]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
In the XML output, list useless and unused symbols and rules with the
[bison.git] / ChangeLog
... / ...
CommitLineData
12007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 In the XML output, list useless and unused symbols and rules with the
4 useful ones and add a "usefulness" attribute. Discussed starting at
5 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
6 * src/gram.c (grammar_rules_partial_print_xml): Remove.
7 (grammar_rules_print_xml): Print all rules instead of just those
8 useful in the grammar, and add a "usefulness" attribute.
9 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
10 * src/print-xml.c (print_rules_useless_in_parser): Remove.
11 (print_grammar): Print all nonterminals instead of just useful ones,
12 and add a "usefulness" attribute to nonterminals and terminals.
13 (print_xml): Don't print a separate "reductions" or
14 "rules-useless-in-parser" element.
15 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
16 (reduce_xml): Remove.
17 (reduce_token_unused_in_grammar): New.
18 (reduce_nonterminal_useless_in_grammar): New.
19 * src/reduce.h (reduce_xml): Remove prototype.
20 (reduce_token_unused_in_grammar): Add prototype.
21 (reduce_nonterminal_useless_in_grammar): Add prototype.
22 * data/xslt/xml2text.xsl: Update for XML changes.
23 * data/xslt/xml2xhtml.xsl: Update for XML changes.
24 * tests/reduce.at (Useless Terminals): Update output.
25 (Useless Rules): Update output.
26 (Reduced Automaton): Update output.
27
28 Say "Terminals unused in grammar" instead of "Unused terminals".
29 * NEWS (2.3a+): Update.
30 * doc/bison.texinfo (Understanding): Update example output.
31 * src/reduce.c (reduce_output): Implement.
32 * data/xslt/xml2text.xsl: Implement.
33 * data/xslt/xml2xhtml.xsl: Implement.
34
352007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
36
37 Accept --report-file=FILE to override the default `.output' filename.
38 * NEWS (2.3a+): Mention.
39 * doc/bison.texinfo (Bison Options): Add an entry.
40 * src/files.c (compute_output_file_names): Don't override
41 spec_verbose_file if already set.
42 * src/getargs.c (usage): Document --report-file.
43 (REPORT_FILE_OPTION): New anonymous enum member.
44 (long_options): Add entry for it.
45 (getargs): Add case for it setting spec_verbose_file.
46
47 * build-aux/cross-options.pl: Don't record a short option just because
48 there's an arg.
49 * doc/.cvsignore: Add yacc.1.
50
512007-11-14 Akim Demaille <akim@epita.fr>
52
53 * doc/yacc.1.in: New.
54 * configure.ac, doc/Makefile.am: Adjust.
55 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
56 config.h symbol.
57 Use AC_SUBST for assignments too.
58 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
59
602007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
61
62 * src/gram.c: Remove comments that duplicate comments in gram.h.
63
64 When reporting useless rules and nonterminals, say "useless in grammar"
65 instead of "useless", and say "useless in parser" instead of "never
66 reduced". Discussed starting at
67 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
68 * NEWS (2.3a+): Mention this change.
69 * data/xslt/xml2text.xsl: Update output text and expected input XML
70 element names to match changes below.
71 * data/xslt/xml2xhtml.xsl: Likewise.
72 (xsl:template match="bison-xml-report"): Add missing entry in Table of
73 Contents: "Rules useless in parser due to conflicts".
74 * doc/bison.texinfo (Decl Summary): Reword a little.
75 (Understanding): Update example output for changes below.
76 * src/gram.c: (rule_useful_p): Rename to...
77 (rule_useful_in_grammar_p): ... this.
78 (rule_useless_p): Rename to...
79 (rule_useless_in_grammar_p): ... this.
80 (rule_never_reduced_p): Rename to...
81 (rule_useless_in_parser_p): ... this.
82 (grammar_rules_print): Update for renames.
83 (grammar_rules_print_xml): Update for renames.
84 (grammar_rules_never_reduced_report): Rename to...
85 (grammar_rules_useless_report): ... this since it is used for either
86 kind of useless rule.
87 * src/gram.h: Reword comments and update function names in prototypes.
88 * src/main.c (main): Say "rule useless in parser due to conflicts".
89 * src/print-xml.c (print_rules_never_reduced): Rename to...
90 (print_rules_useless_in_parser): ... this, and rename output XML
91 element "rules-never-reduced" to "rules-useless-in-parser".
92 (print_xml): Update for rename.
93 * src/print.c (print_results): Say "Rules useless in parser due to
94 conflicts".
95 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
96 (nonterminals_reduce): Say "nonterminal useless in grammar".
97 (reduce_output): Say "Nonterminals useless in grammar".
98 Say "Rules useless in grammar".
99 (reduce_xml): Rename output XML element "useless" to
100 "useless-in-grammar".
101 (reduce_print): Don't report the count of grammatically useless rules
102 as "rules never reduced" just because %yacc is specified.
103 In the correct report of this count, say nonterminal(s) and rule(s)
104 "useless in grammar".
105 * tests/conflicts.at (S/R in initial): Update expected output.
106 (Defaulted Conflicted Reduction): Likewise.
107 (Unreachable States After Conflict Resolution): Likewise.
108 * tests/existing.at (GNU pic Grammar): Likewise.
109 * tests/reduce.at (Useless Nonterminals): Likewise.
110 (Useless Rules): Likewise.
111 (Reduced Automaton): Likewise.
112 (Underivable Rules): Likewise.
113 (Empty Language): Likewise.
114
1152007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
116
117 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
118 here document and before the EOF so that BSD's implementation of Bourne
119 shell doesn't parse the delimiter as part of the here document.
120 * doc/.cvsignore: Add cross-options.texi.
121 * src/getargs.c (usage): Add a blank line after the warning categories.
122
1232007-11-08 Paolo Bonzini <bonzini@gnu.org>
124
125 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
126
1272007-11-05 Akim Demaille <akim@epita.fr>
128
129 Remove Id: from bison.1.
130 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
131 (perl -0777 -pi -e 's/\.PP\nId): New.
132 (.x.1): Use it to ignore the version control revision.
133
1342007-11-05 Akim Demaille <demaille@gostai.com>
135
136 * build-aux/Makefile.am: Ship cross-options.pl.
137 * doc/Makefile.am: Always refer to cross-options.texi with
138 $(srcdir).
139 (MAINTAINERCLEANFILES): Add it.
140
1412007-11-04 Akim Demaille <demaille@gostai.com>
142
143 Generate the long/short option cross-table.
144 * build-aux/cross-options.pl: New.
145 * doc/Makefile.am (cross-options.texi): New.
146 * doc/bison.texinfo: Use it.
147
1482007-11-04 Akim Demaille <demaille@gostai.com>
149
150 Generate bison.1 using help2man.
151 * doc/common.x, doc/bison.x: New.
152 * doc/Makefile.am (bison.1, .x.1): New.
153 The code is taken from autoconf-2.61/man/Makefile.am.
154 * configure.ac: Look for help2man.
155
1562007-11-04 Akim Demaille <demaille@gostai.com>
157
158 Complete --help.
159 * src/getargs.c (usage): Document -W, make it clear that -d,
160 -g and -x have optional arguments.
161
1622007-11-04 Akim Demaille <demaille@gostai.com>
163
164 Find sha1sum when named gsha1sum.
165 * bootstrap (find_tool): New.
166 ($SHA1SUM): New.
167
1682007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
169
170 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
171 at
172 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
173 * NEWS (2.3a+): Mention.
174 * data/bison.m4 (b4_pure_if): Don't define it here.
175 * data/c.m4 (b4_identification): Depend on individual skeletons to
176 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
177 values of the %define variables api.pure or api.push_pull. Define
178 YYPURE, YYPUSH, and YYPULL accordingly.
179 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
180 glr.cc has already defined b4_pure_flag.
181 * data/push.c: Define b4_pure_if based on `%define api.pure'.
182 Remove YYPUSH and YYPULL since they're back in b4_identification again.
183 * data/yacc.c Define b4_pure_if based on `%define api.pure'.
184 * doc/bison.texinfo (Pure Decl): Update.
185 (Push Decl): Update.
186 (Decl Summary): Add api.pure to %define entry.
187 In %pure-parser entry, say it's deprecated and reference %define.
188 (Pure Calling): Update.
189 (Error Reporting): Update.
190 (C++ Scanner Interface): Update.
191 (How Can I Reset the Parser): Update.
192 (Table of Symbols): In %pure-parser entry, say it's deprecated and
193 reference %define.
194 * src/getargs.c (pure_parser): Remove global variable.
195 * src/getargs.h (pure_parser): Remove extern.
196 * src/output.c (prepare): Don't define pure_flag muscle.
197 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
198 wrapper around `%define api.pure'.
199 * tests/calc.at (Simple LALR Calculator): Update.
200 (Simple GLR Calculator): Update.
201 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
202 Update.
203 (GLR: Resolve ambiguity, pure, locations): Update.
204 (GLR: Merge conflicting parses, pure, no locations): Update.
205 (GLR: Merge conflicting parses, pure, locations): Update.
206 * tests/glr-regression.at (Uninitialized location when reporting
207 ambiguity): Update
208 * tests/input.at (Unused %define api.pure): New test case.
209 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
210 AT_PURE_IF and AT_PURE_AND_LOC_IF.
211 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
212
2132007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
214
215 %define push_pull -> %define api.push_pull. Discussed starting at
216 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
217 * data/push.c: Expect the new name.
218 * data/yacc.c: Likewise.
219 * doc/bison.texinfo (Push Decl): Update.
220 (Decl Summary): Update %define entry.
221 (Push Parser Function): Update.
222 (Pull Parser Function): Update.
223 (Parser Create Function): Update.
224 (Parser Delete Function): Update.
225 * tests/calc.at (Simple LALR Calculator): Update.
226 * tests/input.at (%define enum variables): Update.
227 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
228 (Push Parsing: Multiple impure instances): Update.
229 (Push Parsing: Unsupported Skeletons): Update.
230 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
231 (Exploding the Stack Size with Malloc): Update.
232
233 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
234 other entries some.
235
2362007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
237
238 For the XML output's terminal element, rename @number to @token-number,
239 and add @symbol-number. In the nonterminal element, rename @number to
240 @symbol-number. Discussed starting at
241 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
242 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
243 renames.
244 (xsl:template match="nonterminal"): Likewise.
245 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
246 (xsl:template match="nonterminal"): Likewise.
247 * src/print-xml.c (print_grammar): Implement.
248
2492007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
250
251 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
252 2007-10-11 change, the child elements here are items not rules.
253 (<xsl:template match="item"): New.
254 (xsl:template match="rule"): Update for new reduced itemset.
255 (xsl:template match="point"): Remove.
256 (xsl:template match="empty"): For consistency with --graph, don't
257 output "/* empty */".
258 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
259 line-wrap, don't pass a negative value as first-line-length since this
260 won't work with the following changes.
261 (xsl:template name="line-wrap"): Simplify slightly.
262 (xsl:template name="ws-search"): Eliminate recursion.
263 * src/print_graph.c (print_core): Don't print a reduction's lookahead
264 set next to an item whose dot is not at the end of the RHS even if it
265 happens to be associated with the same rule.
266
2672007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
268
269 Add %define lr.keep_unreachable_states.
270 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
271 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
272 * src/main.c (main): Implement it.
273 * tests/conflicts.at (Unreachable States After Conflict Resolution):
274 Extend to test it, and fix a typo.
275
2762007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
277
278 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
279 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
280 the example .output text.
281 * tests/regression.at (Extra lookahead sets in report): Improve wording
282 of comments.
283
2842007-10-17 Wojciech Polak <polak@gnu.org>
285
286 * src/print-xml.c (print_grammar): Renamed
287 <terminal> and <nonterminal> attributes:
288 "type" to "number" and "symbol" to "name".
289 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
290 Use new attribute names.
291 (xsl:template match="nonterminal"): Likewise.
292 * data/xslt/xml2xhtml.xsl: Likewise.
293
2942007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
295
296 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
297 (Option Cross Key): Likewise.
298
299 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
300 next to an item whose dot is not at the end of the RHS even if it
301 happens to be associated with the same rule.
302 * src/print.c (print_core): Likewise.
303 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
304 (Resolved SR Conflicts): Update output.
305 * tests/regression.at (Extra lookahead sets in report): New test case.
306
3072007-10-11 Wojciech Polak <polak@gnu.org>
308
309 * src/print-xml.c (print_core): Remove item set
310 redundancy.
311 * data/xslt/bison.xsl (bison:ruleNumber): New key.
312 Improve processing time. Suggested by Joel E. Denny.
313 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
314 Write xsl:param "required" attribute as comment.
315 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
316 (xsl:template match="rule"): Support new reduced itemset.
317 (xsl:template match="point"): Remove.
318 * data/xslt/xml2xhtml.xsl: Likewise.
319
3202007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
321
322 * src/getargs.c (version): Update copyright year.
323
3242007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
325
326 Make xml2dot.xsl and --graph produce the same output.
327 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
328 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
329 escaped later.
330 (xsl:template name="output-node"): Use the new escape template instead
331 of the string-replace template directly.
332 (xsl:template name="output-edge"): Likewise.
333 (xsl:template name="escape"): New, escapes backslashes and newlines in
334 addition to quotation marks.
335 * src/graphviz.c (start_graph, output_node, output_edge): Add
336 whitespace to output for legibility.
337
338 Make xml2text.xsl and --report produce the same output, and remove the
339 XML "conflicts" element since a conflict summary is easily extracted
340 from the automaton.
341 * data/xslt/bison.xsl: New.
342 (xsl:template match="state" mode="bison:count-conflicts): New.
343 * data/xslt/xml2text.xsl: Import bison.xsl.
344 (xsl:template match="bison-xml-report"): Instead of styling the
345 "conflicts" element, style the "automaton" element with mode
346 "conflicts". Unlike the former, the latter lists S/R and R/R
347 conflicts for a state on the same line.
348 (xsl:template match="conflicts"): Remove.
349 (xsl:template match="conflict"): Remove.
350 (xsl:template match="terminal"): Line-wrap the list of rules in which
351 the terminal is used.
352 (xsl:template match="nonterminal"): Likewise for nonterminals.
353 (xsl:template match="automaton" mode="conflicts"): New.
354 (xsl:template match="state" mode="conflicts"): New.
355 (xsl:template name="line-wrap"): New.
356 (xsl:template name="ws-search"): New.
357 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
358 (xsl:template match="bison-xml-report"): Instead of styling the
359 "conflicts" element, style the "automaton" element with mode
360 "conflicts."
361 (xsl:template match="conflicts"): Remove.
362 (xsl:template match="conflict"): Remove.
363 (xsl:template match="automaton" mode="conflicts"): New.
364 (xsl:template match="state" mode="conflicts): New.
365 * src/conflicts.c (conflicts_output_xml): Remove.
366 * src/conflicts.h (conflicts_output_xml): Remove prototype.
367 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
368 * src/print.c (print_grammar): Consistently wrap at the 66th column so
369 the corresponding XSLT is easier. Also, never wrap between a word and
370 the comma that follows it.
371
3722007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
373
374 Improve C++ namespace support. Discussed starting at
375 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
376 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
377 b4_namespace_close): New macros that interpret the %define variable
378 "namespace" so its value can contain "::" to indicate nested
379 namespaces.
380 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
381 the above macros.
382 * data/lalr1.cc (b4_namespace): Likewise.
383 * data/location.cc (b4_namespace): Likewise.
384 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
385 inside a new table in the general %define entry. Document `%define
386 namespace' there as well. Point the %name-prefix entry to it since it
387 explains it more completely in the case of C++.
388 (C++ Bison Interface): Mention `%define namespace' instead of
389 %name-prefix.
390 (Table of Symbols): Remove the `%define push_pull' entry. The %define
391 entry suffices.
392 * tests/c++.at (Relative namespace references): New test case.
393 (Absolute namespace references): New test case.
394 (Syntactically invalid namespace references): New test case.
395 * tests/input.at (C++ namespace reference errors): New test case.
396
3972007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
398
399 Add syncline support and location accessor to internal %define
400 interfaces.
401 * data/bison.m4 (b4_percent_define_get_loc): New.
402 (b4_percent_define_get_syncline): New.
403 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
404 (b4_percent_define_default): Record defining location as line 1 rather
405 than 0 for the sake of synchronizing #line's, and define
406 b4_percent_define_syncline(VARIABLE).
407 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
408 * src/muscle_tab.c (muscle_syncline_grow): New.
409 (muscle_code_grow): Use muscle_syncline_grow.
410 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
411 define b4_percent_define_syncline(VARIABLE).
412 (muscle_percent_define_get_loc): New.
413 (muscle_percent_define_get_syncline): New.
414 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
415 remove some unused variables.
416 (muscle_percent_define_default): Record defining location as line 1
417 rather than 0 for the sake of synchronizing #line's, and define
418 b4_percent_define_syncline(VARIABLE).
419 (muscle_percent_define_check_values): Use
420 muscle_percent_define_get_loc.
421 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
422 (muscle_percent_define_get_syncline): Prototype.
423 * tests/skeletons.at (%define Boolean variables: invalid skeleton
424 defaults): Update output for location change.
425 (Complaining during macro argument expansion): Extend to test
426 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
427
4282007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
429
430 Fix some error-reporting macro bugs.
431 * data/bison.m4 (b4_cat): New.
432 (b4_error, b4_error_at): Use b4_cat to send error directives directly
433 to stdout so they don't become arguments to other macros. Update
434 comments and add examples.
435 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
436 add examples.
437 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
438 after printing the error directive so that M4 doesn't report subsequent
439 problems that are induced by this problem.
440 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
441 instead of just in them. Recognize @\n in both places. Both expand to
442 the empty string. Needed by b4_cat.
443 * tests/skeletons.at (Complaining during macro argument expansion):
444 New test case.
445 (Fatal errors make M4 exit immediately): New test case.
446
4472007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
448
449 Implement --print-datadir.
450 * src/getargs.c (usage): Mention.
451 (PRINT_DATADIR_OPTION): New anonymous enum member.
452 (long_options): Add entry for it.
453 (getargs): Add case for it calling compute_pkgdatadir.
454 * src/output.c (output_skeleton): Encapsulate data directory
455 computation from here...
456 (prepare): ... and from here...
457 (compute_pkgdatadir): ... into this new function.
458 * src/output.h (compute_pkgdatadir): Prototype.
459
4602007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
461
462 * src/print-xml.c (escape_bufs): New static global variable
463 replacing...
464 (xml_escape_n): ... the static local variable buf here.
465 (print_xml): Free memory for escape_bufs.
466 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
467
4682007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
469
470 Replace `%push-parser' and `%push-pull-parser' with
471 `%define push_pull "push"' and `%define push_pull "both"'.
472 `%define push_pull "pull"' is the default.
473 * doc/bison.texinfo (Push Decl, Push Parser Function,
474 Pull Parser Function, Parser Create Function, Parser Delete Function):
475 Update declarations.
476 (Decl Summary, Table of Symbols): Replace %push-parser and
477 %push-pull-parser entries with a %define push_pull entry.
478 * data/bison.m4 (b4_percent_define_check_values): New macro.
479 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
480 definitions...
481 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
482 definitions...
483 * data/push.c: ... to here and compute them from the value of the
484 %define variable push_pull.
485 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
486 parsing requests here...
487 * data/yacc.c: ... hack this to switch to push.c any time
488 b4_use_push_pull_flag or the %define variable push_pull is set. This
489 will go away when we mv push.c yacc.c.
490 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
491 push parsing is not supported since unused %define variables are
492 reported anyway.
493 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
494 * src/muscle_tab.h (muscle_percent_define_check_values): Update
495 comments for consistency with b4_percent_define_check_values.
496 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
497 muscles.
498 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
499 Remove.
500 (prologue_declaration): Remove %push-parser and %push-pull-parser
501 rules.
502 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
503 * tests/calc.at: Update declarations.
504 * tests/input.at (%define enum variables): New test case.
505 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
506 declaration.
507 (Push Parsing: Multiple impure instances): Update declaration.
508 (Push Parsing: Unsupported Skeletons): New test case.
509 * tests/torture.at (Exploding the Stack Size with Alloca): Update
510 declaration.
511 (Exploding the Stack Size with Malloc): Update declaration.
512
5132007-09-24 Wojciech Polak <polak@gnu.org>
514
515 Add XSLT transformations.
516
517 * data/xslt/xml2dot.xsl: Transform XML into DOT.
518 * data/xslt/xml2text.xsl: Transform XML into plain text.
519 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
520 * data/Makefile.am (xsltdir): New variable.
521 (dist_xslt_DATA): Add xslt/*.xsl files.
522
5232007-09-23 Paul Eggert <eggert@cs.ucla.edu>
524
525 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
526 Problem reported by Wojciech Polak.
527 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
528 (xml_printf): Undo change I made on 21 September; that is,
529 indent 2 spaces, not 1.
530
5312007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
532
533 Pacify ./configure --enable-gcc-warnings.
534 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
535 `char const *' instead of `char *'.
536 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
537 local variable `sep'.
538
5392007-09-21 Paul Eggert <eggert@cs.ucla.edu>
540
541 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
542 elsewhere.
543 * src/print-xml.c: Prefer "const" after types; that's more consistent.
544 (xml_printf): Indent just 1 space for level.
545 (e_char, xlate_char): Remove.
546 (xml_escape_string): Rewrite to avoid undefined behavior (used
547 storage that was freed from the stack).
548 (xml_escape_n): Don't bother checking for subscript error.
549
5502007-09-21 Wojciech Polak <polak@gnu.org>
551
552 Add Bison XML Automaton Report.
553
554 Add support for an -x option to generate an XML report.
555 It is not documented yet.
556 * src/print-xml.c: New file.
557 * src/print-xml.h: Likewise.
558 * lib/timevar.def (TV_XML): New var.
559 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
560 * src/conflicts.c: Include print-xml.h.
561 (solved_conflicts_xml_obstack): New var.
562 (log_resolution, conflicts_solve, conflicts_free):
563 Add support for XML report.
564 (conflicts_output_val): New function.
565 * src/conflicts.h (conflicts_output_val): New decl.
566 * src/files.c (spec_xml_file): New var.
567 (compute_output_file_names, output_file_names_free): Add XML support.
568 * src/files.h (spec_xml_file): New decl.
569 * src/getargs.c (xml_flag): New var.
570 (usage, short_options, long_options, getargs): Add XML support.
571 * src/getargs.h (xml_flag): New decl.
572 * src/gram.c: Include print-xml.h.
573 (rule_lhs_print_xml, rule_rhs_print_xml):
574 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
575 New functions.
576 * src/gram.h: Declare external ones.
577 * src/main.c: Include print-xml.h.
578 (main): Add XML support.
579 * src/reduce.c: Include print-xml.h.
580 (reduce_xml): New function.
581 * src/reduce.h: Declare it.
582 * src/state.c: Include print-xml.h.
583 (state_new): Add XML support.
584 (state_rule_lookahead_tokens_print_xml): New function.
585 * src/state.h: Declare it.
586 (struct state): New member solved_conflicts_xml.
587 * src/symtab.c (symbol_class_get_string): New function.
588 * src/symtab.h: Declare it.
589
5902007-09-21 Paul Eggert <eggert@cs.ucla.edu>
591
592 * GNUmakefile: Switch to coreutils's version.
593 * bootstrap: Likewise.
594 * Makefile.cfg: Adjust to new GNUmakefile.
595 * README-hacking: Likewise.
596
597 Import from gnulib:
598
599 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
600 Bruno Haible <bruno@clisp.org>
601
602 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
603 and is a script that invokes bison. Tighten the code. Add comments.
604
6052007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
606
607 Spell "boolean" as "Boolean". Reported by Akim Demaille.
608 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
609 * doc/bison.texinfo (Decl Summary): Fix.
610 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
611 * tests/input.at (Boolean %define variables): Update output.
612 * tests/skeletons.at (%define boolean variables: invalid skeleton
613 defaults): Rename to...
614 (%define Boolean variables: invalid skeleton defaults): ... this and
615 update output.
616
6172007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
618
619 In impure push mode, don't allow more than one yypstate to be allocated
620 since multiple impure parsers would corrupt yynerrs.
621 * data/push.c (yypstate_allocated): New static global variable
622 initialized to 0.
623 (yypull_parse): If yypstate_new returns 0, don't report it as memory
624 exhaustion if yypstate_allocated is 1, but still return 2.
625 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
626 already 1. Otherwise, set it to 1.
627 (yypstate_delete): Set it to 0.
628 * tests/push.at (Push Parsing: Multiple impure instances): New test
629 case.
630
6312007-08-17 Bob Rossi <bob@brasko.net>
632
633 * doc/bison.texinfo (Push Decl): Document the push parser.
634 (Table of Symbols): Ditto.
635 (Pure Decl): Ditto.
636 (Decl Summary): Ditto.
637 (Multiple Parsers, Push Parser Function, Pull Parser Function,
638 Parser Create Function, Parser Delete Function):
639 Add new push parser symbols.
640 (Table of Symbols): Document push-parser, push-pull-parser,
641 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
642
6432007-08-15 Paul Eggert <eggert@cs.ucla.edu>
644
645 Update to GPLv3.
646 * doc/gpl-3.0.texi: New file.
647 * doc/gpl.texi: Remove.
648 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
649 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
650 * README-hacking, TODO, bootstrap, bootstrap.conf:
651 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
652 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
653 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
654 * data/lalr1.cc, data/lalr1.java, data/location.cc:
655 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
656 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
657 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
658 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
659 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
660 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
661 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
662 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
663 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
664 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
665 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
666 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
667 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
668 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
669 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
670 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
671 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
672 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
673 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
674 * src/complain.c, src/complain.h, src/conflicts.c:
675 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
676 * src/files.h, src/flex-scanner.h, src/getargs.c:
677 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
678 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
679 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
680 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
681 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
682 * src/print.c, src/print.h, src/print_graph.c:
683 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
684 * src/reduce.h, src/relation.c, src/relation.h:
685 * src/revision.h, src/scan-code.h, src/scan-code.l:
686 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
687 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
688 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
689 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
690 * tests/Makefile.am, tests/actions.at, tests/c++.at:
691 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
692 * tests/existing.at, tests/glr-regression.at:
693 * tests/headers.at, tests/input.at, tests/java.at:
694 * tests/local.at, tests/output.at, tests/push.at:
695 * tests/reduce.at, tests/regression.at, tests/sets.at:
696 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
697 * tests/torture.at:
698 Update to GPLv3.
699
7002007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
701
702 Get rid of broken %no-parser, -n, and --no-parser implementation and
703 documentation.
704 * TODO: Don't mention them.
705 * doc/bison.1: Likewise.
706 * doc/bison.texinfo (Decl Summary): Likewise.
707 (Bison Options): Likewise.
708 (Option Cross Key): Likewise.
709 * src/getargs.c (no_parser_flag): Remove global variable.
710 (usage): Don't print description of -n and --no-parser.
711 (long_options): Remove --no-parser entry here.
712 (getargs): Remove -n case in the switch here.
713 * src/getargs.h (no_parser_flag): Remove extern.
714 * tests/regression.at (Web2c Actions): Remove comment that mentions
715 --no-parser.
716
7172007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
718
719 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
720 name user variables starting with `yy'. Just pass NULL instead of a
721 dummy local &yylval to yypush_parse.
722 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
723 starting with `yy'.
724
7252007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
726
727 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
728 true since it's then always used regardless of whether yyoverflow is
729 defined. Reported by Christian Burger at
730 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
731 * THANKS: Add Christian Burger.
732
733 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
734 node names: say "Decl Summary" not "Bison Declaration Summary".
735
7362007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
737
738 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
739 determine whether this function has already complained about an invalid
740 value for a %define boolean variable, don't check whether Bison has
741 ever examined the value. As written, the check was a tautology.
742 Instead, record and check for this complaint using a separate muscle.
743
7442007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
745
746 Fix push parsing memory leak reported by Brandon Lucia at
747 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
748 * THANKS: Add Brandon Lucia.
749 * data/push.c (yypstate_delete): Free the stack if it was reallocated
750 but the parse never completed and thus freed it.
751 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
752 * tests/testsuite.at: Include push.at.
753 * test/push.at: New.
754 (Push Parsing: Memory Leak for Early Deletion): New test case.
755
7562007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
757
758 Improve handling of multiple S/R conflicts in the same state and of S/R
759 conflicts involving multiple reductions.
760 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
761 set for a state here or Bison will abort if it is reassigned on a
762 later conflicted reduction in the same state.
763 Similarly, don't finalize and assign the solved conflicts report here
764 or it will be lost if it is reassigned on a later conflicted reduction
765 in the same state.
766 (set_conflicts): Instead, assign them both here after all S/R conflicts
767 in the state have been fully examined.
768 * src/print.c (shift_set): Rename to...
769 (no_reduce_set): ... this.
770 (print_reductions): Update for rename, and add %nonassoc error action
771 tokens to no_reduce_set so that, when printing the first remaining
772 reduction on an error action token, the reduction is enclosed in
773 brackets.
774 (print_results): Update for rename.
775 * tests/conflicts.at (Solved conflicts report for multiple reductions
776 in a state): New test case.
777 (%nonassoc error actions for multiple reductions in a state): New test
778 case.
779
780 * src/main.c (main): Don't depend on C99 features.
781
7822007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
783
784 * build-aux/.cvsignore: Add compile.
785 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
786 uniwidth.
787
7882007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
789
790 * bootstrap (slurp): Create target directories that don't exist.
791 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
792
7932007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
794
795 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
796 than item number.
797 * closure.c (closure): Likewise.
798 * state.h (reductions): Comment sorting of rules.
799 (state): Comment sorting of items.
800
8012007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
802
803 Fix C++ test cases after recent Gnulib changes. Discussed starting at
804 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
805 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
806 definition in order to avoid Gnulib headers since we don't use config.h
807 here.
808 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
809 rather than AT_DATA so that config.h is included.
810
8112007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
812
813 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
814 instead of fprintf. Guard these functions with #if YYDEBUG instead of
815 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
816 and so that YYFPRINTF is guaranteed to be defined here.
817
8182007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
819
820 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
821 with...
822 (muscle_percent_define_check_values): ... this more helpful function.
823 Again, it's not used yet, but it will be.
824 * src/muscle_tab.h: Likewise.
825
826 Improve some comments in parser table construction.
827 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
828 (generate_states): Don't mention ruleset, which is internal to closure.
829 * src/closure.c (closure): Explain sorting of core and itemset, which
830 is required for this function to behave correctly.
831 * src/closure.h (closure): Mention sorting.
832
8332007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
834
835 * src/lalr.c (state_lookahead_tokens_count): For code readability,
836 move the check for disabled transitions to an aver since conflict
837 resolution hasn't happened yet.
838
839 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
840 labels a state as inconsistent just because it has error transitions.
841 The original form of this check appeared in revision 1.1 of lalr.c,
842 which was committed on 1991-12-21. Now (at least), changing the
843 consistency label on such a state appears to have no useful effect in
844 any of the places it is examined, which I enumerate below. The key
845 point to understanding each item in this enumeration is that a state
846 with an error transition is labelled consistent in the first place only
847 if it has no rules, so the check cannot matter for states that have
848 rules. (1) Labelling a state as inconsistent will cause set_conflicts
849 to try to identify its conflicts, and a state must have *rules* to have
850 conflicts. (2) Labelling a state as inconsistent will affect how
851 action_row sets the default *rule* for the state. (3) Labelling a
852 state as inconsistent will cause build_relations to add lookback edges
853 to *rules* in that state.
854 * src/state.h (struct state): Word the comment for member consistent
855 more carefully.
856
8572007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
858
859 Don't depend on C99 features.
860 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
861 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
862 * src/reader.c (check_and_convert_grammar): Fix for-loop.
863 * src/state.c (state_mark_reachable_states): Fix for-loop.
864 (state_remove_unreachable_states): Fix for-loop.
865
866 Don't widen struct state with member reachable just to temporarily
867 record reachability. Instead, use a local bitset.
868 * src/state.h (struct state): Remove member.
869 * src/state.c (state_new): Don't initialize it.
870 (state_mark_reachable_states): Rename to...
871 (state_record_reachable_states): ... this, and use bitset.
872 (state_remove_unreachable_states): Use bitset.
873
8742007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
875
876 * src/Makefile.am (yacc): Quote target action commands properly so
877 that the yacc script isn't corrupt. Reported by Hans Aberg at
878 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
879
880 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
881 the case of pure parsers. Reported by Frans Englich at
882 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
883 * THANKS: Add Frans Englich.
884
885 * NEWS (2.3a+): In the %code entry, reference section `Bison
886 Declaration Summary' from the manual now since the %code summary has
887 moved there.
888 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
889 in the rules section must be terminated by semicolons.
890
8912007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
892
893 Extend the front-end API for %define variables to more completely
894 mirror the back-end. This will be useful in the future.
895 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
896 Update comments to mention the new front-end counterparts of these
897 macros.
898 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
899 for muscle_string_decode and muscle_location_decode.
900 (muscle_string_decode): New static function.
901 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
902 (muscle_percent_define_get, muscle_percent_define_ifdef): New
903 functions.
904 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
905 muscle_percent_define_get to mimic the b4_percent_define_flag_if
906 implementation more closely.
907 (muscle_percent_define_invalid_value): New function.
908 * src/muscle_tab.h (muscle_percent_define_get,
909 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
910 Prototype.
911
9122007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
913
914 * NEWS (2.3a+): Mention yesterday's state-removal change.
915 (2.3a): Remove the %language entry, which was added after 2.3a.
916 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
917 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
918 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
919 tests/existing.at: Update copyright date.
920
9212007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
922
923 If conflict resolution makes states unreachable, remove those states,
924 report rules that are then unused, and don't report conflicts in those
925 states.
926 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
927 New global function.
928 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
929 function.
930 * src/main.c (main): After conflict resolution, remove the unreachable
931 states and update all data structures that reference states by number.
932 * src/state.c (state_new): Initialize each state's reachable member to
933 false.
934 (state_mark_reachable_states): New static function.
935 (state_remove_unreachable_states): New global function.
936 * src/state.h (struct state): Add member bool reachable.
937 (state_remove_unreachable_states): Prototype.
938 * tests/conflicts.at (Unreachable States After Conflict Resolution):
939 New test case.
940 * tests/existing.at (GNU pic Grammar): Update test case output now that
941 an unused rule is discovered.
942
9432007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
944
945 Minor code cleanup in parser table construction.
946 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
947 (new_itemsets, save_reductions): Update for rename to nitemset.
948 * src/closure.c (nritemset): Rename to...
949 (nitemset): ... this since the "r" appears to meaningless and isn't
950 used in the comments.
951 (closure): Update for rename.
952 * src/closure.h (nritemset): Update extern to...
953 (nitemset): ... this.
954 * src/lalr.c (LA): Fix a typo in comments.
955 * src/print.c (print_core): Update for rename to nitemset.
956 * src/print_graph.c (print_graph): Likewise.
957 * src/state.h: Fix some typos in header comments.
958
9592007-04-04 Paul Eggert <eggert@cs.ucla.edu>
960
961 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
962 still sticks to ASCII. Sorry!
963
964 * README-hacking: New file, taken mostly from coreutils, with changes
965 for Bison. Contains much of the contents of:
966 * README-cvs: Remove.
967 * bootstrap: Sync from gnulib.
968 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
969 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
970
9712007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
972
973 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
974 Setzer.
975 (Java Differences): Fix some typos.
976 * THANKS: Add Sebastian Setzer.
977
9782007-03-07 Paolo Bonzini <bonzini@gnu.org>
979
980 * data/java.m4 (b4_single_class_if): Remove.
981 (b4_abstract_if): Look at "%define abstract".
982 (b4_lexer_if): New.
983 (b4_union_name): Rename...
984 (b4_yystype): ... to this. Map to "%define stype".
985 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
986 b4_maybe_throws): Fix quoting.
987 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
988 * data/lalr1.java (Lexer interface): Always define.
989 (Lexer interface within parser class): Remove.
990 (YYLexer class): New, used when "%code lexer" is present.
991 (constructor): When "%code lexer" is used, pass %lex-param
992 to the lexer constructor.
993 (yylex, yyparse): Remove %lex-param from method invocations
994 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
995
996 * doc/bison.texinfo (Java Bison Interface): Mention "%define
997 abstract". Rename "%define union_name" to "%define stype".
998 Rename method names according to previous patch.
999 (Java Scanner Interface): Describe "%code lexer" instead of
1000 "%pure-parser" and "%define single_class".
1001 (Java Differences): Mention "%code lexer".
1002
1003 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1004 Include scanner here, using macros from tests/local.at.
1005 (AT_DATA_CALC_Y): Remove final argument.
1006 (_AT_CHECK_JAVA_CALC): Likewise.
1007 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1008 of %locations and %error-verbose.
1009 (main): Test with and without %lex-param.
1010 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1011 (AT_BISON_OPTION_POPDEFS): Pop it.
1012
10132007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1014
1015 DJGPP spefic issue. Inhibit the use of disallowed characters for
1016 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1017 and concern testsuite case 46.
1018 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1019 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1020 * djgpp/config.bat: Inhibit the use of disallowed characters.
1021
10222007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1023
1024 Miscellaneous %define and %code cleanup.
1025 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1026 values are interpreted.
1027 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1028 documentation a little more.
1029 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1030 muscle_percent_define_insert, muscle_percent_code_grow): New
1031 functions/macros.
1032 * src/muscle_tab.h (muscle_percent_define_insert,
1033 muscle_percent_code_grow): Prototype.
1034 * src/parse-gram.y (prologue_declaration): Use
1035 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1036 %define and %code directives.
1037
1038 Make it easy to share %define boolean variables between the front-end
1039 and back-end. Though not used yet, this will be useful in the future.
1040 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1041 Bison uses of names rather than just skeleton uses of names.
1042 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1043 b4_percent_define_skeleton_variables(VARIABLE) to
1044 b4_percent_define_bison_variables(VARIABLE).
1045 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1046 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1047 b4_percent_code_bison_qualifiers(QUALIFIER).
1048 (b4_check_user_names_wrap): Update for renames.
1049 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1050 muscle_percent_define_default): New functions mimicking
1051 b4_percent_define_flag_if and b4_percent_define_default.
1052
1053 For %define variables, report locations for invalid values and
1054 redefinitions.
1055 * data/bison.m4 (b4_percent_define_flag_if): Read
1056 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1057 value for VARIABLE.
1058 (b4_percent_define_default): Save a special location in
1059 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1060 must later be reported as invalid.
1061 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1062 functions.
1063 (muscle_percent_define_insert): Record the location of VARIABLE in
1064 muscle percent_define_loc(VARIABLE), and use it to report the previous
1065 location for a redefinition.
1066 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1067 (muscle_percent_define_default): Update like b4_percent_define_default.
1068 (muscle_grow_user_name_list): Rename to...
1069 (muscle_user_name_list_grow): ... this for consistency and use
1070 muscle_location_grow.
1071 * src/muscle_tab.h (muscle_location_grow): Prototype.
1072 * tests/input.at (%define errors): Update expected output.
1073 * tests/skeletons.at (%define boolean variables: invalid skeleton
1074 defaults): New test case.
1075
10762007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1077
1078 * src/print.c (lookahead_set, state_default_rule): Remove.
1079 (print_reductions): Replace state_default_rule invocation with
1080 equivalent use of yydefact, which was computed in token_actions in
1081 tables.c.
1082 (print_results): Don't allocate lookahead_set.
1083
10842007-02-27 Paolo Bonzini <bonzini@gnu.org>
1085
1086 * data/lalr1.java: Prefix all private members with yy.
1087
10882007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1089
1090 Use YYFPRINTF instead of fprintf where appropriate. Reported by
1091 Sebastien Fricker at
1092 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
1093 * THANKS: Add Sebastien Fricker.
1094 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1095 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1096 accept a variable number of arguments.
1097
10982007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1099
1100 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1101
11022007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1103
1104 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1105 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1106 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1107
11082007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1109
1110 Undo my 2007-02-07 change, switching back to the c-strcase module
1111 introduced in the 2007-02-03 change. Bruno Haible reported that
1112 the 2007-02-07 change would be dangerous in Turkish if we add a
1113 language whose name contains "i", since "i" is not lowercase "I"
1114 in Turkish.
1115 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1116 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1117 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1118 * m4/.cvsignore: Remove strcase.m4.
1119 * src/getargs.c: Revert 2007-02-07 change, as follows.
1120 Include c-strcase.h.
1121 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1122
11232007-02-11 Bruno Haible <bruno@clisp.org>
1124
1125 Enable the Java related testsuite tests when the only Java compiler
1126 found is a gcj < 4.3. Discussed at
1127 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1128 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1129
11302007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1131
1132 * data/Makefile.am: Update copyright date.
1133 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1134 yypstate_new returns NULL.
1135 (yypstate_new): Return NULL if malloc does.
1136 * src/reader.c (packgram): Move translation of rule actions from the
1137 beginning of packgram to...
1138 (check_and_convert_grammar): ... here right before packgram is invoked
1139 so it's easier to write more complete comments, and remove redundant
1140 code.
1141
11422007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1143
1144 As in semantic actions, make @$ in %initial-action, %destructor, and
1145 %printer imply %locations.
1146 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1147 scanning @$.
1148 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1149 (@$ in %initial-action implies %locations,
1150 @$ in %destructor implies %locations,
1151 @$ in %printer implies %locations): ... these new test cases.
1152
11532007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1154
1155 Undo most of the 2007-02-03 change, switching to the strcase module
1156 now that gnulib strcase has been fixed.
1157 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1158 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1159 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1160 * m4/.cvsignore: Add strcase.m4.
1161 * src/getargs.c: Revert 2007-02-03 change, as follows.
1162 Don't include c-strcase.h.
1163 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1164 strcasecmp has "unspecified behavior" outside the POSIX locale,
1165 but it works fine in practice if at least one argument is ASCII,
1166 as is the case in Bison.
1167
11682007-02-07 Paolo Bonzini <bonzini@gnu.org>
1169
1170 * tests/java.at: Skip tests if only one of javac/java is present.
1171 Reported by Joel E. Denny.
1172 * tests/atlocal.in: Adjust copyright years.
1173
11742007-02-05 Paolo Bonzini <bonzini@gnu.org>
1175
1176 * data/lalr1.java (Stack): Work around old verifiers that disallow
1177 access to the private fields of an inner class, from the outer class.
1178 We can make Stack's fields public because user code doesn't have access
1179 to the instance of Stack used by parse(). Reported by Paul Eggert.
1180
11812007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1182
1183 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1184 the right spot for these files?
1185 * bootstrap.conf (gnulib_modules): Add c-strcase.
1186 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1187 c-strncasecmp.c.
1188 * src/getargs.c: Include c-strcase.h.
1189 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1190 to avoid unspecified behavior.
1191
11922007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1193
1194 * doc/bison.texinfo (Decl Summary): Correct typo.
1195
11962007-01-30 Paolo Bonzini <bonzini@gnu.org>
1197
1198 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1199 Complain if the value does not match empty, "true" or "false".
1200 * data/c++.m4: Adjust default definitions of %define variables.
1201 * data/java.m4: Adjust default definitions of %define variables.
1202 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1203 to above behavior.
1204 * tests/input.at (Boolean %define variables): Test new behavior.
1205
12062007-01-29 Paolo Bonzini <bonzini@gnu.org>
1207
1208 * NEWS: Mention java.
1209 * TODO: Remove things that are done.
1210 * bootstrap.conf: Add javacomp-script and javaexec-script.
1211 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1212
1213 * data/Makefile.am: Add new files.
1214 * data/java-skel.m4: New.
1215 * data/java.m4: New.
1216 * data/lalr1.java: New.
1217
1218 * doc/bison.texinfo: Put "A Complete C++ Example" under
1219 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1220 under Other Languages.
1221
1222 * src/getargs.c (valid_languages): Add Java.
1223 * src/getargs.h (struct bison_language): Update size of string fields.
1224
1225 * tests/Makefile.am: Add java.at.
1226 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1227 * tests/java.at: New.
1228 * tests/testsuite.at: Include it.
1229
12302007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1231
1232 Clean up.
1233 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1234 at_directive_argv arguments so these no longer have to be global
1235 variables. Also, update the implementation for the following changes.
1236 (fail_for_at_directive_too_many_args,
1237 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1238 (at_directive_name): Remove as at_directive_argv[0] will be used for
1239 this now.
1240 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1241 for the directive name.
1242 (at_directive_argc, at_directive_argv): Make these local within
1243 skel_lex instead of global.
1244 (INITIAL): Update directive start action for above changes.
1245 (SC_AT_DIRECTIVE_ARG): Rename to...
1246 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1247 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1248 (scan_skel): Move yylex_destroy to...
1249 (skel_scanner_free): ... here.
1250 * tests/skeletons.at (installed skeleton file name): Rename to...
1251 (installed skeleton file names): ... this.
1252
12532007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1254
1255 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1256 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1257 Summary" not "Directives".
1258 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1259 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1260 since the former is now the more complete one.
1261 (Prologue Alternatives): Likewise and do the same for %defines.
1262 (Table of Symbols): Add summary of %code, add summary of %define, and
1263 move full %code documentation to...
1264 (Decl Summary): ... here for consistency with other entries in these
1265 sections.
1266 Move %define entry in order to keep this list alphabetized.
1267 Reword %define entry a little to put less emphasis on the skeleton
1268 concept, which most users shouldn't have to think about.
1269
12702007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1271
1272 Adjust to recent gnulib changes.
1273 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1274 Add string.h, string_.h, unistd_.h, wchar_.h.
1275 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1276 * src/system.h: Don't include <stpcpy.h>; this is now done by
1277 <string.h>.
1278
12792007-01-23 Paolo Bonzini <bonzini@gnu.org>
1280
1281 Simplify implementation of unqualified %code, implement macros for
1282 uniform treatment of boolean %define flags. Document %define.
1283 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1284 b4_percent_code_ifdef): New.
1285 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1286 * data/c++.m4: Define default value for global_tokens_and_yystype.
1287 * data/glr.cc: Likewise.
1288 * data/location.cc: Use b4_percent_define_flag_if.
1289
1290 * doc/bison.texinfo (Decl Summary): Document %define.
1291
1292 * src/parse-gram.y (Unqualified %code): Change muscle name to
1293 b4_percent_code().
1294 (content.opt): Default to empty.
1295
12962007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1297
1298 Implement support for relative and absolute skeleton file names.
1299 Discussed starting at
1300 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1301 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1302 (Bison Options): Document in --skeleton entry.
1303 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1304 full_skeleton can't necessarily hold all of pkgdatadir.
1305 If the specified skeleton file name contains a `/', don't prepend
1306 pkgdatadir.
1307 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1308 file name contains a `/', prepend the grammar file directory.
1309 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1310 * skeletons.at: New file.
1311 (relative skeleton file names): New test case.
1312 (installed skeleton file names): New test case.
1313 * tests/testsuite.at: Include skeletons.at.
1314
1315 * bootstrap: Update copyright to 2007.
1316
13172007-01-17 Paolo Bonzini <bonzini@gnu.org>
1318
1319 * bootstrap: Remove occurrences of .#bootmp from the files.
1320
13212007-01-17 Akim Demaille <akim@epita.fr>
1322
1323 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1324 nonterminals.
1325 Use per-type %printer.
1326
13272007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1328
1329 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1330 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1331 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1332 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1333 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1334 tests/glr-regression.at, tests/input.at, tests/local.at,
1335 tests/output.at, tests/torture.at: Update copyright to 2007.
1336
13372007-01-16 Akim Demaille <akim@epita.fr>
1338
1339 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1340 error code.
1341 (Calc++ Scanner): Exit with failure if we can't open the input
1342 file.
1343 Accept "-" standing for stdin.
1344 (Calc++ Top Level): Print the result only if the parsing was
1345 successful.
1346
13472007-01-16 Akim Demaille <akim@epita.fr>
1348
1349 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1350
13512007-01-15 Paolo Bonzini <bonzini@gnu.org>
1352 and Joel E. Denny <jdenny@ces.clemson.edu>
1353
1354 Clean up %define and %code implementation in M4 some. Most
1355 importantly, rename all related macros to be in the b4_percent_define
1356 and b4_percent_code namespaces. Also, complete support for `.' in
1357 %define variable names and %code qualifiers.
1358 * data/bison.m4 (b4_check_user_names): Check for special
1359 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1360 m4_foreach loops.
1361 (b4_get_percent_define, b4_get_percent_code): Rename to...
1362 (b4_percent_define_get, b4_percent_code_get): ... these.
1363 Extend documentation with examples.
1364 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1365 b4_percent_define_skeleton_variables and
1366 b4_percent_code_skeleton_qualifiers.
1367 Expect any value for the %define variable `foo' to be stored in the
1368 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1369 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1370 expect any unqualified %code blocks to be stored in a macro named
1371 `b4_percent_code_unqualified'.
1372 Use m4_indir so that %define variable names and %code qualifiers can
1373 contain `.', which is allowed by the grammar parser.
1374 (b4_percent_define_default): New macro to set a default value for a
1375 %define variable.
1376 (m4_wrap): Update wrapped code, and fix some underquoting.
1377 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1378 Expect grammar uses of %define variables and %code qualifiers to be
1379 defined in b4_percent_define_user_variables and
1380 b4_percent_code_user_qualifiers.
1381 * data/c++.m4: Use b4_percent_define_default rather than
1382 m4_define_default. Fix some underquoting. Skeleton usage of %define
1383 variable define_location_comparison now implies skeleton usage of
1384 %define variable filename_type.
1385 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1386 data/push.c, data/yacc.c: Update macro names.
1387 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1388 muscle names.
1389
13902007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1391
1392 DJGPP specific issues.
1393
1394 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1395 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1396
13972007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1398
1399 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1400 run parsers in all tests so that Valgrind is invoked during
1401 maintainer-check-valgrind.
1402 (Duplicate representation of merged trees): Free all semantic values.
1403 (Duplicated user destructor for lookahead): Likewise.
1404
14052007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1406
1407 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1408 command-line prefix.
1409 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1410 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1411 miss Valgrind messages.
1412 (Exploding the Stack Size with Malloc): Likewise.
1413
14142007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1415
1416 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1417 locals. Reported by Juan Manuel Guerrero at
1418 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1419 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1420 Fix some indentation also.
1421 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1422 explaining this issue.
1423
14242007-01-09 Paolo Bonzini <bonzini@gnu.org>
1425 and Joel E. Denny <jdenny@ces.clemson.edu>
1426
1427 Simplify union and prologue handling, and escape union and lex/parse
1428 params with digraphs.
1429 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1430 values to the empty string since these are no longer guaranteed
1431 initialized by the front-end.
1432 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1433 braces around b4_user_stype since this is no longer done by the
1434 front-end.
1435 * src/files.c, src/files.h (pre_prologue_obstack,
1436 post_prologue_obstack): Remove.
1437 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1438 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1439 with digraphs. This fixes lex params and parse params.
1440 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1441 * src/output.c (prepare): Remove muscle insertion of the prologues.
1442 (output): Remove freeing of pre_prologue_obstack and
1443 post_prologue_obstack.
1444 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1445 than prologue_augment for prologue parsing so you don't need prologue
1446 obstacks.
1447 (grammar_declaration): For %union RHS, use `braceless' instead of
1448 "{...}" so that braces are already stripped and code is escaped with
1449 digraphs.
1450 * src/reader.c (prologue_augment): Remove.
1451 (reader): Remove initialization of pre_prologue_obstack and
1452 post_prologue_obstack.
1453 * src/reader.h (prologue_augment): Remove.
1454
1455 * data/c.m4: Remove stray parenthesis.
1456
14572007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1458
1459 Remove quotes from variables names in %define directives and from
1460 qualifiers in %code directives, and restrict the characters that are
1461 allowed in them to M4-friendly ones. For %define, continue to support
1462 the quoted form as a deprecated feature. Discussed starting at
1463 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1464 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1465 %code.
1466 * doc/bison.texinfo (Prologue Alternatives): Update.
1467 (Decl Summary): In %defines entry, update mention of `%code requires'
1468 and `%code provides'.
1469 (C++ Location Values): Update %define uses.
1470 (Calc++ Parser Interface): Likewise.
1471 (Calc++ Parser): Likewise, and update `%code requires' uses.
1472 (Table of Symbols): Update %code documentation.
1473 * src/parse-gram.y (prologue_declaration): For %define variables, use
1474 `variable' instead of `STRING'.
1475 (grammar_declaration): For %code qualifiers, use `ID' instead of
1476 `STRING'.
1477 (variable): New nonterminal that takes an `ID' or a `STRING'.
1478 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1479 and %define uses.
1480 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1481 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1482 (%define errors): Update %define uses.
1483
14842007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1485
1486 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1487 instead of muscle_insert for %define values so that M4-special
1488 characters are replaced with digraphs.
1489 * tests/input.at (%define errors): Extend to check weird values.
1490
14912007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1492
1493 Instead of having skeletons declare all valid %define variables and
1494 %code qualifiers, provide macros that retrieve the associated values
1495 and build these lists automatically. Thus Bison will now warn when a
1496 variable or qualifier is not used by the skeleton in the current
1497 invocation regardless of whether it might sometimes be used by that
1498 skeleton in other invocations. Also, move all %define value macros to
1499 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1500 form, which is replaced by %code.
1501 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1502 (b4_check_user_names): ... this, and change the series of valid name
1503 arguments to a single list argument for names used in the skeleton
1504 similar to the existing list argument for names used in the grammar.
1505 Warn instead of complaining.
1506 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1507 values and %code code, to format %code code properly, and to build
1508 lists of all %define variables and %code qualifiers used in the
1509 skeleton: b4_skeleton_percent_define_variables and
1510 b4_skeleton_percent_code_qualifiers.
1511 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1512 Remove, and...
1513 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1514 the skeleton names lists can finish building first. In place of
1515 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1516 expect the lists b4_user_percent_define_variables and
1517 b4_user_percent_code_qualifiers.
1518 * data/c++.m4: Where setting default values for b4_parser_class_name,
1519 b4_location_type, b4_filename_type, b4_namespace, and
1520 b4_define_location_comparison, update their names to the
1521 b4_percent_define_ namespace.
1522 * data/glr.c: Don't use b4_check_percent_define_variables and
1523 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1524 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1525 (b4_parser_class_name, b4_namespace): Define these using
1526 b4_get_percent_define for parser_class_name and namespace.
1527 * data/location.cc: Use b4_get_percent_define.
1528 * data/push.c: Don't use b4_check_percent_define_variables and
1529 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1530 * data/yacc.c: Likewise, and don't call m4_exit in
1531 b4_use_push_for_pull_if or m4_wrap code will never execute.
1532 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1533 Rename to...
1534 (muscle_grow_user_name_list): ... this for consistency with the
1535 terminology used in bison.m4.
1536 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1537 %define variable names, and rename muscle used_percent_define_variables
1538 to user_percent_define_variables.
1539 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1540 user_percent_code_qualifiers.
1541 (content): Remove.
1542 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1543 {CODE} form is no longer accepted.
1544 * tests/input.at (Reject bad %code qualifiers): Rename to...
1545 (Reject unused %code qualifiers): ... this, and update test output.
1546 (%define error): Update test output.
1547
15482007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1549
1550 Check for unrecognized %define variables similar to checking for
1551 unrecognized %code qualifiers. Check for redefined %define variables.
1552 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1553 generalizes...
1554 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1555 (b4_check_percent_define_variables): New, also wraps it.
1556 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1557 variables using b4_check_percent_define_variables.
1558 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1559 all those exercised in the test suite and all those listed in the
1560 `Default values' section of c++.m4. Are there others?
1561 * data/push.c, data/yacc.c: Declare no valid %define variables.
1562 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1563 similar to muscle_find, but it works even when the muscle stores a
1564 const value.
1565 (muscle_grow_used_name_list): New function for constructing the used
1566 name list muscles that b4_check_for_unrecognized_names requires.
1567 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1568 %define'd more than once. Define the b4_used_percent_define_variables
1569 muscle with muscle_grow_used_name_list.
1570 (grammar_declaration): Abbreviate %code code with
1571 muscle_grow_used_name_list.
1572 * tests/input.at (%define errors): New.
1573
15742007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1575
1576 Provide warn_at, complain_at, and fatal_at function callbacks to the
1577 skeletons, and use this for %code qualifier complaints.
1578 * data/bison.m4 (b4_error_at): New, invoked by...
1579 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1580 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1581 @fatal_at(...@) directives.
1582 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1583 qualifiers in b4_used_percent_code_qualifiers and to use
1584 b4_complain_at.
1585 * src/location.c, src/location.h (boundary_set_from_string): New global
1586 function.
1587 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1588 function.
1589 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1590 to b4_used_percent_code_qualifiers.
1591 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1592 function.
1593 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1594 (lineno): Rename to...
1595 (out_lineno): ... this so I don't misunderstand it again.
1596 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1597 here; these newlines are in the input but not the output file.
1598 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1599 (at_directive_perform): ... this new static function, and add handling
1600 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1601 directives.
1602 * tests/input.at (Reject bad %code qualifiers): Update test output with
1603 locations and extend.
1604
1605 * tests/output.at (Output file name: [, Output file name: ]): Remove
1606 bogus comment about these tests failing.
1607
16082007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1609
1610 Clean up b4_check_percent_code_qualifiers a little.
1611 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1612 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1613 documentation and add examples.
1614 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1615 qualifiers here.
1616
16172007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1618
1619 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1620 unreliable -- especially when they're hidden inside another macro.
1621 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1622 data/c.m4: Remove m4_divert(-1).
1623 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1624 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1625 m4_divert_push(0) and m4_divert_pop(0).
1626 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
1627 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1628 pushed and popped by m4sugar, should be first on the stack.
1629
1630 Provide warn, complain, and fatal function callbacks to the skeletons.
1631 This provides more flexibility than m4_fatal, improves the error
1632 message format, and captures messages for translation. Discussed
1633 starting at
1634 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1635 * data/bison.m4 (b4_error): New, invoked by...
1636 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1637 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1638 directives. Because these M4 macros might be called when the current
1639 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1640 the previous removal of uses of m4_divert, which caused trouble.
1641 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1642 m4_fatal to report unrecognized %code qualifiers.
1643 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1644 push parser requests.
1645 * data/glr.c: Use b4_complain instead of m4_fatal to report
1646 non-deterministic push parser requests.
1647 Update @output usage to @output(...@) form.
1648 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1649 report missing %defines. Update @output usage to @output(...@) form.
1650 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1651 @output(...@) form.
1652 * src/main.c (main): Invoke skel_scanner_free.
1653 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1654 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1655 obstack_for_string from flex-scanner.h.
1656 (YY_DECL): Use to declare skel_lex static.
1657 (decode_at_digraphs): Remove; now handled in the new
1658 SC_AT_DIRECTIVE_ARG start condition.
1659 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1660 functions.
1661 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1662 at_directive_argv): New static globals.
1663 (INITIAL): Use fail_for_invalid_at.
1664 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1665 recognize the start of a generalized `@directive(...@)' form and
1666 start...
1667 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1668 directive args (using the new obstack_for_string), to decode the
1669 contained @ diagraphs, and to perform the directive. It recognizes
1670 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1671 @output(...@).
1672 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1673 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1674 `@,'.
1675 (scan_skel): Initialize obstack_for_string on the first call.
1676 (skel_scanner_free): New function to free obstack_for_string.
1677 * tests/input.at (Reject bad %code qualifiers): Update test output.
1678
16792007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1680
1681 Consolidate the 4 prologue alternative directives (%code, %requires,
1682 %provides, and %code-top) into a single %code directive with an
1683 optional qualifier field. Discussed at
1684 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
1685 * NEWS (2.3a+): Rewrite the existing entry for the prologue
1686 alternatives.
1687 * doc/bison.texinfo (Prologue Alternatives): Update.
1688 (Decl Summary): Update to %code "requires" and %code "provides".
1689 (Calc++ Parser): Update to %code "requires".
1690 (Table of Symbols): Remove entries for %requires, %provides, and
1691 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
1692 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
1693 are replaced by b4_percent_code_provides and b4_percent_code_requires,
1694 which are skeleton-specific.
1695 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
1696 declare what %code qualifiers it supports and to complain if any other
1697 qualifiers were used in the grammar.
1698 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
1699 and b4_user_code([b4_percent_code_provides]) in place of
1700 b4_user_requires and b4_user_provides.
1701 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
1702 Add b4_user_code([b4_percent_code_top]) and
1703 b4_user_code([b4_percent_code]).
1704 Invoke b4_check_percent_code_qualifiers.
1705 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1706 PERCENT_REQUIRES): Remove.
1707 (grammar_declaration): Remove RHS's for %code-top, %provides, and
1708 %requires. Rewrite the %code RHS as the unqualified form defining the
1709 muscle b4_percent_code. Add another RHS for the qualified %code form,
1710 which defines muscles of the form b4_percent_code_QUALIFIER and the
1711 b4_used_percent_code_qualifiers muscle.
1712 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1713 PERCENT_REQUIRES): Remove.
1714 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
1715 %code "requires" and %code "provides".
1716 * tests/input.at (Reject bad %code qualifiers): New.
1717
17182007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1719
1720 Use the new code_props interface for destructors and printers.
1721 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
1722 printer_location members, and change the type of the destructor and
1723 printer members to code_props.
1724 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
1725 symbol_printer_get, semantic_type_destructor_set,
1726 semantic_type_printer_set, default_tagged_destructor_set,
1727 default_tagless_destructor_set, default_tagged_printer_set,
1728 default_tagless_printer_set): Use code_props in arguments and return
1729 types in place of char const * and location.
1730 (symbol_destructor_location_get, symbol_printer_location_get): Remove
1731 since the locations are now contained in the return of
1732 symbol_destructor_get and symbol_printer_get.
1733 * src/output.c (symbol_destructors_output, symbol_printers_output):
1734 Replace with...
1735 (symbol_code_props_output): ... this to eliminate duplicate code.
1736 (output_skeleton): Update to use symbol_code_props_output.
1737 * src/reader.c (symbol_should_be_used): Update use of
1738 symbol_destructor_get.
1739 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1740 Update uses of the various _destructor_set and _printer_set functions.
1741 * src/symtab.c: (default_tagged_destructor_location,
1742 default_tagless_destructor_location, default_tagged_printer_location,
1743 default_tagless_printer_location): Remove since we...
1744 (default_tagged_destructor, default_tagless_destructor,
1745 default_tagged_printer, default_tagless_printer): ... change the type
1746 of these to code_props.
1747 (symbol_new, semantic_type_new, symbol_destructor_set,
1748 semantic_type_destructor_set, symbol_destructor_get,
1749 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
1750 symbol_check_alias_consistency, default_tagged_destructor_set,
1751 default_tagless_destructor_set, default_tagged_printer_set,
1752 default_tagless_printer_set): Update.
1753 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
1754 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
1755 code_props members.
1756 (symbol_print): Use SYMBOL_CODE_PRINT.
1757
17582007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1759
1760 Use the new code_props interface for rule actions.
1761 * src/symlist.h (symbol_list): Replace action, action_location, and
1762 used members with a code_props action_props member.
1763 * src/reader.c (symbol_should_be_used, grammar_rule_check,
1764 grammar_midrule_action, grammar_current_rule_merge_set,
1765 grammar_current_rule_symbol_append, packgram): Update.
1766 * src/scan-code.h (translate_rule_action): Remove, no longer used.
1767 * src/scan-code.l (handle_action_dollar): Update.
1768 (translate_rule_action): Remove, no longer used.
1769 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
1770
17712007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1772
1773 Use the new code_props interface in parse-gram.y.
1774 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
1775 Update all uses of translate_* functions to use the new code_props
1776 interface and to use gram_scanner_last_string_free and
1777 code_scanner_last_string_free where possible.
1778 (grammar_declaration): symbol_list_destructor_set and
1779 symbol_list_printer_set now perform the translation, so don't do it
1780 here. Use gram_scanner_last_string_free where possible.
1781 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
1782 translate_code): Remove, no longer used.
1783 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
1784 symbol_list_printer_set): Perform code translation here rather than
1785 depending on the caller to do so.
1786
1787 * src/symlist.h (struct symbol_list): Correct some documentation typos.
1788 * src/scan-gram.h (gram_last_string): Remove declaration.
1789 * src/scan-gram.l (last_string): Declare it static.
1790
17912007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1792
1793 Encapsulate code properties and related functionality for the various
1794 destructors, printers, and actions into a code_props structure and
1795 interface. This patch merely implements code_props in scan-code.h and
1796 scan-code.l. Future patches will rewrite other modules to use it.
1797 Discussed starting at
1798 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
1799 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
1800 consistently initialize const structs that have an empty location
1801 field.
1802 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
1803 to ensure consistency.
1804 * src/scan-code.h (code_props): New structure.
1805 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
1806 function, macro, and const global variable for initializing a
1807 code_props with no code.
1808 (code_props_plain_init, code_props_symbol_action_init,
1809 code_props_rule_action_init, code_props_translate_code): The rest of
1810 the new code_props functional interface. Among other things, the init
1811 functions set the code_props kind field so that
1812 code_props_translate_code will know whether to behave like
1813 translate_symbol_action, translate_rule_action, or translate_code.
1814 These old translate functions must remain until all other modules are
1815 updated to use the new code_props interface.
1816 (code_scanner_last_string_free): New function similar to
1817 gram_scanner_last_string_free.
1818 (code_scanner_free): Add documentation.
1819 * src/scan-code.l: Implement the new interface.
1820 (code_lex): Make it static, add a code_props* argument, and remove the
1821 rule argument.
1822 (last_string): New static global similar to the one in scan-gram.l.
1823 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
1824 instead of rule.
1825 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
1826 code_props since Bison may one day use this information for destructors
1827 and printers.
1828 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
1829 (handle_action_dollar): Use symbol_list_n_get and set used flag
1830 directly since symbol_list_n_used_set is removed.
1831 (translate_action): Add a code_props* argument and remove the rule,
1832 action, and location arguments. Pass the code_props* on to code_lex.
1833 (translate_rule_action, translate_symbol_action, translate_code):
1834 Rewrite as wrappers around the new code_props interface.
1835 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
1836 it would eventually need to break the encapsulation of code_props.
1837
18382007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1839
1840 * etc/.cvsignore: New.
1841
18422007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
1843
1844 Add maintainer-push-check to run maintainer-check using push parsing in
1845 place of pull parsing where available.
1846 * Makefile.am (maintainer-push-check): New.
1847 * data/bison.m4 (b4_use_push_for_pull_if): New.
1848 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
1849 appropriately based on their existing values.
1850 (yypush_parse): Don't print push-parser-specific diagnostics if push
1851 parsing is being used in place of pull parsing.
1852 * data/yacc.c: If push parsing should replace pull parsing, redirect to
1853 push.c.
1854 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
1855 variable, and insert b4_use_push_for_pull_flag into muscles.
1856 * tests/Makefile.am (maintainer-push-check): New.
1857
18582006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1859
1860 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
1861 (whether successful or failed) so that yypush_parse can be invoked
1862 again to start a new parse using the same yypstate.
1863 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
1864 check multiple yypull_parse invocations on the same yypstate. For pull
1865 mode, extend to check multiple yyparse invocations.
1866 (Exploding the Stack Size with Alloca): Extend to try with
1867 %push-pull-parser.
1868 (Exploding the Stack Size with Malloc): Likewise.
1869
1870 * tests/calc.at (Simple LALR Calculator): Don't specify
1871 %skeleton "push.c" since %push-pull-parser implies that now.
1872 * tests/headers.at (export YYLTYPE): Don't check for the push
1873 declarations. Otherwise, this test case can't be used to see if push
1874 mode can truly emulate pull mode.
1875 * tests/input.at (Torturing the Scanner): Likewise.
1876 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
1877 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
1878 AT_YACC_IF, which now includes the case of push mode since %skeleton
1879 need not be used for push mode. This will be more intuitive once
1880 push.c is renamed to yacc.c.
1881
18822006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
1883
1884 For push mode, convert yyparse from a macro to a function, invoke yylex
1885 instead of passing a yylexp argument to yypull_parse, and don't
1886 generate yypull_parse or yyparse unless %push-pull-parser is declared.
1887 Discussed starting at
1888 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
1889 * data/bison.m4 (b4_pull_if): New.
1890 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
1891 * data/push.c: Improve M4 quoting a little.
1892 (b4_generate_macro_args, b4_parenthesize): Remove.
1893 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
1894 any time a pull parser is requested.
1895 Don't #define this as a wrapper around yypull_parse. Instead, when
1896 both push and pull are requested, make it a function that does that
1897 same thing.
1898 (yypull_parse): If there's a b4_prefix, #define this to
1899 b4_prefix[pull_parse] when both push and pull are requested.
1900 Don't define this as a function unless both push and pull are
1901 requested.
1902 Remove the yylexp argument and hard-code yylex invocation instead.
1903 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
1904 %push-parser.
1905 * src/getargs.c (pull_parser): New global initialized to true.
1906 * getargs.h (pull_parser): extern it.
1907 * src/output.c (prepare): Insert pull_flag muscle.
1908 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
1909 (prologue_declaration): Set both push_parser and pull_parser = true for
1910 %push-pull-parser. Set push_parser = true and pull_parser = false for
1911 %push-parser.
1912 * src/scan-gram.l: Don't accept %push_parser as an alternative to
1913 %push-parser since there's no backward-compatibility concern here.
1914 Scan %push-pull-parser.
1915 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
1916 instead of %push-parser.
1917 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
1918 prototype it in the module that calls yyparse.
1919 * tests/input.at (Torturing the Scanner): Likewise.
1920 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
1921
19222006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
1923
1924 Update etc/bench.pl. Optimize push mode a little (the yyn change
1925 deserves most of the credit).
1926 * Makefile.am (SUBDIRS): Add etc subdirectory.
1927 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
1928 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
1929 yytoken, yyval, and yyloc declarations to...
1930 (yyparse or yypush_parse): ... here to improve performance. For
1931 yypush_parse invocations after the first, be sure to assign yyn its old
1932 value again.
1933 (yypstate_new): Don't bother initializing the yyresult field since the
1934 initial value isn't used.
1935 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
1936 remove the #define that, in push mode, set it to yyps->NAME.
1937 * etc/Makefile.am: New.
1938 * etc/bench.pl: Remove and build it instead from...
1939 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
1940 "tests/bison" from the build directory by default rather than just
1941 invoking "bison" from $PATH.
1942 (calc_grammar): Update push parser code: don't declare yylval globally,
1943 don't define yyparse_wrapper, and don't #define yyparse.
1944 (bench_grammar): Update to check all working combinations of yacc.c,
1945 push.c, impure, pure, pull, and push.
1946
19472006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1948
1949 For push mode, add pull wrappers around yypush_parse.
1950 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
1951 (yypull_parse): New function wrapping yypush_parse.
1952 (yyparse): New #define wrapping yypull_parse.
1953 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
1954 is declared.
1955 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
1956 prototype yylex in the module that calls yyparse, and don't prototype
1957 yyparse there. Otherwise, the yyparse expansion won't compile.
1958 * tests/input.at (Torturing the Scanner): Likewise.
1959
19602006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
1961
1962 Enable push parsers to operate in impure mode. Thus, %push-parser no
1963 longer implies %pure-parser. The point of this change is to move
1964 towards being able to test the push parser code by running the entire
1965 test suite as if %push-parser had been declared.
1966 * data/push.c (yypush_parse): For impure mode, remove the
1967 yypushed_char, yypushed_val, and yypushed_loc arguments.
1968 Instead, declare these as local variables initialized to the global
1969 yychar, yylval, and yylloc.
1970 For the first yypush_parse invocation only, restore the initial values
1971 of these global variables when it's time to read a token since they
1972 have been overwritten.
1973 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
1974 %push-parser.
1975 * tests/calc.at (Simple LALR(1) Calculator): Always declare
1976 %pure-parser along with %push-parser since this test case was designed
1977 for pure push parsers.
1978 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
1979 (AT_YACC_OR_PUSH_IF): New.
1980 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
1981 add a note that it's still wrong for some cases (as it has been for a
1982 while).
1983 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
1984 %push-parser no longer implies %pure-parser.
1985
19862006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
1987
1988 Remove some unnecessary differences between the pull parser code and
1989 the push parser code. This patch enables yynerrs in push mode.
1990 * data/push.c: Reformat M4 a little.
1991 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
1992 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
1993 because push mode is on. Instead, if pure mode is on, move yynerrs
1994 to...
1995 (b4_declare_parser_state_variables): ... here.
1996 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
1997 to yyps->NAME so it can be used in yypush_parse.
1998 (yypush_parse): Don't omit uses of yynerrs in push mode.
1999
20002006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2001
2002 Fix bug such that the first pushed token's value and location are
2003 sometimes overwritten (sometimes by %initial-action) before being used.
2004 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2005 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2006 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2007 more closely mimic the pull parser logic.
2008 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2009 time to read a token, which is after any initialization of yylval and
2010 yylloc.
2011 (gottoken): Rename label to...
2012 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2013 user namespace.
2014
20152006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2016
2017 Rearrange initialization of the parser state variables so that the
2018 skeleton doesn't have to have a copy for pull mode and another for push
2019 mode. This patch also fixes at least a bug such that yylloc was not
2020 initialized (with b4_location_initial_line and
2021 b4_location_initial_column) upon calling yypush_parse. However, that
2022 initialization now overwrites the first token's location;
2023 %initial-action assigning @$ already did the same thing, and both bugs
2024 will be fixed in a later patch.
2025 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2026 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2027 yyss, yyvs, yyls, and yystacksize.
2028 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2029 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2030 yylsp.
2031 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2032 yyps->NAME so it can be used in yypush_parse.
2033 (yyparse or yypush_parse): For yypush_parse, don't print the
2034 "Starting parse" diagnostic for invocations after the first.
2035 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2036 yypush_parse, only do it for the first invocation.
2037 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2038 initialization to occur in yypush_parse but only on the first
2039 invocation.
2040
20412006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2042
2043 * data/push.c: Add CPP guards around push parser declarations in both
2044 the header and the code file.
2045 In the code file, move the push parser declarations to the same place
2046 they appear in the header file.
2047 Clean up the M4 some, especially the inconsistent underquoting in
2048 some b4_c_function_def and b4_c_function_decl uses.
2049
20502006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2051
2052 Encapsulate the push parser state variables into an M4 macro so the
2053 push skeleton doesn't have to list them again for pull mode's yyparse.
2054 For push mode, remove yypush_parse's local equivalents of these
2055 variables to eliminate unnecessary copying between the two sets at
2056 run-time. This patch also fixes at least a bug related to multiple
2057 %initial-action invocations in push mode.
2058 * data/push.c (b4_declare_parser_variables): Rename to...
2059 (b4_declare_scanner_communication_variables): ... this for clarity and
2060 update both uses.
2061 (b4_declare_yyparse_variables): Remove and move its contents to the one
2062 spot where it was invoked.
2063 (b4_declare_parser_state_variables): New macro containing the parser
2064 state variables required by push mode.
2065 (struct yypstate): Replace all fields but yynew with
2066 b4_declare_parser_state_variables.
2067 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2068 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2069 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2070 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2071 parser state variable declarations with
2072 b4_declare_parser_state_variables.
2073 Don't initialize parser state variables when calling yypush_parse since
2074 yypstate_new already does that.
2075 Invoke the user's initial action only upon the first yypush_parse
2076 invocation.
2077 Remove all code that copies between the local parser state variables
2078 and the yypstate.
2079
20802006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2081
2082 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2083 prevent a name collision in a future patch where these names will
2084 sometimes be #define'd.
2085 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2086 since it no longer has the same name as the existing argument.
2087 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2088
20892006-12-19 Paolo Bonzini <bonzini@gnu.org>
2090 and Joel E. Denny <jdenny@ces.clemson.edu>
2091
2092 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2093 that the argument is case-insensitive, and there's no `=' here.
2094 For the %skeleton entry, mention that %language is better.
2095 (Bison Options): Likewise for --language and --skeleton. Move the
2096 --skeleton entry so that the `Tuning the parser' section is sorted
2097 alphabetically on long options.
2098 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2099 %language directive in detail here; cross-reference the %language
2100 documentation instead.
2101 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2102 `%require "2.3b"' so that the example is always up-to-date.
2103 (Table of Symbols): Add entries for %language and %skeleton.
2104 * examples/extexi (normalize): Instead of replacing every %require
2105 argument with the current Bison version, just substitute for
2106 `@value{VERSION}'. This guarantees that we're testing what actually
2107 appears in the documentation.
2108 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2109 rather than `@VERSION@'.
2110
21112006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2112
2113 * NEWS: Reword the %language news a bit, and put it earlier.
2114
2115 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2116 Rewrite to simplify the logic.
2117 (language_argmatch): Likewise.
2118 (program_name): We now own this var.
2119 * src/getargs.h (struct bison_language): Use char[] rather than
2120 const char *.
2121
2122 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2123 Java is supported.
2124 * src/complain.c (program_name): Remove decl; no longer needed.
2125 * src/main.c (program_name): Remove; now belongs to getargs.
2126
21272006-12-18 Paolo Bonzini <bonzini@gnu.org>
2128
2129 * NEWS: Document %language.
2130
2131 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2132
2133 * data/c-skel.m4, data/c++-skel.m4: New files.
2134 * data/glr.c: Complain on push parsers.
2135
2136 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2137 over %skeleton.
2138 (Decl Summary): Document %language and %skeleton.
2139 (Command line): Document -L.
2140
2141 * examples/extexi: Rewrite %require directive.
2142 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2143
2144 * src/files.c (compute_exts_from_gc): Look in language structure
2145 for .y extension.
2146 (compute_file_name_parts): Check whether .tab should be added.
2147 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2148 (language, skeleton_arg, language_argmatch): New.
2149 (long_options): Add --language.
2150 (getargs): Use skeleton_arg, add -L/--language.
2151 * src/getargs.h: Include location.h.
2152 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2153 * src/output.c (prepare): Pick default skeleton from struct language.
2154 Don't dispatch C skeletons here.
2155 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2156 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2157 * src/scan-gram.l ("%language"): New rule.
2158
2159 * tests/calc.at: Test %skeleton and %language.
2160 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2161 (AT_GLR_IF): Look for %skeleton "glr.cc".
2162 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2163 (AT_YACC_IF): Reject %language.
2164
21652006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2166
2167 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2168 since it wasn't used; only the typedef name 'semantic_type' is needed.
2169 Also, omit trailing white space.
2170
2171 * bootstrap: Sync from coreutils.
2172 (gnulib_extra_files): Add build-aux/announce.gen.
2173 (slurp): Adjust .gitignore files like .cvsignore files.
2174 * build-aux/announce-gen: Remove from CVS, since bootstrap
2175 now creates this.
2176
21772006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2178
2179 Make %push-parser imply %pure-parser. This fixes several bugs; see
2180 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2181 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2182 pure_parser = true.
2183 * data/push.c: Don't bother testing b4_push_if when deciding whether
2184 to expand b4_declare_parser_variables globally.
2185 (yypush_parse): Likewise in here.
2186
2187 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2188 (yy_reduce_print): Reformat M4 for readability.
2189
21902006-12-15 Bob Rossi <bob@brasko.net>
2191 and Joel Denny <jdenny@ces.clemson.edu>
2192
2193 * data/push.c (yypstate): Add typedef, and update all uses of
2194 struct yypstate to just yypstate.
2195 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2196
21972006-12-14 Bob Rossi <bob@brasko.net>
2198
2199 * data/push.c (yypush_parse): Declare prototype regardless of
2200 %locations option.
2201
22022006-12-14 Bob Rossi <bob@brasko.net>
2203
2204 * data/push.c (yyparse): Remove the prototype and the #define when in
2205 push-parser mode.
2206
22072006-12-13 Bob Rossi <bob@brasko.net>
2208
2209 * data/push.c (yypstate_init): Rename to...
2210 (yypstate_new): ... this and use b4_c_function_def.
2211 (yypstate_delete): New.
2212 (yypush_parse): Change parameters yynval and yynlloc to be const.
2213 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2214 yypstate_delete functions.
2215
22162006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2217
2218 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2219 strange test case titles. Reported by Bob Rossi.
2220
22212006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2222
2223 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2224 of potential ambiguities in GLR grammers.
2225
22262006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2227
2228 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2229 `bison ', use m4_index instead of m4_substr since chopping up a string
2230 containing M4-special characters causes problems here.
2231
2232 Fix a couple of bugs related to special characters in user-specified
2233 file names, and make it easier for skeletons to compute output file
2234 names with the same file name prefix as Bison-computed output file
2235 names.
2236 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2237 b4_parser_file_name and b4_spec_defines_file instead of
2238 @output_parser_name@ and @output_header_name@, which are now redundant.
2239 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2240 b4_parser_file_name, b4_spec_defines_file, and the new
2241 @basename(FILENAME@) instead of @output_parser_name@ and
2242 @output_header_name@, which inappropriately escaped the file names as
2243 C string literals.
2244 * src/files.c (all_but_ext): Remove static qualifier.
2245 (compute_output_file_names): Move `free (all_but_ext)' to...
2246 (output_file_names_free): ... here since all_but_ext is needed later.
2247 * src/files.h (all_but_ext): Extern.
2248 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2249 exactly what MUSCLE_INSERT_STRING used to do.
2250 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2251 characters are escaped properly.
2252 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2253 all_but_ext.
2254 For pkgdatadir muscle, maintain previous functionality by using
2255 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2256 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2257 digraphs would never be expanded. Hopefully no one has M4-special
2258 characters in his Bison installation path.
2259 * src/scan-skel.l: Don't parse @output_header_name@ and
2260 @output_parser_name@ anymore since they're now redundant.
2261 In @output, use decode_at_digraphs.
2262 Parse a new @basename command that invokes last_component.
2263 (decode_at_digraphs): New.
2264 (BASE_QPUTS): Remove unused.
2265 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2266 (Output file name): New tests.
2267
22682006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2269
2270 Warn about output files that are generated by the skeletons and that
2271 conflict with other output files.
2272 * data/glr.c: Don't generate the header file here when glr.cc does.
2273 * src/files.c (file_names, file_names_count): New static globals.
2274 (compute_output_file_names): Invoke output_file_name_check for files
2275 not generated by the skeletons and remove existing checks.
2276 (output_file_name_check): New function that warns about conflicting
2277 output file names.
2278 (output_file_names_free): Free file_names.
2279 * src/files.h (output_file_name_check): Declare.
2280 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2281 the skeletons.
2282 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2283 (Conflicting output files): New tests.
2284
22852006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2286
2287 * doc/bison.texinfo: Fix a couple of typos.
2288
22892006-12-08 Bob Rossi <bob@brasko.net>
2290
2291 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2292 Rename to...
2293 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2294 update all uses.
2295 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2296 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2297 local pv.
2298 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2299 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2300
23012006-12-07 Bob Rossi <bob@brasko.net>
2302 and Joel Denny <jdenny@ces.clemson.edu>
2303
2304 * data/push.c (yypvarsinit): Change return type from void* to struct
2305 yypvars*. No longer cast to void* on return.
2306 (struct yypvars): Remove yylen since it need not be remembered between
2307 yypushparse invocations.
2308 (yypushparse): Don't copy between yylen and pv->yylen.
2309
23102006-12-05 Bob Rossi <bob@brasko.net>
2311
2312 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2313 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2314 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2315 (struct yypvars): Remove b4_declare_parser_variables.
2316 (yypvarsinit): Remove init code for removed variables.
2317 (global scope): Do not declare b4_declare_parser_variables if
2318 push or pure mode.
2319 (yypushparse): Add b4_declare_parser_variables.
2320 Init new local variables, and remove init code for removed
2321 yypvars variables.
2322 (yyparse): Delete.
2323 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2324 and yyparse for other modes.
2325 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2326 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2327 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2328 (AT_PURE_LEX_IF): True if pure or push parser.
2329
23302006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2331
2332 Document Yacc prologue alternatives and default %destructor's and
2333 %printer's as experimental. Don't mention Java yet. Discussed at
2334 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2335 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2336 (2.3a): Annotate this entry to say the old forms of these features were
2337 also experimental.
2338 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2339 Table of Symbols): Say they're experimental. Comment out any mention
2340 of Java (we'll want this back eventually).
2341
23422006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2343
2344 Support a file name argument to %defines. Deprecate `=' in
2345 %file-prefix, %name-prefix, and %output. Discussed at
2346 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2347 * NEWS (2.3a+): Mention.
2348 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2349 form of %defines, and remove `=' from entries for %file-prefix,
2350 %name-prefix, and %output.
2351 * src/parse-gram.y (prologue_declaration): Implement.
2352 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2353 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2354 all but one occurrence of %name-prefix.
2355 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2356 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2357 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2358 occurrence of each of %file-prefix and %output. Add check for %defines
2359 with argument.
2360 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2361 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2362 Remove the `=' from %output.
2363
23642006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2365
2366 Don't escape $ in test case titles since Autoconf 2.61 now does that
2367 correctly.
2368 * tests/actions.at (Default %printer and %destructor are not for error
2369 or $undefined): Here.
2370 (Default %printer and %destructor are not for $accept): Here.
2371 * tests/input.at (Invalid $n and @n): Here.
2372
23732006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2374
2375 Rename <!> to <>. Discussed starting at
2376 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2377 * NEWS (2.3a+): Update.
2378 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2379 Update.
2380 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2381 * src/scan-gram.l (INITIAL): Implement.
2382 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2383 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2384 comment.
2385 * tests/actions.at (Default tagless %printer and %destructor,
2386 Default tagged and per-type %printer and %destructor,
2387 Default %printer and %destructor are not for error or $undefined,
2388 Default %printer and %destructor are not for $accept,
2389 Default %printer and %destructor for mid-rule values): Update.
2390 * tests/input.at (Default %printer and %destructor redeclared,
2391 Unused values with default %destructor): Update.
2392
23932006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2394
2395 Don't let %prec take a nonterminal.
2396 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2397 token.
2398 * tests/input.at (%prec takes a token): New test checking that %prec
2399 won't take a nonterminal.
2400
24012006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2402
2403 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2404 it was double-quoted.
2405 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2406 grammar is maintained with Bison's highest standards.
2407 * src/getargs.c: Fix some typos in Doxygen comments.
2408
24092006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2410
2411 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2412 later. Reported by Paul Eggert in
2413 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2414 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2415 * src/scan-code.l (translate_action): Don't bother invoking
2416 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2417 (code_scanner_free): Instead of invoking
2418 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2419 which frees more.
2420 * src/scan-gram.l (gram_scanner_free): Likewise.
2421 * src/scan-skel.l (scan_skel): Likewise.
2422
24232006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2424
2425 * src/files.c (tr): Change return type to void.
2426 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2427 has been called previously for the same key.
2428 (muscle_find): Return storage instead of value so that
2429 --enable-gcc-warnings doesn't produce warnings that the return discards
2430 const. aver that the value and storage are the same since storage
2431 could potentially be NULL when value is not.
2432 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2433 same as 0.
2434
24352006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2436
2437 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2438 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2439 us a slightly cleaner distribution, and also works.
2440 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2441 gnulib changes.
2442
24432006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2444 and Paul Eggert <eggert@cs.ucla.edu>
2445
2446 Don't let Bison leak memory except when it complains.
2447 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2448 (spec_defines_file, dir_prefix): Now char *, not const char *,
2449 since they are freed.
2450 * src/files.c: Likewise.
2451 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2452 Likewise.
2453 (tr): Now operates in-place. All uses changed.
2454 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2455 values.
2456 (compute_file_name_parts, compute_output_file_names): Don't store
2457 read-only data in variables that will be freed.
2458 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2459 src_extension, and header_extension.
2460 (output_file_names_free): New public function to free
2461 spec_verbose_file, spec_graph_file, spec_defines_file,
2462 parser_file_name, and dir_prefix.
2463 * src/getargs.c (getargs): Don't store read-only data in variables that
2464 will be freed.
2465 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2466 (which previously existed but was unused), and quotearg_free.
2467 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2468 * src/muscle_tab.c: Likewise.
2469 (muscle_entry): Make the value char const *,
2470 and add a new storage member that is char * and can be freed.
2471 (muscle_entry_free): New private function.
2472 (muscle_init): Use it instead of free.
2473 (muscle_insert, muscle_grow): Update and use new storage member.
2474 (muscle_code_grow): Free the string passed to muscle_grow
2475 since it's not needed anymore.
2476 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2477 add a new `char *code' member.
2478 ("{...}"): Declare semantic type as code.
2479 * src/scan-code.h (translate_rule_action):
2480 (translate_symbol_action, translate_code, translate_action): Return
2481 `char const *' rather than `char *' since external code should not free
2482 these strings.
2483 * src/scan-code.l: Likewise.
2484 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2485 which is "{...}" in the parser.
2486 * tests/Makefile.am (maintainer-check-valgrind): Set
2487 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2488 Valgrind.
2489 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2490 complain.
2491 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2492 expecting a non-zero exit status sets --leak-check=summary and
2493 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2494 this case, and we don't want to hear about it.
2495
24962006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2497
2498 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2499 instead of from the template, to simplify configuration a bit.
2500 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2501 and m4/wint_t.m4, as they are needed with the latest gnulib.
2502
25032006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2504
2505 Disable unset/unused mid-rule value warnings by default, and recognize
2506 --warnings=midrule-values to enable them. Discussed starting at
2507 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2508 * NEWS (2.3a+): Mention.
2509 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2510 warnings): Add entry for midrule-values subargument.
2511 * src/reader.c (symbol_should_be_used): Don't return true just because
2512 the value is a set/used mid-rule value unless
2513 --warnings=midrule-values was specified.
2514 * tests/input.at (Unused values, Unused values before symbol
2515 declarations): Run tests with and without --warnings=midrule-values.
2516
2517 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2518 than LIST_FREE directly.
2519
25202006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2521
2522 Finish implementing --warnings=error, which should not be implied by
2523 --warnings=all (or by its synonyms -W and --warnings without
2524 subarguments).
2525 * src/complain.c (set_warning_issued): New function to report that
2526 warnings are being treated as errors and to record an error if so.
2527 Invoke...
2528 (warn_at, warn): ... here.
2529 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2530 "error - warnings are errors" does not appear above "all - all of the
2531 above".
2532 (getargs): For -W and --warnings without subarguments, don't let
2533 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2534 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2535
25362006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2537
2538 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2539 empty subargument list. For example: `bison --warnings= parser.y'.
2540
25412006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2542
2543 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2544 the parser header file so that gcc doesn't warn.
2545
25462006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2547
2548 Split the default %destructor/%printer into two kinds: <*> and <!>.
2549 Discussed starting at
2550 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2551 * NEWS (2.3a+): Mention.
2552 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2553 previous change today related to mid-rules.
2554 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2555 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2556 (TYPE_TAG_ANY): Add as <*>.
2557 (TYPE_TAG_NONE): Add as <!>.
2558 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2559 for <*> and <!>.
2560 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2561 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2562 * src/symlist.c (symbol_list_default_new): Split into tagged and
2563 tagless versions.
2564 (symbol_list_destructor_set, symbol_list_printer_set): Split
2565 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2566 SYMLIST_DEFAULT_TAGLESS.
2567 * src/symlist.h: Update symbol_list_default*_new prototypes.
2568 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2569 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2570 * src/symtab.c (default_destructor, default_destructor_location,
2571 default_printer, default_printer_location): Split each into tagged and
2572 tagless versions.
2573 (symbol_destructor_get, symbol_destructor_location_get,
2574 symbol_printer_get, symbol_printer_location_get): Implement tagged
2575 default and tagless default cases.
2576 (default_destructor_set, default_printer_set): Split each into tagged
2577 and tagless versions.
2578 * src/symtab.h: Update prototypes.
2579 * tests/actions.at (Default %printer and %destructor): Rename to...
2580 (Default tagless %printer and %destructor): ... this, and extend.
2581 (Per-type %printer and %destructor): Rename to...
2582 (Default tagged and per-type %printer and %destructor): ... this, and
2583 extend.
2584 (Default %printer and %destructor for user-defined end token): Extend.
2585 (Default %printer and %destructor are not for error or $undefined):
2586 Update.
2587 (Default %printer and %destructor are not for $accept): Update.
2588 (Default %printer and %destructor for mid-rule values): Extend.
2589 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2590 (Unused values with default %destructor): Extend.
2591
25922006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2593
2594 Don't apply the default %destructor/%printer to an unreferenced midrule
2595 value. Mentioned at
2596 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2597 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2598 like $@n instead of just @n so that the default %destructor/%printer
2599 logic doesn't see them as user-defined symbols.
2600 (symbol_is_dummy): Check for both forms of the name.
2601 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2602 name for which the midrule value is referenced in any action.
2603 * tests/actions.at (Default %printer and %destructor for mid-rule
2604 values): New test.
2605 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2606 for change to dummy symbol names.
2607
26082006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2609
2610 Warn about unset midrule $$ if the corresponding $n is used.
2611 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2612 $n usage.
2613 (packgram): Before invoking grammar_rule_check on any rule, make sure
2614 all actions have already been scanned in order to set `used' flags.
2615 Otherwise, checking that a midrule's $$ is set will not always work
2616 properly because the midrule check must forward-reference the midrule's
2617 parent rule.
2618 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2619 warning.
2620
26212006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2622
2623 More improvements to the documentation of the prologue alternatives:
2624 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2625 Bison manual.
2626 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2627 some text to clarify the relative importance of the new directives and
2628 to show how these directives may be viewed as code labels.
2629
26302006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2631
2632 Similar to the recently removed %before-header, add %code-top as the
2633 alternative to the pre-prologue. Mentioned at
2634 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2635 Also, let the prologue alternatives appear in the grammar section.
2636 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2637 (prologue_declaration): Move the existing prologue alternatives to...
2638 (grammar_declaration): ... here and add %code-top.
2639 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2640
2641 Clean up and extend documentation for the prologue alternatives.
2642 * NEWS (2.3a+): Describe prologue alternatives.
2643 * doc/bison.texinfo (Prologue): Move discussion of prologue
2644 alternatives to...
2645 (Prologue Alternatives): ... this new section, and extend it to discuss
2646 all 4 directives in detail.
2647 (Table of Symbols): Clean up discussion of prologue alternatives and
2648 add %code-top.
2649
26502006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2651
2652 DJGPP specific issues.
2653
2654 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2655 config.bat accordingly.
2656 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2657 * djgpp/config.site: Likewise.
2658
26592006-10-16 Paolo Bonzini <bonzini@gnu.org>
2660
2661 Replace %*-header with %provides, %requires, %code. See discussion at
2662 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2663
2664 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2665 (b4_user_start_header): Remove.
2666 * data/glr.c: Use new macros instead of b4_*start_header
2667 and b4_*end_header.
2668 * data/glr.cc: Likewise.
2669 * data/lalr1.cc: Likewise.
2670 * data/push.c: Likewise.
2671 * data/yacc.c: Likewise.
2672
2673 * doc/bison.texinfo: Remove %before-header, rename
2674 %{start,end,after}-header to %requires, %provides, %code.
2675
2676 * src/parse-gram.y: Likewise (also rename token names accordingly).
2677 * src/scan-gram.l: Likewise.
2678 * tests/actions.at: Likewise.
2679
26802006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2681
2682 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2683 Problem reported by Joel E. Denny.
2684
26852006-10-14 Jim Meyering <jim@meyering.net>
2686
2687 (Sync from coreutils.)
2688 Work also when the working directory (with e.g. coreutils sources)
2689 is version controlled with git, rather than CVS.
2690 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2691 rather than CVS.
2692 In messages and comments, say e.g., "checked-out sources",
2693 rather than "CVS sources".
2694 (version_controlled_file): New function. Work for git as well as
2695 for CVS. Don't use grep's -q option.
2696 (slurp): Call it here, in place of CVS-specific code.
2697
26982006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
2699
2700 Fix testsuite for ./configure --enable-gcc-warnings:
2701 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
2702 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
2703 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
2704 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
2705 * test/regression.at (Diagnostic that expects two alternatives):
2706 Likewise.
2707
27082006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2709
2710 * bootstrap.conf (gnulib_modules): Add config-h.
2711 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
2712 worry about HAVE_CONFIG_H.
2713 * lib/abitset.c: Likewise.
2714 * lib/bitset.c: Likewise.
2715 * lib/bitset_stats.c: Likewise.
2716 * lib/bitsetv-print.c: Likewise.
2717 * lib/bitsetv.c: Likewise.
2718 * lib/ebitset.c: Likewise.
2719 * lib/get-errno.c: Likewise.
2720 * lib/lbitset.c: Likewise.
2721 * lib/subpipe.c: Likewise.
2722 * lib/timevar.c: Likewise.
2723 * lib/vbitset.c: Likewise.
2724 * lib/bitset.c: Include "bitset.h" first, to test interface.
2725 * lib/bitset_stats.c: Include "bitset_stats.h" first.
2726 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
2727 * lib/bitsetv.c: Include "bitsetv.h" first.
2728 * lib/get-errno.c: Include "get-errno.h" first.
2729 * m4/.cvsignore: Add config-h.m4.
2730 * tests/actions.at (Default %printer and %destructor for ...):
2731 Adjust expected line numbers in output to reflect removal of #if
2732 HAVE_CONFIG_H lines.
2733 * tests/glr-regression.at (Missed %merge type warnings when ...):
2734 Likewise.
2735 * tests/regression.at (Braced code in declaration in rules section):
2736 Likewise.
2737 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
2738 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
2739 Include <config.h> unconditionally.
2740
2741 * bootstrap: Sync from coreutils, as follows:
2742
2743 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2744
2745 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2746 variable was sometimes used without being initialized. This
2747 messed up the installation of the INSTALL file in some cases.
2748
2749 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2750
2751 * bootstrap (usage, main program, symlink_to_gnulib): Add option
2752 --copy. Inspired by a suggestion from Bruno Haible.
2753
2754 2006-10-03 Jim Meyering <jim@meyering.net>
2755
2756 * bootstrap: Undo last change to this file, since now gnulib-tool
2757 sticks with the automake default in generating dependencies.
2758
27592006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2760
2761 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
2762 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
2763
2764 * doc/bison.1: Add copyright notice.
2765
2766 * data/glr.c: Don't include <stdarg.h>; not used.
2767
2768 * NEWS: The -g and --graph options now output graphs in Graphviz
2769 DOT format, not VCG format.
2770 * doc/bison.1: Likewise.
2771 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
2772 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
2773 of this change in
2774 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
2775 * TODO: Remove Graphviz entry.
2776 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
2777 remove vcg.c, vcg.h, vcg_defaults.h.
2778 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
2779 * src/graphviz.c, src/graphviz.h: New files.
2780 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
2781 * src/files.h: Make comment more generic.
2782 * src/main.c (main): Likewise.
2783 * src/print_graph.h: Likewise.
2784 * src/getargs.c (usage): Make usage description more generic.
2785 * src/print_graph.c: Include graphviz.h rather than vcg.h.
2786 (static_graph, fgraph): Remove. All uses changed to pass
2787 arguments instead of sharing a static var.
2788 (print_core, print_actions, print_state, print_graph):
2789 Output graphviz format rather than VCG format.
2790 * tests/.cvsignore: Remove *.vcg; add *.dot.
2791 * tests/output.at: Expect *.dot files, not *.vcg files.
2792
2793 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
2794 accommodates the 2006-10-08 change.
2795
27962006-10-11 Bob Rossi <bob@brasko.net>
2797
2798 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
2799 (b4_yyssa, b4_yyerror_range): New macros.
2800 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
2801 (yypvarsinit): Remove init of removed fields.
2802 (yypushparse): Remove use of removed fields; use new macros instead.
2803
28042006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2805
2806 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
2807 in a push parser. Reindent slightly to match yacc.c better.
2808
28092006-10-11 Bob Rossi <bob@brasko.net>
2810
2811 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
2812 yymsg_alloc fields.
2813 (yypvarsinit, yypushparse): Remove init of removed fields.
2814 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
2815
28162006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2817
2818 * THANKS: Add Paolo Bonzini and Bob Rossi.
2819
28202006-10-08 Paolo Bonzini <bonzini@gnu.org>
2821
2822 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
2823 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
2824 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
2825 b4_define_user_cde and uses): Remove.
2826 (b4_comment, b4_prefix, b4_sync_start): New.
2827 * data/bison.m4: New file, with most of the content removed from c.m4.
2828 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
2829 * src/output.c (output_skeleton): Pass bison.m4.
2830 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
2831 only if specified.
2832
28332006-10-05 Paul Eggert <eggert@cs.ucla.edu>
2834
2835 Fix test failure reported by Tom Lane in
2836 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
2837 and try to make such failures easier to catch in the future.
2838 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
2839 that's now the caller's responsibility.
2840 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
2841 Set yychar = YYEOF if it's negative.
2842 * tests/actions.at (yylex): Abort if asked to read past EOF.
2843 * tests/conflicts.at (yylex): Likewise.
2844 * tests/cxx-type.at (yylex): Likewise.
2845 * tests/glr-regression.at (yylex): Likewise.
2846 * tests/input.at (yylex): Likewise.
2847 * tests/regression.at (yylex): Likewise.
2848 * tests/torture.at (yylex): Likewise.
2849
28502006-10-01 Paul Eggert <eggert@cs.ucla.edu>
2851
2852 Fix problems with translating English-language diagnostics.
2853 * bootstrap: Fix bug introduced in recent bootstrap changes, with
2854 respect to bison-runtime pot generation. The YY_ stuff
2855 wasn't being captured.
2856 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
2857 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
2858 * runtime-po/POTFILES.in: Add data/push.c.
2859
28602006-09-29 Paul Eggert <eggert@cs.ucla.edu>
2861
2862 Merge bootstrap changes from coreutils.
2863
2864 2006-09-28 Jim Meyering <jim@meyering.net>
2865
2866 Automatically generated dependencies are important even
2867 when all of the sources in a directory come from gnulib.
2868 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
2869 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
2870
2871 2006-09-23 Jim Meyering <jim@meyering.net>
2872
2873 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
2874
2875 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2876
2877 * bootstrap: Add support for --force.
2878 (usage): New function. Describe usage less tersely.
2879 (CVS_only_file): New var.
2880
28812006-09-21 Paul Eggert <eggert@cs.ucla.edu>
2882
2883 * data/push.c (YYPUSH_MORE): Make it an enum instead.
2884 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
2885 Adjust white space and comments to match GNU style better.
2886
28872006-09-20 Bob Rossi <bob@brasko.net>
2888
2889 * data/push.c (yyresult_get): Remove function.
2890 (YYPUSH_MORE): Add #define.
2891 (yypushparse): Modify return value.
2892
28932006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2894
2895 * stamp-h.in: Remove; no longer needed.
2896 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
2897 Remove config.h, config.hin, intl (no longer created).
2898 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
2899 stamp-h1.
2900
2901 Sync bootstrap from coreutils, as follows:
2902
2903 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
2904
2905 * bootstrap (symlink_to_gnulib): New function.
2906 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
2907 to copies-of-gnulib.
2908 (cp_mark_as_generated, slurp, gnulib_files):
2909 Avoid making a copy if it's the same as the old version.
2910 (gnulib_files): Add support for this variable (used by Bison).
2911
29122006-09-20 Paul Eggert <eggert@cs.ucla.edu>
2913
2914 * src/getargs.c (usage): Rework to use conventions similar to
2915 coreutils, to make translation a bit easier and the code a bit
2916 smaller. Problem reported by Tim Van Holder.
2917
29182006-09-15 Paul Eggert <eggert@cs.ucla.edu>
2919
2920 Use some of gnulib's new modules, taken from coreutils.
2921
2922 * bootstrap: Sync from coreutils, except add support for gnulib_files.
2923 * bootstrap.conf: New file.
2924 (gnulib_modules): Add configmake, inttypes, unistd.
2925 (XGETTEXT_OPTIONS): Add complain, complain_at,
2926 fatal, fatal_at, warn, warn_at, unexpected_end.
2927 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
2928 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
2929 (gl_EARLY): Add.
2930 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
2931 (gl_INIT): Add
2932 (GNULIB_AUTOCONF_SNIPPET): Remove.
2933 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
2934 the pickiest.
2935 * lib/.cvsignore: Add inttypes_.h.
2936 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
2937 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
2938 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
2939 no-longer-necessary initializations.
2940 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
2941 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
2942 use the unistd module.
2943 * src/system.h: Likewise.
2944 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
2945 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
2946 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
2947 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
2948 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
2949 * src/system.h: Include inttypes.h unconditionally, now that we
2950 use the inttypes module. Don't bother to include stdint.h, since
2951 inttypes.h now does that for us.
2952 (LOCALEDIR): Remove, now that we use the configmake module.
2953 * src/getargs.c: Include configmake.h.
2954 * src/main.c: Likewise.
2955 * src/output.c: Likewise.
2956 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
2957 not from $abs_top_builddir, since config.h moved.
2958
2959
2960 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
2961 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
2962
2963 * src/parse-gram.y (symbol_declaration): Don't put statements
2964 before declarations; it's not portable to C89.
2965 * src/scan-code.l (handle_action_at): Likewise.
2966
2967 * src/scan-code.l: Always initialize braces_level; the old code
2968 left it uninitialized and therefore had undefined behavior.
2969
2970 Don't attempt to redefine 'assert', since it runs afoul of
2971 systems where standard headers (mistakenly) include <assert.h>.
2972 Instead, define and use our own alternative, called 'aver'.
2973 * src/reader.c: Don't include assert.h, since we no longer
2974 use assert.
2975 * src/scan-code.l: Likewise.
2976 * src/system.h (assert): Remove, replacing with....
2977 (aver): New function, taking a bool arg. All uses changed.
2978 * src/tables.c (pack_vector): Ensure that aver arg is bool,
2979 not merely an integer.
2980
29812006-09-15 Bob Rossi <bob@brasko.net>
2982
2983 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
2984 * data/c.m4 (YYPUSH): New.
2985 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
2986 * src/getargs.c (push_parser): New var.
2987 * src/getargs.h (push_parser): New declaration.
2988 * src/output.c (prepare): Add macro insertion of `push_flag'.
2989 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
2990 (prologue_declaration): Parse %push-parser.
2991 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
2992 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
2993 list of removed lines from the traces observed.
2994 (AT_CHECK_CALC_LALR): Added push parser tests.
2995
29962006-09-13 Paul Eggert <eggert@cs.ucla.edu>
2997
2998 * NEWS: Version 2.3a.
2999 * configure.ac (AC_INIT): Likewise.
3000
3001 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3002 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3003 due to header ordering dependencies. I don't know why the #define
3004 was there.
3005
3006 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3007 runtime cost when YYDEBUG is not defined, and so that some tests
3008 that used to fail now work. Problem and initial suggestion by
3009 Paolo Bonzini.
3010 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3011 * data/glr.cc (b4_parser_class_name):
3012 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3013 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3014 (yydebug_) [YYDEBUG]: New member.
3015 (yycdebug_): Now defined only if YYDEBUG.
3016 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3017 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3018 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3019 if YYYDEBUG.
3020 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3021 Define only if YYDEBUG.
3022 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3023 set_debug_level.
3024 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3025 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3026 AT_CHECK_CALC_GLR_CC that are working now.
3027
30282006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3029
3030 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3031 We don't need them in glr.cc, and glr.c defines them.
3032 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3033 assumes that defining it to anything is the same as defining
3034 it to 1. Problem reported by Paolo Bonzini.
3035
30362006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3037
3038 * data/c.m4 (b4_null, b4_case): Define.
3039 * src/output.c (prepare_symbols): Use b4_null.
3040 (user_actions_output): Use b4_case.
3041
30422006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3043
3044 * data/glr.c (b4_shared_declarations): Put start-header first,
3045 before any #includes that we generate, so that feature-test
3046 macros work. Problem reported by Michael Deutschmann in
3047 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3048 * data/lalr1.cc: Likewise.
3049 * doc/bison.texinfo (Prologue): Document that feature-test macros
3050 should be defined before any Bison declarations.
3051 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3052 that depend on location.hh after, not before, Bison decls, since
3053 we now include location.hh after the first user prologue.
3054
3055 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3056 Sander Brandenburg in
3057 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3058 Also, fix minor white space and comment issues.
3059 (Prologue): Mention that it's better to define feature-test macros
3060 before Bison declarations. Problem reported by Michael Deutschmann.
3061
3062 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3063 by Jim Meyering.
3064 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3065 This adjusts to recent gnulib changes.
3066
30672006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3068
3069 Finish implementation of per-type %destructor/%printer. Discussed
3070 starting at
3071 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3072 and
3073 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3074 * NEWS (2.3+): Add a description of this feature to the default
3075 %destructor/%printer description.
3076 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3077 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3078 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3079 list node contains a semantic type.
3080 * src/symtab.c, src/symtab.h: Extend with a table that associates
3081 semantic types with their %destructor's and %printer's.
3082 (semantic_type_from_uniqstr, semantic_type_get,
3083 semantic_type_destructor_set, semantic_type_printer_set): New functions
3084 composing the public interface of that table.
3085 (symbol_destructor_get, symbol_destructor_location_get,
3086 symbol_printer_get, symbol_printer_location_get): If there's no
3087 per-symbol %destructor/%printer, look up the per-type before trying
3088 the default.
3089 * tests/actions.at (Per-type %printer and %destructor): New test case.
3090 * tests/input.at (Default %printer and %destructor redeclared):
3091 Extend to check that multiple occurrences of %symbol-default in a
3092 single %destructor/%printer declaration is an error.
3093 (Per-type %printer and %destructor redeclared, Unused values with
3094 per-type %destructor): New test cases.
3095
30962006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3097
3098 Require default %destructor/%printer to be declared using
3099 %symbol-default instead of an empty symbol list, and start working on
3100 new per-type %destructor/%printer. Discussed at
3101 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3102 * NEWS (2.3+): Add %symbol-default to example.
3103 * bison.texinfo (Freeing Discarded Symbols): Likewise.
3104 (Table of Symbols): Add entry for %symbol-default.
3105 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3106 (generic_symlist, generic_symlist_item): New nonterminals for creating
3107 a list in which each item is a symbol, semantic type, or
3108 %symbol-default.
3109 (grammar_declaration): Use generic_symlist in %destructor and %printer
3110 declarations instead of symbols.1 or an empty list.
3111 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3112 for changes to symbol_list.
3113 * src/reader.c: Update for changes to symbol_list.
3114 * src/scan-code.l: Likewise.
3115 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3116 * src/symlist.c, src/symlist.h: Extend such that a list node may
3117 represent a semantic type or a %symbol-default in addition to just an
3118 ordinary symbol. Add switched functions for setting %destructor's and
3119 %printer's.
3120 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3121 %destructor/%printer declarations.
3122
31232006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3124
3125 Whether the default %destructor/%printer applies to a particular symbol
3126 isn't a question of whether the user *declares* that symbol (in %token,
3127 for example). It's a question of whether the user by any means
3128 *defines* the symbol at all (by simply using a char token, for
3129 example). $end is defined by Bison whereas any other token with token
3130 number 0 is defined by the user. The error token is always defined by
3131 Bison regardless of whether the user declares it with %token, but we
3132 may one day let the user define error as a nonterminal instead.
3133 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3134 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3135 the meaning of "user-defined".
3136 * tests/actions.at (Default %printer and %destructor for user-declared
3137 end token): Rename to...
3138 (Default %printer and %destructor for user-defined end token): ...
3139 this.
3140
3141 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3142 computation of whether to apply the default, don't maintain a list of
3143 every Bison-defined symbol. Instead, just check for a first character
3144 of '$', which a user symbol cannot have, and check for the error token.
3145
31462006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3147
3148 Don't apply the default %destructor or %printer to the error token,
3149 $undefined, or $accept. This change fits the general rule that the
3150 default %destructor and %printer are only for user-declared symbols,
3151 and it solves several difficulties that are described in the new test
3152 cases listed below.
3153 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3154 * tests/actions.at (Default %printer and %destructor are not for error
3155 or $undefined, Default %printer and %destructor are not for $accept):
3156 New test cases.
3157
31582006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3159
3160 Allow %start after the first rule.
3161 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3162 when parsing the first rule.
3163 (check_and_convert_grammar): Search for it here after all grammar
3164 declarations have been parsed. Skip midrules, which have dummy LHS
3165 nonterminals.
3166 * src/symtab.c (symbol_is_dummy): New function.
3167 * src/symtab.h (symbol_is_dummy): Declare it.
3168 * tests/input.at (%start after first rule): New test.
3169
31702006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3171
3172 Redo some of the previous commit: add back the ability to use
3173 non-aliased/undeclared string literals since it might be useful to
3174 those declaring %token-table.
3175 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3176 commit: don't worry about complaints from symbols_pack.
3177 * src/symtab.c (symbol_new, symbol_class_set,
3178 symbol_check_alias_consistency): Undo changes in previous commit: count
3179 each string literal as a new symbol and token, assign it a symbol
3180 number, and don't complain about non-aliased string literals.
3181 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3182 and token counts but does still set aliased tokens to the same number,
3183 symbol_pack_processor now leaves empty slots in the symbols array.
3184 Remove those slots.
3185 * tests/regression.at (Undeclared string literal): Remove test case
3186 added in previous commit since non-aliased string literals are allowed
3187 again.
3188 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3189 remove unnecessary string literal declarations.
3190 * tests/sets.at (Firsts): Likewise.
3191
31922006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3193
3194 Don't allow an undeclared string literal, but allow a string literal to
3195 be used before its declaration.
3196 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3197 symbols_pack complained.
3198 * src/symtab.c (symbol_new): Don't count a string literal as a new
3199 symbol.
3200 (symbol_class_set): Don't count a string literal as a new token, and
3201 don't assign it a symbol number since symbol_make_alias does that.
3202 (symbol_make_alias): It's not necessary to decrement the symbol and
3203 token counts anymore. Don't assume that an alias declaration occurs
3204 before any uses of the identifier or string, and thus don't assert that
3205 one of them has the highest symbol number so far.
3206 (symbol_check_alias_consistency): Complain if there's a string literal
3207 that wasn't declared as an alias.
3208 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3209 symbol_pack asserts that every token has been assigned a symbol number
3210 although undeclared string literals have not.
3211 * tests/regression.at (String alias declared after use, Undeclared
3212 string literal): New test cases.
3213 (Characters Escapes, Web2c Actions): Declare string literals as
3214 aliases.
3215 * tests/sets.at (Firsts): Likewise.
3216
32172006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3218
3219 In the grammar scanner, STRING_FINISH unclosed constructs and return
3220 them to the parser in order to improve error messages.
3221 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3222 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3223 * tests/input.at (Unclosed constructs): New test case.
3224 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3225 seen.
3226
3227 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3228 unused global.
3229
32302006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3231
3232 Handle string aliases for character tokens correctly.
3233 * src/symtab.c (symbol_user_token_number_set): If the token has an
3234 alias, check and set its alias's user token number instead of its own,
3235 which is set to indicate the alias. Previously, every occurrence of
3236 the character token in the grammar overwrote that alias indicator with
3237 the character code.
3238 * tests/input.at (String aliases for character tokens): New test.
3239
32402006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3241
3242 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3243
32442006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3245
3246 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3247 to prevent failures when building on older platforms.
3248 Check for autopoint failure.
3249 Set XGETTEXT_OPTIONS to values that check for C format strings,
3250 so that translators are warned about them (this also helps
3251 prevent core dumps).
3252
3253 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3254 function, since it simplifies our code a bit.
3255
3256 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3257 rather than -W, so we don't get bogus warnings about sign comparisons.
3258 Add -Wpointer-arith, since that warning is useful (it reports code
3259 that does not conform to C89 and that some compilers reject).
3260 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3261 since it's no longer needed.
3262
32632006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3264
3265 Clean up scanners a bit.
3266 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3267 definitions so gcc won't warn when obstack_for_string is unused.
3268 * src/scan-code.l: config.h and system.h are already #include'd by
3269 scan-code-c.c, so get rid of them here.
3270 * src/scan-gram.l: Likewise.
3271 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3272 definitions rather than duplicating the rest of it.
3273 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3274
32752006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3276
3277 Suppress signed/unsigned comparison warnings for yycheck.
3278 * data/c.m4 (b4_safest_int_type): New macro.
3279 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3280 a signed int type, cast it to b4_safest_int_type first.
3281 * data/yacc.c: Likewise.
3282 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3283 also overwritten.
3284
32852006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3286
3287 * doc/bison.texinfo: Fix some typos.
3288
32892006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3290
3291 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3292 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3293
3294 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3295 the latest gnulib does this a different way.
3296 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3297 translation was patched, so stop omitting it.
3298
32992006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3300
3301 Enable declaration of default %printer/%destructor. Make the parser
3302 use these for all user-declared grammar symbols for which the user does
3303 not declare a specific %printer/%destructor. Thus, the parser uses it
3304 for token 0 if the user declares it but not if Bison generates it as
3305 $end. Discussed starting at
3306 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3307 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3308 and
3309 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3310 * NEWS (2.3+): Mention.
3311 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3312 declare a %destructor for a mid-rule's semantic value. It's just
3313 impossible to declare one specific to it.
3314 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3315 code. Describe default %destructor form.
3316 * src/parse-gram.y (grammar_declaration): Parse default
3317 %printer/%destructor declarations.
3318 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3319 and symbol_destructor_location_get rather than accessing the destructor
3320 and destructor_location members of struct symbol.
3321 (symbol_printers_output): Likewise but for %printer's.
3322 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3323 again.
3324 * src/symtab.c (default_destructor, default_destructor_location,
3325 default_printer, default_printer_location): New static global
3326 variables to record the default %destructor and %printer.
3327 (symbol_destructor_get, symbol_destructor_location_get,
3328 symbol_printer_get, symbol_printer_location_get): New functions to
3329 compute the appropriate %destructor and %printer for a symbol.
3330 (default_destructor_set, default_printer_set): New functions to set the
3331 default %destructor and %printer.
3332 * src/symtab.h: Prototype all those new functions.
3333 * tests/actions.at (Default %printer and %destructor): New test to
3334 check that the right %printer and %destructor are called, that they're
3335 not called for $end, and that $$ and @$ work correctly.
3336 (Default %printer and %destructor for user-declared end token): New
3337 test to check that the default %printer and %destructor are called for
3338 a user-declared end token.
3339 * tests/input.at (Default %printer and %destructor redeclared, Unused
3340 values with default %destructor): New tests to check related grammar
3341 warnings and errors.
3342
33432006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3344
3345 Clean up handling of %destructor for the end token (token 0).
3346 Discussed starting at
3347 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3348 and
3349 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3350
3351 Make the skeletons consistent in how they pop the end token and invoke
3352 its %destructor.
3353 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3354 state, which has token number 0, since this would invoke the
3355 %destructor for the end token.
3356 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3357 until after shifting the end token, or else it won't be popped.
3358 * data/yacc.c (yyparse): Likewise.
3359
3360 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3361 it's the end token. Upon termination, destroy an unshifted lookahead
3362 even when it's the end token.
3363 * data/lalr1.cc (yy::parser::parse): Likewise.
3364 * data/yacc.c (yyparse): Likewise.
3365
3366 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3367 value warnings for the end token when the user gives the end token a
3368 %destructor.
3369
3370 * tests/actions.at (Printers and Destructors): Test all the above.
3371
33722006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3373
3374 Update to latest gnulib and gettext versions.
3375 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3376 Add fopen-safer.
3377 (gnulib_files): Add m4/warning.m4. Don't worry about files
3378 overwritten by autopoint.
3379 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3380 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3381 rejects them.
3382 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3383 so that we can remove the intl files at a better time.
3384 (intl_files_to_remove): Remove aclocal.m4, since it gets
3385 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3386 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3387 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3388 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3389 Remove datarootdir hack; no longer needed.
3390 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3391 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3392 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3393 strdup.h.
3394 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3395 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3396
33972006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3398
3399 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3400 it with --assume-autoconf='latest-stable'.
3401
34022006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3403
3404 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3405 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3406 YYSTYPE' and `{'.
3407 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3408 those from muscle_tab.c since the old ones are misleading.
3409
34102006-07-13 Akim Demaille <akim@epita.fr>
3411
3412 Support %define "KEY" {VALUE}.
3413 * src/scan-code.h, src/scan-code.l (translate_action)
3414 (translate_rule_action, translate_symbol_action, translate_code):
3415 Return char *, not const char *.
3416 * src/parse-gram.y (declaration): Rename as...
3417 (prologue_declaration): this.
3418 (string_content): Remove this nonterminal, use STRING.
3419 (braceless, content, content.opt): New nonterminal.
3420 Use them.
3421 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3422 as value.
3423 * src/scan-gram.l (getargs.h): Don't include it.
3424
34252006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3426
3427 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3428 rather than a for-loop that declares a local bool variable. This
3429 should work around a compatibility problem with a Cray x1e C++
3430 compiler reported by Hung Nguyen in
3431 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3432 The for-loop was introduced in the 2004-11-17 change but I don't
3433 know why it was needed.
3434
34352006-07-12 Akim Demaille <akim@epita.fr>
3436
3437 * data/c.m4: Comment changes.
3438
34392006-07-10 Akim Demaille <akim@lrde.epita.fr>
3440
3441 * src/complain.c (error_message, ERROR_MESSAGE): New.
3442 To factor...
3443 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3444 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3445
34462006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3447
3448 * NEWS: Instead of %union, you can define and use your own union type
3449 YYSTYPE if your grammar contains at least one <type> tag.
3450 Your YYSTYPE need not be a macro; it can be a typedef.
3451 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3452 (Union Decl, Decl Summary): Document this.
3453 * data/glr.c (YYSTYPE): Implement this.
3454 * data/glr.cc (YYSTYPE): Likewise.
3455 * data/lalr1.cc (YYSTYPE): Likewise.
3456 * data/yacc.c (YYSTYPE): Likewise.
3457 * src/output.c (prepare): Output tag_seen_flag.
3458 * src/parse-gram.y (declaration, grammar_declaration):
3459 Use 'union_seen' rather than 'typed' to determine whether
3460 %union has been seen, since grammars can now be typed without
3461 %union.
3462 (symbol_declaration, type.opt, symbol_def):
3463 Keep track of whether a tag has been seen.
3464 * src/reader.c (union_seen, tag_seen): New vars.
3465 (typed): remove.
3466 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3467 * src/scan-code.l (untyped_var_seen): New variable.
3468 (handle_action_dollar): Adjust to above changes.
3469 (handle_action_dollar, handle_action_at):
3470 Improve overflow checking for outlandish numbers.
3471 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3472 avoid new diagnostics generated by above changes.
3473 * tests/regression.at (YYSTYPE typedef): Add test to check
3474 for type tags without %union.
3475
3476 * src/symlist.c (symbol_list_length): Return int, not unsigned
3477 int, since callers expect int. This may need to get revisited
3478 once we have proper integer overflow checking.
3479
3480 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3481 object is now static.
3482
3483 * src/getargs.c (flags_argmatch): Return void, not int,
3484 to pacify ./configure --enable-gcc-warnings.
3485
3486 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3487 since last_string is already defined to FLEX_PREFIX (last_string).
3488
34892006-07-09 Akim Demaille <akim@lrde.epita.fr>
3490
3491 Implement --warnings/-W.
3492 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3493 replaced by...
3494 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3495 Adjust callers.
3496 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3497 (warnings_args, warnings_types): New.
3498 (getargs, short_options, long_options): Accept -W/--warnings.
3499 Sort the options by alphabetical order, upper case letter right
3500 before its lower case.
3501
35022006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3503
3504 Change %merge result type clash warnings to errors. Discussed at
3505 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3506 * src/reader.c (record_merge_function_type): Use complain_at.
3507 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3508 declared later): Update test case results.
3509
35102006-07-09 Akim Demaille <akim@lrde.epita.fr>
3511
3512 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3513 to be in alphabetical order.
3514 (trace_args): Spelling fixes.
3515
35162006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3517
3518 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3519 so they don't collide with user-defined macros.
3520 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3521 this was never guaranteed, and now that we're using gnulib stdint,
3522 which defines int_fast16_t to long int, the problem is exposed.
3523
35242006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3525
3526 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3527 need the full POSIX semantics (and weren't implementing them
3528 anyway).
3529
3530 Adjust to Autoconf 2.60 and today's gnulib.
3531 * bootstrap (gnulib_modules): Add stdint.
3532 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3533 no longer copies it.
3534 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3535 since stdint needs the former and wcwidth (which is now required
3536 by mbswidth) needs the latter.
3537 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3538 work around a compatibility glitch between gettext 0.14.6 and
3539 Autoconf 2.60.
3540 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3541 Do not check for uintptr_t, since new stdint module does the right
3542 thing.
3543 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3544 Add stdint.h, stdint_.h, wcwidth.h.
3545 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3546 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3547 stdint.m4, wchar_t.m4, wcwidth.m4.
3548 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3549 usual order for ../lib/*.h files.
3550 (file_name_split): Use last_component, not base_name, to adjust
3551 to gnulib changes.
3552 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3553 for ../lib/*.h files.
3554 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3555 Define unconditionally, since we now assume the stdint module.
3556 * src/scan-skel.l: Include <dirname.h>.
3557 (BASE_QPUTS): Use last_component, not base_name.
3558 * src/system.h: Include <unlocked-io.h> in the usual order
3559 for ../lib/*.h files. Include <stdint.h> unconditionally,
3560 since we now use the stdint module.
3561 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3562 HAVE_UINTPTR_T, since we now use the stdint module.
3563 (base_name): Remove decl, since files now include <dirname.h>
3564 to get the decl.
3565
35662006-07-08 Akim Demaille <akim@lrde.epita.fr>
3567
3568 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3569 New, default to 1.
3570 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3571 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3572 default.
3573 * tests/calc.at: Adjust.
3574
35752006-07-08 Akim Demaille <akim@lrde.epita.fr>
3576
3577 * data/c.m4 (b4_basename): New.
3578 (b4_syncline): Also output the location of its invocation (from
3579 the skeleton).
3580 (b4_user_action, b4_define_user_action, b4_user_actions)
3581 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3582 (b4_user_stype): New.
3583 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3584
35852006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3586
3587 In the grammar file, the first column is 1 not 0 on the first line as
3588 on every other line.
3589 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3590 * tests/input.at (Torturing the Scanner): Update output.
3591
3592 * src/scan-gram.l (scanner_cursor): Declare it static.
3593
35942006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3595
3596 In warnings, say "previous declaration" rather than "first
3597 declaration".
3598 * src/symtab.c (redeclaration): Do that here.
3599 * src/reader.c (record_merge_function_type): In the case of a result
3600 type clash, report the previous declaration rather than the very first
3601 one in the grammar file.
3602 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3603 declared later): Add a third declaration to check this behavior.
3604 * tests/input.at (Incompatible Aliases): Update output.
3605
36062006-06-27 Akim Demaille <akim@epita.fr>
3607
3608 * doc/Doxyfile.in: New.
3609 * doc/Makefile.am: Use it.
3610 * src/lalr.h, src/symtab.h: Initial doxygenation.
3611
36122006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3613
3614 Don't miss %merge result type warnings just because the LHS types are
3615 declared after the %merge. This continues the effort of the previous
3616 patch.
3617 * src/reader.c (get_merge_function): Don't set the merger type yet.
3618 (record_merge_function_type): New function for setting the merger type
3619 and checking for clashes.
3620 (grammar_current_rule_merge_set): Set the location of the %merge for
3621 the current rule.
3622 (packgram): Invoke record_merge_function_type for each rule now that
3623 all symbol type declarations have been parsed.
3624 * src/reader.h (merger_list.type_declaration_location): New member
3625 storing the location of the first %merge from which the type for this
3626 merging function was derived.
3627 * src/symlist.h (symbol_list.merger_declaration_location): New member
3628 storing the location of a rule's %merge, if any.
3629 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3630 declared later): New test to catch the error fixed by the above patch.
3631
36322006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3633
3634 Get action warnings (grammar_rule_check) right even when symbol
3635 declarations appear after the rules. Discussed at
3636 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3637 and
3638 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3639 Don't mistake the type of $$ in a midrule to be that of its parent
3640 rule's $$.
3641 * src/reader.c (grammar_current_rule_end): Don't invoke
3642 grammar_rule_check yet since not all symbol declarations may have been
3643 parsed yet.
3644 (grammar_midrule_action): Likewise.
3645 Don't record whether the midrule's $$ has been used yet since actions
3646 haven't been translated yet.
3647 Record the midrule's parent rule and its RHS index within the parent
3648 rule.
3649 (grammar_current_rule_action_append): Don't translate the action yet
3650 since not all symbol declarations may have been parsed yet and, thus,
3651 warnings about types for $$, $n, @$, and @n can't be reported yet.
3652 (packgram): Translate the action and invoke grammar_rule_check now that
3653 all symbol declarations have been parsed.
3654 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3655 after parsing the entire grammar file, the symbol list here in the case
3656 of a midrule is actually the midrule's empty RHS, so reference its
3657 parent rule's RHS where necessary.
3658 On the other hand, now that you can already know it's a midrule, you
3659 aren't forced to think $$ has the same type as its parent rule's $$.
3660 (handle_action_at): In the case of a midrule, reference the parent rule
3661 where necessary.
3662 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3663 members.
3664 (symbol_list_length): Now that this is invoked after all rules have
3665 been parsed, a NULL symbol (rather than a NULL symbol list node)
3666 terminates a rule. symbol_list_print already does this correctly.
3667 * src/symlist.h (symbol_list.midrule_parent_rule,
3668 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3669 remember their relationships with their parents.
3670 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3671 fixed by the above patch.
3672 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3673 implementing...
3674 (Unused values): ... this old test case and...
3675 (Unused values before symbol declarations): ... this new test case.
3676 This one is the same as `Unused values' except that all symbol
3677 declarations appear after the rules in order to catch the rest of the
3678 errors fixed by the above patch.
3679
36802006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3681
3682 More cleanup.
3683 * src/reader.c (current_rule): Declare it static since it's no longer
3684 used outside this file.
3685 (grammar_current_rule_action_append): Remove redundant arguments from
3686 translate_rule_action invocation.
3687 * src/reader.h (current_rule): Remove this unused extern.
3688 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
3689 * src/scan-code.l (translate_rule_action): Likewise.
3690
36912006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
3692
3693 Clean up yesterday's patch.
3694 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
3695 to...
3696 * src/reader.c (grammar_current_rule_action_append): ... here for
3697 consistency with grammar_current_rule_symbol_append.
3698 * tests/regression.at (Braced code in declaration in rules section):
3699 Make yyerror and yylex static as usual.
3700
37012006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
3702
3703 Fix bug that mistakes braced code in a declaration in the rules section
3704 to be a rule action. Mentioned at
3705 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
3706 * src/scan-gram.l: Move midrule action detection from the start of the
3707 scanning of any braced code to...
3708 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
3709 action. For readability, use $2 and @2 rather than the equivalent
3710 global variables.
3711 * tests/regression.at (Braced code in declaration in rules section):
3712 New test to catch the error fixed by the above patch.
3713
3714 Work on code readability some.
3715 * src/scan-code.l (current_rule): Get rid of this misleading and
3716 redundant declaration: it's actually extern'ed in reader.h.
3717 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
3718 translate_action): Add a rule argument and use it instead of the global
3719 current_rule.
3720 (translate_rule_action): This already receives current_rule through an
3721 argument, so pass it on to translate_action instead of assigning
3722 current_rule to current_rule.
3723 (translate_symbol_action, translate_code): Pass rule = NULL to
3724 translate_action.
3725
37262006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
3727
3728 Rename %before-definitions to %start-header and %after-definitions to
3729 %end-header. Don't use these declarations to separate pre-prologue
3730 blocks from post-prologue blocks. Add new order-independent
3731 declarations %before-header and %after-header as alternatives to the
3732 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
3733 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
3734 * NEWS (2.3+): Update for these changes.
3735 * data/glr.c (b4_before_definitions): Update to...
3736 (b4_start_header): ... this.
3737 (b4_after_definitions): Update to...
3738 (b4_end_header): ... this.
3739 * data/glr.cc: Likewise.
3740 * data/lalr1.cc: Likewise.
3741 * data/yacc.c: Likewise.
3742 * doc/bison.texinfo (The prologue): Update names, and replace remaining
3743 prologue blocks with %*-header declarations.
3744 (Calc++ Parser): Likewise.
3745 (Decl Summary): Update names.
3746 (Table of Symbols): Update description.
3747 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
3748 (PERCENT_END_HEADER): ... this.
3749 (PERCENT_BEFORE_DEFINITIONS): Update to...
3750 (PERCENT_START_HEADER): ... this.
3751 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3752 (declaration): Update token names and m4 macro names.
3753 When parsing %end-header and %start-header, invoke translate_code
3754 before muscle_code_grow, and no longer set global booleans to remember
3755 whether these declarations have been seen.
3756 Parse new %after-header and %before-header.
3757 * src/reader.c (before_definitions, after_definitions): Remove.
3758 (prologue_augment): Accept a new bool argument to specify whether to
3759 augment the pre-prologue or post-prologue.
3760 * src/reader.h (before_definitions, after_definitions): Remove these
3761 extern's.
3762 (prologue_augment): Add new bool argument.
3763 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
3764 (PERCENT_END_HEADER): ... this.
3765 (PERCENT_BEFORE_DEFINITIONS): Update to...
3766 (PERCENT_START_HEADER): ... this.
3767 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3768 * tests/actions.at (Printers and Destructors): Update names.
3769
37702006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
3771
3772 Add comparison operators for C++ location classes. Discussed at
3773 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
3774 * data/c++.m4 (b4_define_location_comparison): New boolean %define
3775 declaration indicating whether filename_type has an operator==. If
3776 filename_type is `std::string', it defaults to `1', `0' otherwise.
3777 * data/location.cc: Iff b4_define_location_comparison is `1', add
3778 operator== and operator!= for class position and for class location.
3779
3780 Some minor fixes.
3781 * src/scan-action.l: Remove unused file.
3782 * src/symtab.c (symbol_printer_set): Use printer_location not
3783 destructor_location.
3784 * src/symtab.h (struct symbol): Replace incorrect source comment for
3785 printer members.
3786 * tests/input.at (Incompatible Aliases): Update output with correct
3787 printer location.
3788
37892006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
3790
3791 Don't put the pre-prologue in the header file. For the yacc.c code
3792 file and the glr.c header and code files, move the pre-prologue before
3793 the token definitions. Add new %before-definitions and
3794 %after-definitions to declare code that will go in both the header file
3795 and code file. Discussed at
3796 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
3797 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
3798 and
3799 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
3800 * NEWS (2.3+): Describe these changes.
3801 * data/glr.c (b4_pre_prologue): Move from within to before...
3802 (b4_shared_declarations): ... this.
3803 Add new b4_before_definitions before b4_token_enums.
3804 Add new b4_after_definitions at the end.
3805 * data/glr.cc (b4_pre_prologue): Replace with...
3806 (b4_before_definitions): ... this in the header file.
3807 (b4_after_definitions): New near the end of the header file.
3808 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
3809 code file right before including the header file.
3810 (b4_before_definitions): New in the previous position of
3811 b4_pre_prologue in the header file.
3812 (b4_after_definitions): New near the end of the header file.
3813 * data/yacc.c: Clean up some m4 quoting especially in the header file.
3814 (b4_token_enums_defines): In the code file, move to right before
3815 YYSTYPE for consistency with the header file.
3816 (b4_before_definitions): New right before b4_token_enums_defines in
3817 both the header and code file.
3818 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
3819 header and code file.
3820 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
3821 of prologues for %union dependencies.
3822 (Decl Summary): In %defines description, mention the effect of
3823 %before-definitions and %after-definitions on the header file.
3824 (Calc++ Parser): Forward declare driver in a %before-definitions rather
3825 than in the pre-prologue so that make check succeeds.
3826 (Table of Symbols): Add entries for %before-definitions and
3827 %after-definitions.
3828 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
3829 %before-definitions.
3830 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
3831 (declaration): Parse those declarations and append to
3832 b4_before_definitions and b4_after_definitions, respectively.
3833 * src/reader.c (before_definitions, after_definitions): New bools to
3834 track whether those declarations have been seen.
3835 (prologue_augment): Add to the post-prologue if %union,
3836 %before-definitions, or %after-definitions has been seen.
3837 * src/reader.h (before_definitions, after_definitions): New extern's.
3838 * src/scan-gram.l: Scan the new declarations.
3839 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
3840 prologue block in a %before-definitions or a %after-definitions based
3841 on whether the %union is declared.
3842 * tests/regression.at (Early token definitions with --yacc, Early token
3843 definitions without --yacc): Move tests for token definitions into the
3844 post-prologue since token names are no longer defined in the
3845 pre-prologue.
3846
38472006-06-20 Akim Demaille <akim@epita.fr>
3848
3849 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
3850 (symbol_get): Use it.
3851 * src/parse-gram.y: Use it.
3852
38532006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
3854
3855 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
3856 build succeeds when configured with --enable-gcc-warnings.
3857
38582006-06-19 Paul Eggert <eggert@cs.ucla.edu>
3859
3860 * src/parse-gram.y (char_name): New function.
3861 (CHAR, STRING, string_content): For %printer, properly escape.
3862 (ID): Prefer fputs to fprintf.
3863 (id): Reindent to be consistent with other rules.
3864 Properly quote char.
3865
3866 The Translation Project changed its way of publishing translations
3867 to maintainers. I haven't received any responses to my request
3868 for supporting the old way, or for documenting the new way. I
3869 have modified 'bootstrap' to use screen scraping
3870 (in this case, HTML scraping). This is unreliable and inelegant,
3871 but I don't see any better way. Yuck.
3872 * bootstrap (TP_URL, WGET_COMMAND): New vars.
3873 (get_translations): New function, which uses HTML scraping to
3874 deduce locations of latest translations.
3875 Use this function to grab both bison and bison-runtime .po files.
3876 Don't bother priming the pump for the runtime-po domain any more,
3877 as it's now translated better than bison is.
3878
38792006-06-19 Akim Demaille <akim@epita.fr>
3880
3881 * src/scan-gram.l: No longer "parse" things after `%union' until
3882 `{'. Rather, return a single "%union" token.
3883 No longer make symbols: return strings, and leave the conversion
3884 to symbols to the parser.
3885 (SC_PRE_CODE, token_type): Remove.
3886 * src/parse-gram.y (%union): New field `character'.
3887 Sort tokens.
3888 (CHAR): New token.
3889 (ID, ID_COLON): Now that the scanner no longer makes them
3890 identifiers, adjust all uses to invoke symbol_get.
3891 (id_colon): New, wraps the conversion from string to symbol.
3892 (%union): Accept a possible union_name.
3893 (symbol): Now can be a char.
3894 * data/c.m4 (b4_union_name): Leave a default value.
3895 * data/glr.c, data/yacc.c: Use it.
3896
38972006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
3898
3899 For associating token numbers with token names for "yacc.c", don't use
3900 #define statements unless `--yacc' is specified; always use enum
3901 yytokentype. Most important discussions start at:
3902 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
3903 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
3904 and
3905 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
3906 * NEWS (2.3+): Mention.
3907 * data/c.m4 (b4_yacc_if): New.
3908 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
3909 token #define's.
3910 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
3911 on token name definitions.
3912 * src/getargs.c (usage): Capitalize `Yacc' in English.
3913 * src/output.c (prepare): Define b4_yacc_flag.
3914 * tests/regression.at (Early token definitions): Test that tokens names
3915 are defined before the pre-prologue not just before the post-prologue.
3916 Remove this test case and copy to...
3917 (Early token definitions with --yacc): ... this to test #define's.
3918 (Early token definitions without --yacc): ... and this to test enums.
3919
39202006-06-11 Paul Eggert <eggert@cs.ucla.edu>
3921
3922 * NEWS: Reword the post-2.3 change to not be so optimistic about
3923 removing the old "look-ahead" spelling.
3924 Update previous look-ahead/lookahead change reports.
3925 * REFERENCES: look-ahead -> lookahead (since that's
3926 what he actually wrote).
3927 * doc/refcard.tex: look ahead -> lookahead,
3928 look-ahead -> lookahead
3929
39302006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
3931
3932 For consistency, use `lookahead' instead of `look-ahead' or
3933 `look_ahead'. Discussed starting at
3934 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
3935 and then at
3936 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
3937 * NEWS: For the next release, note the change to `--report'.
3938 * TODO, doc/bison.1: Update English.
3939 * doc/bison.texinfo: Update English.
3940 (Understanding Your Parser, Bison Options): Document as
3941 `--report=lookahead' rather than `--report=look-ahead'.
3942 * src/conflicts.c: Update English in comments.
3943 (lookahead_set): Rename from look_ahead_set.
3944 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
3945 (resolve_sr_conflict): Rename local look_ahead_tokens to
3946 lookahead_tokens, and update other uses.
3947 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
3948 count_rr_conflicts, conflicts_free): Update uses.
3949 * src/getargs.c (report_args): Move "lookahead" before alternate
3950 spellings.
3951 (report_types): Update uses.
3952 (usage): For `--report' usage description, state `lookahead' spelling
3953 rather than `look-ahead'.
3954 * src/getargs.h (report.report_lookahead_tokens): Rename from
3955 report_look_ahead_tokens.
3956 * src/lalr.c: Update English in comments.
3957 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
3958 (state_lookahead_tokens_count): Rename from
3959 state_look_ahead_tokens_count.
3960 Rename local n_look_ahead_tokens to n_lookahead_tokens.
3961 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
3962 Rename local n_look_ahead_tokens to n_lookahead_tokens.
3963 Update other uses.
3964 Update English in output.
3965 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
3966 * src/print.c: Update English in comments.
3967 (lookahead_set): Rename from look_ahead_set.
3968 (print_reduction): Rename argument lookahead_token from
3969 look_ahead_token.
3970 (print_core, state_default_rule, print_reductions, print_results):
3971 Update uses.
3972 * src/print_graph.c: Update English in comments.
3973 (print_core): Update uses.
3974 * src/state.c: Update English in comments.
3975 (reductions_new): Update uses.
3976 (state_rule_lookahead_tokens_print): Rename from
3977 state_rule_look_ahead_tokens_print, and update other uses.
3978 * src/state.h: Update English in comments.
3979 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
3980 (state_rule_lookahead_tokens_print): Rename from
3981 state_rule_look_ahead_tokens_print.
3982 * src/tables.c: Update English in comments.
3983 (conflict_row, action_row): Update uses.
3984 * tests/glr-regression.at
3985 (Incorrect lookahead during deterministic GLR,
3986 Incorrect lookahead during nondeterministic GLR): Rename
3987 print_look_ahead to print_lookahead.
3988 * tests/torture.at: Update English in comments.
3989 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
3990 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
3991 (Many lookahead tokens): Update uses.
3992 * data/glr.c: Update English in comments.
3993 * lalr1.cc: Likewise.
3994 * yacc.c: Likewise.
3995 * src/conflicts.h: Likewise.
3996 * src/lalr.h: Likewise.
3997 * src/main.c: Likewise.
3998 * src/output.c: Likewise.
3999 * src/parse-gram.c: Likewise.
4000 * src/tables.h: Likewise.
4001 * tests/calc.at: Likewise.
4002
40032006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4004
4005 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4006
40072006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4008
4009 * TODO: Add request from Nelson H. F. Beebe to be able to install
4010 Bison without installing the yacc script.
4011
40122006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4013
4014 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4015 and yytext if they're already #define'd.
4016 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4017 * src/scan-code-c.c: ... here.
4018 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4019 <config.h>.
4020
40212006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4022
4023 Get Bison to build again when configured with --enable-gcc-warnings.
4024 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4025 missing #include's.
4026 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4027 loc argument as it shadows a global.
4028 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4029 invocation.
4030
4031 * src/.cvsignore: Add scan-code.c.
4032
40332006-06-07 Akim Demaille <akim@epita.fr>
4034
4035 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4036 to...
4037 * src/scan-code.l: here.
4038 * tests/input.at (Torturing the Scanner): Fix another location
4039 error.
4040
40412006-06-07 Akim Demaille <akim@epita.fr>
4042
4043 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4044
40452006-06-06 Akim Demaille <akim@epita.fr>
4046
4047 Extract the parsing of user actions from the grammar scanner.
4048 As a consequence, the relation between the grammar scanner and
4049 parser is much simpler. We can also split "composite tokens" back
4050 into simple tokens.
4051 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4052 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4053 rename as...
4054 * src/location.h, src/location.c (add_column_width)
4055 (location_compute): these.
4056 Fix the column count: the initial column is 0.
4057 (location_print): Be robust to ending column being 0.
4058 * src/location.h (boundary_set): New.
4059 * src/main.c: Adjust to scanner_free being renamed as
4060 gram_scanner_free.
4061 * src/output.c: Include scan-code.h.
4062 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4063 Use boundary_set.
4064 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4065 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4066 which is now, again, a separate token.
4067 Adjust all dependencies.
4068 Whereever actions with $ and @ are used, use translate_code.
4069 (action): Remove this nonterminal which is now useless.
4070 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4071 (grammar_current_rule_action_append): Use translate_code.
4072 (packgram): Bound check ruleno, itemno, and rule_length.
4073 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4074 (last_string, last_braced_code_loc, max_left_semantic_context)
4075 (scanner_initialize, scanner_free, scanner_last_string_free)
4076 (gram_out, gram_lineno, YY_DECL_): Move to...
4077 * src/scan-gram.h: this new file.
4078 (YY_DECL): Rename as...
4079 (GRAM_DECL): this.
4080 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4081 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4082 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4083 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4084 Move these declarations, and...
4085 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4086 these to...
4087 * src/flex-scanner.h: this new file.
4088 * src/scan-gram.l (rule_length, rule_length_overflow)
4089 (increment_rule_length): Remove.
4090 (last_braced_code_loc): Rename as...
4091 (gram_last_braced_code_loc): this.
4092 Adjust to the changes of the parser.
4093 Move all the handling of $ and @ into...
4094 * src/scan-code.l: here.
4095 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4096 (handle_action_dollar, handle_action_at): Move to...
4097 * src/scan-code.l: here.
4098 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4099 scan-code.h, scan-code-c.c, scan-gram.h.
4100 (EXTRA_bison_SOURCES): Add scan-code.l.
4101 (BUILT_SOURCES): Add scan-code.c.
4102 (yacc): Be robust to white spaces.
4103
4104 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4105 * tests/regression.at: Adjust the column numbers.
4106 * tests/regression.at: Adjust the error message.
4107
41082006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4109
4110 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4111 Use Akim's wording from
4112 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4113
41142006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4115
4116 Between Bison releases, manually append `+' to the previous Bison
4117 release number, and use that as a signal to automatically print the
4118 ChangeLog's CVS Id keyword from --version. Discussed starting at
4119 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4120 * ChangeLog: Add Id header.
4121 * configure.ac (AC_INIT): Append `+' to `2.3'.
4122 * src/.cvsignore: Add revision.c.
4123 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4124 (BUILT_SOURCES): Add revision.c.
4125 (revision.c): New target rule. This file defines a new global variable
4126 named revision. It initializes it with either the Id from ChangeLog
4127 or, if VERSION doesn't contain `+', with the empty string.
4128 * src/getargs.c (version): Print the value of revision.
4129 * src/revision.h: Extern revision.
4130
41312006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4132
4133 * NEWS: Version 2.3.
4134 * configure.ac (AC_INIT): Likewise.
4135
41362006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4137
4138 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4139 with no arguments, not as an object-like macro. This is for
4140 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4141 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4142 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4143 Document this.
4144
41452006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4146
4147 * src/getargs.c (usage): Back out yesterday's modification of the
4148 --help output so that we don't have to wait for translation before
4149 releasing 2.3.
4150
41512006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4152
4153 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4154 Problem reported by Akim Demaille.
4155
41562006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4157
4158 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4159
41602006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4161
4162 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4163 generated source code. Problem reported by Frans Englich in
4164 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4165
41662006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4167
4168 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4169 shell, not within 'make', so that 'make' by an ordinary builder
4170 (using GNU make) does not worry about configuring gzip. This also
4171 works around a bug reported independently by Keith Thompson and by
4172 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4173 stderr rather than stdout, messing up the build logs.
4174
41752006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4176
4177 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4178 to make sure that YYID will never be unused. This fixes a 'make
4179 maintainer-check' failure caused by the recent changes to the 'Trivial
4180 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4181 not used.
4182 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4183
41842006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4185
4186 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4187 state before an empty RHS is always resolved here. Only the location
4188 of that state is guaranteed to be resolved, and that's enough. This
4189 fixes the remaining bug reported by Derek M. Jones in
4190 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4191 * tests/glr-regression.at (Uninitialized location when reporting
4192 ambiguity): Test the above case.
4193 Also, the embedded comments in this test case claim it checks the case
4194 of an empty RHS that has inherited the initial location. However, the
4195 corresponding LHS was already resolved, so yyresolveLocations didn't
4196 actually have reason to modify it. Fix this by forcing
4197 nondeterministic operation at the beginning of the parse.
4198
41992006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4200
4201 * data/c.m4 (b4_yy_symbol_print_generate):
4202 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4203 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4204 of the bugs reported today by Derek M Jones in
4205 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4206 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4207 defined to be a type name without parens or brackets.
4208 (Location Type): Similarly for YYLTYPE.
4209 * tests/regression.at (Trivial grammars): Put in a test for this
4210 bug that will be caught by 'make maintainer-check' (though not,
4211 alas, by 'make check' unless your compiler is picky).
4212
42132006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4214
4215 * NEWS: Version 2.2.
4216 * configure.ac (AC_INIT): Likewise.
4217
42182006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4219
4220 * data/glr.c (yyreportTree): Make room in yystates for the state
4221 preceding the RHS. This fixes the segmentation fault reported by Derek
4222 M. Jones in
4223 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4224 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4225 to the user. Reported for yyreportTree by Derek M. Jones later in the
4226 same thread.
4227 * THANKS: Add Derek M. Jones.
4228 Update my email address.
4229 Fix typo in Steve Murphy's name.
4230
42312006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4232
4233 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4234 checking against YYLAST that caused the parser to miss a potential
4235 alternative in its diagnostic.
4236 Problem reported by Maria Jose Moron Fernandez in
4237 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4238 * data/lalr1.cc (yysyntax_error_): Likewise.
4239 * data/yacc.c (yysyntax_error): Likewise.
4240 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4241 tokens, in case we run into an older C compiler.
4242 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4243 Use them to check for the off-by-one error fixed above.
4244
4245 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4246 YYSIZE_T, not size_t.
4247 * tests/regression.at (Trivial grammars): New test, to catch
4248 the error fixed by the above patch.
4249
42502006-05-14 Akim Demaille <akim@lrde.epita.fr>
4251
4252 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4253 scheme.
4254 Reported by Steve Murphy.
4255
42562006-05-14 Akim Demaille <akim@lrde.epita.fr>
4257
4258 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4259 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4260
42612006-05-14 Akim Demaille <akim@lrde.epita.fr>
4262
4263 Implement --trace=m4.
4264 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4265 * src/output.c (output_skeleton): When set, pass -dV to m4.
4266
4267 Factor the handling of flags in m4.
4268 * src/output.c (prepare): Rename the muscle names debug, defines,
4269 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4270 * data/c.m4: Adjust.
4271 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4272 Use b4_define_flag_if to define other b4_FLAG_if macros.
4273 (b4_location_if): As a consequence, rename as...
4274 (b4_locations_if): this, for consistency.
4275 Adjust all the skeletons.
4276
42772006-05-14 Akim Demaille <akim@lrde.epita.fr>
4278
4279 * etc/bench.pm: Shorten bench names.
4280
42812006-05-14 Akim Demaille <akim@lrde.epita.fr>
4282
4283 * src/output.h, src/output.c (error_verbose): Move to...
4284 * src/getargs.h, src/getargs.c: here.
4285 Sort the flags.
4286 Adjust dependencies.
4287
42882006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4289
4290 * data/c.m4 (b4_copyright): Put the special exception for Bison
4291 skeletons here, so we don't have to put it in each skeleton. All
4292 uses changed. Suggested by Akim Demaille. Also, wrap the
4293 copyright notice, in case it is longer than 80 columns. Replace
4294 comma by newline after title.
4295
42962006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4297
4298 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4299 incompatibility, not a bug. Mention that it wasn't fixed as of
4300 flex 2.5.33.
4301
43022006-05-11 Akim Demaille <akim@lrde.epita.fr>
4303
4304 * examples/extexi: Enforce the precedence of concatenation over
4305 >>.
4306 Reported by Tommy Nordgren.
4307
43082006-05-11 Akim Demaille <akim@lrde.epita.fr>
4309
4310 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4311 with the member "token".
4312 Reported by Martin Nylin.
4313
43142006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4315
4316 * data/glr.c: Switch to Bison 2.2 special-exception language in
4317 the copyright notice. Use more-regular format for titles and
4318 copyright notices.
4319 * data/glr.cc: Likewise.
4320 * data/location.cc: Likewise.
4321 * data/yacc.cc: Likewise.
4322 * doc/bison.texinfo (Conditions): Document this.
4323 * NEWS: likewise. Upgrade version to 2.2.
4324
43252006-04-27 Akim Demaille <akim@lrde.epita.fr>
4326
4327 * data/glr.cc: Remove dead code.
4328
43292006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4330
4331 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4332 that variable and the line breaks the bootstrap. Problem reported
4333 by Juan M. Guerrero.
4334
43352006-04-24 Akim Demaille <akim@lrde.epita.fr>
4336
4337 * doc/bison.texinfo (Multiple start-symbols): New.
4338
43392006-04-24 Akim Demaille <akim@lrde.epita.fr>
4340
4341 * etc/README, etc/bench.pl: New.
4342
43432006-04-03 Akim Demaille <akim@lrde.epita.fr>
4344
4345 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4346 rule.
4347 Reported by Mickael Labau.
4348 * tests/input.at (Torturing the Scanner): Test it.
4349
43502006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4351
4352 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4353 Problem reported by Bob Rossi.
4354
43552006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4356
4357 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4358 and didn't really work.
4359 For the index, use @ifnotinfo, not @iftex.
4360 Minor cleanups of spacing and terminology.
4361
43622006-03-12 Akim Demaille <akim@lrde.epita.fr>
4363
4364 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4365 of AT_NAME_PREFIX when %name-prefix is not used.
4366
43672006-03-12 Akim Demaille <akim@lrde.epita.fr>
4368
4369 Apply --prefix to C++ skeletons too: they change the namespace.
4370 The test suite already exercize these cases.
4371 * data/c++.m4 (b4_namespace): New.
4372 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4373 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4374 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4375 * doc/bison.texinfo: Document it.
4376 (Option Cross Key): Use @multitable in all formats. It looks
4377 nicer, even in TeX outputs.
4378 (Rules): Use the same code whatever the output type is.
4379 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4380 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4381 * tests/calc.at: Use it, instead of hard coding `yy'.
4382
43832006-03-10 Akim Demaille <akim@lrde.epita.fr>
4384
4385 * TODO: Remove dead items.
4386
43872006-03-10 Akim Demaille <akim@lrde.epita.fr>
4388
4389 * doc/FAQ: Remove, merged into...
4390 * doc/bison.texinfo (FAQ): this.
4391 * doc/Makefile.am (EXTRA_DIST): Adjust.
4392
43932006-03-10 Akim Demaille <akim@lrde.epita.fr>
4394
4395 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4396 even if empty.
4397 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4398 * doc/bison.texinfo (Calc++ Scanner): Use it.
4399
44002006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4401
4402 Fix two nits reported by twlevo, plus one more that I discovered.
4403
4404 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4405 this is the usual Bison style.
4406 * src/location.h (location_print): Likewise.
4407
4408 * src/reader.h (token_name): Likewise.
4409
44102006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4411
4412 Fix some nits reported by twlevo.
4413 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4414 and "POSIX". Use more-modern syntax for URLs. Mention C++
4415 and ask for Java. Don't hardwire OS version numbers. Add
4416 copyright notice.
4417 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4418 * src/conflicts.c (solved_conflicts_obstack): Now static.
4419
44202006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4421
4422 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4423 page. Say "you can use it" not "you may use it" as on the web page;
4424 we're describing capabilities not granting permission.
4425
44262006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4427
4428 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4429 shadowing warnings. Use usual patter for iterating through RHS.
4430 * tests/glr-regression.at
4431 (Uninitialized location when reporting ambiguity):
4432 Modify yylex so that it uses its argument, rather than trying
4433 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4434 const char -> char const.
4435
4436 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4437 Don't use tabs inside commands; it messes up 'ps'.
4438 Problem reported by twlevo.
4439
44402006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4441
4442 * tests/glr-regression.at (Uninitialized location when reporting
4443 ambiguity): New test case.
4444 * data/glr.c (yyresolveLocations): New function, which uses
4445 YYLLOC_DEFAULT.
4446 (yyresolveValue): Invoke yyresolveLocations before reporting an
4447 ambiguity.
4448 * doc/bison.texinfo (Default Action for Locations): Note
4449 YYLLOC_DEFAULT's usage for ambiguity locations.
4450 (GLR Semantic Actions): Cross-reference those notes.
4451
44522006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4453
4454 * tests/glr-regression.at (Leaked semantic values when reporting
4455 ambiguity): Remove unnecessary union and type declarations.
4456 (Leaked lookahead after nondeterministic parse syntax error): New test
4457 case.
4458 * data/glr.c (yyparse): Check for zero stacks remaining before
4459 attempting to shift the lookahead so that you don't lose it.
4460
44612006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4462
4463 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4464 * tests/glr-regression.at (Leaked semantic values when reporting
4465 ambiguity): New test case.
4466 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4467 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4468 now unnecessary yystackp parameter.
4469 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4470 destructors can be called.
4471
4472 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4473 in existing testcases.
4474
44752006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4476
4477 Don't leak semantic values for parent RHS when a user action cuts the
4478 parser, and clean up related code a bit.
4479 * tests/glr-regression.at (Leaked merged semantic value if user action
4480 cuts parse): Rename to...
4481 (Leaked semantic values if user action cuts parse): ... this. Add check
4482 for leaked parent RHS values.
4483 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4484 between an unresolved state (non-empty chain of semantic options) and
4485 an incomplete one (signaled by an empty chain).
4486 (yyresolveStates): Document the interface. Move all manipulation of a
4487 successfully or unsuccessfully resolved yyGLRState to...
4488 (yyresolveValue): ... here so that yyresolveValue always leaves a
4489 yyGLRState with consistent data and thus is easier to understand.
4490 Remove the yyvalp and yylocp parameters since they are always just
4491 taken from the yys parameter. When reporting a discarded merged value
4492 in debugging output, note that it is incompletely merged. Document the
4493 interface.
4494 (yyresolveAction): If resolving any of the RHS states fails, destroy
4495 them all rather than leaking them. Thus, as long as user actions are
4496 written to clean up the RHS correctly, yyresolveAction always cleans up
4497 the RHS of a semantic option. Document the interface.
4498
44992006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4500
4501 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4502 led to a segmentation fault in GNU Pascal. Problem reported
4503 by Waldek Hebisch.
4504
45052006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4506
4507 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4508 mid-rule action inside a nonterminal symbol in order to declare a
4509 destructor for its semantic value.
4510
45112006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4512
4513 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4514 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4515 __cplusplus && ! defined _STDLIB_H && !
4516 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4517 defined free))]: Include <stdlib.h> rather than rolling our own
4518 declarations of malloc and free, to avoid problems with
4519 incompatible declarations (using 'throw') C++'s stdlib.h. This
4520 should fix Debian bug 340012
4521 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4522 reported by Guillaume Melquiond.
4523
45242006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4525
4526 * NEWS: Clarify symbols versus types in unused-value warnings.
4527
4528 * configure.ac (AC_INIT): Bump version number.
4529
45302006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4531
4532 * NEWS: Version 2.1a.
4533 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4534 since C99 requires this.
4535
45362006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4537
4538 * m4/c-working.m4: New file.
4539 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4540
45412006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4542
4543 * Makefile.maint: Merge from coreutils.
4544
45452006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4546
4547 More portability fixes for problems summarized by Nelson H. F. Beebe.
4548
4549 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4550 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4551 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4552 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4553 messes up because C++ code is compiled in 32-bit mode but linked
4554 in 64-bit mode.
4555
45562006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4557
4558 More portability fixes for problems summarized by Nelson H. F. Beebe.
4559
4560 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4561 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4562
4563 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4564 nodist_PROGRAMS, since we don't need to actually compile the
4565 example if we're just doing a plain 'make'. This avoids bothering
4566 the installer unnecessarily about problems due to weird C++
4567 compilers.
4568
45692006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4570
4571 More portability fixes for problems summarized by Nelson H. F. Beebe.
4572
4573 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4574 than #include "...", and compile with -I'.'. The old method was
4575 not portable, according to Posix and the C standard, and it does
4576 not work with Sun C 5.7, where previous #line directives affect
4577 the working directory used in later #include "..." directives.
4578
45792006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4580
4581 Various DJGGP specific issues in /djgpp
4582
45832006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4584
4585 More portability fixes for problems summarized by Nelson H. F. Beebe.
4586
4587 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4588 '#include <map>' works and that you can apply ++ to iterators.
4589
45902006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4591
4592 Work around portability problems summarized by Nelson H. F. Beebe in
4593 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4594
4595 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4596 that '#include <string>' works.
4597
4598 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4599 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4600 "warning: sorry: semantics of inline function static data `const
4601 unsigned char translate_table[262]' are wrong (you'll wind up with
4602 multiple copies)".
4603
4604 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4605 or, xor to not_, and_, or_, and xor_, respectively. This works
4606 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4607 random system header somewhere that includes the equivalent of
4608 <iso646.h>.
4609
4610 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4611 -E" works; it apparently doesn't work with PathScale EKO Compiler
4612 Suite Version 2.0.
4613
46142006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4615
4616 During deterministic GLR operation, user actions should be able to
4617 influence the parse by changing yychar. To make this easier to fix and
4618 to make glr.c easier to evolve in general, don't maintain yytoken in
4619 parallel with yychar; just compute yytoken when needed.
4620 * tests/glr-regression.at (Incorrect lookahead during deterministic
4621 GLR): Check that setting yychar in a user action has the intended
4622 effect.
4623 * data/glr.c (yyGLRStack): Remove yytokenp member.
4624 (yyclearin): Don't set *yytokenp.
4625 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4626 yychar rather than *yytokenp to determine the current lookahead.
4627 Compute yytoken locally when needed.
4628 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4629 point to.
4630
4631 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4632 after `--report' documentation.
4633
46342006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4635
4636 * src/parse-gram.y (grammar_declaration): Location of printer
4637 symbol is @1, not list->location. Bug reported by twlevo.
4638 * tests/input.at (Incompatible Aliases): Adjust to above change.
4639
46402006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4641
4642 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4643 all the test at once. This makes the output easier to read in the
4644 normal case.
4645
4646 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4647 got from <http://bro-ids.org/download.html>. The bug is that
4648 when two actions appeared in succession, the second one was
4649 scanned before the first one was added to the grammar rule
4650 as a midrule action. Bison then output the incorrect warning
4651 "parse.y:905.17-906.36: warning: unused value: $3".
4652 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4653 associated with a value.
4654 (rhs): Don't invoke grammar_current_rule_action_append.
4655 (action): Invoke it here instead.
4656 * src/reader.c (grammar_midrule_action): Now extern.
4657 (grammar_current_rule_action_append): Don't invoke
4658 grammar_midrule_action; that is now the scanner's job.
4659 * src/reader.h (last_string, last_braced_code_loc):
4660 (grammar_midrule_action): New decls.
4661 * src/scan-gram.l (last_string): Now extern, sigh.
4662 (last_braced_code_loc): New extern variable.
4663 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4664 rule already has an action.
4665 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4666 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4667 Add some tests to check that the above changes fixed the bug.
4668
46692006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4670
4671 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4672 All used changed. Check whether the symbol has a destructor,
4673 not whether it is typed.
4674 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4675 that the values are still reported as unused. All line numbers
4676 adjusted.
4677
46782006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4679
4680 Work around a bug in bro 0.8, which underparenthesizes its
4681 definition of YYLLOC_DEFAULT.
4682 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4683 their arguments.
4684 * data/lalr1.cc: Likewise.
4685 * data/yacc.cc: Likewise.
4686
46872006-01-22 Paul Eggert <eggert@cs.ucla.edu>
4688
4689 Work around a bug in Pike 7.0, and give the Pike folks a
4690 better way to override the usual int widths.
4691 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
4692 user can override the types.
4693 (short): #undef, to work around a bug in Pike 7.0.
4694 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
4695 (union yyalloc.yyss): Use yytype_int16 rather than short.
4696 All uses changed.
4697 (yysigned_char): Remove.
4698 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
4699 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
4700 * tests/regression.at (Web2c Actions): Adjust to above changes.
4701
4702 * src/reader.c (check_and_convert_grammar): New function.
4703 (reader): Close the input file even if something went wrong during
4704 parsing. Minor file descriptor leak reported by twlevo.
4705
4706 * src/assoc.c (assoc_to_string): Use a default: abort (); case
4707 to pacify gcc -Wswitch-default.
4708 * src/scan-gram.l (adjust_location): Use a default: break; case
4709 to pacify gcc -Wswitch-default.
4710 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
4711 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4712 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4713 Move these decls to scan-skel.l, since they don't need to be
4714 visible elsewhere.
4715 * src/scan-skel.l: Accept the above decls.
4716 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
4717 is used.
4718
47192006-01-21 Paul Eggert <eggert@cs.ucla.edu>
4720
4721 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4722 since we don't want to insist on a version number at the start
4723 of the changelog every time.
4724 * Makefile.maint: Sync from coreutils a bit better.
4725 (sc_trailing_blank): Renamed from sc_trailing_space.
4726 All uses changed.
4727 (sc_no_if_have_config_h, sc_require_config_h):
4728 (sc_prohibit_assert_without_use): New rules.
4729 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
4730 (sc_dd_max_sym_length): Fix leading spaces in rule.
4731 (sc_system_h_headers): Prefix with @.
4732 (sc_useless_cpp_parens, m4-check): Output line numbers.
4733 (changelog-check): Allow version only in head.
4734 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
4735 satisfy new Makefile.maint rule.
4736 * data/glr.c: Likewise.
4737 * data/glr.cc: Likewise.
4738 * data/lalr1.cc: Likewise.
4739 * data/yacc.c: Likewise.
4740 * lib/ebitsetv.c: Likewise.
4741 * lib/lbitset.c: Likewise.
4742 * lib/subpipe.c: Likewise.
4743 * lib/timevar.c: Likewise.
4744 * src/system.h: Likewise.
4745 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
4746 * djgpp/Makefile.maint: Add copyright notice.
4747 * djgpp/README.in: Likewise.
4748 * djgpp/config.bat: Likewise.
4749 * djgpp/config.site: Likewise.
4750 * djgpp/config_h.sed: Likewise.
4751 * djgpp/djunpack.bat: Likewise.
4752 * djgpp/config.sed: Fix copyright notice to match standard format.
4753 * djgpp/subpipe.h: Likewise.
4754 * lib/bitsetv-print.c: Likewise.
4755 * lib/bitsetv.c: Likewise.
4756 * lib/subpipe.h: Likewise.
4757 * lib/timevar.c: Likewise.
4758 * lib/timevar.h: Likewise.
4759 * djgpp/subpipe.c: Use standard recipe for config.h.
4760 * lib/abitset.c: Likewise.
4761 * lib/bitset.c: Likewise.
4762 * lib/bitset_stats.c: Likewise.
4763 * lib/bitsetv-print.c: Likewise.
4764 * lib/bitsetv.c: Likewise.
4765 * lib/ebitsetv.c: Likewise.
4766 * lib/get-errno.c: Likewise.
4767 * lib/lbitset.c: Likewise.
4768 * lib/subpipe.c: Likewise.
4769 * lib/timevar.c: Likewise.
4770 * lib/vbitset.c: Likewise.
4771 * tests/local.at: Likewise.
4772 * src/scan-gram.l: Don't include verify.h, since system.h does
4773 that for us.
4774 * .x-sc_require_config_h: New file.
4775 * .x-sc_unmarked_diagnostics: New file.
4776
47772006-01-20 Paul Eggert <eggert@cs.ucla.edu>
4778
4779 Be a bit more systematic about using 'abort'.
4780 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
4781 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
4782 Put 'default: abort ();' before some other case, to satisfy older
4783 pedantic compilers.
4784 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4785 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
4786 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
4787 * src/conflicts.c (resolve_sr_conflict): Likewise.
4788 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
4789 (get_decision_str, get_orientation_str, get_node_alignment_str):
4790 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
4791 (get_linestyle_str, get_arrowstyle_str): Likewise.
4792 * src/conflicts.c (resolve_sr_conflict):
4793 Use a default case rather than one for the one remaining enum
4794 value, to catch invalid enum values as well.
4795 * src/lalr.c (set_goto_map, map_goto):
4796 Prefer "assert (FOO);" to "if (!FOO) abort ();".
4797 * src/nullable.c (nullable_compute, token_definitions_output):
4798 Likewise.
4799 * src/reader.c (packgram, reader): Likewise.
4800 * src/state.c (transitions_to, state_new, state_reduction_find):
4801 Likewise.
4802 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
4803 (symbol_pack): Likewise.
4804 * src/tables.c (conflict_row, pack_vector): Likewise.
4805 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
4806 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
4807 * src/system.h: Don't include <assert.h>.
4808 (assert): New macro.
4809
4810 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
4811 (Destructor Decl, Parser Function, Pure Calling):
4812 Describe rules for braces inside C code more carefully.
4813
48142006-01-19 Paul Eggert <eggert@cs.ucla.edu>
4815
4816 Fix some porting glitches found by Nelson H. F. Beebe.
4817 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
4818 compilers that don't understand that abort () does not return.
4819 * src/state.c (transitions_to): Likewise.
4820 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4821 that '#include <cstdlib>' works.
4822 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
4823 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
4824 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
4825 for the benefit of some pre-C99 compilers.
4826
4827 * bootstrap: Undo changes to gnulib files that autoreconf made.
4828
4829 Minor fixups to get 'make maintainer-check' to work.
4830 * configure.ac: Don't use -Wnested-externs, as it's incompatible
4831 with the new verify.h implementation.
4832 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
4833 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
4834 * data/yacc.c (YYUSE): Likewise.
4835 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
4836 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
4837 * src/parse-gram.y (declaration): Don't pass a string constant
4838 to a function that expects char *, since GCC might complain
4839 about the constant value.
4840 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
4841 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
4842 before #defining them.
4843 * tests/glr-regression.at
4844 (Incorrectly initialized location for empty right-hand side in GLR):
4845 In yyerror, use the msg arg.
4846 (Corrupted semantic options if user action cuts parse):
4847 (Incorrect lookahead during deterministic GLR):
4848 (Incorrect lookahead during nondeterministic GLR):
4849 Don't name a local var 'index'; it shadows string.h's 'index'.
4850
48512006-01-19 Akim Demaille <akim@epita.fr>
4852
4853 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
4854 location, not just parts of it.
4855
48562006-01-18 Paul Eggert <eggert@cs.ucla.edu>
4857
4858 * NEWS: Document the fact that multiple %unions are now allowed.
4859 * doc/bison.texinfo (Union Decl): Likewise.
4860 * TODO: This feature is now implemented, so remove it from
4861 the wishlist.
4862
4863 * Makefile.maint: Merge with coreutils Makefile.maint.
4864 (CVS_LIST): Use build-aux version if available.
4865 (VERSION_REGEXP): New macro.
4866 (syntax-check-rules): Add sc_no_if_have_config_h,
4867 sc_prohibit_assert_without_use, sc_require_config_h,
4868 sc_useless_cpp_parens.
4869 (sc_obsolete_symbols): Check for O_NDELAY.
4870 (sc_dd_max_sym_length): Track coreutils.
4871 (sc_unmarked_diagnostics): Look in all files, not just *.c.
4872 (sc_useless_cpp_parens): New rule.
4873 (news-date-check): Look for version or today's date.
4874 (changelog-check): Don't require version number near head.
4875 (copyright-check): Use current year instead of hardwiring 2005.
4876 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
4877 (announcement): Add --gpg-key-ID.
4878
4879 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
4880 with "file system".
4881
4882 Avoid undefined behavior that addressed just before the start of an
4883 array. Problem reported by twlevo.
4884 * src/reader.c (packgram): Prepend a new sentinel before ritem.
4885 * src/lalr.c (build_relations): Rely on new sentinel.
4886 * src/gram.c (gram_free): Adjust to new sentinel.
4887
48882006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
4889
4890 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
4891 yylookaheadNeeds. All uses updated.
4892 (yysplitStack): Rename local yynewLookaheadStatuses to
4893 yynewLookaheadNeeds.
4894 * data/glr-regression.at (Incorrect lookahead during nondeterministic
4895 GLR): In comments, change `lookahead status' to `lookahead need'.
4896
48972006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4898
4899 * data/glr.c (yysplitStack): A little stylistic rewrite.
4900
49012006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4902
4903 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
4904
49052006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
4906
4907 * doc/bison.texinfo: Fix some typos.
4908 (GLR Semantic Actions): New subsection discussing special
4909 considerations because GLR semantic actions might be deferred.
4910 (Actions): Mention look-ahead usage of yylval.
4911 (Actions and Locations): Mention look-ahead usage of yylloc.
4912 (Special Features for Use in Actions): Add YYEOF entry and mention it
4913 in the yychar entry.
4914 In the yychar entry, remove mention of the local yychar case (pure
4915 parser) since this is irrelevant information when writing semantic
4916 actions and since it's already discussed in `Table of Symbols' where
4917 yychar is otherwise described as an external variable.
4918 In the yychar entry, don't call it the `current' look-ahead since it
4919 isn't when semantic actions are deferred.
4920 In the yychar and yyclearin entries, add note about deferred semantic
4921 actions.
4922 Add yylloc and yylval entries discussing look-ahead usage.
4923 (Look-Ahead Tokens): When discussing yychar, don't call it the
4924 `current' look-ahead, and do mention yylval and yylloc.
4925 (Error Recovery): Cross-reference `Action Features' when mentioning
4926 yyclearin.
4927 (Table of Symbols): In the yychar entry, don't call it the `current'
4928 look-ahead.
4929 In the yylloc and yylval entries, mention look-ahead usage.
4930
49312006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4932
4933 * tests/glr-regression.at: Update copyright year to 2006.
4934
49352006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4936
4937 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
4938 use during nondeterministic operation to track which stacks have
4939 actually needed the current lookahead.
4940 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
4941 Allocate, deallocate, resize, and otherwise shuffle space for
4942 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
4943 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
4944 appropriately during nondeterministic operation.
4945 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
4946 members to store the current lookahead to be used by the deferred
4947 user action.
4948 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
4949 from which the RHS is taken. Set the lookahead members of the new
4950 yySemanticOption according to the lookahead status for stack yyk.
4951 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
4952 yyaddDeferredAction.
4953 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
4954 members of yySemanticOption before invoking yyuserAction, and then set
4955 them back to their current values afterward.
4956 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
4957 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
4958 * tests/glr-regression.at: Remove `.' from the ends of recent test case
4959 titles for consistency.
4960 (Leaked merged semantic value if user action cuts parse): In order to
4961 suppress lint warnings, use arguments in merge function, and assign
4962 char value < 128 in main.
4963 (Incorrect lookahead during deterministic GLR): New test case.
4964 (Incorrect lookahead during nondeterministic GLR): New test case.
4965
49662006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4967
4968 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
4969 !yyvaluep as signal that no semantic value is available to print.
4970 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
4971 to print a semantic value.
4972
49732006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4974
4975 * tests/glr-regression.at: For consistency with my newer test cases,
4976 don't thank myself.
4977
49782006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4979
4980 * data/glr.c (yyresolveValue): When merging semantic options, if at
4981 least one user action succeeds but a later one cuts the parse, then
4982 destroy the semantic value before returning rather than leaking it.
4983 (yyresolveStates): If a user action cuts the parse and thus
4984 yyresolveValue fails, ignore the (unset) semantic value rather than
4985 corrupting the yyGLRState, and empty the semantic options list since
4986 the user actions should have called all necessary destructors.
4987 Simplify code with YYCHK.
4988 * tests/glr-regression.at (Corrupted semantic options if user action
4989 cuts parse): New test case.
4990 (Undesirable destructors if user action cuts parse): New test case.
4991 Before applying any of this patch, this test case never actually failed
4992 for me... but only because the corrupted semantic options usually
4993 masked this bug.
4994 (Leaked merged semantic value if user action cuts parse): New test
4995 case.
4996
49972006-01-05 Akim Demaille <akim@epita.fr>
4998
4999 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5000
50012006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5002
5003 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5004 _MSC_VER. Problem reported by Cenzato Marco.
5005 (b4_c_function_def): Use it.
5006 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5007 b4_c_modern.
5008 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5009 than rolling our own.
5010
50112006-01-04 Akim Demaille <akim@epita.fr>
5012
5013 Also warn about non-used mid-rule values.
5014 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5015 member.
5016 (symbol_list_new): Adjust.
5017 * src/reader.c (symbol_typed_p): New.
5018 (grammar_rule_check): Use it.
5019 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5020 Check its rule.
5021 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5022 Use it.
5023 * tests/actions.at (Exotic Dollars): Adjust.
5024
50252006-01-04 Akim Demaille <akim@epita.fr>
5026
5027 * src/reader.c (grammar_midrule_action): If $$ is set in a
5028 mid-rule, move the `used' bit to its lhs.
5029 * tests/input.at (Unused values): New.
5030 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5031
50322006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5033
5034 * doc/bison.texinfo (Bison Options): Say more accurately what
5035 --yacc does.
5036 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5037 about declarations in the grammar when in Yacc mode, as POSIX does
5038 not require a diagnostic when the grammar uses extensions.
5039
5040 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5041
5042 Warn about dubious constructions like "%token T T".
5043 Reported by twlevo.
5044 * src/symtab.h (struct symbol.declared): New member.
5045 * src/symtab.c (symbol_new): Initialize it to false.
5046 (symbol_class_set): New arg DECLARING, specifying whether
5047 this is a declaration that we want to warn about, if there
5048 is more than one of them. All uses changed.
5049
5050 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5051 Allow multiple %union directives, whose contents concatenate.
5052 * src/parse-gram.y (grammar_declaration): Likewise.
5053 Use muscle_code_grow, so that we don't need stype_line any more.
5054 All uses changed.
5055
5056 * src/muscle_tab.c (muscle_grow): Fix comment.
5057
5058 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5059 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5060 Update copyright year to 2006.
5061
50622006-01-03 Akim Demaille <akim@epita.fr>
5063
5064 Have glr.cc pass (some of) the calc.at tests.
5065 * data/glr.cc (b4_parse_param_orig): New.
5066 (b4_parse_param): Improve its definition, and bound it more
5067 clearly in the skeleton.
5068 (b4_epilogue): Append, instead of prepending, in order to keep
5069 #line consistency.
5070 Simplify the generation of auxiliary functions: locations and
5071 purity are mandated.
5072 (b4_global_tokens_and_yystype): Honor it.
5073 * data/location.cc (c++.m4): Don't include it.
5074 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5075 and AT_SKEL_CC_IF.
5076 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5077 AT_LALR1_CC_IF.
5078 Be sure to initialize the first position's filename.
5079 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5080 mandated anyway.
5081 (AT_CHECK_CALC_GLR_CC): New.
5082 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5083
50842006-01-02 Akim Demaille <akim@epita.fr>
5085
5086 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5087 c.m4.
5088 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
5089 * data/glr.cc: Do not include stack.hh.
5090
50912006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5092
5093 * data/glr.c: Reformat whitespace with tabs.
5094 (b4_lpure_formals): Remove this unused m4 macro.
5095 * tests/cxx-type.at: Reformat whitespace with tabs.
5096 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5097 since it's a member. Rename type to isNterm for clarity.
5098
50992005-12-29 Akim <akim@sulaco.local>
5100
5101 Let glr.cc catch up with symbol_value_print.
5102 * data/glr.cc (b4_yysymprint_generate): Replace by...
5103 (b4_yy_symbol_print_generate): this.
5104 (yy_symbol_print, yy_symbol_value_print): Declare them.
5105
51062005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5107
5108 * src/location.h (boundary): Note that a line or column equal
5109 to INT_MAX indicates an overflow.
5110 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5111 (rule_length_overflow, increment_rule_length, add_column_width):
5112 New functions.
5113 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5114 (<SC_BRACED_CODE>"}"):
5115 Use increment_rule_length rather than incrementing it by hand.
5116 (adjust_location, handle_syncline): Diagnose overflow.
5117 (handle_action_dollar, handle_action_at):
5118 Fix bug with monstrosities like $-2147483648.
5119 Remove now-unnecessary checks.
5120 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5121 (convert_ucn_to_byte): Verify assumptions.
5122 (handle_syncline): New arg LOC. All callers changed.
5123 Don't store through a value derived from char const * pointer.
5124
5125 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5126 GCC warnings.
5127
51282005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5129
5130 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5131 Remove unnecessary forward static decls.
5132
51332005-12-27 Akim Demaille <akim@epita.fr>
5134
5135 * src/reader.c (grammar_current_rule_check): Also check that $$
5136 is used.
5137 Take the rule to check as argument, hence rename as...
5138 (grammar_rule_check): this.
5139 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5140 Rename as...
5141 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5142 (grammar_midrule_action, grammar_symbol_append): Now static.
5143 * tests/torture.at (input): Don't rely on the default action
5144 being always performed.
5145 * tests/calc.at: "Set" $$ even when the action is "cut" with
5146 YYERROR or other.
5147 * tests/actions.at (Exotic Dollars): Instead of using unused
5148 values, check that the warning is issued.
5149
51502005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5151
5152 * NEWS: Improve wording for unused-value warnings.
5153
51542005-12-22 Akim Demaille <akim@epita.fr>
5155
5156 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5157 (b4_yysymprint_generate): Rename as...
5158 (b4_yy_symbol_print_generate): this.
5159 Generate yy_symbol_print instead of yysymprint.
5160 Generate also yy_symbol_value_print, and use it.
5161
51622005-12-22 Akim Demaille <akim@epita.fr>
5163
5164 * NEWS: Warn about unused values.
5165 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5166 a `used' member.
5167 (symbol_list_n_get, symbol_list_n_used_set): New.
5168 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5169 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5170 * src/reader.c (grammar_current_rule_check): Check that values are
5171 used.
5172 * src/symtab.c (symbol_print): Accept 0.
5173 * tests/existing.at: Remove the type information.
5174 Empty the actions.
5175 Remove useless actions (beware of mid-rule actions: perl -000
5176 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5177 * tests/actions.at (Exotic Dollars): Use unused values.
5178 * tests/calc.at: Likewise.
5179 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5180 Likewise.
5181
5182 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5183 rule_useful_p.
5184
51852005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5186
5187 Undo 2005-12-01 tentative license wording change. The wording is
5188 still being reviewed by the lawyers, and we don't want to wait for
5189 them before publishing a test release. For now, revert to the
5190 previous wording.
5191 * NEWS: Undo 2005-12-01 change.
5192 * data/glr.c: Revert to previous license wording.
5193 * data/glr.cc: Likewise.
5194 * data/lalr1.cc: Likewise.
5195 * data/location.cc: Likewise.
5196 * data/yacc.c: Likewise.
5197
5198 * NEWS: Reword %destructor vs YYABORT etc.
5199 * data/glr.c: Use American spacing, for consistency.
5200 * data/glr.cc: Likewise.
5201 * data/lalr1.cc: Likewise.
5202 * data/yacc.c: Likewise.
5203 * data/yacc.c: Reformat comments slightly.
5204 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5205 for consistency. Fix some spelling errors and reword recently-included
5206 text slightly.
5207 * tests/cxx-type.at: Cast results of malloc, for C++.
5208
52092005-12-21 Joel E. Denny <address@hidden>
5210
5211 * tests/cxx-type.at: Construct a tree, count the parents of shared
5212 nodes, and free each node once and only once. Previously, the memory
5213 for semantic values was leaked instead.
5214
52152005-12-21 Joel E. Denny <address@hidden>
5216
5217 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5218 (yylval, yylloc): If pure, #define to yystackp->yyval and
5219 yystackp->yyloc similar to yychar and yynerrs.
5220 (yyparse): If pure, remove local yylval and yylloc. Add local
5221 yystackp to accommodate pure definitions of yylval and yylloc.
5222 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5223 yylvalp and yyllocp to &yylval and &yylloc.
5224 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5225 namespace. Previously, nerrs and char were missing, but lval and lloc
5226 weren't necessary.
5227 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5228 yylvalp and yyllocp parameters since, if pure, these are now always
5229 accessible through yystackp. If not pure, they are still accessible
5230 globally.
5231 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5232 `if (YYID (N))' to pacify lint.
5233
52342005-12-21 Akim Demaille <akim@epita.fr>
5235
5236 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5237 destroy the RHS symbols of a rule.
5238 * data/yacc.c (yylen): Initialize to 0.
5239 Keep its value to the number of items to possibly shift.
5240 In particular, a regular successful parse that ends on YYFINAL by
5241 a (internal) YYACCEPT must not have yylen != 0.
5242 (yyerrorlab, yyreturn): Pop the RHS.
5243 Reorder a bit to emphasize the `shifting' bits of code.
5244 (YYPOPSTACK): Now accept a number of items to pop.
5245 * data/lalr1.cc: Likewise.
5246 * data/glr.c: Formatting changes.
5247 Use goto instead of fall through.
5248 * doc/bison.texinfo (Destructor Decl): Complete.
5249
52502005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5251
5252 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5253 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5254 * djgpp/config.bat: Replace every occurence of the file name
5255 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5256 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5257 * djgpp/config.sed: Replace every occurence of the file name
5258 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5259 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5260 * djgpp/djunpack.bat: DJGPP specific file.
5261 * djgpp/fnchange.lst: DJGPP specific file.
5262 * djgpp/README.in: Add new information about how to unpack the bison
5263 source on MSDOS and other systems which have 8.3 file name restrictions
5264 using djunpack.bat and fnchange.lst.
5265
52662005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5267
5268 * bootstrap (build_cvs_prefix): Remove; unused.
5269 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5270 when getting gnulib.
5271
52722005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5273
5274 * data/glr.c: Reorder typedef declarations for structs to match order
5275 of struct declarations.
5276 Rename yystack everywhere to yystackp except in yyparse where it's not
5277 a pointer.
5278 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5279 consistency.
5280 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5281 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5282 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5283 lint.
5284
52852005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5286
5287 * tests/sets.at (Accept): Fix typos in regular expression used to
5288 sed out the final state number.
5289
5290 Work around portability problem on Solaris 10: flex-generated
5291 files include <stdio.h> before <config.h>, which messes up
5292 because the latter defines __EXTENSIONS__. Address the problem
5293 by creating two new little files that include <config.h> first,
5294 then include the flex-generated files. Rewrite everyone else
5295 to include <config.h> first, as well.
5296 * lib/timevar.c: Always include "config.h".
5297 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5298 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5299 (EXTRA_bison_SOURCES): New macro.
5300 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5301 * src/system.h: Don't include config.h.
5302 * src/LR0.c: Include <config.h> first.
5303 * src/assoc.c: Likewise.
5304 * src/closure.c: Likewise.
5305 * src/complain.c: Likewise.
5306 * src/conflicts.c: Likewise.
5307 * src/derives.c: Likewise.
5308 * src/files.c: Likewise.
5309 * src/getargs.c: Likewise.
5310 * src/gram.c: Likewise.
5311 * src/lalr.c: Likewise.
5312 * src/location.c: Likewise.
5313 * src/main.c: Likewise.
5314 * src/muscle_tab.c: Likewise.
5315 * src/nullable.c: Likewise.
5316 * src/output.c: Likewise.
5317 * src/parse-gram.y: Likewise.
5318 * src/print.c: Likewise.
5319 * src/print_graph.c: Likewise.
5320 * src/reader.c: Likewise.
5321 * src/reduce.c: Likewise.
5322 * src/relation.c: Likewise.
5323 * src/state.c: Likewise.
5324 * src/symlist.c: Likewise.
5325 * src/symtab.c: Likewise.
5326 * src/tables.c: Likewise.
5327 * src/uniqstr.c: Likewise.
5328 * src/vcg.c: Likewise.
5329
5330 * src/parse-gram.y: Fix minor problems uncovered by lint.
5331 (current_lhs, current_lhs_location): Now static.
5332 (current_assoc): Remove unused variable.
5333
5334 Cleanups so that Bison-generated parsers have less lint.
5335 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5336 Prepend /*ARGSUSED*/, for lint's sake.
5337 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5338 definition if 'lint' is defined.
5339 (YYID): New macro (or function, if lint).
5340 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5341 * data/yacc.c: Likewise.
5342 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5343 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5344 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5345 is C++ only.
5346 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5347 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5348 Use YYID(0) rather than 0, for lint.
5349 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5350 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5351
53522005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5353
5354 * tests/glr-regression.at
5355 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5356 Close memory leak reported by twlevo.
5357
53582005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5359
5360 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5361 all stacks.
5362 (yyparse): Iterate another stack in order to call user destructors.
5363 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5364 New test case.
5365 (Duplicated user destructor for lookahead): This test now is expected
5366 to succeed.
5367
53682005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5369
5370 * NEWS: Document the following change.
5371 * data/yacc.c: Say "parser skeleton" rather than "file", since
5372 it's no longer just a file.
5373 * data/glr.c: Grant a special exception for C GLR parsers, that
5374 reads like the already-existing exception for C LALR(1) parsers.
5375 * data/glr.cc: Likewise.
5376 * data/lalr1.cc: Likewise.
5377 * data/location.cc: Likewise.
5378 * data/yacc.c: Reword the "written by" statement to clarify that
5379 it was the parser skeleton, not the entire output file.
5380 * data/glr.c: Written by Paul Hilfinger.
5381 * data/glr.cc: Written by Akim Demaille.
5382 * data/lalr1.cc: Likewise.
5383
53842005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5385
5386 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5387 Fix typos in previous change that broke 'make check'.
5388 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5389 supported in C.
5390 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5391 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5392 We can revert this once things settle down.
5393
5394 * src/conflicts.c (conflicts_print): Don't print file name twice
5395 when %expect fails because there were no conflicts.
5396 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5397 change.
5398 * tests/conflicts.at (%expect not enough, %expect too much):
5399 (%expect with reduce conflicts): Adjust to new behavior.
5400
54012005-11-18 Akim Demaille <akim@epita.fr>
5402
5403 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5404 errors.
5405 * NEWS: Document this.
5406 * doc/bison.texinfo (Expect Decl): Likewise.
5407
54082005-11-16 Akim Demaille <akim@epita.fr>
5409
5410 Generalize the display of semantic values and locations in traces.
5411 * data/glr.c (yy_reduce_print): Fix indices (again).
5412 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5413 literal integers.
5414 * data/lalr1.cc (yyreduce_print): Rename as...
5415 (yy_reduce_print): this.
5416 Display values and locations.
5417 * data/yacc.c (yy_reduce_print): Likewise.
5418 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5419 (yysymprint): Move higher to be visible from yy_reduce_print).
5420 (yyparse): Adjust.
5421 * tests/calc.at: Adjust the expected length of the traces.
5422
54232005-11-14 Akim Demaille <akim@epita.fr>
5424
5425 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5426 from 1 to N, while values and location start at 0.
5427 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5428
54292005-11-14 Akim Demaille <akim@epita.fr>
5430
5431 * data/glr.c (yy_reduce_print): Fix the $ number.
5432
54332005-11-14 Akim Demaille <akim@epita.fr>
5434
5435 "Use" parse parameters.
5436 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5437 * data/glr.c, data/glr.cc: Use them.
5438 * data/glr.c (YYUSE): Have a C++ definition that supports
5439 non-pointer types.
5440
54412005-11-14 Akim Demaille <akim@epita.fr>
5442
5443 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5444
54452005-11-14 Akim Demaille <akim@epita.fr>
5446
5447 * data/glr.cc: New.
5448 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5449
54502005-11-12 Akim Demaille <akim@epita.fr>
5451
5452 Let position and location be PODs.
5453 * data/location.cc (position::initialize, location::initialize): New.
5454 (position::position, location::location): Define only if
5455 b4_location_constructors is defined.
5456 * data/lalr1.cc (b4_location_constructors): Define it for backward
5457 compatibility.
5458 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5459
54602005-11-12 Akim Demaille <akim@epita.fr>
5461
5462 * data/lalr1.cc: Move the body of the ctor and dtor into the
5463 parser file (instead of the header).
5464 Wrap the implementations in a "namespace yy".
5465
54662005-11-12 Akim Demaille <akim@epita.fr>
5467
5468 Have glr.c include its header file when created.
5469 * data/glr.c (b4_shared_declarations): New.
5470 Output them verbatim in the parser if !%defines, otherwise
5471 output then in the header file, and include it instead.
5472
54732005-11-11 Akim Demaille <akim@epita.fr>
5474
5475 * data/glr.c: Comment changes.
5476
54772005-11-11 Akim Demaille <akim@epita.fr>
5478
5479 When yydebug, report semantic and location values for reductions.
5480 * data/glr.c (yy_reduce_print): Report the semantic values and the
5481 locations.
5482 (YY_REDUCE_PRINT): Adjust.
5483 (yyglrReduce): Use them.
5484 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5485 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5486 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5487 traces.
5488
54892005-11-10 Akim Demaille <akim@epita.fr>
5490
5491 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5492 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5493 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5494
54952005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5496
5497 * m4/cxx.m4, examples/Makefile.am: Don't build
5498 examples/calc++ if no C++ compiler is available. (trivial change)
5499
55002005-11-09 Akim Demaille <akim@epita.fr>
5501
5502 * src/scan-skel.l: Use a couple of asserts.
5503
55042005-11-03 Akim Demaille <akim@epita.fr>
5505
5506 In some (weird) cases, the final state number is incorrect.
5507 Reported by Alexandre Duret-Lutz.
5508 * src/LR0.c (state_list_append): Remove the computation of
5509 final_state.
5510 (save_reductions): Do it here.
5511 (get_state): Alpha conversion.
5512 (generate_states): Use a for loop.
5513 * src/gram.h (item_number_is_rule_number)
5514 (item_number_is_symbol_number): New.
5515 * src/state.c: Use assert.
5516 * src/system.h: Include assert.h.
5517 * tests/sets.at (Accept): New.
5518
55192005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5520
5521 * data/glr.c (yyfill): Adjust comment.
5522 (yyresolveAction): Initialize default location properly
5523 for empty right-hand sides.
5524 (yydoAction): Ditto.
5525 Add comment explaining apparently dead code.
5526 * tests/glr-regression.at
5527 (Incorrectly initialized location for empty right-hand side in GLR):
5528 New test.
5529
55302005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5531
5532 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5533 gnulib when interrupted. This fixes some race conditions and
5534 works around some portability problems (one noted by Paul
5535 Hilfinger).
5536
55372005-10-22 Akim <akim@epita.fr>
5538
5539 * Makefile.cfg: Adjust to config -> build-aux.
5540 Reported by twledo.
5541
55422005-10-21 Akim Demaille <akim@epita.fr>
5543
5544 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5545 the %parse-params.
5546 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5547 * data/yacc.c (b4_Pure_if): Rename as...
5548 (b4_yacc_pure_if): this.
5549 (YY_SYMBOL_PRINT, yyparse): Adjust.
5550 * doc/bison.texinfo: Formatting changes.
5551
55522005-10-21 Akim Demaille <akim@epita.fr>
5553
5554 Finish the transition config -> build-aux.
5555 * configure.ac, Makefile.am: Use build-aux.
5556 * config/prev-version, config/announce-gen, config/Makefile.am:
5557 Move to...
5558 * build-aux/prev-version, build-aux/announce-gen,
5559 * build-aux/Makefile.am: here.
5560
55612005-10-14 Akim Demaille <akim@epita.fr>
5562
5563 * examples/calc++/test: Use set -x only when VERBOSE.
5564
55652005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5566
5567 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5568 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5569
55702005-10-13 Akim Demaille <akim@epita.fr>
5571
5572 * src/scan-skel.l: Output the base name parts of the parser and
5573 header file names.
5574 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5575 additional checks.
5576 Use this to exercise C++ outputs in subdirs.
5577 Reported by Oleg Smolsky.
5578
55792005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5580
5581 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5582 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5583 Problem reported by John P. Hartmann.
5584 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5585 already defined it.
5586
55872005-10-12 Akim Demaille <akim@epita.fr>
5588
5589 * src/parse-gram.y (version_check): Exit 63 to please missing
5590 (stands for "version mismatch).
5591 * tests/input.at, doc/bison.texinfo: Adjust.
5592
55932005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5594
5595 Work around portability problems with Visual Age C compiler
5596 (xlc and xlC_r) reported by John P. Hartmann.
5597 * data/location.cc (initial_column, initial_line): Remove.
5598 All uses replaced by 0 and 1.
5599 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5600 that xlc complains about.
5601 * src/scan-skel.l (skel_wrap): Likewise.
5602 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5603 as __STDC__.
5604 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5605 __STDC_VERSION__. Use it everywhere instead of looking at
5606 __STDC__ and __cplusplus.
5607
56082005-10-10 Akim Demaille <akim@epita.fr>
5609
5610 * examples/calc++/test: Be quiet unless VERBOSE.
5611
56122005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5613
5614 * data/c.m4 (yydestruct, yysymprint):
5615 Use YYUSE instead of casting to void.
5616 * data/glr.c (YYUSE): New macro.
5617 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5618 Use it instead of rolling our own.
5619 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5620 (YYCHK1):
5621 Use /*CONSTCOND*/ to suppress lint warnings.
5622 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5623 (YY_STACK_PRINT): Use 'false' not '0'.
5624 (YYUSE): New macro.
5625 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5626 * data/yacc.c (YYUSE): New macro.
5627 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5628 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5629 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5630
5631
5632 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5633 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5634
56352005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5636
5637 Undo the parts of the unlocked-I/O change that substituted
5638 putc or puts for printf. This might hurt performance a bit,
5639 but some people prefer the printf style.
5640 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5641 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5642 All uses replaced by YYFPRINTF and YYDPRINTF.
5643 * data/yacc.c: Likewise.
5644 * lib/bitset.c (bitset_print): Likewise.
5645 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5646 putc and puts.
5647 * lib/lbitset.c (debug_lbitset): Likewise.
5648 * src/closure.c (print_firsts, print_fderives): Likewise.
5649 * src/gram.c (grammar_dump): Likewise.
5650 * src/lalr.c (look_ahead_tokens_print): Likewise.
5651 * src/output.c (escaped_output): Likewise.
5652 (user_actions_output): Break apart two printfs.
5653 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5654 * src/reduce.c (reduce_print): Likewise.
5655 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5656 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5657
5658 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5659 Use assignments rather than casts-to-void to suppress
5660 unused-variable warnings. This pacifies 'lint'.
5661 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5662 unused-variable warnings.
5663
56642005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5665
5666 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5667
56682005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5669
5670 Use unlocked I/O for a minor performance improvement on hosts like
5671 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5672 is to use the gnlib unlocked-io module, and to prefer putc and
5673 puts to printf when either will work (since the latter doesn't
5674 come in an unlocked flavor).
5675 * bootstrap (gnulib_modules): Add unlocked-io.
5676 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5677 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5678 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5679 and similarly for puts and putc and printf.
5680 * data/yacc.c: Likewise.
5681 * lib/bitset.c (bitset_print): Likewise.
5682 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5683 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5684 to printf.
5685 * lib/lbitset.c (debug_lbitset): Likewise.
5686 * src/closure.c (print_firsts, print_fderives): Likewise.
5687 * src/gram.c (grammar_dump): Likewise.
5688 * src/lalr.c (look_ahead_tokens_print): Likewise.
5689 * src/output.c (escaped_output): Likewise.
5690 (user_actions_output): Coalesce two printfs.
5691 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
5692 * src/reduce.c (reduce_print): Likewise.
5693 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5694 * src/system.h: Include unlocked-io.h rather than stdio.h.
5695
5696 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
5697 this confuses xgettext.
5698
56992005-10-02 Akim Demaille <akim@epita.fr>
5700
5701 * bootstrap (gnulib_modules): Add strverscmp.
5702 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
5703 * m4/.cvsignore: Add strverscmp.m4.
5704 * src/parse-gram.y (%require): New token, new rule.
5705 (version_check): New.
5706 * src/scan-gram.l (%require): Adjust.
5707 * tests/input.at (AT_REQUIRE): New.
5708 Use it.
5709 * doc/bison.texinfo (Require Decl): New.
5710 (Calc++ Parser): Use %require.
5711
57122005-10-02 Akim Demaille <akim@epita.fr>
5713
5714 * data/location.cc: New.
5715
57162005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
5717 Akim Demaille <akim@epita.fr>
5718
5719 Make sure -odir/foo.cc creates dir/location.hh etc.
5720 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
5721 (spec_file_prefix, spec_verbose_file, spec_graph_file)
5722 (spec_defines_file): Now const.
5723 (dir_prefix): New.
5724 (short_base_name): Remove.
5725 * src/files.c: Adjust.
5726 (dirname.h): Include.
5727 (base_name): Don't prototype it.
5728 (finput): Remove, duplicates gram_in.
5729 (full_base_name, short_base_name): Replace by...
5730 (all_but_ext, all_but_tab_ext): these.
5731 (compute_base_names): Rename as...
5732 (compute_file_name_parts): this.
5733 Update to compute the new variables, including dir_prefix.
5734 Adjust dependencies.
5735 * src/output.c (prepare): Output them.
5736 * src/reader.c: Adjust to use gram_in, not finput.
5737 * src/scan-skel.l (@dir_prefix@): New.
5738
57392005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5740
5741 * lib/subpipe.c: New function end_of_output_subpipe() added
5742 to allow support for non-posix systems. This is a no-op function
5743 for posix systems.
5744
5745 * lib/subpipe.h: New function end_of_output_subpipe() added
5746 to allow support for non-posix systems. This is a no-op function
5747 for posix systems.
5748
5749 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
5750 handle the lack of pipe/fork functionality on non-posix systems.
5751
5752 * djgpp/Makefile.maint: DJGPP specific file.
5753
5754 * djgpp/README.in: DJGPP specific file.
5755
5756 * djgpp/config.bat: DJGPP specific configuration file.
5757
5758 * djgpp/config.sed: DJGPP specific configuration file.
5759
5760 * djgpp/config.site: DJGPP specific configuration file.
5761
5762 * djgpp/config_h.sed: DJGPP specific configuration file.
5763
5764 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
5765
5766 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
5767
57682005-10-02 Akim Demaille <akim@epita.fr>
5769
5770 * data/location.cc: New, extract from...
5771 * data/lalr1.cc: here.
5772 (location.hh): Include it after the user prologue, in case the
5773 filename type is defined by the user.
5774 Forward declation location and position before the pre-prologue.
5775 (yyresult_): Rename as...
5776 (yyresult): this, it's a local variable, not an attribute.
5777 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
5778
57792005-10-01 Akim Demaille <akim@epita.fr>
5780
5781 * examples/extexi: Restore the #line generation.
5782
57832005-09-30 Akim Demaille <akim@epita.fr>,
5784 Alexandre Duret-Lutz <adl@gnu.org>
5785
5786 Move the token type and YYSTYPE in the parser class.
5787 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
5788 (parser::token): New, from the moved free definition of tokens.
5789 (parser::semantic_value): Now a full definition instead of an
5790 indirection to YYSTYPE.
5791 (b4_post_prologue): No longer included in the header file, but
5792 in the implementation file.
5793 * doc/bison.texi (C+ Language Interface): Update.
5794 * src/parse-gram.y: Support unary %define.
5795 * tests/actions.at: Define global_tokens_and_yystype for backward
5796 compatibility until we update the tests.
5797 * tests/calc.at: Idem.
5798 (first_line, first_column, last_line, last_column): Define for lalr1.cc
5799 to simplify the code.
5800
58012005-09-29 Paul Eggert <eggert@cs.ucla.edu>
5802
5803 Port to SunOS 4.1.4, which lacks strtoul and strerror.
5804 Ah, the good old days! Problem reported by Peter Klein.
5805 * bootstrap (gnulib_modules): Add strerror, strtoul.
5806 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
5807 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
5808
58092005-09-29 Akim Demaille <akim@epita.fr>
5810
5811 * data/c.m4 (b4_error_verbose_if): New.
5812 * data/lalr1.cc: Use it.
5813 (YYERROR_VERBOSE_IF): Remove.
5814 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
5815 parser members, replaced by...
5816 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
5817 local variables.
5818 (yysyntax_error_): Takes the state number as argument.
5819 (yyreduce_print_): Use the argument yyrule, not the former
5820 attribute yyn_.
5821
58222005-09-26 Paul Eggert <eggert@cs.ucla.edu>
5823
5824 * bootstrap (gnulib_modules): Add verify.
5825 * lib/.cvsignore: Add verify.h.
5826 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
5827 * src/system.h (verify): Remove.
5828 Include verify.h instead.
5829 * src/tables.c (tables_generate): Use new API for 'verify'.
5830
58312005-09-21 Paul Eggert <eggert@cs.ucla.edu>
5832
5833 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
5834 local variables whose names begin with 'yy'.
5835 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
5836 Trivial changes from Joel E. Denny.
5837
5838 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
5839 it itself.
5840 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
5841 don't use alloca any more.
5842
5843 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
5844 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
5845 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
5846 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
5847 to match yacc.c, to test more hosts.
5848
58492005-09-20 Paul Eggert <eggert@cs.ucla.edu>
5850
5851 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
5852 doesn't affect behavior.
5853 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
5854 Solaris, AIX, MSC.
5855 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
5856 This works a bit better with glibc, if user code has already included
5857 stdlib.h.
5858 * doc/bison.texinfo (Bison Parser): Document that users can't
5859 arbitrarily use malloc and free for other purposes. Document
5860 that <alloca.h> and <malloc.h> might be included.
5861 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
5862 user must declare alloca.
5863
5864 * HACKING (release): Forwarn the Translation Project about
5865 stable releses.
5866
58672005-09-20 Akim Demaille <akim@epita.fr>
5868
5869 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
5870
58712005-09-19 Paul Eggert <eggert@cs.ucla.edu>
5872
5873 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
5874 (YYSTACK_ALLOC_MAXIMUM): Use it.
5875 (yysyntax_error): New function.
5876 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
5877 multiple syntax errors are reported, and alloca is being used.
5878 Instead, reallocate buffers twice as big each time, so that
5879 we waste at most half the allocated memory. Start with a small
5880 (128-byte) buffer that will suffice in most cases anyway.
5881 Use yysyntax_error to do most of the work.
5882
5883 * doc/bison.texinfo (Error Reporting, Table of Symbols):
5884 yynerrs is the number of errors reported, not the number of
5885 errors encountered.
5886
5887 * tests/glr-regression.at (Duplicated user destructor for lookahead):
5888 Mark it as expected to fail.
5889 Cast result of malloc; problem reported by twlevo@xs4all.nl.
5890 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
5891 Don't start user-code symbols with "yy", to avoid name space problems.
5892
58932005-09-19 Akim Demaille <akim@epita.fr>
5894
5895 Remove the traits, failed experiment.
5896 It never proved useful, and anyway because of the current
5897 definition, it was not possible to have several specialization of
5898 this traits, making it useless.
5899 * data/lalr1.cc (yy:traits): Remove.
5900 Inline its definitions in the parser class.
5901
59022005-09-19 Akim Demaille <akim@epita.fr>
5903
5904 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
5905 least Mac OSX with a /usr/local install of gettext.
5906
59072005-09-19 Akim Demaille <akim@epita.fr>
5908
5909 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
5910 and yytoken for similarity with the other skeletons.
5911
59122005-09-19 Akim Demaille <akim@epita.fr>
5913
5914 * NEWS, configure.ac: update version number to 2.1a.
5915
59162005-09-16 Paul Eggert <eggert@cs.ucla.edu>
5917
5918 * NEWS: Version 2.1.
5919
5920 * NEWS: Remove notice of yytname change, since it was never in an
5921 official release.
5922 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
5923 diagnostic.
5924 * src/output.c (prepare): Likewise.
5925 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
5926 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
5927 is not defined. This is an awful hack, but it's enough for now.
5928 All callers changed.
5929 * tests/glr-regression-at (make_value): Args are const pointers now,
5930 to avoid GCC warning.
5931 (Duplicated user destructor for lookahead): New test. Currently
5932 skipped. It fails on my host but I'm not sure it'll always fail.
5933
59342005-09-16 Akim Demaille <akim@epita.fr>
5935
5936 * src/symtab.h (struct symbol): Declare the printer and destructor
5937 as const, to avoid accidental calls to free.
5938 (symbol_destructor_set, symbol_printer_set): Adjust.
5939 * src/symtab.c: Adjust.
5940
59412005-09-16 Akim Demaille <akim@epita.fr>
5942
5943 * data/c.m4 (b4_token_enums): New.
5944 (b4_token_defines): Rename as...
5945 (b4_token_enums_defines): this.
5946 (b4_token_defines): New, output only the #defines.
5947 * data/yacc.c, data/glr.c: Adjust.
5948 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
5949 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
5950 as default values.
5951
59522005-09-16 Akim Demaille <akim@epita.fr>
5953
5954 * data/lalr1.cc (yylex_): Remove, inline its code.
5955 (yyreport_syntax_error_): Remove, replaced by...
5956 (yysyntax_error_): this which returns a string and leaves to the
5957 caller the call to the users' error function.
5958 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
5959 Move from members of the parser object...
5960 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
5961 to local variables of the parse function.
5962
59632005-09-16 Akim Demaille <akim@epita.fr>
5964
5965 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
5966 since it's in Bison's name space.
5967
59682005-09-15 Paul Eggert <eggert@cs.ucla.edu>
5969
5970 * data/glr.c (yyresolveValue): Add default case to pacify
5971 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
5972
5973 * NEWS: Document when yyparse started to return 2.
5974 * doc/bison.texinfo (Parser Function): Document when yyparse
5975 returns 2.
5976
5977 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
5978 (b4_filename_type): Renamed back from b4_file_name_type. All uses
5979 changed.
5980 (class position): file_name -> filename (reverting). All uses changed.
5981
59822005-09-14 Paul Eggert <eggert@cs.ucla.edu>
5983
5984 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
5985 do anything if $@ exists. This reverts part of the 2005-07-07
5986 patch.
5987
59882005-09-11 Paul Eggert <eggert@cs.ucla.edu>
5989
5990 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
5991 contains obsolete information and isn't worth distributing as a
5992 separate file anyway.
5993 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
5994 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
5995 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
5996 (yyparse): Abort if user code uses longjmp to throw an unexpected
5997 value.
5998
59992005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6000
6001 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6002 Suggested by twlevo@xs4all.nl.
6003
6004 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6005 This avoids a diagnostic from gcc -Wswitch-enum.
6006 Problem reported by twlevo@xs4all.nl.
6007
6008 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6009 standards. Use "file name" or "file" or "name", depending on
6010 the context.
6011 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6012 not to hack/foo.tab.c.
6013 (Calc++ Top Level): 2nd arg of main is not const.
6014 * data/glr.c: b4_filename -> b4_file_name.
6015 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6016 All uses changed.
6017 (class position): filename -> file_name. All uses changed.
6018 * data/yacc.c: b4_filename -> b4_file_name.
6019 * lib/bitset.h: filename -> file_name in local vars.
6020 * lib/bitset_stats.c: Likewise.
6021 * src/files.c: Likewise.
6022 * src/scan-skel.l ("@output ".*\n): Likewise.
6023 * src/files.c (file_name_split): Renamed from filename_split.
6024 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6025
60262005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6027
6028 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6029 to accommodate latest gnulib.
6030
6031 * tests/glr-regression.at (Duplicate representation of merged trees):
6032 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6033
6034 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6035 needed.
6036
60372005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6038
6039 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6040 All uses changed. Invoke user destructor after an error during a
6041 split parse (trivial change from Joel E. Denny).
6042
6043 * tests/glr-regression.at
6044 (User destructor after an error during a split parse): New test case.
6045 Problem reported by Joel E. Denny in:
6046 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6047
60482005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6049
6050 * README-cvs: Give URLs for recommended tools.
6051 Mention Gzip version problem, and bootstrapping issues.
6052 Remove troubleshooting section, as it's somewhat obsolete.
6053
6054 * bootstrap (no_cache): New var, to accommodate different wget
6055 variants. Use it instead of '-C off'. Problem reported by
6056 twlevo@xs4all.nl.
6057
6058 * data/glr.c (yydestroyStackItem): New function.
6059 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6060 debugging information. Problem reported by Joel E. Denny.
6061
60622005-08-25 Akim Demaille <akim@epita.fr>
6063
6064 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6065
60662005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6067
6068 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6069 Don't invoke destructor on unresolved entries.
6070 * tests/glr-regression.at
6071 (User destructor for unresolved GLR semantic value): New test case.
6072 Problem reported by Joel E. Denny in:
6073 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6074
60752005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6076
6077 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6078 Add strnlen.c.
6079 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6080 lib-prefix.m4, po.m4.
6081
6082 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6083 in yydestruct diagnostic, since it might not be an error.
6084 Problem reported by Joel Denny near end of
6085 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6086 * data/lalr1.cc (yyerturn): Likewise.
6087 * data/yacc.c (yyreturn): Likewise.
6088 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6089
6090 * src/files.c: Remove obsolete FIXME comment.
6091
6092 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6093 with the other templates, and to fix bogus run-on messages such
6094 as the one reported at the end of
6095 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6096 All callers changed to avoid the newline.
6097 (yyprocessOneStack): Output two lines rather than one, to accommodate
6098 the above change. This changes the debug output format slightly.
6099
6100 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6101 reported by Joel E. Denny in
6102 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6103 (trivial change).
6104 * tests/glr-regression.at (Duplicate representation of merged trees):
6105 New test, from Joel E. Denny in:
6106 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6107 * THANKS: Add Joel E. Denny.
6108
6109 * configure.ac (AC_INIT): Bump to 2.0c.
6110
61112005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6112
6113 * NEWS: Version 2.0b.
6114
6115 * Makefile.am (SUBDIRS): Put examples before tests, so that
6116 "make check" doesn't finish with "All 1 tests passed".
6117
6118 * tests/regression.at (Token definitions): Don't rely on
6119 AT_PARSER_CHECK for data that contains backslashes. It currently
6120 uses 'echo', and 'echo' isn't portable if its argument contains
6121 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6122 that the byte '\0xff' is not printable in the C locale; it is,
6123 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6124 not printable, so use '\0x81' to test.
6125
6126 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6127 version of GCC, since the macro is used with non-GCC compilers.
6128
6129 Fix core dump reported by Pablo De Napoli in
6130 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6131 * tests/regression.at (Invalid inputs with {}): New test.
6132 * src/parse-gram.y (token_name): Translate type before using
6133 it as an index.
6134
6135 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6136 the user's name space. All uses changed to __attribute__
6137 ((__unused__)).
6138 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6139 Add __attribute__ ((__noreturn__)).
6140
6141 * etc/clcommit: Remove. We weren't using it, and it failed
6142 "make maintainer-distcheck".
6143 * Makefile.maint: Merge from coreutils.
6144 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6145 (syntax-check-rules): Change list of rules as described below.
6146 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6147 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6148 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6149 (sc_trailing_space): New rules.
6150 (sc_xalloc_h_in_src): Remove.
6151 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6152 (sc_space_tab, sc_error_exit_success, sc_changelog):
6153 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6154 (makefile-check, po-check, author_mark_check):
6155 (makefile_path_separator_check, copyright-check):
6156 Use grep -n, to make it easier to find violations.
6157 Use CVS_LIST and CVS_LIST_EXCEPT.
6158 (header_regexp, h_re): Remove.
6159 (dd_c): New macro.
6160 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6161 (my-distcheck): Use more-modern GCC flags.
6162 (signatures, %.asc): Remove.
6163 (rel-files, announcement): Remove signatures.
6164 Restore old updating code, even though we don't use it, so
6165 that we're the same as coreutils.
6166 (alpha, beta, major): Depend on news-date-check.
6167 Make the upload commands.
6168
6169 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6170 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6171 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6172 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6173 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6174 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6175 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6176 * tests/sets.at: Likewise.
6177
6178 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6179 we comment out the Autoconf version number.
6180 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6181 it's error-prone and "make maintainer-distcheck" rejects it.
6182
6183 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6184 Indent calls to "error" to pacify "make maintainer-distcheck",
6185 when the calls are not intended to be translated.
6186 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6187
6188 * src/Makefile.am (DEFS): Use +=, to pacify
6189 "make maintainer-distcheck".
6190 (bison_SOURCES): Add scan-skel.h.
6191 (sc_tight_scope): New rule, from coreutils.
6192
6193 * src/files.c (src_extension, header_extension):
6194 Now static, not extern.
6195 * src/getargs.c (short_options): Likewise.
6196 * src/muscle_tab.c (muscle_table): Likewise.
6197 * src/parse-gram.y (current_class, current_type, current_prec):
6198 Likewise.
6199 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6200 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6201 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6202 void, to avoid warning when NLS is disabled.
6203 * src/output.c: Include scan-skel.h.
6204 (scan_skel): Remove decl, since scan-skel.h does this.
6205 (output_skeleton):
6206 Indent calls to "error" to pacify "make maintainer-distcheck".
6207 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6208 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6209 "make maintainer-distcheck".
6210 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6211 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6212 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6213 (skel_lex_destroy, scan_skel): Move these decls to...
6214 * src/scan-skel.h: New file.
6215 * src/uniqstr.c (uniqstr_assert):
6216 Indent calls to "error" to pacify "make maintainer-distcheck".
6217
6218 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6219 not @VAR@.
6220
6221 * tests/torture.at: Revamp to avoid misuse of atoi that
6222 "make maintainer-distcheck" complained about.
6223
6224 * examples/extexi (message): Don't print a message more than once,
6225 and omit line-number decoration that makes Emacs compile think
6226 that informative messages are worth worrying about.
6227
62282005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6229
6230 * configure.ac: Update version number.
6231
6232 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6233 accidentally.
6234 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6235 autogenerated by the maintainer.
6236 * examples/calc++/.cvsignore: Add *.yy.
6237
6238 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6239 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6240 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6241
6242 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6243
6244 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6245 from maintainer-distcheck about casting the argument of 'free'.
6246
6247 * NEWS: Mention recent yytname changes.
6248 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6249
6250 * bootstrap: For translations that have not yet been upgraded to
6251 the new runtime-po domain, prime the pump by extracting the
6252 relevant strings from the obsolete translations. This code can be
6253 removed once the bison-runtime domain has been translated by each
6254 team.
6255
6256 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6257 now that token names are already quoted.
6258
6259 Fix problem reported by Anthony Heading.
6260 * data/glr.c (YYTOKEN_TABLE): New macro.
6261 (yytname): Define if YYTOKEN_TABLE.
6262 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6263 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6264 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6265 * src/output.c (prepare_symbols): Output token_table_flag.
6266
62672005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6268
6269 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6270 again if the first call fails.
6271
6272 * data/glr.c (yytnamerr): New function.
6273 (yyreportSyntaxError): Use it to dequote most string literals.
6274 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6275 with other skeletons. All uses changed.
6276 (yytnameerr_): New function.
6277 (yyreport_syntax_error): Use it to dequote most string literals.
6278 * data/yacc.c (yytnamerr): New function.
6279 (yyerrlab): Use it to decode most string literals.
6280 * doc/bison.texinfo (Decl Summary, Calling Convention):
6281 Clarify quoting convention of yytname.
6282 * src/output.c (prepare_symbols): Quote all names. This undoes
6283 the 2005-04-17 change, which is now accomplished (mostly) via
6284 changes in the parsers as described above.
6285 * tests/regression.at (Token definitions, Web2c Actions):
6286 Undo most 2005-04-17 change here, too.
6287
62882005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6289
6290 Fix more problems reported by twlevo@xs4all.nl.
6291 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6292 remove trailing spaces. This loses the exit status of ./types,
6293 and isn't needed since ./types shouldn't be emitting trailing
6294 spaces.
6295 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6296 as the stack isn't valid in that case.
6297
6298 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6299 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6300 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6301 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6302 is used.
6303 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6304 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6305 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6306 Likewise.
6307
6308 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6309 overly-picky compilers that reject 'char *foo = "bar";'.
6310
6311 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6312 to FILE * parameter, not to stderr. This fixes a typo introduced
6313 in the 2005-07-12 change.
6314
6315 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6316 warnings from GCC 4.
6317
6318 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6319 (yyglrShiftDefer, yysplitStack):
6320 Remove unused parameters b4_pure_formals. All uses changed.
6321 (yyglrShift): Remove unused parameters b4_user_formals.
6322 All uses changed.
6323 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6324
63252005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6326
6327 Destructor cleanups and regularization among the three skeletons.
6328 * NEWS: Document the behavior changes.
6329 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6330 stack before failing, as the cleanup code will do it for us now.
6331 * data/lalr1.cc (yyerrlab): Likewise.
6332 * data/glr.c (yyparse): Pop everything off the stack before
6333 freeing it, so that destructors get called properly.
6334 * data/lalr1.cc (yyreturn): Likewise.
6335 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6336 This is more consistent.
6337 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6338 why destructors might be called. 1.875 -> 2.1.
6339 (Destructor Decl, Decl Summary, Table of Symbols):
6340 Some English-language cleanups for %destructor.
6341 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6342 Add output line for destructor of start symbol.
6343 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6344 because of that same extra output line.
6345
6346 * NEWS: Document minor wording changes in diagnostics of
6347 Bison-generated parsers.
6348 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6349 Remove unused formals. All uses changed.
6350 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6351 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6352 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6353 Rename yyoverflowab to yyexhaustedlab.
6354 When memory exhaustion occurs during syntax-error reporting,
6355 report it separately rather than in a single diagnostic; this
6356 eases translation.
6357 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6358 (Memory Exhausted): Renamed from Parser Stack Overflow.
6359 Revamp wording slightly to prefer "memory exhaustion".
6360 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6361
6362 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6363
6364 Add i18n support to the GLR skeleton. Partially fix the C++
6365 skeleton; a C++ expert needs to finish this. Remove debugging
6366 msgids; there's little point to having them translated, since they
6367 can be understood only by someone who can read the
6368 (English-language) source code.
6369
6370 Generate runtime-po/bison-runtime.pot automatically, so that we
6371 don't have to worry about garbage getting in that file. We'll
6372 make sure after the next official release that old msgids don't
6373 get lost. See
6374 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6375
6376 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6377 Now auto-generated.
6378 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6379 Fix typos in explanations of the runtime file.
6380 * bootstrap: Change gettext keyword from YYI18N to YY_.
6381 Use standard Makefile.in.in in runtime-po, since we'll arrange
6382 for backward-compatible bison-runtime.po files in a different way.
6383 * data/glr.c (YY_): New macro, from yacc.c.
6384 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6385 Translate messages intended for users.
6386 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6387 the wording in the other skeletons. We don't know that the memory
6388 is virtual.
6389 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6390 Use same method that yacc.c uses.
6391 Don't translate debugging messages.
6392 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6393 it doesn't work (yet), and requires C++ expertise to fix.
6394 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6395 Move defn to a more logical place, to be consistent with other
6396 skeletons.
6397 Don't translate debugging messages.
6398 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6399 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6400 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6401 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6402
6403 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6404 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6405 void, not int.
6406 * tests/glr-regression.at (Badly Collapsed GLR States):
6407 Likewise.
6408 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6409 yylex should return 0 at EOF rather than aborting.
6410
6411 Improve tests for stack overflow in GLR parser.
6412 Problem reported by twlevo@xs4all.nl.
6413 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6414 All uses removed.
6415 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6416 can handle the problem.
6417 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6418 (yyparse): New local variable yyresult to record the result.
6419 Use result of setjmp to set it, rather than storing itinto
6420 struct.
6421 (yyDone): Remove label.
6422 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6423 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6424 if YYABORT is used).
6425 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6426 yyparse status; put status > 1 into diagnostic.
6427 Check that status==2 works.
6428 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6429 Use exit status 3 for failure to open (which shouldn't happen).
6430
64312005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6432
6433 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6434 1 on syntax error; just let yyparse do its thing.
6435 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6436 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6437 (Exploding the Stack Size with Alloca):
6438 (Exploding the Stack Size with Malloc):
6439 Expect exit status 2, not 1, since the parser is supposed to blow
6440 its stack. Problem reported by twlevo@xs4all.nl.
6441
6442 * data/glr.c (yyparse): Don't assume that the initial calls
6443 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6444 Print a stack-overflow message and fail instead.
6445 Initialize the line-number information before creating the stack,
6446 so that the stack-overflow message can report line zero safely.
6447
64482005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6449
6450 Fix problems reported by twlevo@xs4all.nl.
6451 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6452 (yyuserMerge): Provide a default case if b4_mergers is empty.
6453 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6454 * tests/glr-regression.at
6455 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6456 Add casts to pacify C++ compilers.
6457 * tests/glr-regression.at (Improper merging of GLR delayed action
6458 sets): Declare yylex before using it.
6459 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6460 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6461 test for valgrind; valgrind is independent of g++.
6462 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6463 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6464 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6465 Use a destructor, so that we can expand the stack. Change
6466 YYSTYPE to char * so that we can free it. Cast result of malloc.
6467
64682005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6469
6470 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6471 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6472
64732005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6474
6475 * PACKAGING: New file, suggested by Bruno Haible and taken from
6476 similar wording in gettext's PACKAGING file.
6477 * NEWS: Mention PACKAGING.
6478 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6479
64802005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6481
6482 * NEWS: Document recent i18n improvements.
6483 * bootstrap: Get runtime translations into runtime-po.
6484 Create runtime-po files automatically, if possible.
6485 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6486 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6487 does not infringe on the user's name space.
6488 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6489 * doc/bison.texinfo (Internationalization): Revamp the English
6490 and Texinfo syntax a bit, to try to make it clearer.
6491 (Bison Options, Option Cross Key): Mention --print-localedir.
6492 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6493 YYENABLE_NLS. Quote a bit more.
6494 * runtime-po/.cvsignore: New file.
6495 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6496 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6497 * runtime-po/quot.sed: Likewise.
6498 * runtime-po/boldquot.sed: Likewise.
6499 * runtime-po/en@quot.header: Likewise.
6500 * runtime-po/en@boldquot.header: Likewise.
6501 * runtime-po/insert-header.sin: Likewise.
6502 * runtime-po/remove-potcdate.sin: Likewise.
6503 * runtime-po/Makevars: Likewise.
6504 * runtime-po/LINGUAS: Likewise.
6505 * runtime-po/de.po: Likewise; we will rely on the translation project
6506 to maintain this, so "bootstrap" should get it.
6507 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6508 its value.
6509 * src/main.c (main): Bind the bison-runtime domain, too.
6510
65112005-07-12 Bruno Haible <bruno@clisp.org>
6512
6513 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6514 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6515 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6516 * runtime-po: New directory.
6517 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6518 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6519 * runtime-po/Rules-quot: New file, copied from po/.
6520 * runtime-po/quot.sed: Likewise.
6521 * runtime-po/boldquot.sed: Likewise.
6522 * runtime-po/en@quot.header: Likewise.
6523 * runtime-po/en@boldquot.header: Likewise.
6524 * runtime-po/insert-header.sin: Likewise.
6525 * runtime-po/remove-potcdate.sin: Likewise.
6526 * runtime-po/Makevars: New file.
6527 * runtime-po/POTFILES.in: New file.
6528 * runtime-po/LINGUAS: New file.
6529 * runtime-po/bison-runtime.pot: New file.
6530 * runtime-po/de.po: New file.
6531 * m4/bison.m4: New file.
6532 * Makefile.am (SUBDIRS): Add runtime-po.
6533 (aclocaldir, aclocal_DATA): New variables.
6534 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6535 Define aclocaldir.
6536 * src/getargs.c (usage): Document --print-localedir option.
6537 (PRINT_LOCALEDIR_OPTION): New enum item.
6538 (long_options): Add --print-localedir option.
6539 (getargs): Handle --print-localedir option.
6540 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6541 (Internationalization): New section.
6542
65432005-07-12 Akim Demaille <akim@epita.fr>
6544
6545 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6546 for consistency with the rest of the code.
6547 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6548 Add separators.
6549
65502005-07-12 Akim Demaille <akim@epita.fr>
6551
6552 * src/parse-gram.y: Use %printer instead of YYPRINT.
6553
65542005-07-12 Akim Demaille <akim@epita.fr>
6555
6556 * src/symtab.h, src/symtab.c (symbol_print): New.
6557 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6558 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6559
65602005-07-12 Akim Demaille <akim@epita.fr>
6561
6562 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6563 b4_at_dollar and b4_dollar_dollar.
6564
65652005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6566
6567 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6568 and Pennello's paper.
6569
65702005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6571
6572 * data/yacc.c (yyparse): Undo previous patch. Instead,
6573 set yylsp[0] and yyvsp[0] only if the initial action
6574 sets yylloc and yylval, respectively.
6575
6576 * data/yacc.c (yyparse): In the initial action, set
6577 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6578 This avoids the use of undefined variables if the initial
6579 action does not set yylloc and/or yylval.
6580
65812005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6582
6583 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6584 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6585 Remove from CVS. These files are automatically generated.
6586 * examples/extexi: Clarify that this file is now part of Bison,
6587 not GNU M4, and that it works with any POSIX-compatible Awk.
6588 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6589 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6590 so that we also get calc++-parser.yy. Geneate it.
6591 Use $(AWK), not gawk, since any conforming Awk will do.
6592 Put comment before action, since older 'make' can't handle comment
6593 in action.
6594 $(BUILT_SOURCES): List all built sources, not just some of them.
6595 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6596 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6597 $($(calc_sources_generated)): Remove unnecessary test for existence
6598 of target. (This had a shell syntax error anyway; a stray "x".)
6599 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6600 calc++-parser.yy.
6601 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6602
6603 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6604 implied by the other modules.
6605
66062005-07-06 Akim Demaille <akim@epita.fr>
6607
6608 Bind examples/calc++ to the package.
6609 * examples/calc++/Makefile: Remove, replaced by...
6610 * examples/calc++/Makefile.am: ... this new file.
6611 * examples/calc++/test: Remove input.
6612 * examples/calc++/compile: Remove.
6613 * examples/Makefile.am: New.
6614 * configure.ac, Makefile.am: Adjust.
6615 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6616
66172005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6618
6619 * data/glr.c (yyFail): Drastically simplify; since the format argument
6620 never had any % directives, we can simply pass it to yyerror.
6621 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6622 be modified later, as that is the usual style in glr.c.
6623 Problems reported by Paul Hilfinger.
6624
6625 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6626 and size overflow errors.
6627 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6628 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6629 (YYSIZEMAX): New macro.
6630 (yystpcpy): New function, taken from yacc.c.
6631 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6632 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6633 so that we don't have to maintain their signatures.
6634 (yyFail): Check for buffer overflow, by using vsnprintf rather
6635 than vsprintf. Allocate a bigger buffer if possible.
6636 Report an error if buffer allocation fails.
6637 (yyStackOverflow): New function.
6638 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6639 the initialization was successful. It might fail if storage was
6640 exhausted.
6641 (yyexpandGLRStack): Add more checks for storage allocation failure.
6642 Use yyStackOverflow to report failures.
6643 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6644 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6645 Don't assume stack number fits in int.
6646 (yysplitStack): Check for storage allocation failure.
6647 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6648 can print diagnostics on storage allocation failure. All callers
6649 changed.
6650 (yyresolveValue): Use yybool for boolean.
6651 (yyreportSyntaxError): Check for size-calculation overflow.
6652 This code is taken from yacc.c.
6653 (yyparse): Check for storage allocation errors when allocating
6654 the initial stack.
6655
66562005-07-05 Akim Demaille <akim@epita.fr>
6657
6658 Extract calc++ from the documentation.
6659 * doc/bison.texinfo (Calc++): Add the extraction marks.
6660 * examples/extexi: New, from the aborted GNU Programming 2E.
6661 Separate the different paragraph of a file with empty lines.
6662 * examples/Makefile: Use it to extract the whole calc++ example.
6663
66642005-06-24 Akim Demaille <akim@epita.fr>
6665
6666 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6667 class typedefs.
6668
66692005-06-22 Akim Demaille <akim@epita.fr>
6670
6671 * doc/bison.texinfo (C++ Language Interface): First stab.
6672 (C++ Parsers): Remove.
6673
66742005-06-22 Akim Demaille <akim@epita.fr>
6675
6676 * data/lalr1.cc (yylex_): Honor %lex-param.
6677
66782005-06-22 Akim Demaille <akim@epita.fr>
6679
6680 Start a set of simple examples.
6681 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6682 * examples/calc++/calc++-driver.hh,
6683 * examples/calc++/calc++-parser.yy,
6684 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
6685 * examples/calc++/compile, examples/calc++/test: New.
6686
66872005-06-09 Paul Eggert <eggert@cs.ucla.edu>
6688
6689 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
6690 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
6691 which stems from the 2005-05-27 patch.
6692
66932005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6694
6695 * data/glr.c: Modify treatment of unused parameters to permit use
6696 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
6697
66982005-05-30 Paul Eggert <eggert@cs.ucla.edu>
6699
6700 Fix infringement on user name space reported by Janos Zoltan Szabo.
6701 * data/yacc.c (yyparse): strlen -> yystrlen.
6702
67032005-05-30 Akim Demaille <akim@epita.fr>
6704
6705 * data/lalr1.cc (_): New.
6706 Translate the various messages.
6707
67082005-05-27 Paul Eggert <eggert@cs.ucla.edu>
6709
6710 Fix infringement on user name space reported by Bruno Haible.
6711 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
6712 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
6713 the user's name space.
6714 (alloca): Include <stdlib.h> to get it, if it's not built in.
6715 (YYMALLOC, YYFREE): Define only if needed.
6716 (malloc, free): Declare, but only if needed, as this infringes on
6717 the user name space.
6718
67192005-05-25 Paul Eggert <eggert@cs.ucla.edu>
6720
6721 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
6722 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
6723 with %d format.
6724 * lib/ebitset.c (min, max): Undef before defining.
6725 * lib/vbitset.c (min, max): Likewise.
6726 * lib/subpipe.c (create_subpipe): Save local variables in case
6727 vfork clobbers them.
6728
67292005-05-24 Bruno Haible <bruno@clisp.org>
6730
6731 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
6732 error message syntax used by gcc-4.0.
6733
67342005-05-23 Paul Eggert <eggert@cs.ucla.edu>
6735
6736 * README: Mention m4 1.4.3. Remove obsolete advice about
6737 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
6738
6739 * bootstrap: Remove workaround for problem I encountered with
6740 gettext 0.14.1; it seems to be fixed now.
6741
67422005-05-22 Paul Eggert <eggert@cs.ucla.edu>
6743
6744 * NEWS: Version 2.0a.
6745
6746 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
6747 the previous change.
6748
6749 Various maintainer cleanups.
6750 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
6751 conftest*, for benefit of CVS commands run at the same time as
6752 "configure". Add build-aux, since "bootstrap" now creates it and
6753 its subfiles.
6754 * Makefile.cfg (move_if_change): Remove.
6755 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
6756 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
6757 (po_repo, do-po-update, po-update, wget_files, get-targets):
6758 (config.guess-url_prefix, config.sub-url_prefix):
6759 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
6760 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
6761 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
6762 Remove.
6763 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
6764 this is now the recommended name.
6765 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
6766 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
6767 ylwrap. These files now go into build-aux.
6768 * config/move-if-change: Remove.
6769 * config/prev-version.txt: Bump from 1.75 to 2.0.
6770
6771 * bootstrap: Add stdio-safer, unistd-safer modules.
6772 Remove m4/glibc2.m4 (introduced by latest gnulib, but
6773 we don't need it).
6774 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
6775 fopen-safer.c, stdio-safer.h, unistd-safer.h.
6776 * lib/subpipe.c: Include "unistd-safer.h".
6777 (create_subpipe): Make sure all the newly-created
6778 file descriptors are > 2, so that diagnostics don't
6779 get sent down them (which might cause Bison to hang, in theory).
6780 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
6781 * src/files.c (xfopen): Use fopen_safer, not fopen.
6782
6783 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
6784 yesterday's yacc.c fix.
6785
67862005-05-21 Paul Eggert <eggert@cs.ucla.edu>
6787
6788 * data/glr.c, data/lalr1.cc: Update copyright date.
6789
6790 Fix a destructor bug reported by Wolfgang Spraul in
6791 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
6792 * data/yacc.c (yyabortlab): Don't call destructor, and
6793 don't set yychar to EMPTY.
6794 (yyoverflowlab): Don't call destructor.
6795 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
6796 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
6797 since we no longer output the message "discarding lookahead token
6798 end of input ()".
6799
68002005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6801
6802 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
6803 fix a small glitch in debugging output.
6804 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
6805 after YY_SYMBOL_PRINT where needed.
6806
6807 (struct yyGLRState): Add some comments.
6808 (struct yySemanticOption): Add some comments.
6809 (union yyGLRStackItem): Add comment.
6810
6811 (yymergeOptionSets): Correct this to properly perform the union,
6812 avoiding infinite reported by Michael Rosien.
6813 Update comment.
6814
6815 * tests/glr-regression.at: Add test for GLR merging error reported
6816 by M. Rosien.
6817
68182005-05-13 Paul Eggert <eggert@cs.ucla.edu>
6819
6820 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
6821 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
6822 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
6823 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
6824 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
6825 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
6826 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
6827 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
6828 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
6829 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
6830 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
6831 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
6832 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
6833 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
6834 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
6835 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
6836 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
6837 src/derives.h, src/files.c, src/files.h, src/getargs.c,
6838 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
6839 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
6840 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
6841 src/output.h, src/parse-gram.c, src/parse-gram.h,
6842 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
6843 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
6844 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
6845 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
6846 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
6847 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
6848 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
6849 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
6850 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
6851 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
6852 tests/reduce.at, tests/regression.at, tests/sets.at,
6853 tests/synclines.at, tests/testsuite.at, tests/torture.at:
6854 Update FSF postal mail address.
6855
68562005-05-11 Paul Eggert <eggert@cs.ucla.edu>
6857
6858 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
6859 Problem reported by Ralf Menzel.
6860
68612005-05-01 Paul Eggert <eggert@cs.ucla.edu>
6862
6863 * tests/actions.at: Test that stack overflow invokes destructors.
6864 From Marcus Holland-Moritz.
6865 * data/yacc.c (yyerrlab): Move the code that destroys the stack
6866 from here....
6867 (yyreturn): to here. That way, destructors are called properly
6868 even if the stack overflows, or the user calls YYACCEPT or
6869 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
6870 (yyoverflowlab): Destroy the lookahead.
6871
68722005-04-24 Paul Eggert <eggert@cs.ucla.edu>
6873
6874 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
6875
68762005-04-17 Paul Eggert <eggert@cs.ucla.edu>
6877
6878 * NEWS: Bison-generated C parsers no longer quote literal strings
6879 associated with tokens.
6880 * src/output.c (prepare_symbols): Don't escape strings,
6881 since users don't want to see C escapes.
6882 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
6883 in diagnostics.
6884 * tests/input.at (Torturing the Scanner): Likewise.
6885 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
6886
68872005-04-16 Paul Eggert <eggert@cs.ucla.edu>
6888
6889 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
6890 the data size is known to be too small and we can't increase it.
6891 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
6892
68932005-04-15 Paul Eggert <eggert@cs.ucla.edu>
6894
6895 * src/parse-gram.y: Include quotearg.h.
6896 (string_as_id): Quote $1 before using it as a key, since the
6897 lexer no longer quotes it for us.
6898 (string_content): Don't strip quotes, since lexer no longer
6899 quotes it for us.
6900 * src/scan-gram.l: Include quotearg.h.
6901 ("\""): Omit quote.
6902 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
6903 a key, since the rest of the lexer doesn't quote it.
6904 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
6905 * tests/regression.at (Token definitions): Check for backslashes
6906 in token strings.
6907
6908 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
6909 (YYSIZE_T): Define to unsigned long int when using an older compiler.
6910 (yyparse): Revamp code to generate long syntax error message, to
6911 make it easier to translate, and to avoid problems with arithmetic
6912 overflow. Change "virtual memory" to "memory" in diagnostic, since
6913 we don't know whether the memory is virtual.
6914
69152005-04-13 Paul Eggert <eggert@cs.ucla.edu>
6916
6917 * NEWS: Bison-generated C parsers now use the _ macro to
6918 translate strings.
6919 * data/yacc.c (_) [!defined _]: New macro.
6920 All English strings wrapped inside this macro.
6921 * doc/bison.texinfo (Bison Parser): Document _.
6922 * po/POTFILES.in: Include src/parse-gram.c, since it now
6923 includes translateable strings that parse-gram.y doesn't.
6924
69252005-04-12 Paul Eggert <eggert@cs.ucla.edu>
6926
6927 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
6928 reverting the 2004-10-11 change to this function.
6929 (symbol_check_alias_consistency): Don't call symbol_type_set
6930 if the type name is already correct.
6931 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
6932
69332005-03-25 Paul Eggert <eggert@cs.ucla.edu>
6934
6935 * tests/regression.at (Token definitions): Don't use a token named
6936 c, as that generates a "#define c ..." that runs afoul of buggy
6937 stdlib.h that uses the identifier c as a member of struct
6938 drand48_data. Problem reported by Horst Wente.
6939
69402005-03-21 Paul Eggert <eggert@cs.ucla.edu>
6941
6942 * bootstrap: Change translation URL from
6943 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
6944 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
6945 redirection glitches. Problem reported by twlevo@xs4all.nl.
6946
69472005-03-20 Paul Eggert <eggert@cs.ucla.edu>
6948
6949 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
6950 after operands; POSIX says this isn't portable for the c99 command.
6951
69522005-03-18 Paul Eggert <eggert@cs.ucla.edu>
6953
6954 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
6955 immediately if a data overrun has occurred; this may help us track
6956 down what may be a spurious failure on MacOS.
6957
69582005-03-17 Paul Eggert <eggert@cs.ucla.edu>
6959
6960 Respond to problems reported by twlevo@xs4all.nl.
6961
6962 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
6963
6964 * src/vcg.h: Comment fix.
6965 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
6966 (G_CMAX): Change to -1 instead of INT_MAX.
6967
6968 * data/yacc.c (yyparse): Omit spaces before #line.
6969
69702005-03-15 Paul Eggert <eggert@cs.ucla.edu>
6971
6972 * src/tables.c (state_number_to_vector_number): Put it inside an
6973 "#if 0", since it's not currently used. Problem reported by
6974 Roland McGrath.
6975
69762005-03-06 Paul Eggert <eggert@cs.ucla.edu>
6977
6978 * src/output.c (escaped_output): Renamed from
6979 escaped_file_name_output, since we now use it for symbol tags as
6980 well. All uses changed.
6981 (symbol_destructors_output, symbol_printers_output):
6982 Escape symbol tags too.
6983 Problem reported by Matyas Forstner in
6984 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
6985
6986 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
6987 not needed.
6988 * src/output.c (user_actions_output, token_definitions_output,
6989 symbol_destructors_output, symbol_printers_output): Likewise.
6990 * src/reader.c (prologue_augment): Likewise.
6991 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
6992
6993 * src/vcg.c (output_edge): Don't quote linestyle arg.
6994 Problem reported by twlevo@xs4all.nl.
6995
69962005-02-28 Paul Eggert <eggert@cs.ucla.edu>
6997
6998 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
6999 example, reported by Derek M Jones. Also, make the example even
7000 more outrageous, to better illustrate how bad the problem is.
7001
70022005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7003
7004 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7005 putsym. Typo reported by Sebastian Piping.
7006
70072005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7008
7009 * doc/bison.texinfo (Language and Grammar): some -> same
7010 (Epilogue): int he -> in the
7011 Typos reported by Sebastian Piping via Justin Pence.
7012
70132005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7014
7015 * tests/glr-regression.at (Improper handling of embedded actions
7016 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7017 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7018 with dollar signs in test names.
7019 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7020 for a similar reason.
7021
70222005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7023
7024 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7025 wants to redefine G_VIEW.
7026
70272005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7028
7029 * src/vcg.c (get_view_str): Remove case for normal_view.
7030 Problem reported by twlevo@xs4all.nl.
7031
70322005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7033
7034 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7035 Problem reported by twlevo@xs4all.nl.
7036
7037 * doc/bison.texinfo: Change @dircategory from "GNU programming
7038 tools" to "Software development". Requested by Richard Stallman
7039 via Karl Berry.
7040
70412005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7042
7043 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7044 Problem reported by twlevo@xs4all.nl.
7045
70462005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7047
7048 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7049 keyword; it's not needed with modern compilers, and it doesn't
7050 affect correctness with older compilers. Suggested by
7051 twlevo@xs4all.nl.
7052
70532005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7054
7055 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7056 gcc -Wswitch-default.
7057 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7058 * data/yacc.c (yyparse): Likewise.
7059
70602005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7061
7062 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7063 already. Let config.h define any nonstandard values.
7064
70652005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7066
7067 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7068 for the benefit of slower hosts. Problem reported by
7069 Nelson H. F. Beebe.
7070
70712005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7072
7073 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7074 being defined and not used.
7075 * data/lalr1.cc (yyparse): Likewise.
7076 Use "if (false)" rather than "if (0)".
7077
70782005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7079
7080 * TODO: Mention that we should allow NUL bytes in tokens.
7081
70822005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7083
7084 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7085 Problem reported by Hans Aberg.
7086
70872005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7088
7089 * src/getargs.c (version): Happy new year; update overall
7090 program copyright date from 2004 to 2005.
7091
7092 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7093 Problem reported by Hans Aberg.
7094 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7095 (Output file names.): Add a test for the case when standard output
7096 is closed.
7097
70982004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7099
7100 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7101 to fix an oversight in the Bison 2.0 manual.
7102
71032004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7104
7105 * NEWS: Version 2.0. Reformat the existing news items since
7106 1.875, so that related items are grouped together.
7107 * configure.ac (AC_INIT): Bump version to 2.0.
7108 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7109
7110 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7111 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7112 otherwise, we're not testing alloca. Unfortunately there's no
7113 simple way to consult HAVE_ALLOCA here.
7114
7115 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7116 for yymsg, too.
7117
7118 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7119 hand. This avoids a warning about comparing int to size_t when
7120 GCC warnings are enabled.
7121
71222004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7123
7124 * NEWS: Bison-generated parsers no longer default to using the
7125 alloca function (when available) to extend the parser stack, due
7126 to widespread problems in unchecked stack-overflow detection.
7127 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7128 responsibility to set it to a positive value. This lets the user
7129 specify a value that is not a preprocessor constant.
7130 * data/yacc.c (YYMAXDEPTH): Likewise.
7131 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7132 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7133 to be a compile-time constant. However, explain the constraints on it.
7134 Also, explain the constraints on YYINITDEPTH.
7135 (Table of Symbols): Explain that alloca is no longer the default.
7136 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7137 to 1.
7138
7139 * doc/bison.texinfo (Location Default Action): Mention that n must
7140 be zero when k is zero. Suggested by Frank Heckenbach.
7141
71422004-12-22 Akim Demaille <akim@epita.fr>
7143
7144 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7145 (parser::state_type, parser::semantic_type, parser::location_type):
7146 Private, not public.
7147 (parser::parse): Return ints, not bool.
7148 Returning a bool introduces a problem: 0 corresponds to false, and
7149 it seems weird to return false on success. Returning true changes
7150 the conventions for yyparse.
7151 Alternatively we could return void and send an exception.
7152 There is no clear consensus (yet?).
7153 (state_stack, semantic_stack, location_stack): Rename as...
7154 (state_stack_type, semantic_stack_type, location_stack_type): these.
7155 Private, not public.
7156 * tests/c++.at: New.
7157 * tests/testsuite.at, tests/Makefile.am: Adjust.
7158
71592004-12-21 Akim Demaille <akim@epita.fr>
7160
7161 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7162
71632004-12-21 Akim Demaille <akim@epita.fr>
7164
7165 Don't impose std::string for filenames.
7166
7167 * data/lalr1.cc (b4_filename_type): New.
7168 (position::filename): Use it.
7169 (parser.hh): Move the inclusion of stack.hh and location.hh below
7170 the user code, so that needed headers for the filename type can be
7171 included first.
7172 Forward declare them before the user code.
7173 * tests/Makefile.am (check-local, installcheck-local): Pass
7174 TESTSUITEFLAGS to the TESTSUITE.
7175
71762004-12-20 Akim Demaille <akim@epita.fr>
7177
7178 Use more STL like names: my_class instead of MyClass.
7179
7180 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7181 (SemanticStack, SemanticType, StateStack, StateType)
7182 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7183 (Parser::value): Rename as...
7184 (location_stack, location_type, rhs_number_type, semantic_stack)
7185 (semantic_type, state_stack, state_type, token_number_type, stack)
7186 (slice, traits, parser::yylloc, parser::yylval): these.
7187
7188 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7189
71902004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7191
7192 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7193 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7194
71952004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7196
7197 Remove uses of 'short int' and 'unsigned short int'. This raises
7198 some arbitrary limits. It uses more memory but nowadays that's
7199 not much of an issue.
7200
7201 This change does not affect the generated parsers; that's a different
7202 task, as some users will want to conserve memory there.
7203
7204 Ideally we should use size_t to represent all object counts, and
7205 something like ptrdiff_t to represent signed differences of object
7206 counts; but that will require more code-cleanup than I have the
7207 time to do right now.
7208
7209 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7210 Use size_t, not int or short int, to count objects.
7211 * src/closure.c (nritemset, closure): Likewise.
7212 * src/closure.h (nritemset, closure): Likewise.
7213 * src/nullable.c (nullable_compute): Likewise.
7214 * src/print.c (print_core): Likewise.
7215 * src/print_graph.c (print_core): Likewise.
7216 * src/state.c (state_compare, state_hash): Likewise.
7217 * src/state.h (struct state): Likewise.
7218 * src/tables.c (default_goto, goto_actions): Likewise.
7219
7220 * src/gram.h (rule_number, rule): Use int, not short int.
7221 * src/output.c (prepare_rules): Likewise.
7222 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7223 errs, reductions): Likewise.
7224 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7225 Likewise.
7226 * src/tables.c (vector_number, tally, action_number,
7227 ACTION_NUMBER_MINIMUM): Likewise.
7228 * src/output.c (muscle_insert_short_int_table): Remove.
7229
72302004-12-17 Akim Demaille <akim@epita.fr>
7231
7232 * data/lalr1.cc: Extensive Doxygenation.
7233 (error_): Rename as...
7234 (error): this, since it is visible to the user.
7235 Adjust callers.
7236 (Parser::message): Now an automatic variable from...
7237 (Parser::yyreport_syntax_error_): here.
7238 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7239 Parser::error.
7240 * tests/input.at: Escape $.
7241
72422004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7243
7244 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7245 Parenthesize rhs to avoid obscure problems with mistakes like
7246 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7247 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7248 b4_rhs_location): Likewise.
7249 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7250 b4_rhs_location): Likewise.
7251
72522004-12-16 Akim Demaille <akim@epita.fr>
7253
7254 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7255 yacc.c: be sure to stay within yycheck_.
7256 * tests/actions.at: Re-enable C++ tests.
7257
72582004-12-16 Akim Demaille <akim@epita.fr>
7259
7260 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7261 real.
7262
72632004-12-16 Akim Demaille <akim@epita.fr>
7264
7265 Use #define to handle the %name-prefix.
7266
7267 * data/glr.c, data/yacc.c: Comment changes.
7268 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7269 so that one can refer to yylex in the parser file, and have it
7270 renamed, as is the case with other skeletons.
7271
72722004-12-16 Akim Demaille <akim@epita.fr>
7273
7274 Move lalr1.cc internals into yy*.
7275
7276 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7277 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7278 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7279 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7280 (empty_, final_, terror_, errcode_, ntokens_)
7281 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7282 (looka_, ilooka_, error_range_, nerrs_):
7283 Rename as...
7284 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7285 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7286 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7287 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7288 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7289 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7290 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7291 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7292 these.
7293
72942004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7295
7296 Fix some problems reported by twlevo at xs4all.
7297 * src/symtab.c (symbol_new): Report an error if the input grammar
7298 contains too many symbols. This is better than calling abort() later.
7299 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7300 (struct node, struct graph):
7301 Rename member expand to stretch. All uses changed.
7302 (struct graph): Remove member layoutalgorithm. All uses removed.
7303 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7304 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7305 All uses changed.
7306 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7307
73082004-12-15 Akim Demaille <akim@epita.fr>
7309
7310 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7311 Add more Doxygen comments.
7312 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7313 (report_syntax_error_, translate_): Rename as...
7314 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7315 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7316
73172004-12-15 Akim Demaille <akim@epita.fr>
7318
7319 * data/lalr1.cc (lex_): Rename as...
7320 (yylex_): this.
7321 Move the trace here.
7322 Take the %name-prefix into account.
7323 Reported by Alexandre Duret-Lutz.
7324
73252004-12-15 Akim Demaille <akim@epita.fr>
7326
7327 Simplify the C++ parser constructor.
7328
7329 * data/lalr1.cc (debug_): Rename as...
7330 (yydebug_): so that the parser's internals are always in the yy*
7331 pseudo namespace.
7332 Adjust uses.
7333 (b4_parse_param_decl): Remove the leading comma as it is now only
7334 called as unique argument list.
7335 (Parser::Parser): Remove the constructor accepting a location and
7336 an initial debugging level.
7337 Remove from the other ctor the argument for the debugging level.
7338 (debug_level_type, debug_level, set_debug_level): New.
7339
7340 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7341 constructor calls.
7342
73432004-12-15 Akim Demaille <akim@epita.fr>
7344
7345 Remove b4_root related material: failure experiment
7346 (which goal was to allow to derive from a class).
7347
7348 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7349 definitions and uses.
7350
73512004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7352
7353 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7354 not 2, since it's not portable to subtract 1 from the start of an
7355 array. The new item 0 is never set or used. All uses changed.
7356
7357 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7358 the default definition of YYLLOC_DEFAULT. Problem reported
7359 by Frank Heckenbach.
7360
73612004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7362
7363 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7364 the normal case and one for the error case. Just use the
7365 first one uniformly. Problem reported by Frank Heckenbach.
7366 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7367 use exactly the same macro in both places.
7368 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7369 so that the normal-case YYRHSLOC works for the error case too.
7370 All uses changed.
7371 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7372 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7373 * doc/bison.texinfo (Location Default Action): Don't claim that
7374 we have an array of locations. Use the same macro for both glr
7375 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7376 the index is 0.
7377
73782004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7379
7380 * HACKING: Update email addresses to send announcements to.
7381
7382 * configure.ac (AC_INIT): Bump version to 1.875f.
7383
73842004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7385
7386 * NEWS: Version 1.875e.
7387 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7388
7389 * src/scan-skel.l: Include "complain.h", for "fatal".
7390
7391 * src/relation.h (relation_print, relation_digraph):
7392 Relation sizes are of type relation_node, not size_t (this is
7393 merely a doc fix, since the two types are equivalent).
7394 (relation_transpose): Relation sizes are of type relation_node,
7395 not int.
7396 * src/relation.c: Likewise.
7397 (top, infinity): Now of type relation_node, not int.
7398 (traverse, relation_transpose): Use relation_node, not int.
7399
7400 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7401 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7402 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7403
7404 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7405 specifying whether the test should be skipped. Use it tp
7406 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7407 fail on some hosts, and should be skipped.
7408
74092004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7410
7411 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7412 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7413 unless otherwise specified below.
7414
7415 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7416 to allocate kernel_base, kernel_items, kernel_size, since
7417 they needn't be initialized to 0.
7418 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7419 * src/closure.c (new_closure): Likewise, for itemset.
7420 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7421 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7422 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7423 (build_relations): Likewise for edge, states1, includes.
7424 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7425 * src/reader.c (packgram): Likewise, for ritem, rules.
7426 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7427 * src/relation.c (relation_digraph): Likewise for VERTICES.
7428 (relation_transpose): Likewise for new_R, end_R.
7429 * src/symtab.c (symbols_token_translations_init): Likewise for
7430 token_translations.
7431 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7432 (token_actions): Likewise for yydefact, actrow, conflrow,
7433 conflict_list.
7434 (save_column): Likewise for froms[symno], tos[symno].
7435 (goto_actions): Likewise for state_count.
7436 (pack_table): Likewise for base, pos, check.
7437 (tables_generate): Likewise for width.
7438
7439 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7440 for initial core. Just have a separate core, so we needn't worry
7441 about whether kernel_size and kernel_base are initialized.
7442
7443 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7444 kernel_size, kernel_items): Remove unnecessary initialization.
7445 * src/conflicts.c (conflicts): Likewise.
7446 * src/derives.c (derives): Likewise.
7447 * src/muscle_tablc (muscle_insert): Likewise.
7448 * src/relation.c (relation_digraph): Likewise.
7449 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7450 conflrow, conflict_table, conflict_list, table, check):
7451 Likewise.
7452
7453 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7454 This is because all callers pass unsigned int.
7455 * src/closure.h (new_closure): Likewise.
7456
7457 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7458 (build_relations): Initialize includes[i] in all cases.
7459 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7460 and rules[ruleno].precsym. Initialize members in order.
7461 * src/relation.c (relation_transpose): Always initialize new_R[i]
7462 and end_R[i].
7463 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7464
7465 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7466 conflict_list[0] was always 0, but now it isn't initialized.
7467
7468 * src/table.c (table_grow): When conflict_table grew, the grown
7469 area wasn't cleared. Fix this.
7470
7471 * lib/.cvsignore: Add strdup.c, strdup.h.
7472 * m4/.cvsignore: Add strdup.m4.
7473
74742004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7475
7476 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7477 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7478 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7479 ngotos + 1 without checking for overflow.
7480 (build_relations): Use END_NODE, not -1, to denote end of edges.
7481 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7482 build_relations): Use goto_number, not int, for goto numbers.
7483 * src/tables.c (save_column, default_goto): Likewise.
7484
74852004-11-23 Akim Demaille <akim@epita.fr>
7486
7487 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7488 of #defining from yystype.
7489 Don't typedef yystype, C++ does not need it.
7490 This lets it possible to forward declare it as union.
7491
74922004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7493
7494 * bootstrap (gnulib_modules): Add extensions.
7495 Problem reported by Jim Meyering.
7496
74972004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7498
7499 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7500 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7501 src/system.h, src/tables.c: XFREE -> free, to accommodate
7502 recent change to gnulib xalloc.h.
7503 Problem reported by Jim Meyering.
7504
75052004-11-17 Akim Demaille <akim@epita.fr>
7506
7507 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7508
75092004-11-17 Akim Demaille <akim@epita.fr>,
7510 Alexandre Duret-Lutz <adl@gnu.org>
7511
7512 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7513 changes.
7514 (YYCDEBUG): Adjust.
7515 Use it instead of cdebug_.
7516 (Parser::debug_stream, Parser::set_debug_stream): New.
7517 (Parser::symprint_): Define cdebug_ for temporary backward
7518 compatibility.
7519 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7520 debug_stream ().
7521
75222004-11-17 Akim Demaille <akim@epita.fr>
7523
7524 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7525 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7526 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7527 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7528
75292004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7530
7531 * data/glr.c (yyloc_default): Remove; not used.
7532 Problem reported by Frank Heckenbach.
7533
75342004-10-25 Akim Demaille <akim@epita.fr>
7535
7536 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7537 Introduce another definition to address simple location arrays.
7538 (yyGLRStack): New member: yyerror_range.
7539 (yyrecoverSyntaxError, yyparse): Update it.
7540 (yyrecoverSyntaxError): Use it when shifting the error token to
7541 have an accurate range, equivalent to the one computed by both
7542 yacc.c and lalr1.cc.
7543 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7544 that column numbers start at column 0, as per GNU Coding
7545 Standards, the others tests, and the doc.
7546 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7547 Adjust to the above change (first column is 0).
7548 And adjust the location of the "<error>", now covering the whole
7549 line.
7550
75512004-10-22 Akim Demaille <akim@epita.fr>
7552 and Paul Eggert <eggert@cs.ucla.edu>
7553
7554 Remove some arbitrary limits on goto numbers and relations.
7555 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7556 initial values, since they're never used.
7557 (set_goto_map): ngotos is now unsigned, so test for overflow
7558 by seeing whether it wraps around to zero.
7559 * src/lalr.h (goto_number): Now size_t, not short int.
7560 (GOTO_NUMBER_MAXIMUM): Remove.
7561 * src/relation.c (relation_print, traverse, relation_transpose):
7562 Check for END_NODE rather than looking at sign.
7563 * src/relation.h (END_NODE): New macro.
7564 (relation_node): Now size_t, not short int.
7565
75662004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7567
7568 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7569 keyword, not an identifier. Problem reported by Baron Schwartz in
7570 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7571
75722004-10-11 Akim Demaille <akim@epita.fr>
7573
7574 * src/symtab.c (symbol_check_alias_consistency): Also check
7575 type names, destructors, and printers.
7576 Reported by Alexandre Duret-Lutz.
7577 Recode the handling of associativity and precedence in terms
7578 of symbol_precedence_set.
7579 Accept no redeclaration at all, not even equal to the previous
7580 value.
7581 (redeclaration): New.
7582 Use it to factor redeclaration complaints.
7583 (symbol_make_alias): Don't set the type of the alias, let
7584 symbol_check_alias_consistency do it as for other features.
7585 * src/symtab.h (symbol): Add new member prec_location, and
7586 type_location.
7587 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7588 * tests/input.at (Incompatible Aliases): New.
7589
75902004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7591
7592 .cvsignore fixes to accommodate gnulib changes,
7593 and the practice of naming build directories "_build".
7594 * .cvsignore: Add "_*". Sort.
7595 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7596 * m4/.cvsignore: Add "*_gl.m4".
7597
75982004-10-06 Akim Demaille <akim@epita.fr>
7599
7600 * src/parse-gram.y (add_param): Fix the truncation of trailing
7601 spaces.
7602
76032004-10-05 Akim Demaille <akim@epita.fr>
7604
7605 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7606 whether the reducion was empty or not. This leaves room to
7607 improve the use of YYLLOC_DEFAULT in such a case.
7608 lalr1.cc is still experimental, so changing this is acceptable.
7609 And finally, there are probably not many users who changed the
7610 handling of locations in GLR, so changing is admissible too.
7611
7612 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7613 empty reduction, set @$ to an empty location ending the previously
7614 stacked symbol.
7615 Adjust uses to make sure the code is triggered on empty
7616 reductions.
7617 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7618 expected output: empty reductions have empty locations.
7619
76202004-09-29 Akim Demaille <akim@epita.fr>
7621
7622 * data/lalr1.cc: Move towards a more standard C++ coding style
7623 for templates: Class < T > -> Class<T>.
7624
76252004-09-29 Akim Demaille <akim@epita.fr>
7626
7627 * data/lalr1.cc: Reinstall the former ctor, for sake of
7628 compatibility, but warn it will be removed.
7629 Move towards a more standard C++ coding style (i.e., type *var ->
7630 type* var).
7631
76322004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7633
7634 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7635 since it's less likely to work if NULs are involved in the future.
7636
76372004-09-27 Akim Demaille <akim@epita.fr>
7638
7639 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7640
76412004-09-27 Akim Demaille <akim@epita.fr>
7642
7643 * data/lalr1.cc (b4_parse_param_decl_1): New.
7644 (b4_parse_param_decl): Use it to have different names between attribute
7645 and argument names.
7646 (b4_cc_constructor_call): Likewise.
7647
76482004-09-24 Akim Demaille <akim@epita.fr>
7649
7650 * src/parse-gram.y (add_param): Strip the leading and trailing
7651 blanks from a formal argument declaration.
7652 (YY_LOCATION_PRINT): New.
7653
76542004-09-24 Akim Demaille <akim@epita.fr>
7655
7656 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7657 after the location.
7658
76592004-09-24 Akim Demaille <akim@epita.fr>
7660
7661 * doc/bison.texinfo (Table of Symbols): Sort.
7662
76632004-09-21 Akim Demaille <akim@epita.fr>
7664
7665 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7666 the useless parentheses.
7667 Suggested by Paul Eggert.
7668
76692004-09-20 Akim Demaille <akim@epita.fr>
7670
7671 Let the initial-action act on the look-ahead, and use it for the
7672 "initial push" (corresponding to an hypothetical beginning-of-file).
7673 And let lalr1.cc honor %initial-action.
7674
7675 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7676 example.
7677 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7678 (Parser::Parser): Remove the ctor that used to initialize it.
7679 (Parser::parse): Like in the other skeletons, issue the "starting
7680 parse" message before any action.
7681 Honor %initial-action.
7682 Initialize the stacks with the lookahead.
7683 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7684 look-ahead.
7685 Push them in the stacks.
7686 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
7687
76882004-09-20 Akim Demaille <akim@epita.fr>
7689
7690 * doc/bison.texinfo (Initial Action Decl): New.
7691
76922004-09-20 Akim Demaille <akim@epita.fr>
7693
7694 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
7695 clearer criterion to define it.
7696 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
7697 When reducing on an empty RHS, use the latest stacked location as
7698 location.
7699 yylloc is not always available.
7700 * data/glr.c: Likewise.
7701 Also, honor initial-actions.
7702
77032004-09-20 Akim Demaille <akim@epita.fr>
7704
7705 * data/yacc.c (YY_LOCATION_PRINT): New.
7706 Define when we know YYLTYPE's structure, i.e., when the default
7707 YYLLOC_DEFAULT is used.
7708 * data/c.m4 (b4_yysymprint_generate): Use it.
7709 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
7710 value of the result.
7711 (error_start_): Replace with...
7712 (error_range_): this location array.
7713 This allows to replace code relying on the implementation of
7714 locations by portable code.
7715 * data/yacc.c (yylerrsp): Replace with...
7716 (yyerror_range): this.
7717 Every time a token is popped, update yyerror_range[0], to have an
7718 accurate location for the error token.
7719 * data/glr.c (YY_LOCATION_PRINT): New.
7720 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
7721 deference a pointer.
7722 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
7723 report the location in %printers.
7724
7725 * src/scan-skel.l: Instead of abort, report error messages to ease
7726 understanding skeleton scanning failures.
7727
77282004-09-16 Akim Demaille <akim@epita.fr>
7729
7730 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
7731 (iterator, const_iterator): these, to be more in the C++ spirit.
7732 Also, return reverse iterators so that when displaying the stack
7733 we display its bottom first.
7734 (Parser::stack_print_, Parser::reduce_print_): Match the messages
7735 from yacc.c.
7736 We should probably use vector here though.
7737
77382004-09-16 Akim Demaille <akim@epita.fr>
7739
7740 Have more complete shift traces.
7741
7742 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
7743 to report Shifts instead of ad hoc YYDPRINTF invocations,
7744 including for the error token.
7745 * data/lalr1.cc (symprint_): Output the location.
7746 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
7747 output the location within the %printer.
7748 Activate GLR tests, at least to make sure they compile properly.
7749 They still don't pass though.
7750 * tests/calc.at: Adjust expect verbose output, since now "Entering
7751 state..." is on a different line than the "Shifting" message.
7752
77532004-09-08 Akim Demaille <akim@epita.fr>
7754
7755 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
7756 Bison directive from the Bison file to the invocation of this
7757 macro, so that these directives are passed to
7758 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
7759 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
7760 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
7761 the extra Bison directives instead of the whole series.
7762 Change the grammar so that there are recoverable errors, and
7763 unrecoverable errors. Now we can have the parser give up before
7764 consuming the whole input. As a result we now can observe that
7765 the lookahead is freed when needed.
7766 Change the parser source to parse argv[1] instead of a hard coded
7767 string.
7768 Simplify yylex, and give a value and location to EOF.
7769 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
7770 passed directives already coded in the file.
7771 Add some tests to check the location of "error".
7772 For some tests, the C++ parser is correct, and not yacc.c.
7773 For other tests, they provide different, but unsatisfying, values,
7774 so keep the C++ value so that at least one parser is "correct"
7775 according to the test suite.
7776 (Actions after errors): Remove, this is subsumed by the
7777 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
7778
77792004-09-06 Akim Demaille <akim@epita.fr>
7780
7781 * data/lalr1.cc: Adjust the indentation of the labels.
7782 (Parser::pop): New.
7783 Use it.
7784
77852004-09-06 Akim Demaille <akim@epita.fr>
7786
7787 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
7788 argument, an informative message.
7789 Call YY_SYMBOL_PRINT.
7790 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
7791 * data/lalr1.cc (destruct_): Likewise.
7792 In addition, no longer depend on b4_yysymprint_generate and
7793 b4_yydestruct_generate to generate these functions, do it "by
7794 hand".
7795
77962004-09-03 Akim Demaille <akim@epita.fr>
7797
7798 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
7799 invoked, yydestruct the lookahead.
7800 * tests/calc.at (Calculator $1): Update the expected lengths of
7801 traces: there is an added line for the discarded lookahead.
7802 * doc/bison.texinfo (Destructor Decl): Some rewording.
7803 Define "discarded" symbols.
7804
78052004-09-02 Akim Demaille <akim@epita.fr>
7806
7807 * data/lalr1.cc (translate_, destruct_): No reason to be static.
7808
78092004-09-02 Akim Demaille <akim@epita.fr>
7810
7811 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
7812 (YYDSYMPRINTF): Rename as...
7813 (YY_SYMBOL_PRINT): this.
7814 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
7815 two.
7816 Use it instead of direct symprint_ calls.
7817 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
7818 one.
7819
78202004-09-02 Akim Demaille <akim@epita.fr>
7821
7822 * data/lalr1.cc (b4_yysymprint_generate): New.
7823 (symprint_): New member function, defined when YYDEBUG.
7824 Use it consistently instead of token/nterm debugging output by
7825 hand.
7826 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
7827 %printer calls to use cdebug_ when using lalr1.cc.
7828
78292004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
7830
7831 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
7832 with #ifdef YYDEBUG.
7833
78342004-08-26 Akim Demaille <akim@epita.fr>
7835
7836 * doc/bison.texinfo (Implementing Loops): Rename as...
7837 (Implementing Gotos/Loops): this.
7838
78392004-08-13 Paul Eggert <eggert@cs.ucla.edu>
7840
7841 Adjust to latest gnulib.
7842 * bootstrap (gnulib_modules): Add xalloc-die.
7843 Set LC_ALL=C so that file names sort consistently.
7844 Prefer the gnulib copies of gettext.m4, glibc21.m4,
7845 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
7846 uintmax_t.m4, ulonglong.m4.
7847 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
7848 po.m4 since we are now using _gl.m4 instead.
7849
78502004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
7851
7852 * src/scan-action.l: Remove. Scanning of semantic actions is
7853 handled in scan-gram.l.
7854
78552004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
7856
7857 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
7858
7859 * src/location.h (struct): The file member is a uniqstr.
7860 (equal_boundaries): Use UNIQSTR_EQ for comparison.
7861
78622004-07-22 Paul Eggert <eggert@cs.ucla.edu>
7863
7864 Fix bug with non-%union parsers that have printers or destructors,
7865 which led to a Bison core dump. Reported by Peter Fales in
7866 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
7867
7868 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
7869 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
7870 not to our own type.
7871 * src/output.c (symbol_destructors_output, symbol_printers_output):
7872 Don't assume %union.
7873 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
7874 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
7875 UNION-FLAG. All callers changed.
7876 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
7877 Use type char, not unsigned int, when declaring an array of char;
7878 this lets us remove a cast.
7879 (Printers and Destructors): Add non-%union test cases.
7880
78812004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7882
7883 * doc/bison.texinfo: Minor editorial changes, mostly to the new
7884 GLR writeups. E.g., avoid frenchspacing and the future tense,
7885 change "lookahead" to "look-ahead", and change "wrt" to "with
7886 respect to".
7887
78882004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7889
7890 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
7891 New sections, split off from the GLR Parsers section. Put the new
7892 Simple GLR Parser near the start of the GLR section, for clarity.
7893 Rewrite connective text.
7894
78952004-06-21 Frank Heckenbach <frank@g-n-u.de>
7896
7897 * doc/bison.texinfo (Simple GLR Parsers): New section.
7898
78992004-06-21 Paul Eggert <eggert@cs.ucla.edu>
7900
7901 * NEWS, TODO, doc/bison.texinfo:
7902 Use "look-ahead" instead of "lookahead", to be consistent.
7903 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
7904 while we're fixing "look-ahead".
7905 * src/conflicts.c (shift_set): Renamed from shiftset.
7906 (look_ahead_set): Renamed from lookaheadset.
7907 * src/print.c: Likewise.
7908 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
7909 name for "lookahead".
7910 (report_types, usage): Likewise.
7911 * src/getargs.h (report_look_ahead_tokens): Renamed from
7912 report_lookaheads.
7913 * src/lalr.c (compute_look_ahead_tokens): Renamed from
7914 compute_lookaheads.
7915 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
7916 (look_ahead_tokens_print): Renamed from lookaheads_print.
7917 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
7918 state_rule_lookaheads_print.
7919 * src/state.h: Likewise.
7920 (reductions.look_ahead_tokens): Renamed from lookaheads.
7921 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
7922 AT_DATA_LOOKAHEADS_GRAMMAR.
7923
79242004-06-03 Paul Eggert <eggert@cs.ucla.edu>
7925
7926 * README: Update location of patched M4 distribution.
7927
79282004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
7929
7930 Don't assume the C++ compiler takes the same arguments as the C compiler
7931 (trivial change).
7932 * configure.ac (O0CXXFLAGS): New var.
7933 * tests/atlocal.in (CXXFLAGS): Use it.
7934
79352004-05-29 Paul Eggert <eggert@cs.ucla.edu>
7936
7937 Fix some "make check" problems with C++ reported by
7938 Albert Chin-A-Young for Tru64 C++ in this thread:
7939 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
7940
7941 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
7942 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
7943 Output to a .cc file for C++, not to a .c file.
7944 * tests/calc.at (AT_CHECK_CALC): Likewise.
7945 * tests/regression.at (AT_CHECK_DANCER): Likewise.
7946 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
7947
79482004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
7949
7950 * tests/calc.at, tests/actions.at: Workaround for SGI
7951 C++ compiler. (trivial change)
7952
79532004-05-27 Paul Eggert <eggert@cs.ucla.edu>
7954
7955 Spent a few hours checking out which prerequisite versions the
7956 current sources actually require. I went all the way back to
7957 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
7958 a seemingly endless set of combinations of versions more recent
7959 than that. The bottom line is that the current sources require
7960 fairly recent versions of the build tools, and it'll be some work
7961 to change this.
7962 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
7963 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
7964 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
7965 Add comments explaining why those particular versions are
7966 currently needed.
7967
7968 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
7969 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
7970 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
7971
7972 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
7973 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
7974
79752004-05-26 Paul Eggert <eggert@cs.ucla.edu>
7976
7977 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
7978 0.11.5. Suggested by Bruno Haible.
7979 * bootstrap: Remove gettext version checking.
7980
7981 * doc/bison.texinfo (Decl Summary): Also mention that %union
7982 can depend on prerequisite types. Problem reported by Tim
7983 Van Holder.
7984
79852004-05-25 Paul Eggert <eggert@cs.ucla.edu>
7986
7987 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
7988 * README-alpha: Don't tell people not to package this.
7989
7990 * bootstrap: Don't assume $(...) works; use `...` instead.
7991 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
7992 gettext better.
7993
7994 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
7995 put into the -d output file, and mention what to do if YYSTYPE is
7996 defined as a macro.
7997
79982004-05-24 Paul Eggert <eggert@cs.ucla.edu>
7999
8000 Undo change made earlier today: it caused autopoint to not bring
8001 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8002 autopoint's.
8003
8004 * bootstrap: Check that gettext version matches what's in
8005 configure.ac. Warn users to ignore robots.txt ERROR 404.
8006 * bootstrap: Undo today's earlier change (logged below).
8007 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8008
8009 The gettext version checking is causing more trouble than it's
8010 curing; remove it. Problem reported by Paul Hilfinger.
8011
8012 * bootstrap: Issue a warning that one can expect a message
8013 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8014 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8015
80162004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8017
8018 Ensure that the C++ compiler used for testing actually works on a
8019 simple test program; if not, skip the C++-related tests. Problem
8020 reported by Vin Shelton in:
8021 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8022
8023 * m4/cxx.m4: New file.
8024 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8025 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8026 * tests/local.at (AT_COMPILE_CXX): Use it.
8027
80282004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8029
8030 * data/glr.c (yylloc): Output this macro even if locations are not
8031 being generated, as the GLR parser needs it even in that case.
8032 Problem reported by Troy A. Johnson
8033 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8034
8035 * configure.ac (AC_INIT): Update to 1.875e.
8036
80372004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8038
8039 * NEWS: Version 1.875d.
8040 * configure.ac (AC_INIT): Likewise.
8041 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8042
8043 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8044 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8045 lalr1.cc runs afoul of the first, and the last two are no longer
8046 supported by GCC 3.4.0.
8047 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8048 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8049
80502004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8051
8052 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8053 unsigned int, for compatibility with latest gnulib hash module.
8054 * src/state.c (state_hash, state_hasher): Likewise.
8055 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8056 * src/uniqstr.c (hash_uniqstr): Likewise.
8057
80582004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8059
8060 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8061
8062 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8063 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8064 character and string literals.
8065 (unexpected_end): New function.
8066 (unexpected_eof): Use it.
8067 (unexpected_newline): New function.
8068 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8069 actions.
8070
8071 * NEWS: Document %expect-rr.
8072
8073 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8074 Fix typo by replacing $1 with $option.
8075 Remove more 'intl'-related files.
8076 Don't DEFUN AM_INTL_SUBDIR twice.
8077
8078 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8079 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8080 strtoul.c.
8081 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8082 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8083 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8084 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8085 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8086 * src/.cvsignore: Add *.output.
8087
8088 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8089 gets copied to the output file.
8090
80912004-04-28 Paul Eggert <eggert@twinsun.com>
8092
8093 Get files from the gnulib and po repositories, instead of relying
8094 on them being in our CVS. Upgrade to latest versions of gnulib
8095 and Automake.
8096
8097 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8098 * bootstrap: Bootstrap from gnulib and po repositories.
8099 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8100 * README-cvs: Document these changes. Remove version numbers from
8101 mentions of build tools, since they change so often. Mention Flex.
8102
8103 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8104 (gl_USE_SYSTEM_EXTENSIONS): Add.
8105 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8106 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
8107 does this for us.
8108 (AC_ISC_POSIX): Remove; we no longer support this
8109 ancient OS, as it gets in the way of latest Autoconf & gnulib.
8110 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8111 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8112 Do not check for C89 headers, except for locale.h which is used
8113 by the Yacc library and must port to K&R hosts.
8114 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8115 Do not check for C89 functions, except for setlocale which is
8116 used by the Yacc library.
8117 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8118 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8119 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8120 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8121 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8122 AM_GNU_GETTEXT): Remove; now done by:
8123 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8124 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8125 for us.
8126
8127 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8128 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8129 Define to empty, as gnulib.mk will do the rest for us.
8130 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8131 for us.
8132 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8133 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8134
8135 * src/files.c: Include gnulib's xstrndup.h.
8136
8137 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8138 (REALLOC): Use xnrealloc, for likewise.
8139 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8140 (strnlen, memrchr): Remove decls; functions no longer used.
8141 Include <stpcpy.h>.
8142
8143 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8144 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8145 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8146 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8147 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8148 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8149 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8150 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8151 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8152 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8153 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8154 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8155 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8156 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8157 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8158 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8159 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8160 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8161 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8162 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8163 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8164 Remove, as these files are now generated automatically
8165 by bootstrap or automake.
8166
8167 * po/ChangeLog: Remove: all but one entry was a duplicate
8168 of this file, and I moved that 2000-11-02 entry here.
8169
8170 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8171 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8172 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8173 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8174 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8175 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8176 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8177 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8178 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8179 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8180 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8181 xstrndup.h.
8182 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8183 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8184 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8185 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8186 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8187 * src/.cvsignore: Remove *_.c.
8188
8189
8190 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8191 support it. (The latest stable gzip doesn't.)
8192
81932004-04-27 Paul Eggert <eggert@twinsun.com>
8194
8195 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8196 case, as stos_ is now used by destructors due to the 2004-02-09
8197 change.
8198
8199 Remove more K&R C support.
8200 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8201 * lib/subpipe.c (errno): Remove decl.
8202 Include <stdlib.h> unconditionally.
8203 (EXIT_FAILURE): Remove macro.
8204 * src/complain.c (vfprintf, strerror): Remove.
8205 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8206 unconditionally.
8207 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8208 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8209 (strchr, strspn, memchr): Remove decls.
8210 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8211 unconditionally. Do not declare perror.
8212 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8213 unconditionally.
8214
8215 * src/complain.c (_): Remove useless defn, as system.h defines this.
8216
8217 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8218 with latest obstack.h.
8219 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8220 to procedure types, as obstack.h now does that for us.
8221 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8222
8223 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8224 so that this include file can stand alone.
8225 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8226 does this now. Include subpipe.h first after config.h, to
8227 test whether it can stand alone.
8228
8229 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8230 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8231 unused declaration.
8232
8233 * tests/synclines.at (%union synch line): Put a dummy member in
8234 the union, because empty unions aren't allowed in C. Caught
8235 by GCC 3.4.0.
8236
82372004-04-13 Jim Meyering <jim@meyering.net>
8238
8239 * src/conflicts.c (conflicts_print): Correct format string typo:
8240 use `%%' to produce literal `%'. (trivial change)
8241
82422004-03-30 Paul Eggert <eggert@twinsun.com>
8243
8244 * src/getargs.c (version): Update copyright year to 2004.
8245
8246 * data/c.m4 (b4_int_type): Use 'short int' rather than
8247 'short', and similarly for 'long', 'unsigned', etc.
8248 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8249 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8250 yy_yypstack, yydumpstack): Likewise.
8251 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8252 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8253 Likewise.
8254 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8255 yy_stack_print, yyparse): Likewise.
8256 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8257 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8258 * lib/bitset.c (bitset_print): Likewise.
8259 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8260 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8261 * lib/bitsetv.c (bitsetv_dump): Likewise.
8262 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8263 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8264 Likewise.
8265 * src/LR0.c (allocate_itemsets): Likewise.
8266 * src/gram.h (rule_number, rule): Likewise.
8267 * src/lalr.h (goto_number): Likewise.
8268 * src/nullable.c (nullable_compute): Likewise.
8269 * src/output.c (prepare_rules): Likewise.
8270 * src/relation.c (relation_print, relation_digraph): Likewise.
8271 * src/relation.h (relation_node): Likewise.
8272 * src/state.h (state_number, transitions, errs, reductions,
8273 struct state): Likewise.
8274 * src/symtab.h (symbol_number, struct symbol): Likewise.
8275 * src/tables.c (vector_number, tally, action_number,
8276 default_goto, goto_actions): Likewise.
8277 * tests/existing.at (GNU Cim Grammar): Likewise.
8278 * tests/regression.at (Web2c Actions): Likewise.
8279
8280 * src/output.c (muscle_insert_short_int_table): Renamed from
8281 muscle_insert_short_table. All uses changed.
8282
82832004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8284
8285 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8286 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8287 Add %expect-rr rule.
8288
8289 * src/scan-gram.l: Recognize %expect-rr.
8290
8291 * src/conflicts.h (expected_sr_conflicts): Rename from
8292 expected_conflicts.
8293 (expected_rr_conflicts): Declare.
8294
8295 * src/conflicts.c (expected_sr_conflicts): Rename from
8296 expected_conflicts.
8297 (expected_rr_conflicts): Define.
8298 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8299 for GLR parsers.
8300 Use expected_sr_conflicts in place of expected_conflicts.
8301 Warn if expected_rr_conflicts used in non-GLR parser.
8302
8303 * doc/bison.texinfo: Add documentation for %expect-rr.
8304
83052004-03-08 Paul Eggert <eggert@gnu.org>
8306
8307 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8308 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8309
8310 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8311 in lalr1.cc.
8312 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8313 * src/scan-gram.l (scan_integer): New function.
8314 ({int}): Use it.
8315 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8316 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8317 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8318 Say "long int", not "long", for uniformity with GNU style.
8319
83202004-02-25 Paul Eggert <eggert@twinsun.com>
8321
8322 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8323 compilers. This fixes a problem with Intel's C++ compiler being
8324 chatty, reported by Guido Trentalancia in
8325 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8326
83272004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8328
8329 Support %destructor and merge error locations in lalr1.cc.
8330
8331 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8332 (Parser::stos_): Define unconditionally.
8333 (Parser::destruct_): New method. Generate its body with
8334 b4_yydestruct_generate.
8335 (Parser::error_start_): New attribute.
8336 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8337 token which are discarded.
8338 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8339 error_start_ when erroneous token are discarded.
8340 (Parser::parse) <yyerrlab1>: Compute the location of the error
8341 token so that it covers all the discarded tokens.
8342 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8343 it can be called with `%skeleton "lalr1.cc"', and do that.
8344
83452004-02-02 Paul Eggert <eggert@twinsun.com>
8346
8347 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8348 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8349 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8350 There's no need to mention top_builddir since Automake does that
8351 for us.
8352 (INCLUDES): Remove, as Automake says it's obsolescent.
8353 Contents migrated into AM_CPPFLAGS as described above.
8354 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8355
83562004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8357
8358 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8359 (yyreportSyntaxError): Handle case where lookahead token is
8360 YYEMPTY.
8361
83622004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8363
8364 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8365 resulting parsers are compilable with C++.
8366
83672003-12-23 Paul Eggert <eggert@twinsun.com>
8368
8369 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8370 * src/output.c (output_skeleton): Rename local var.
8371 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8372 Bison tokens, as this runs afoul of the 2003-10-07 change that
8373 disallowed NUL bytes in character constants or string literals.
8374
8375 * tests/local.at: Require Autoconf 2.59's Autotest.
8376 * tests/testsuite.at: Don't include local.at, since we now assume
8377 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8378 including it.
8379 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8380 multiple inclusion warnings.
8381
83822003-12-02 Akim Demaille <akim@epita.fr>
8383
8384 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8385 conditions.
8386 From Bruno Haible.
8387
83882003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8389
8390 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8391
83922003-10-07 Paul Eggert <eggert@twinsun.com>
8393
8394 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8395 if testsuite doesn't exist.
8396
8397 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8398 literals, unfortunately.
8399 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8400 Complain about NUL bytes in character constants or string literals.
8401
84022003-10-05 Paul Eggert <eggert@twinsun.com>
8403
8404 * NEWS: Don't document %no-default-prec, as it's still
8405 too experimental.
8406 * doc/bison.texinfo: Document %no-default-prec only if
8407 the defaultprec flag is set. Normally it's not.
8408
84092003-10-04 Paul Eggert <eggert@twinsun.com>
8410
8411 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8412 non-modifiable lvalue, instead of a modifiable one.
8413 * doc/bison.texinfo (Actions): Document that $$ can
8414 be assigned to. Do not claim that $$ and $N are
8415 array element references: user code should not rely on this.
8416
84172003-10-01 Paul Eggert <eggert@twinsun.com>
8418
8419 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8420 (grammar_declaration): Use it.
8421 * src/scan-gram.l: New token %no-default-prec.
8422 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8423 * NEWS, doc/bison.texinfo: Document the above.
8424
84252003-10-01 Akim Demaille <akim@epita.fr>
8426
8427 VCG no longer supports long_straight_phase.
8428
8429 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8430 * src/print_graph.c (print_graph): Adjust.
8431
84322003-09-30 Frank Heckenbach <frank@g-n-u.de>
8433 and Paul Eggert <eggert@twinsun.com>
8434
8435 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8436 Table of Symbols): Document %default-prec.
8437 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8438 (grammar_declaration): Set default_prec on %default-prec.
8439 * src/scan-gram.l (%default-prec): New token.
8440 * src/reader.h (default_prec): New flag.
8441 * src/reader.c: Likewise.
8442 (packgram): Handle it.
8443 * tests/conflicts.at (%default-prec without %prec,
8444 %default-prec with %prec, %default-prec 1): New tests.
8445
84462003-09-30 Paul Eggert <eggert@twinsun.com>
8447
8448 * tests/testsuite.at: Include local.at, not input.at, fixing
8449 a typo in the 2003-08-25 patch.
8450
84512003-08-27 Akim Demaille <akim@epita.fr>
8452
8453 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8454 GCC warnings.
8455
84562003-08-26 Akim Demaille <akim@epita.fr>
8457
8458 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8459 "<\#" to avoid magic from Gnus when posting parts of this script.
8460
84612003-08-26 Akim Demaille <akim@epita.fr>
8462
8463 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8464 (Parser::parse): here.
8465 Adjust: nerrs and errstatus is now replaced by...
8466 (Parser::nerrs_, Parser::errstatus_): New.
8467
84682003-08-25 Akim Demaille <akim@epita.fr>
8469
8470 * config/announce-gen, Makefile.cfg: New.
8471 * Makefile.am: Adjust.
8472 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8473 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8474
84752003-08-25 Akim Demaille <akim@epita.fr>
8476
8477 When reducing initial empty rules, Bison parser read an initial
8478 location that is not defined. This results in garbage, and that
8479 affects Bison's own parser. Therefore we need (i) to extend Bison
8480 to support a means to initialize this location, and (ii) to use
8481 this CVS Bison to fix CVS Bison's parser.
8482
8483 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8484 with...
8485 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8486 * src/parse-gram.y: Adjust.
8487 (%initial-action): New.
8488 (%error-verbose): Since we require CVS Bison, there is no reason
8489 not to use it.
8490 * src/scan-gram.l: Adjust.
8491 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8492 * data/yacc.c (yyparse): Use b4_initial_action.
8493
84942003-08-25 Akim Demaille <akim@epita.fr>
8495
8496 * doc/bison.texinfo: Don't promote stdout for error messages.
8497
84982003-08-25 Akim Demaille <akim@epita.fr>
8499
8500 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8501 From Alexandre Duret-Lutz.
8502
85032003-08-25 Akim Demaille <akim@epita.fr>
8504
8505 Version 1.875c.
8506
85072003-08-25 Akim Demaille <akim@epita.fr>
8508
8509 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8510 Use them.
8511
85122003-08-25 Akim Demaille <akim@epita.fr>
8513
8514 * data/lalr1.cc (Parser::reduce_print_): New.
8515 Use it.
8516
85172003-08-25 Akim Demaille <akim@epita.fr>
8518
8519 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8520 error recovery loops. This patch is based on
8521 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8522 Also, augment the similarity between lalr1.cc and yacc.c.
8523 Note: the locations of error recovery rules are not correct yet.
8524
8525 * data/lalr1.cc: Comment changes to augment the similarity between
8526 lalr1.cc and yacc.c.
8527 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8528 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8529 yyerrlab), when hitting EOF, pop the whole stack here instead of
8530 merely falling thru the default error handling mechanism.
8531 (yyerrorlab): New label, with the old contents of YYERROR,
8532 plus the following change: pop the stack of rhs corresponding
8533 to the production that invoked YYERROR. That is how Yacc
8534 behaves (required by POSIX).
8535 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8536 fail.
8537
85382003-08-25 Akim Demaille <akim@epita.fr>
8539
8540 Tune local.at so that people can "autom4te -l autotest calc.at -o
8541 calc" for instance, to extract a sub test suite.
8542
8543 * tests/testsuite.at: Move the initialization, Autotest version
8544 requirement, and AT_TESTED invocation into...
8545 * tests/local.at: here.
8546 * tests/testsuite.at: Include it for compatibility with Autoconf
8547 2.57.
8548 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8549 be ignore.
8550
85512003-08-04 Paul Eggert <eggert@twinsun.com>
8552
8553 Rework code slightly to avoid gcc -Wtraditional warnings.
8554 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8555 The returned value is now stored in *YY0. All callers changed.
8556 * src/output.c (merge_output): Adjust to the above change.
8557
85582003-07-26 Paul Eggert <eggert@twinsun.com>
8559
8560 * data/glr.c (YYASSERT): New macro.
8561 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8562 yyresolveStates, yyprocessOneStack):
8563 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8564 Derived from a suggestion by Frank Heckenbach.
8565
85662003-07-25 Paul Eggert <eggert@twinsun.com>
8567
8568 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8569 for portability to K&R C (after ansi2knr, presumably). See
8570 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8571 by Frank Heckenbach, though I have omitted the structure-initialization
8572 part of his glr-knr.diff patch since I recall that the Portable
8573 C Compiler didn't require that change.
8574
8575 Let the user specify how to allocate and free memory.
8576 Derived from a suggestion by Frank Heckenbach in
8577 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8578 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8579 All uses of free, malloc, realloc changed to use these macros,
8580 and unnecessary casts removed.
8581 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8582
85832003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8584
8585 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8586 use s.empty() rather than s == "" to test for empty string; see
8587 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8588 (trivial change)
8589
85902003-06-25 Akim Demaille <akim@epita.fr>
8591
8592 * config/depcomp, config/install-sh: Update from masters.
8593
85942003-06-20 Paul Eggert <eggert@twinsun.com>
8595
8596 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8597 and return properly parenthesized result.
8598 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8599 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8600 Remove unnecessary parentheses from uses.
8601 * doc/bison.texinfo (Location Default Action): Describe the
8602 conventions for parentheses.
8603
86042003-06-19 Paul Eggert <eggert@twinsun.com>
8605
8606 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8607 yyreportTree): Do not assume that size_t is the same width as int,
8608 when printing sizes. Print sizes using an unsigned format.
8609 Problem reported by Frank Heckenbach in
8610 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8611
8612 Port to Forte Developer 7 C compiler.
8613 * data/glr.c (struct YYLTYPE): If locations are not being used,
8614 declare a single dummy member, as empty structs do not conform
8615 to the C standard.
8616 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8617 the Forte Developer 7 C compiler complains that end-of-loop
8618 code is not reached.
8619
86202003-06-17 Paul Eggert <eggert@twinsun.com>
8621
8622 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8623 avoid warnings from picky compilers about redefinition of PARAMS.
8624
86252003-06-17 Paul Eggert <eggert@twinsun.com>
8626
8627 Version 1.875b.
8628
8629 * NEWS: Document 1.875b.
8630
8631 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8632 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8633 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8634 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8635 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8636 per recent gettext manual's suggestion.
8637 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8638 Use prototypes, not old-style definitions.
8639 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8640 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8641 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8642 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8643 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8644 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8645 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8646 vbitset_or_and_cmp, vbitset_copy): Likewise.
8647
8648 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8649 Do not include <stdlib.h>.
8650 (PARAMS): Define unconditionally for C89.
8651 (ATTRIBUTE_NORETURN): Remove.
8652 (ATTRIBUTE_UNUSED): Define unconditionally.
8653
8654 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
8655 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8656 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8657 * lib/vbitset.c, lib/vbitset.h: New files.
8658 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8659 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8660 from libbitset.
8661
8662 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8663 `How Can I Reset @code{yyparse}', since texinfo does not allow
8664 arbitrary @ in node names.
8665
8666 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8667 shouldn't be needed according to the gettext 0.12.1 documentation
8668 but which seem to be needed anyway: codeset.m4 glibc21.m4
8669 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8670 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
8671 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
8672
8673 * lib/.cvsignore: Add stdbool.h.
8674 * m4/.cvsignore: Add nls.m4, po.m4.
8675
8676 Upgrade to CVS gnulib.
8677 * stdbool_.h: File renamed from stdbool.h.in.
8678 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8679 AC_HEADER_STDBOOL.
8680 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8681 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8682 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8683 (MOSTLYCLEANFILES): New var.
8684 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
8685 (stdbool.h): New rule.
8686 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
8687 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
8688 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
8689 m4/quote.m4: Upgrade to today's gnulib.
8690
8691 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
8692 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
8693 the tests right now.
8694 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
8695 yyerror are declared before use; C99 requires this.
8696
86972003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8698
8699 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
8700 first.
8701 (yyrecoverSyntaxError): Correct the logic for setting and testing
8702 yyerrState.
8703 Correct comment on handling EOF.
8704 Allow states with only a default reduction, rather than failing
8705 (I can't quite reconstruct why these were not allowed before).
8706
8707 Fixes to avoid problem that $-N rules in GLR parsers can cause
8708 buffer overruns, corrupting state.
8709
8710 * src/output.c (prepare_rules): Output max_left_semantic_context
8711 definition.
8712 * src/reader.h (max_left_semantic_context): New variable declaration.
8713 * src/scan-gram.l (max_left_semantic_context): Define.
8714 (handle_action_dollar): Update max_left_semantic_context.
8715 * data/glr.c (YYMAXLEFT): New definition.
8716 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
8717 (yyresolveAction): Ditto.
8718
8719 Fixes to problems with location handling in GLR parsers reported by
8720 Frank Heckenbach (2003/06/05).
8721
8722 * data/glr.c (YYLTYPE): Make trivial if locations not used.
8723 (YYRHSLOC): Add parentheses, and define only if locations used.
8724 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
8725 locations not used.
8726 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
8727 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8728
8729 * tests/cxx-type.at: Exercise location information; update tests
8730 to differentiate output with and without locations.
8731 Remove forward declarations of yylex and yyerror---caused errors
8732 because default YYLTYPE not yet defined.
8733 Change semantic actions to compute strings, rather than printing
8734 them directly (to test proper passing of semantics values). Change
8735 output to prefix notation and update test data and expected results.
8736 (yylex): Track locations.
8737 (stmtMerge): Return value rather than printing, and include arguments
8738 in value.
8739
87402003-06-03 Paul Eggert <eggert@twinsun.com>
8741
8742 Avoid warnings generated by GCC 2.95.4 when Bison is
8743 configured with --enable-gcc-warnings.
8744 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
8745 yy::]b4_parser_class_name[::translate_,
8746 yy::Stack::operator[] (unsigned),
8747 yy::Stack::operator[] (unsigned) const,
8748 yy::Slice::operator[] (unsigned),
8749 yy::Slice::operator[] (unsigned) const):
8750 Rename local vars to avoid warnings.
8751 * tests/glr-regression.at (Improper handling of embedded actions
8752 and $-N in GLR parsers): Remove unused local variable from yylex.
8753 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
8754 (void) as arg when not pure, since we now assume C89 when building
8755 Bison. Pacify GCC by using parameter.
8756
87572003-06-02 Paul Eggert <eggert@twinsun.com>
8758
8759 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
8760 yy::Location::lines, yy::Location::columns): Rename arguments
8761 to avoid shadowing; this removes a warning generated by GCC 3.3.
8762
87632003-06-01 Paul Eggert <eggert@twinsun.com>
8764
8765 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
8766 to g++, as GCC 3.3 complains if you do it.
8767 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
8768 everything that WARNING_CFLAGS has, except omit warnings
8769 not suitable for C++.
8770 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
8771 * tests/atlocal.in (CXXFLAGS): New var.
8772 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
8773
8774 Fix a GLR parser bug I reported in February; see
8775 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
8776 The problem was that GLR parsers did not conform to the C standard,
8777 because actions like { $1 = $2 + $3; } expanded to expressions
8778 that invoked YYFILL in separate subexpressions, and YYFILL assigned
8779 to a local variable. The C standard says that expressions
8780 like (var = f ()) + (var = f ()) have undefined behavior.
8781 Another problem was that GCC sometimes issues warnings that
8782 yyfill and its parameters are unused.
8783
8784 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
8785 as possibly unused.
8786 (yyfill): New function.
8787 (YYFILL): Use it.
8788 (yyuserAction): Change type of yynormal to bool, so that it matches
8789 the new yyfill signature. Mark it as possibly unused.
8790
8791
8792 Follow up on a bug I reported in February, where a Bison-generated
8793 parser can loop. Provide a test case and a fix for yacc.c. I
8794 don't have a fix for lalr1.cc or for glr.c, unfortunately.
8795 The original bug report is in:
8796 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
8797
8798 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
8799 macro's size was becoming unwieldy.
8800 (yyerrlab): Do not discard an empty lookahead symbol, as this
8801 might destroy garbage.
8802 (yyerrorlab): New label, with the old contents of YYERROR,
8803 plus the following change: pop the stack of rhs corresponding
8804 to the production that invoked YYERROR. That is how Yacc
8805 behaves, and POSIX requires this behavior.
8806 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
8807 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
8808 Define 'alarm' to do nothing if unistd.h is not available.
8809 Add a new rule "exp: '-' error;" to test the above change to
8810 data/yacc.c. Use 'alarm' to abort any test taking longer than
8811 10 seconds, as it's probably looping.
8812 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
8813 Also, the new yacc.c generates two fewer diagnostics for an
8814 existing test.
8815
88162003-05-24 Paul Eggert <eggert@twinsun.com>
8817
8818 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
8819 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
8820 This fixes a problem reported by John Bowman when the Compaq/HP
8821 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
8822 -ansi -Wall -gall).
8823 * data/yacc.c (union yyalloc): Likewise.
8824 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
8825
8826 Switch from 'int' to 'bool' where that makes sense.
8827
8828 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
8829 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
8830 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
8831 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
8832 Return or accept bool, not int. All callers changed.
8833 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
8834 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
8835 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
8836 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
8837 bitset_or_and_cmp_): Likewise.
8838 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
8839 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
8840 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
8841 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
8842 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
8843 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
8844 bitset_stats_or_and_cmp): Likewise.
8845 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
8846 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
8847 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
8848 ebitset_xor_cmp): Likewise.
8849 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
8850 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
8851 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
8852 lbitset_xor_cmp): Likewise.
8853 * lib/bbitset.h: Include <stdbool.h>.
8854 (struct bitset_vtable): The following members now return bool, not
8855 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
8856 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
8857 or_and_cmp).
8858 * src/conflicts.c (count_rr_conflicts): Likewise.
8859 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
8860 All uses changed.
8861 * lib/ebitset.c (ebitset_obstack_init): Likewise.
8862 * lib/lbitset.c (lbitset_obstack_init): Likewise.
8863 * src/getargs.c (debug_flag, defines_flag, locations_flag,
8864 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8865 graph_flag): Likewise.
8866 * src/getargs.h (debug_flag, defines_flag, locations_flag,
8867 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
8868 graph_flag): Likewise.
8869 * src/output.c (error_verbose): Likewise.
8870 * src/output.h (error_verbose): Likewise.
8871 * src/reader.c (start_flag, typed): Likewise.
8872 * src/reader.h (typed): Likewise.
8873 * src/getargs.c (LOCATIONS_OPTION): New constant.
8874 (long_options, getargs): Use it.
8875 * src/lalr.c (build_relations): Use bool, not int.
8876 * src/nullable.c (nullable_compute): Likewise.
8877 * src/print.c (print_reductions): Likewise.
8878 * src/tables.c (action_row, pack_vector): Likewise.
8879 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
8880 * src/output.c (prepare): Use it.
8881 * src/output.c (token_definitions_output,
8882 symbol_destructors_output, symbol_destructors_output): Use string,
8883 not boolean integer, to keep track of whether to output separator.
8884 * src/print_graph.c (print_core): Likewise.
8885 * src/state.c (state_rule_lookaheads_print): Likewise.
8886
8887 * config/install-sh: Sync from automake 1.7.5.
8888
88892003-05-14 Paul Eggert <eggert@twinsun.com>
8890
8891 * src/parse-gram.y (rules_or_grammar_declaration): Require a
8892 semicolon after a grammar declaration, in the interest of possible
8893 future changes to the Bison input language.
8894 Do not allow a stray semicolon at the start of the grammar.
8895 (rhses.1): Allow one or more semicolons after any rule, including
8896 just before "|" as required by POSIX.
8897 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
8898 grammar.
8899
89002003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
8901
8902 %parse-param support for lalr1.cc.
8903
8904 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
8905 b4_cc_constructor_calls, b4_cc_constructor_call,
8906 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
8907 definitions.
8908 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
8909 parse-param arguments.
8910 (yy::b4_parser_class_name): Declare instance variables to
8911 hold parse-param arguments.
8912 * tests/calc.at: s/value/semantic_value/ because value clashes
8913 with a member of yy::b4_parser_class_name. Adjust C++ code
8914 to handle %parse-param. Enable %parse-param test in C++.
8915
89162003-05-12 Paul Eggert <eggert@twinsun.com>
8917
8918 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
8919 English a bit. Fix fclose typo. Change "const char" to "char
8920 const", and use ANSI C rather than K&R for "main". Suggest
8921 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
8922 and suggest yy_switch_to_buffer.
8923
89242003-05-05 Paul Eggert <eggert@twinsun.com>
8925
8926 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
8927 C89. This avoids a diagnostic on compilers that define __STDC__
8928 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
8929 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8930
89312003-05-03 Paul Eggert <eggert@twinsun.com>
8932
8933 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
8934 Do not overrun array bounds.
8935 This should fix a bug reported today by Olatunji Oluwabukunmi in
8936 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
8937
89382003-04-29 Akim Demaille <akim@epita.fr>
8939
8940 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
8941 * src/getargs.c, src/getargs.h: here, as bool, not int.
8942 (nondeterministic_parser): New.
8943 * src/parse-gram.y, src/scan-gram.l: Support
8944 %nondeterministic-parser.
8945 * src/output.c (prepare): Use nondeterministic_parser instead
8946 of glr_parser where appropriate.
8947 * src/tables.c (conflict_row, action_row, save_row)
8948 (token_actions, token_actions, pack_vector): Ditto.
8949
89502003-04-29 Akim Demaille <akim@epita.fr>
8951
8952 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
8953
89542003-04-29 Akim Demaille <akim@epita.fr>
8955
8956 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
8957 with %pure-parser and %locations to exercise the patch from Yakov
8958 Markovitch below.
8959
89602003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
8961
8962 * data/yacc.c: (b4_lex_param): Corrected for the case where
8963 %lex-param is provided and %pure-parser isn't.
8964
89652003-04-27 Paul Eggert <eggert@twinsun.com>
8966
8967 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
8968 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
8969 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
8970 if it is not defined.
8971 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
8972
89732003-04-26 Paul Eggert <eggert@twinsun.com>
8974
8975 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
8976 Declare to be of type suitable for the ninf value itself, not of
8977 type suitable for the corresponding table, since the latter might
8978 be unsigned but the ninf value might be negative. This fixes a
8979 bug reported by Alexandre Duret-Lutz in
8980 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
8981
8982 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
8983 invokes it. We shouldn't invoke it twice because it will attempt
8984 to put error.o in the archive twice. This fixes a glitch reported
8985 by Martin Mokrejs in
8986 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
8987
89882003-04-21 Paul Eggert <eggert@twinsun.com>
8989
8990 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
8991 to gnulib.
8992
89932003-04-21 Yakov Markovitch <Markovitch@iso.ru>
8994
8995 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
8996 Fix obvious typo that results in uncompilable GLR parsers
8997 when both %pure-parser and %locations are used. (trivial change)
8998
89992003-04-17 Paul Eggert <eggert@twinsun.com>
9000
9001 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9002 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9003 Do not insert the expected token via unput, as this runs afoul
9004 of a POSIX-compatibility bug in flex 2.5.31.
9005 All uses changed to BEGIN the parent state,
9006 since we no longer insert the expected token via unput.
9007 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9008 that is no longer emitted after the above change.
9009
9010 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9011 the first one. This change is from Paul Hilfinger, and it fixes
9012 regression reported by Werner Lemberg in
9013 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9014
9015 (resolve_sr_conflict): Don't invoke state_errs_set
9016 unless one or more tokens have been explicitly made errors.
9017 Otherwise, the above change causes Bison to abort.
9018
9019 * tests/existing.at (GNU pic Grammar): New test case, taken from
9020 Lemberg's email.
9021
90222003-03-31 Akim Demaille <akim@epita.fr>
9023
9024 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9025
90262003-03-31 Akim Demaille <akim@epita.fr>
9027
9028 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9029 output.
9030
90312003-03-31 Akim Demaille <akim@epita.fr>
9032
9033 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9034 From Paul Hilfinger.
9035
90362003-03-29 Akim Demaille <akim@epita.fr>
9037
9038 * m4/error.m4: Do not put under dynamic conditions some code which
9039 expansion is under static control.
9040
90412003-03-29 Akim Demaille <akim@epita.fr>
9042
9043 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9044
90452003-03-29 Akim Demaille <akim@epita.fr>
9046
9047 * doc/bison.texinfo (Strings are Destroyed): New.
9048
90492003-03-13 Paul Eggert <eggert@twinsun.com>
9050
9051 * .cvsignore: Add configure.lineno.
9052 * src/.cvsignore: Add yacc.
9053 * tests/.cvsignore: Add testsuite.log.
9054 * doc/fdl.texi: Sync with latest FSF version.
9055
90562003-03-12 Paul Eggert <eggert@twinsun.com>
9057
9058 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9059 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9060 cursor, instead of leaving it undefined. This fixes a bug
9061 reported by Tim Van Holder in
9062 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9063 * tests/input.at (Torturing the Scanner): Test the scanner on
9064 an empty input file, which was Tim Van Holder's test case.
9065
9066 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9067 <sys/resource.h> can be included, include sys/time.h and
9068 sys/times.h first, if available. This works around the SunOS
9069 4.1.4 porting bug reported by Bruce Becker in
9070 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
9071
9072 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9073 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9074 AC_HEADER_SYS_WAIT.
9075
9076 Merge changes from gnulib. This was prompted because the CVS
9077 snapshot didn't build on Solaris 7 due to strnlen problems.
9078
9079 These changes need to be merged back into gnulib:
9080 * lib/hash.c: Include <stdbool.h> unconditionally.
9081 * m4/onceonly.m4 (m4_quote): New macro.
9082 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9083 Quote AC_FOREACH variable-expansions properly.
9084 The 2003-01-03 obstack.h change also needs merging.
9085 {end of changes requiring merging}
9086
9087 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9088 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9089 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9090 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9091 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9092 New files, imported from gnulib.
9093 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9094 above.
9095
9096 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9097 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9098 gnulib sources.
9099
9100 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9101 Add.
9102 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9103 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9104 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9105 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9106 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9107 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9108 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9109 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9110 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9111 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9112 (jm_PREREQ_ARGMATCH): Remove.
9113 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9114 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9115
9116 * src/system.h: Include <stdbool.h> unconditionally.
9117
9118 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9119 assuming at least C89 in the bitset code for some time now.
9120
91212003-03-03 Akim Demaille <akim@epita.fr>
9122
9123 * ro.po: New.
9124
91252003-03-02 Akim Demaille <akim@epita.fr>
9126
9127 * doc/bison.texinfo (Table of Symbols): Reactivate the
9128 documentation for %lex-param, and %parse-param.
9129
91302003-03-02 Akim Demaille <akim@epita.fr>
9131
9132 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9133 generate verbose error messages.
9134 Use the number of tokens as an upper bound in yytname, as it
9135 cannot be a non terminal.
9136
91372003-03-02 Akim Demaille <akim@epita.fr>
9138
9139 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9140 message.
9141
91422003-03-02 Akim Demaille <akim@epita.fr>
9143
9144 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9145 Use them to exercise yycheck overrun.
9146 Based on Andrew Suffield's grammar.
9147
91482003-03-02 Akim Demaille <akim@epita.fr>
9149
9150 Create tests/local.at for Bison generic testing macros.
9151
9152 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9153 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9154 This new file.
9155 * tests/calc.at (AT_CHECK_CALC): Adjust.
9156 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9157 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9158 * tests/local.at: here.
9159 (AT_COMPILE_CXX): Tags the tests using it as c++.
9160 Ignore the test if CXX is not functional.
9161
91622003-03-01 Paul Eggert <eggert@twinsun.com>
9163
9164 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9165 not loc->end, since loc->end might contain garbage and this leads
9166 to undefined behavior on some platforms.
9167 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9168 depend on *loc, so that the reader doesn't give the the false
9169 impression that *loc is initialized.
9170 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9171 does not survive the return.
9172
91732003-03-01 Akim Demaille <akim@epita.fr>
9174
9175 * src/scan-gram.l (code_start): Always initialize it when entering
9176 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9177 yylex invocation. An alternative would be making it static, but
9178 then it starts with the second %%'s beginning, instead of its end.
9179
91802003-02-28 Paul Eggert <eggert@twinsun.com>
9181
9182 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9183 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9184 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9185
91862003-02-26 Paul Eggert <eggert@twinsun.com>
9187
9188 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9189 Remove Sequent/Pyramid discussion (nobody uses them any more).
9190 Merge VMS and MS-DOS discussion; these ports may well be dead
9191 but let's keep mentioning them for now. Put <> around email
9192 addresses. Add copyright notice.
9193
91942003-02-24 Paul Eggert <eggert@twinsun.com>
9195
9196 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9197 to avoid collision with flex use of yylineno.
9198 Problem reported by Bruce Lilly in
9199 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9200 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9201 * data/yacc.c (yy_reduce_print): Likewise.
9202
9203 * config/depcomp: Sync with Automake 1.7.3.
9204
92052003-02-21 Akim Demaille <akim@epita.fr>
9206
9207 * data/lalr1.cc: Use temporary variables instead of casts to
9208 change integer types.
9209 Suggested by Paul Eggert.
9210
92112003-02-21 Akim Demaille <akim@epita.fr>
9212
9213 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9214 to avoid confusions with lalr1.cc's notion of Position.
9215 Suggested by Paul Eggert.
9216
92172003-02-20 Akim Demaille <akim@epita.fr>
9218
9219 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9220 before initial_columns.
9221 (location.hh): Use consistent variable names when defining the
9222 operator<<.
9223 Use "last" so that we subtract from Positions, not from unsigned.
9224
92252003-02-20 Akim Demaille <akim@epita.fr>
9226
9227 * data/lalr1.cc (position.hh): New subfile, including the extended
9228 and Doxygen'ed documentation of class Position.
9229 (location.hh): Use it.
9230 Document a` la Doxygen.
9231 With the help of Benoit Perrot.
9232
92332003-02-20 Akim Demaille <akim@epita.fr>
9234
9235 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9236 AT_YACC_IF.
9237 Redefine AT_YYERROR_SEES_LOC_IF using it.
9238 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9239 not defined.
9240 Don't use the location in yy::Parser::error_ and
9241 yy::Parser::print_ when not %locations.
9242 Activate more lalr1.cc tests.
9243
92442003-02-19 Akim Demaille <akim@epita.fr>
9245
9246 * data/lalr1.cc: When displaying a line number, be sure to make it
9247 an int.
9248
92492003-02-19 Akim Demaille <akim@epita.fr>
9250
9251 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9252 Remove, useless.
9253 (YYABORT, YYACCEPT, YYERROR): New.
9254 * tests/calc.at: Renable the lalr1.cc test.
9255
92562003-02-19 Akim Demaille <akim@epita.fr>
9257
9258 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9259 error recovery, mixing with/without pops and discarding of the
9260 lookahead.
9261 Exercise YYERROR.
9262 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9263
92642003-02-17 Paul Eggert <eggert@twinsun.com>
9265
9266 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9267 * tests/testsuite.at (AT_COMPILE): Use them.
9268 This fixes the testsuite problem reported by Robert Lentz in
9269 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9270
92712003-02-12 Paul Eggert <eggert@twinsun.com>
9272
9273 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9274 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9275 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9276 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9277 Check for malloc failure, for consistency with yacc.c.
9278 (yytname_size): Remove, for consistency with yacc.c.
9279
9280 The bug still remains in data/lalr1.cc, as I didn't have time
9281 to fix it there.
9282
92832003-02-06 Akim Demaille <akim@epita.fr>
9284
9285 * configure.ac (GXX): Rename as...
9286 (CXX): this, to keep the original Autoconf semantics.
9287 Require 2.57.
9288 * data/lalr1.cc: Fix b4_copyright invocations.
9289 If YYDEBUG is not defined, don't depend upon name_ being defined.
9290 (location.hh): Include string and iostream.
9291 (Position::filename): New member.
9292 (Position::Position ()): New.
9293 (operator<< (Position)): New.
9294 (operator- (Position, int)): New.
9295 (Location::first, Location::last): Rename as...
9296 (Location::begin, Location::end): these, to mock the conventional
9297 iterator names.
9298 (operator<< (Location)): New.
9299 * tests/atlocal.in (CXX): New.
9300 * tests/testsuite.at (AT_COMPILE_CXX): New.
9301 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9302 locations in a more synthetic way.
9303 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9304 lalr1.cc is used.
9305 Adjust the C locations to match those from Emacs: first column is
9306 column 0.
9307 Change all the expected results.
9308 Conform to the GCS: simplify the locations when applicable.
9309 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9310 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9311 these CPP macros with the m4 macros new defined by...
9312 (AT_CHECK_PUSHDEFS): this, i.e.:
9313 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9314 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9315 New macros.
9316 (AT_CHECK_POPDEFS): Undefine them.
9317 (AT_CHECK_CALC_LALR1_CC): New.
9318 Use it for the first lalr1.cc test.
9319
93202003-02-04 Akim Demaille <akim@epita.fr>
9321
9322 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9323 Location as is defined.
9324
93252003-02-04 Akim Demaille <akim@epita.fr>
9326
9327 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9328 name_ being defined.
9329
93302003-02-03 Paul Eggert <eggert@twinsun.com>
9331
9332 * src/gram.h (start_symbol): Remove unused decl.
9333
9334 Use more-consistent naming conventions for local vars.
9335
9336 * src/derives.c (derives_compute): Change type of local var from
9337 int to rule_number.
9338 * src/gram.c (grammar_rules_partial_print): Likewise.
9339 * src/print.c (print_core): Likewise.
9340 * src/reduce.c (reduce_grammar_tables): Likewise.
9341
9342 * src/gram.c (grammar_dump): Change name of item_number *
9343 local var from r to rp.
9344 * src/nullable.c (nullable_compute): Likewise.
9345
9346 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9347
9348 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9349 for symbol or symbol_number var.
9350 * src/reader.c (grammar_start_symbol_set): Likewise.
9351 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9352 Likewise.
9353 * src/state.c (transitions_to): Likewise.
9354 * src/state.h: Likewise.
9355 * src/tables.c (symbol_number_to_vector_number): Likewise.
9356
9357 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9358 char * var.
9359
9360 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9361 var.
9362
9363 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9364 var.
9365
9366 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9367 Use str, not s, for char * var. Use ch, not c, for character var.
9368 Use size for size var.
9369
9370 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9371 char * var.
9372 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9373 uniqstr var.
9374 * src/uniqstr.h: Likewise.
9375
9376 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9377 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9378 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9379 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9380 param to have same name as that of enum, so that we don't use
9381 "s" to stand for a non-state.
9382
93832003-02-02 Akim Demaille <akim@epita.fr>
9384
9385 * src/scan-skel.l: Scan more than one inert character per yylex
9386 invocation.
9387
93882003-02-01 Paul Eggert <eggert@twinsun.com>
9389
9390 Version 1.875a.
9391
9392 * po/LINGUAS: Add ms.
9393
93942003-01-30 Akim Demaille <akim@epita.fr>
9395
9396 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9397
93982003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9399
9400 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9401 of $1.
9402
9403 Changes in response to error report by S. Eken: GLR mode does not
9404 handle negative $ indices or $ indices in embedded rules correctly.
9405 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9406
9407 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9408 (b4_rhs_location): Ditto.
9409 (yyfill): New function to copy from stack tree into array
9410 incrementally.
9411 (yyuserAction): Modify to allow incremental move of semantic values
9412 to rhs array when in GLR mode.
9413 Define YYFILL to use in user-defined actions to fill semantic array
9414 as needed.
9415 Remove dummy use of yystack, as there is now a guaranteed use.
9416 (yydoAction): Modify to allow incremental move of semantic values
9417 to rhs array when in GLR mode.
9418 (yyresolveAction): Ditto.
9419 (yyglrShiftDefer): Update comment.
9420 (yyresolveStates): Use X == NULL for pointers, not !X.
9421 (yyglrReduce): Ditto.
9422 (yydoAction): Ditto
9423
9424 * tests/glr-regr1.at: Rename to ...
9425 * tests/glr-regression.at: Add new regression test for the problems
9426 described above (adapted from S. Eken).
9427 Update copyright notice.
9428 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9429 * tests/Makefile.am: Ditto.
9430
94312003-01-28 Paul Eggert <eggert@twinsun.com>
9432
9433 * data/lalr1.cc: Do not use @output_header_name@ unless
9434 b4_defines_flag is set. This fixes two bugs reported by
9435 Tim Van Holder in
9436 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9437 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9438
94392003-01-21 Paul Eggert <eggert@twinsun.com>
9440
9441 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9442 we don't need to worry about yyerrlab1 being reported as an
9443 "unused label" by non-GCC C compilers. The downside is that if
9444 locations are used then a couple of statements are duplicated each
9445 time YYERROR is invoked, but the upside is that the warnings
9446 should vanish.
9447 (yyerrlab1): Move code to YERROR.
9448 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9449 This reverts some of the 2002-12-27 change.
9450
94512003-01-17 Paul Eggert <eggert@twinsun.com>
9452
9453 * src/output.c (symbol_printers_output): Fix typo that led
9454 to core dump. Problem reported by Antonio Rus in
9455 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9456
94572003-01-13 Akim Demaille <akim@epita.fr>,
9458 Quoc Peyrot <chojin@lrde.epita.fr>,
9459 Robert Anisko <anisko_r@lrde.epita.fr>
9460
9461 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9462 when the stacks contain one element, as the loop would otherwise
9463 free the last state, and then use the top state (the one we just
9464 popped). This means that the initial elements will not be freed
9465 explicitly, as is the case in yacc.c; it is not a problem, as
9466 these elements have fake values.
9467
94682003-01-11 Paul Eggert <eggert@twinsun.com>
9469
9470 * NEWS: %expect-violations are now just warnings, reverting
9471 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9472 bootstrapping problem reported by Matthias Klose; see
9473 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9474 * src/conflicts.c (conflicts_print): Likewise.
9475 * tests/conflicts.at (%expect not enough, %expect too much,
9476 %expect with reduce conflicts): Likewise.
9477 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9478 that the warning is enabled if the number of conflicts changes
9479 (not necessarily increases).
9480
9481 * src/getargs.c (version): Update copyright year.
9482
94832003-01-09 Akim Demaille <akim@epita.fr>
9484
9485 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9486
94872003-01-08 Paul Eggert <eggert@twinsun.com>
9488
9489 * Makefile.maint (WGETFLAGS):
9490 New macro, containing "-C off" to disable proxy caches.
9491 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9492 (rel-check): Use $(WGET) instead of wget.
9493
94942003-01-06 Paul Eggert <eggert@twinsun.com>
9495
9496 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9497 the GLR paper of Scott, Johnstone and Hussain.
9498
94992003-01-04 Paul Eggert <eggert@twinsun.com>
9500
9501 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9502 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9503 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9504 (EXTRA_LIBRARIES): New var, for liby.a.
9505 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9506 (EXTRA_SCRIPTS): New var, for yacc.
9507
9508 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9509 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9510 Problem reported by Nelson H. F. Beebe.
9511
95122003-01-03 Paul Eggert <eggert@twinsun.com>
9513
9514 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9515 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9516 when compiling Bison 1.875's `bitset bset = obstack_alloc
9517 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9518
9519 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9520 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9521 grow to a huge size with typical invocation.
9522
9523 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9524 Use the pattern recommended by Autoconf 2.57, except also protect
9525 against double-definition.
9526 * src/system.h: Likewise.
9527 Portability issues reported by Nelson H. F. Beebe.
9528
9529 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9530 All uses changed. Provide a definition in both C and C++.
9531 (yytrue, yyfalse): Define even if defined (__cplusplus).
9532
9533 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9534 Reported by Nelson H. F. Beebe.
9535
9536 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9537
95382003-01-02 Paul Eggert <eggert@twinsun.com>
9539
9540 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9541 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9542 Bug reported by Nelson H. F. Beebe.
9543
95442003-01-01 Paul Eggert <eggert@twinsun.com>
9545
9546 * Version 1.875.
9547
95482002-12-30 Paul Eggert <eggert@twinsun.com>
9549
9550 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9551 Moved here from...
9552 (<INITIAL>","): Here. This causes stray "," to be treated
9553 more uniformly.
9554
9555 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9556 last brace in braced code when not in Yacc mode, for compatibility
9557 with Bison 1.35. This resurrects the 2001-12-15 patch to
9558 src/reader.c.
9559
9560 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9561 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9562
95632002-12-28 Paul Eggert <eggert@twinsun.com>
9564
9565 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9566 that of SYM's type. This fixes Debian bug 168069, reported by
9567 Thomas Olsson.
9568
95692002-12-28 Paul Eggert <eggert@twinsun.com>
9570
9571 Version 1.75f.
9572
9573 Switch back to the Yacc style of conflict reports, undoing some
9574 of the 2002-07-30 change.
9575 * doc/bison.texinfo (Understanding): Use Yacc style for
9576 conflict reports. Also, use new way of locating rules.
9577 * src/conflicts.c (conflict_report):
9578 Renamed from conflict_report_yacc, removing the old
9579 'conflict_report'. Translate the entire conflict report at once,
9580 so that we don't assume that "," has the same interpretation in
9581 all languages.
9582 (conflicts_output): Use Yacc-style conflict report for each state,
9583 instead of our more-complicated style.
9584 (conflicts_print): Use Yacc-style conflict report, except print
9585 the input file name when not emulating Yacc.
9586 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9587 Conflicted Reduction, %expect not enough, %expect too much,
9588 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9589 * tests/existing.at (GNU Cim Grammar): Likewise.
9590 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9591
9592 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9593 fatal): Don't invoke fflush; it's not needed and it might even be
9594 harmful for stdout, as stdout might not be open.
9595 * src/reduce.c (reduce_print): Likewise.
9596
95972002-12-27 Paul Eggert <eggert@twinsun.com>
9598
9599 Fix a bug where error locations were not being recorded correctly.
9600 This problem was originally reported by Paul Hilfinger in
9601 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9602
9603 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9604 top of the location stack's error locations.
9605 (yyerrlab): Set it. When discarding a token, push its location
9606 onto yylerrsp so that we don't lose track of the error's end.
9607 (yyerrlab1): Now is only the target of YYERROR, so that we can
9608 properly record the location of the action that failed. For GCC
9609 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9610 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9611 (yyerrlab2): New label, which yyerrlab now falls through to.
9612 Compute the error's location by applying YYLLOC_DEFAULT to
9613 the locations of all the symbols that went into the error.
9614 * doc/bison.texinfo (Location Default Action): Mention that
9615 YYLLOC_DEFAULT is also invoked for syntax errors.
9616 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9617 Error locations include the locations of all the tokens that were
9618 discarded, not just the last token.
9619
96202002-12-26 Paul Eggert <eggert@twinsun.com>
9621
9622 * src/files.c: Include quote.h.
9623 (compute_output_file_names): Warn if we detect conflicting
9624 outputs to the same file. This should catch the misunderstanding
9625 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9626
9627 * src/conflicts.c (conflicts_print): If the user specifies
9628 "%expect N", report an error if there are any reduce/reduce
9629 conflicts. This is what the manual says should happen.
9630 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9631 * tests/conflicts.at (%expect with reduce conflicts): New test.
9632
9633 Don't use m4_include on relative file names, as it doesn't work as
9634 desired if there happens to be a file with that name under ".".
9635
9636 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9637 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9638 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9639 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9640 * src/output.c (output_skeleton): Use full path names when
9641 specifying a file to include; don't rely on include path, as
9642 it's unreliable when the working file contains a file with
9643 that name.
9644
96452002-12-25 Paul Eggert <eggert@twinsun.com>
9646
9647 Remove obsolete references to bison.simple and bison.hairy.
9648 Problem mentioned by Aubin Mahe in
9649 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
9650 * data/glr.c: Comment fix.
9651 * doc/bison.1: Remove references. Also, mention "yacc".
9652
9653 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9654 with -g option.
9655
9656 * src/parse-gram.y (declaration): Use enum "report_states" rather
9657 than its numeric value 1.
9658
9659 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9660 opening a new one. This fixes Debian bug 165349, reported by
9661 Bruce Stephens.
9662
96632002-12-24 Paul Eggert <eggert@twinsun.com>
9664
9665 Version 1.75e.
9666
9667 * Makefile.maint (cvs-update): Don't assume that the shell
9668 supports $(...), as Solaris sh doesn't.
9669
9670 * src/parse-gram.y (lloc_default): Remove test for empty
9671 nonterminals at the end, since it didn't change the result.
9672
96732002-12-24 Paul Eggert <eggert@twinsun.com>
9674
9675 If the user does not define YYSTYPE as a macro, Bison now declares it
9676 using typedef instead of defining it as a macro. POSIX requires this.
9677 For consistency, YYLTYPE is also declared instead of defined.
9678
9679 %union directives can now have a tag before the `{', e.g., the
9680 directive `%union foo {...}' now generates the C code
9681 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9682 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9683 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9684 instead of `yyltype'.
9685
9686 `yystype' and `yyltype' are now obsolescent macros instead of being
9687 typedefs or tags; they are no longer documented and will be
9688 withdrawn in a future release.
9689
9690 * data/glr.c (b4_location_type): Remove.
9691 (YYSTYPE): Renamed from yystype.
9692 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
9693 (struct YYLTYPE): Renamed from struct yyltype.
9694 (YYLTYPE): Renamed from yyltype.
9695 (yyltype, yystype): New (and obsolescent) macros,
9696 for backward compatibility.
9697 * data/yacc.c: Likewise.
9698
9699 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
9700 does not specify a union tag. This is for compatibility with
9701 Solaris 9 yacc.
9702
9703 * src/parse-gram.y (add_param): 2nd arg is now char * not char
9704 const *, since it is now modified by stripping surrounding { }.
9705 (current_braced_code): Remove.
9706 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
9707 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
9708 trailing " {...}". Now of type <chars>.
9709 (grammar_declaration): Adjust to bundled tokens.
9710 (code_content): Remove; stripping is now done by add_param.
9711 (print_token_value): Print contents of bundled tokens.
9712 (token_name): New function.
9713
9714 * src/reader.h (braced_code, current_braced_code): Remove.
9715 (token_name): New decl.
9716
9717 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
9718 token_type, not braced_code code_kind. All uses changed.
9719 (SC_PRE_CODE): New state, for scanning after a keyword that
9720 has (or usually has) an immediately-following braced code.
9721 (token_type): New local var, to keep track of which token type
9722 to return when scanning braced code.
9723 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
9724 <INITIAL>"%parse-param", <INITIAL>"%printer",
9725 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
9726 instead of returning a token type immediately.
9727 (<INITIAL>"{"): Set token type.
9728 (<SC_BRACED_CODE>"}"): Use it.
9729 (handle_action_dollar, handle_action_at): Now returns bool
9730 indicating success. Fail if ! current_rule; this prevents a core dump.
9731 (handle_symbol_code_dollar, handle_symbol_code_at):
9732 Remove; merge body into caller.
9733 (handle_dollar, handle_at): Complain in invalid contexts.
9734
9735 * NEWS, doc/bison.texinfo: Document the above.
9736 * NEWS: Fix years and program names in copyright notice.
9737
97382002-12-17 Paul Eggert <eggert@twinsun.com>
9739
9740 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
9741 Reporting, Table of Symbols): Omit mentions of %lex-param and
9742 %parse-param from the documentation for now.
9743
97442002-12-15 Paul Eggert <eggert@twinsun.com>
9745
9746 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
9747 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
9748 lookahead symbol, and which sets yychar in parser actions) and it
9749 disagreed with the Bison documentation. Bug
9750 reported by Andrew Walrond.
9751
9752 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
9753 as the caller now does that.
9754 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
9755 (YYEMPTY): Parenthesize right hand side, since others use it.
9756 (yyparse): Don't assume that our generated code is the only code
9757 that sets yychar.
9758
97592002-12-13 Paul Eggert <eggert@twinsun.com>
9760
9761 Version 1.75d.
9762
9763 POSIX requires a "yacc" command.
9764 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
9765 (MOSTLYCLEANFILES): Add yacc.
9766 (yacc): New rule.
9767 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
9768 as an alias for bison y.
9769
9770 * po/LINGUAS: Add da.
9771
9772 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
9773 problem with latest <getopt.h>.
9774 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
9775
9776 * doc/fdl.texi: Upgrade to 1.2.
9777 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
9778 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
9779 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
9780 gnulib.
9781 * config/install-sh: Sync with autotools.
9782
9783 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
9784 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9785 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
9786 locations are requested.
9787 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
9788 locations are requested.
9789
97902002-12-12 Paul Eggert <eggert@twinsun.com>
9791
9792 Remove unportable casts and storage allocation tricks.
9793 While we're at it, remove almost all casts, since they
9794 usually aren't needed and are a sign of trouble.
9795
9796 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
9797
9798 * src/derives.c (derives_compute): Do not subtract NTOKENS from
9799 the pointer DSET returned by malloc; this isn't portable.
9800 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
9801 Similarly for DERIVES.
9802 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
9803 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
9804 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
9805
9806 * src/derives.c (derives_compute): Do not bother invoking
9807 int_of_rule_number, since rule numbers are integers.
9808
9809 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
9810 rather than XMALLOC (char, N).
9811
9812 * src/files.c (filename_split): Rewrite to avoid cast.
9813
9814 * src/gram.h (symbol_number_as_item_number,
9815 item_number_as_symbol_number, rule_number_as_item_number,
9816 item_number_as_rule_number):
9817 Now inline functions rather than macros, to avoid casts.
9818 * src/state.h (state_number_as_int): Likewise.
9819 * src/tables.c (state_number_to_vector_number,
9820 symbol_number_to_vector_number): Likewise.
9821
9822 * src/gram.h (int_of_rule_number): Remove; no longer used.
9823
9824 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
9825 since the resulting storage is always stored into.
9826
9827 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
9828 where it's needed.
9829
9830 * src/muscle_tab.c (muscle_m4_output):
9831 Now inline. Return bool, not int.
9832 * src/state.c (state_compare): Likewise.
9833 * src/symtab.c (symbol_check_defined,
9834 symbol_check_alias_consistency, symbol_pack, symbol_translation,
9835 hash_compare_symbol, hash_symbol):
9836 Likewise.
9837 * src/uniqstr.c (uniqstr_print): Likewise.
9838 * src/muscle_tab.c (muscle_m4_output_processor):
9839 New function, to avoid casts.
9840 * src/state.c (state_comparator, stage_hasher): Likewise.
9841 * src/symtab.c (symbol_check_defined_processor,
9842 symbol_check_alias_consistency_processor, symbol_pack_processor,
9843 symbol_translation_processor, hash_symbol_comparator,
9844 hash_symbol_hasher): Likewise.
9845 * src/uniqstr.c (uniqstr_print_processor): Likewise.
9846 * src/muscle_tab.c (muscles_m4_output):
9847 Use new functions instead of casting old functions unportably.
9848 * src/state.c (state_hash_new): Likewise.
9849 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
9850 symbols_token_translations_init):
9851 Likewise.
9852 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
9853
9854 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
9855 var instead of casting to long, to avoid casts.
9856 (prepare_states): Use MALLOC rather than alloca, so that we don't
9857 have to worry about alloca.
9858 * src/state.c (state_hash_lookup): Likewise.
9859
9860 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
9861 local var instead of casting to unsigned char, to avoid casts.
9862
9863 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
9864 STATE_ALLOC): Remove.
9865 (transitions_new, errs_new, reductions_new, state_new): Use malloc
9866 rather than calloc, and use offsetof to avoid allocating slightly
9867 too much storage.
9868 (state_new): Initialize all members.
9869
9870 * src/state.c (state_hash): Use unsigned accumulator, not signed.
9871
9872 * src/symtab.c (symbol_free): Remove; unused.
9873 (symbol_get): Remove cast in lhs of assignment.
9874 (symbols_do): Now static. Accept generic arguments, not
9875 hashing-related ones.
9876
9877 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
9878 (symbol_processor): Remove.
9879 (symbols_do): Remove decl; now static.
9880
9881 * src/system.h (alloca): Remove; decl no longer needed.
9882 (<stddef.h>): Include, for offsetof.
9883 (<inttypes.>, <stdint.h>): Include if available.
9884 (uintptr_t): New type, if system lacks it.
9885 (CALLOC, MALLOC, REALLOC): New macros.
9886 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
9887 new macros.
9888
9889 * src/tables.c (table_size): Now int, to pacify GCC.
9890 (table_grow, table_ninf_remap): Use signed table size.
9891 (save_row): Don't bother initializing locals when not needed.
9892 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
9893 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
9894
9895 * src/vcg.h: Correct misspellings.
9896
9897 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
9898
9899
9900 * src/getargs.c (getargs): Don't assume EOF == -1.
9901
99022002-12-09 Paul Eggert <eggert@twinsun.com>
9903
9904 Change identifier spellings to avoid collisions with names
9905 that are reserved by POSIX.
9906
9907 Don't use names ending in _t, since POSIX reserves them.
9908 For consistency, remove _e and _s endings -- they're weren't
9909 needed to remove ambiguity. All uses changed.
9910 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
9911 turn was just renamed from struniq_t.
9912 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
9913 which in turn was just renamed from struniq_processor_t.
9914 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
9915 in turn was renamed from hash_compare_struniq_t.
9916 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
9917 (state_list): Renamed from state_list_t.
9918 * src/assoc.h (assoc): Renamed from assoc_t.
9919 * src/conflicts.c (enum conflict_resolution): Renamed from
9920 enum conflict_resolution_e.
9921 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
9922 (rule_list): Renamed from rule_list_t.
9923 * src/getargs.h (enum trace): Renamed from enum trace_e.
9924 (enum report): Renamed from enum report_e.
9925 * src/gram.h (item_number): Renamed from item_number_t.
9926 (rule_number): Renamed from rule_number_t.
9927 (struct rule_s): Remove the "rule_s" part; not used.
9928 (rule): Renamed from rule_t.
9929 (rule_filter): Renamed from rule_filter_t.
9930 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
9931 (goto_list): Renamed from goto_list_t.
9932 * src/lalr.h (goto_number): Renamed from goto_number_t.
9933 * src/location.h (location): Renamed from location_t.
9934 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
9935 and moved here from:
9936 * src/muscle_tab.h (muscle_entry_t): here.
9937 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
9938 (rule_list): Renamed from rule_list_t.
9939 * src/print_graph.c (static_graph): Renamed from graph.
9940 * src/reader.h (braced_code): Renamed from braced_code_t.
9941 Remove brace_code_e tag.
9942 * src/relation.h (relation_node): Renamed from relation_node_t.
9943 (relation_nodes): Renamed from relation_nodes_t.
9944 (relation): Renamed from relation_t.
9945 * src/state.h (state_number): Renamed from state_number_t.
9946 (struct state): Renamed from struct state_s.
9947 (state): Renamed from state_t.
9948 (transitions): Renamed from transitions_t. Unused (and
9949 misspelled) transtion_s tag removed.
9950 (errs): Renamed from errs_t. Unused errs_s tag removed.
9951 (reductions): Renamed from reductions_t. Unused tag
9952 reductions_s removed.
9953 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
9954 (struct symbol_list): Renamed from struct symbol_list_s.
9955 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
9956 (struct symbol): Renamed from struct symbol_s.
9957 (symbol): Renamed from symbol_t.
9958 * src/tables.c (vector_number): Renamed from vector_number_t.
9959 (action_number): Renamed from action_t.
9960 * src/tables.h (base_number): Renamed from base_t.
9961 * src/vcg.h (enum color): Renamed from enum color_e.
9962 (enum textmode): Renamed from enum textmode_e.
9963 (enum shape): Renamed from enum shape_e.
9964 (struct colorentry): Renamed from struct colorentry_s.
9965 (struct classname): Renamed from struct classname_s.
9966 (struct infoname): Renamed from struct infoname_s.
9967 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
9968 (enum decision): Renamed from enum decision_e.
9969 (enum orientation): Renamed from enum orientation_e.
9970 (enum alignment): Renamed from enum alignment_e.
9971 (enum arrow_mode): Renamed from enum arrow_mode_e.
9972 (enum crossing_type): Renamed from enum crossing_type_e.
9973 (enum view): Renamed from enum view_e.
9974 (struct node): Renamed from struct node_s.
9975 (node): Renamed from node_t.
9976 (enum linestyle): Renamed from enum linestyle_e.
9977 (enum arrowstyle): Renamed from enum arrowstyle_e.
9978 (struct edge): Renamed from struct edge.
9979 (edge): Renamed from edge_t.
9980 (struct graph): Renamed from struct graph_s.
9981 (graph): Renamed from graph_t.
9982 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
9983 Rename value_t -> value.
9984 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
9985 value_t_as_yystype -> value_as_yystype.
9986
9987 Don't include <errno.h> in the mainstream code, since it
9988 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
9989 * lib/get-errno.c, lib/get-errno.h: New files.
9990 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
9991 get-errno.c.
9992 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
9993 * src/output.c (output_skeleton): Likewise.
9994 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
9995 instead of errno.
9996 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
9997 Likewise.
9998 (handle_action_dollar, handle_action_at): Likewise.
9999 * src/system.h: Do not include <errno.h>.
10000 (TAB_EXT): Renamed from EXT_TAB.
10001 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10002
10003 Avoid str[a-z]*, since <string.h> reserves that name space.
10004 Change all instances of "struniq" in names to "uniqstr", and
10005 likewise for "STRUNIQ" and "UNIQSTR".
10006 * src/uniqstr.c: Renamed from src/struniq.c.
10007 * src/uniqstr.h: Renamed from src/struniq.h.
10008 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10009 * src/files.c (strsuffix): Remove; unused.
10010 (concat2): Renamed from stringappend. Now static.
10011 * src/files.h (strsuffix, stringappend): Remove; unused.
10012 * src/parse-gram.y (<chars>): Renamed from <string>.
10013 (<uniqstr>): Renamed from <struniq>.
10014 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10015 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10016 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10017 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10018 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10019 (N_EXPAND): Renamed from N_STRETCH.
10020
10021 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10022 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10023 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10024 Remove; unused.
10025 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10026 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10027 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10028 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10029 (BASE_MAXIMUM): Renamed from BASE_MAX.
10030 (BASE_MINIMUM): Renamed from BASE_MIN.
10031 (ACTION_MAX): Remove; unused.
10032 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10033 Unnecessary casts removed from above defines.
10034
10035
10036 Fix misspelling in names.
10037 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10038 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10039 G_NODE_ALIGNEMENT.
10040
10041
10042 * lib/timevar.c (timevar_report): Renamed from time_report,
10043 for consistency with other names.
10044 * lib/timevar.h (timevar_report): New decl.
10045 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10046
10047
10048 Sort include-file uses.
10049
10050 Reorder all include files under src to be in the order "system.h".
10051 then the ../lib include files in angle brackets (alphabetized),
10052 then the . include files in double-quotes (alphabetized). Fix
10053 dependency breakages encountered in this process, as follows:
10054 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10055 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10056 * src/state.h: Include "symtab.h".
10057
100582002-12-08 Paul Eggert <eggert@twinsun.com>
10059
10060 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10061 since this causes problems when __file__ contains character
10062 sequences like "@" that are treated specially by src/scan-skel.l.
10063 Instead, just use the file's basename. This fixes the bug
10064 reported by Martin Mokrejs in
10065 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10066
100672002-12-06 Paul Eggert <eggert@twinsun.com>
10068
10069 Add support for rules that do not have trailing semicolons, as
10070 POSIX requires. Improve the quality of locations in Bison
10071 diagnostics.
10072
10073 * src/location.c: Include <quotearg.h>.
10074 (empty_location): Now const.
10075 (location_print): New function. Follow the recommendation of the
10076 GNU Coding Standards for locations that span file boundaries.
10077 * src/location.h: Do not include <quotearg.h>; no longer needed.
10078 (boundary): New type.
10079 (location_t): Use it. This allows locations to span file boundaries.
10080 All member uses changed: file -> start.file or end.file (as needed),
10081 first_line -> start.line, first_column -> start.column,
10082 last_line -> end.line, last_column -> end.column.
10083 (equal_boundaries): New function.
10084 (LOCATION_RESET, LOCATION_STEP): Remove.
10085 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10086 (empty_location): Now const.
10087 (location_print): New decl.
10088 * src/parse-gram.y (lloc_default): New function, which handles
10089 empty locations more accurately.
10090 (YYLLOC_DEFAULT): Use it.
10091 (%token COLON): Remove.
10092 (%token ID_COLON): New token.
10093 (rules): Use it.
10094 (declarations, rules): Remove trailing semicolon.
10095 (declaration, rules_or_grammar_declaration):
10096 Allow empty (";") declaration.
10097 (symbol_def): Remove empty actions; no longer needed.
10098 (rules_or_grammar_declaration): Remove trailing semicolon.
10099 (semi_colon.opt): Remove.
10100 * src/reader.h: Include location.h.
10101 (scanner_cursor): New decl.
10102 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10103 rolling our own.
10104 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10105 of *loc.
10106 (STEP): Remove. No longer needed, now that adjust_location does
10107 the work. All uses removed.
10108 (scanner_cursor): New var.
10109 (adjust_location): Renamed from extend_location. It now sets
10110 *loc and adjusts the scanner cursor. All uses changed.
10111 Don't bother testing for CR.
10112 (handle_syncline): Remove location arg; now updates scanner cursor.
10113 All callers changed.
10114 (unexpected_end_of_file): Now accepts start boundary of token or
10115 comment, not location. All callers changed. Update scanner cursor,
10116 not the location.
10117 (SC_AFTER_IDENTIFIER): New state.
10118 (context_state): Renamed from c_context. All uses changed.
10119 (id_loc, code_start, token_start): New local vars.
10120 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10121 processing of Yacc white space and equivalents here.
10122 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10123 instead of returning ID immediately, since we need to search for
10124 a subsequent colon.
10125 (<INITIAL>"'", "\""): Save token_start.
10126 (<INITIAL>"%{", "{", "%%"): Save code_start.
10127 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10128 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10129 BEGIN context_state at end, not INITIAL.
10130 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10131 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10132 Return correct token start.
10133 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10134 the start of a character, string or multiline comment is found.
10135 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10136 Reduction): Adjust reported locations to match the more-precise
10137 results now expected.
10138 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10139 * tests/reduce.at (Useless Rules, Reduced Automaton,
10140 Underivable Rules): Likewise.
10141 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10142 or "|"' now that so many other tokens are allowed by the new grammar.
10143
10144 * src/complain.h (current_file): Remove duplicate decl;
10145 current_file is now owned by files.h.
10146 * src/complain.c, src/scan-gram.l: Include files.h.
10147
101482002-12-06 Paul Eggert <eggert@twinsun.com>
10149
10150 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10151 promotes to int; it might be unsigned int.
10152 * data/yacc.c (yy_reduce_print): Likewise.
10153
10154 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10155 be #defined in the prologue, not in the Bison declarations.
10156 This fixes Debian Bug 102878, reported by Shaul Karl.
10157
101582002-12-02 Paul Eggert <eggert@twinsun.com>
10159
10160 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10161 * lib/strtoul.c: New file, from gnulib.
10162 This fixes a porting bug reported by Peter Klein in
10163 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10164
101652002-11-30 Paul Eggert <eggert@twinsun.com>
10166
10167 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10168 and put only a forward declaration in the prologue. This is for
10169 consistency with the other scanner helper functions.
10170
10171 Type clashes now generate warnings, not errors, since it
10172 appears that POSIX may allow some grammars with type clashes.
10173 * src/reader.c (grammar_current_rule_check): Warn about
10174 type clashes instead of complaining.
10175 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10176
10177 Add Yacc library, since POSIX requires it.
10178 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10179 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10180 * lib/main.c, lib/yyerror.c: New files.
10181
10182 gram_error can be static; it need not be extern.
10183 * src/reader.h (gram_error): Remove decl.
10184 * src/parse-gram.y (gram_error): Now static. Add static decl.
10185 (print_token_value): Omit parameter names from forward decl,
10186 for consistency.
10187
101882002-11-29 Paul Eggert <eggert@twinsun.com>
10189
10190 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10191 be declared before being used. E.g., one should typically
10192 declare them in the prologue. Use GNU coding style in examples.
10193 Put "const" consistently after the type it modifies. Mention
10194 that C99 supports "inline". Mention that yyerror traditionally
10195 returns "int".
10196
10197 %parse-param and %lex-param now take just one argument, the
10198 declaration; the argument name is deduced from the declaration.
10199
10200 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10201 Reporting, Table of Symbols): Document this.
10202 * src/parse-gram.y (add_param): New function.
10203 (COMMA): Remove.
10204 (declaration): Implement new rule for %parse-param and %lex-param.
10205 * src/scan-gram.l: "," now elicits a warning, rather than being
10206 a token; this is more compatible with byacc.
10207 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10208
102092002-11-27 Paul Eggert <eggert@twinsun.com>
10210
10211 Rename identifiers to avoid real and potential collisions.
10212
10213 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10214 to avoid collision with lex macro described by Bruce Lilly in
10215 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10216 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10217 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10218 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10219 All uses changed.
10220 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10221 The name "yycontrol" violates the name space rules, and this stuff
10222 wasn't being used anyway.
10223 (input): Remove action; this stuff wasn't being used.
10224 (gram_error): Rename local variable yylloc -> loc.
10225 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10226 (YY_DECL): Don't use "yy" at start of local variables.
10227 All uses changed, e.g., yylloc -> loc.
10228 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10229 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10230 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10231 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10232
10233 * src/parse-gram.y (gram_error): loc is now const *.
10234 * src/reader.h (gram_error): Likewise.
10235
102362002-11-24 Paul Eggert <eggert@twinsun.com>
10237
10238 Version 1.75c.
10239
10240 * tests/actions.at (Actions after errors): Use an output format
10241 more similar to that of the Printers and Destructors test.
10242 Test the position of the ';' token too.
10243 (Printers and Destructors): Likewise.
10244 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10245 unnecessarily alarming people when the test fails.
10246
10247 * data/yacc.c (yyerrlab1): Move this label down, so that the
10248 parser does not discard the lookahead token if the user code
10249 invokes YYERROR. This change is required for POSIX conformance.
10250
10251 * lib/error.c: Sync with gnulib.
10252
102532002-11-22 Paul Eggert <eggert@twinsun.com>
10254
10255 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10256 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10257 * lib/xmalloc.c: Likewise.
10258
102592002-11-20 Paul Eggert <eggert@twinsun.com>
10260
10261 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10262
102632002-11-20 Paul Eggert <eggert@twinsun.com>
10264
10265 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10266 should use `if (! x) abort ();' rather than `assert (x);', and
10267 anyway it's one less thing to worry about configuring.
10268
10269 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10270 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10271 and replace all instances of assert with abort.
10272 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10273 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10274
10275 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10276 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10277 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10278 hash_find_entry, hash_rehash, hash_insert): Likewise.
10279 * src/conflicts.c (resolve_sr_conflict): Likewise.
10280 * src/lalr.c (set_goto_map, map_goto): Likewise.
10281 * src/nullable.c (nullable_compute): Likewise.
10282 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10283 * src/reader.c (packgram, reader): Likewise.
10284 * src/state.c (state_new, state_free, state_transitions_set,
10285 state_reduction_find): Likewise.
10286 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10287 symbol_pack): Likewise.
10288 * src/tables.c (conflict_row, pack_vector): Likewise.
10289 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10290 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10291 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10292 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10293
10294 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10295 (ARGMATCH_CONSTRAINT): New macro.
10296 (ARGMATCH_ASSERT): Use it.
10297
10298 * src/system.h (verify): New macro.
10299 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10300 rather than assert.
10301 * src/tables.c (tables_generate): Likewise.
10302
10303 * src/struniq.c (struniq_assert): Now returns void, and aborts
10304 if the assertion is false.
10305 (struniq_assert_p): Remove.
10306 * src/struniq.h: Likewise.
10307
103082002-11-18 Paul Eggert <eggert@twinsun.com>
10309
10310 * data/glr.c (yygetLRActions): Replace `yyindex' with
10311 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10312 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10313 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10314
103152002-11-18 Akim Demaille <akim@epita.fr>
10316
10317 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10318 space.
10319 From Tim Van Holder.
10320
103212002-11-17 Paul Eggert <eggert@twinsun.com>
10322
10323 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10324 to "SyntaxError" for consistency with my 2002-11-15 change.
10325
10326 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10327 not define to {}, since this breaks the common use of `YYDPRINTF
10328 ((...));' if a single statement is desired (e.g. before `else').
10329 Work around GCC warnings by surrounding corresponding calls with
10330 {} if needed.
10331 (yyhasResolvedValue): Remove unused function.
10332 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10333 loop body.
10334 (yyreportSyntaxError): Renamed from yyreportParseError.
10335 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10336 All uses changed.
10337 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10338 extern when possible. Remove unused initializations.
10339
103402002-11-16 Akim Demaille <akim@epita.fr>
10341
10342 Augment the similarity between GLR and LALR traces.
10343
10344 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10345 (YY_REDUCE_PRINT): New.
10346 (yyparse): Use them.
10347 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10348 YYDPRINT here.
10349 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10350 state reached after the reduction/recovery, since...
10351 (yyparse, yyprocessOneStack): Report the state we are entering in.
10352
103532002-11-16 Akim Demaille <akim@epita.fr>
10354
10355 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10356 Add support for --trace=skeleton.
10357 * src/scan-skel.l: %option debug.
10358 Scan strings of non-@ or \n instead of character by character.
10359 (scan_skel): Handle trace_skeleton.
10360 (QPUTS): New.
10361 (@output_parser_name@, @output_header_name@): ``Restore'' their
10362 support (used to be M4 macros).
10363 * data/yacc.c: Quote larger chunks, a la glr.c.
10364 * data/lalr1.cc: Likewise.
10365 The header guards are no longer available, so use some other
10366 string than `YYLSP_NEEDED'.
10367
103682002-11-16 Akim Demaille <akim@epita.fr>
10369
10370 Make the ``Printers and Destructors'' test more verbose, taking
10371 `yacc.c''s behavior as (possibly wrong) reference.
10372
10373 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10374 instead of fprint on stdout.
10375 Set and report the last_line of the symbols.
10376 Consistently display values and locations.
10377
103782002-11-16 Paul Eggert <eggert@twinsun.com>
10379
10380 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10381
103822002-11-15 Paul Eggert <eggert@twinsun.com>
10383
10384 * tests/actions.at (Actions after errors): New test case.
10385
10386 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10387 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10388 tests/action.at, tests/calc.at, tests/conflicts.at,
10389 tests/cxx-type.at, tests/regression.at:
10390 "parse error" -> "syntax error" for POSIX compatibility.
10391 "parsing stack overflow..." -> "parser stack overflow" so
10392 that code matches Bison documentation.
10393
103942002-11-15 Akim Demaille <akim@epita.fr>
10395
10396 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10397 take two BRACED_CODE, not two string_content.
10398 Free the scanner's obstack when we are done.
10399 (code_content): New.
10400 * tests/calc.at: Adjust.
10401 * doc/bison.texinfo: Adjust.
10402 Also, make sure to include the `,' for these declarations.
10403
104042002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10405
10406 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10407 definition; avoids potential autoreconf problems.
10408
104092002-11-15 Akim Demaille <akim@epita.fr>
10410
10411 Always check the value returned by yyparse.
10412
10413 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10414 returned by yyparse.
10415 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10416 Adjust calls.
10417 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10418 returned by yyparse.
10419
104202002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10421
10422 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10423 on input.at test.
10424
104252002-11-14 Paul Eggert <eggert@twinsun.com>
10426
10427 * src/output.c (output_skeleton): Call xfopen instead of
10428 duplicating xfopen's body.
10429
10430 Fix bugs reported by Nelson H. F. Beebe in
10431 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10432
10433 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10434 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10435 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10436 file twice in the grammar, as an extra check.
10437
10438 * tests/input.at (Torturing the Scanner): Surround the
10439 backslash-newline tests with "#if 0", to make it less likely that
10440 we'll run into compiler bugs. Bring back solitary \ inside
10441 comment, but add a closing comment to work around HP C bug. Don't
10442 test backslash-newline in C character constant.
10443
104442002-11-14 Akim Demaille <akim@epita.fr>
10445
10446 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10447 status of the compiler.
10448 Calling `exit 1' is no longer needed.
10449 Reported by Nelson H. F. Beebe.
10450
104512002-11-14 Akim Demaille <akim@epita.fr>
10452
10453 * tests/atlocal.in (CPPFLAGS): We have config.h.
10454 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10455 New.
10456 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10457 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10458 * tests/regression.at, tests/torture.at: Use them for all the
10459 grammars that are to be compiled.
10460 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10461 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10462 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10463
104642002-11-14 Akim Demaille <akim@epita.fr>
10465
10466 * doc/bison.texinfo: Various formatting changes (alignments in
10467 samples, additional @group/@end group, GCS in samples.
10468 Use @deffn instead of simple @table to define the directives,
10469 macros, variables etc.
10470
104712002-11-13 Paul Eggert <eggert@twinsun.com>
10472
10473 Fix some bugs reported by Albert Chin-A-Young in
10474 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10475
10476 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10477 -o c"; the HP C compiler chatters during compilation.
10478 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10479 * tests/headers.at (export YYLTYPE): Likewise.
10480
10481 * tests/input.at (Torturing the Scanner): Remove lines containing
10482 solitary backslashes, as they tickle a bug in the HP C compiler.
10483
10484 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10485 comments, since they're not portable. Use GNU coding style.
10486
104872002-11-13 Akim Demaille <akim@epita.fr>
10488
10489 * data/yacc.c: Leave bigger chunks of quoted text.
10490 (YYDSYMPRINTF): New.
10491 Use it to report symbol activities.
10492 * data/glr.c (YYDSYMPRINTF): New.
10493 Use it.
10494
104952002-11-12 Paul Eggert <eggert@twinsun.com>
10496
10497 Version 1.75b.
10498
10499 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10500 (yyglrReduce): Return yyok, not 0.
10501 This should avoid the enumerated-type warnings reported
10502 by Nelson H. F. Beebe in
10503 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10504
10505 * lib/bbitset.h (BITSET_INLINE): Remove.
10506 * lib/bitset.h [! BITSET_INLINE]: Remove.
10507 (bitset_set, bitset_reset, bitset_test): Rename local vars
10508 to avoid shadowing warnings by GCC.
10509
10510 * data/glr.c (inline): Remove #define. It's the user's
10511 responsibility to #define it away, just like 'const'.
10512 This fixes one of the bugs reported by Nelson H. F. Beebe in
10513 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10514
10515 * Makefile.maint (po-check): Scan .l and .y files instead of the
10516 .c and the .h files that they generate. This fixes the bug
10517 reported by Tim Van Holder in:
10518 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10519 Look for N_ as well as for _. Try to avoid matching #define for
10520 N_ and _.
10521 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10522 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10523 * src/scan-gram.l: Revamp regular expressions so that " and '
10524 do not confuse xgettext.
10525
10526 * src/struniq.h (struniq_new): Do not declare the return type
10527 to be 'const'; this violates the C standard.
10528 * src/struniq.c (struniq_new): Likewise.
10529
105302002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10531
10532 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10533 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10534 linker.
10535
105362002-11-12 Akim Demaille <akim@epita.fr>
10537
10538 * Makefile.maint: Sync with Autoconf:
10539 (local_updates): New.
10540
105412002-11-12 Akim Demaille <akim@epita.fr>
10542
10543 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10544
105452002-11-12 Akim Demaille <akim@epita.fr>
10546
10547 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10548 locations.
10549
105502002-11-12 Akim Demaille <akim@epita.fr>
10551
10552 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10553 not yyvalue.
10554
105552002-11-12 Akim Demaille <akim@epita.fr>
10556
10557 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10558 Use it to test the GLR parser.
10559
105602002-11-12 Akim Demaille <akim@epita.fr>
10561
10562 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10563 defines it.
10564 * data/glr.c (yystos): New.
10565 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10566 (YYDSYMPRINT): New.
10567 (yyval): Don't define it, it is handled via M4.
10568 (yyrecoverParseError): Free verbosely the discarded symbols.
10569 * data/yacc.c (yysymprint): Remove, rather...
10570 (b4_yysymprint_generate): invoke.
10571 * data/c.m4 (b4_yysymprint_generate): New.
10572 Accept pointers as arguments, as opposed to the version from
10573 yacc.c.
10574 (b4_yydestruct_generate): Likewise.
10575 * tests/cations.at (Printers and Destructors): Use Bison directives
10576 instead of CPP macros.
10577 Don't rely on internal details.
10578
105792002-11-12 Akim Demaille <akim@epita.fr>
10580
10581 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10582 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10583 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10584 it against YYEMPTY and so forth), work on yytoken (i.e., set
10585 it to YYEMPTY etc.).
10586 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10587 (b4_symbol_actions): Remove.
10588 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10589 for 0, end-of-input.
10590
105912002-11-12 Akim Demaille <akim@epita.fr>
10592
10593 * doc/bison.texinfo (Destructor Decl): New.
10594
105952002-11-12 Akim Demaille <akim@epita.fr>
10596
10597 * src/tables.c (tables_generate): Use free for pointers that
10598 cannot be NULL, not XFREE.
10599 (pack_vector): Use assert, not fatal, for bound violations.
10600 * src/state.c (state_new): Likewise.
10601 * src/reader.c (reader): Likewise.
10602 * src/lalr.c (set_goto_map): Likewise.
10603 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10604 the file name.
10605
106062002-11-12 Akim Demaille <akim@epita.fr>
10607
10608 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10609 Restore.
10610 * src/scan-gram.l (last_string): Is global to the file, not to
10611 yylex.
10612 * src/parse-gram.y (input): Don't append the epilogue here,
10613 (epilogue.opt): do it here, and free the scanner's obstack.
10614 * src/reader.c (epilogue_set): Rename as...
10615 (epilogue_augment): this.
10616 * data/c.m4 (b4_epilogue): Defaults to empty.
10617
106182002-11-12 Akim Demaille <akim@epita.fr>
10619
10620 * src/getargs.c (long_options): Remove duplicates.
10621 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10622 Remove.
10623 * doc/bison.rnh: Remove.
10624 * doc/bison.texinfo (VMS Invocation): Remove.
10625
106262002-11-12 Akim Demaille <akim@epita.fr>
10627
10628 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10629 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10630
10631 Use struniq for symbols.
10632
10633 * src/symtab.h (symbol_t): The tag member is a struniq.
10634 (symbol_type_set): Adjust.
10635 * src/symtab.c (symbol_new): Takes a struniq.
10636 (symbol_free): Don't free the tag member.
10637 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10638 (hash_compare_symbol, hash_symbol): these.
10639 Use the fact that tags as struniqs.
10640 (symbol_get): Use struniq_new.
10641 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10642 Returns a strniq.
10643 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10644 and type members are struniqs.
10645 * src/reader.c (get_merge_function)
10646 (grammar_current_rule_merge_set): Adjust.
10647 (TYPE, current_type): Are struniq.
10648
10649 Use struniq for file names.
10650
10651 * src/files.h, src/files.c (infile): Split into...
10652 (grammar_file, current_file): these.
10653 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10654 * src/reduce.c (reduce_print): Likewise.
10655 * src/getargs.c (getargs): Likewise.
10656 * src/complain.h, src/complain.c: Likewise.
10657 * src/main.c (main): Call struniqs_new early enough to use it for
10658 file names.
10659 Don't free the input file name.
10660
106612002-11-12 Akim Demaille <akim@epita.fr>
10662
10663 * src/symtab.c (symbol_free): Remove dead deactivated code:
10664 type_name are properly removed.
10665 Don't use XFREE to free items that cannot be NULL.
10666 * src/struniq.h, src/struniq.c: New.
10667 * src/main.c (main): Initialize/free struniqs.
10668 * src/parse-gram.y (%union): Add astruniq member.
10669 (yyprint): Adjust.
10670 * src/scan-gram.l (<{tag}>): Return a struniq.
10671 Free the obstack bit that used to store it.
10672 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10673
106742002-11-11 Paul Eggert <eggert@twinsun.com>
10675
10676 Revamp to fix many (but not all) of the C- and M4-related quoting
10677 problems. Among other things, this fixes the Bison bug reported
10678 by Jan Hubicka when processing the Bash grammar; see:
10679 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
10680
10681 Use new @ escapes consistently. Represent brackets with @{ and @}
10682 rather than @<:@ and @:>@, since this works a bit better with dumb
10683 editors like vi. Represent @ with @@, since @ is now consistently
10684 an escape. Use @oline@ and @ofile@ rather than __oline__ and
10685 __ofile__, to avoid unexpected expansions. Similarly, use @output
10686 rather than #output.
10687
10688 * data/c.m4 (b4_copyright): Omit file name from comment, since
10689 the file name could contain "*/".
10690 (b4_synclines_flag): Don't quote the 2nd argument; it should already
10691 be quoted. All uses changed.
10692
10693 * data/glr.c: Use new @ escapes consistently.
10694 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
10695 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
10696 Remove, since they couldn't handle arbitrary characters in file
10697 names.
10698 * data/lalr1.cc: Likewise.
10699 * data/yacc.c: Likewise.
10700
10701 * src/files.c (output_infix): Remove; all uses removed.
10702 * src/files.h: Likewise.
10703
10704 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
10705 mishandled funny characters in file names, and anyway it isn't
10706 needed any more.
10707 * data/yacc.c: Likewise.
10708 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
10709
10710 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
10711 * data/yacc.c: Likewise.
10712
10713 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
10714 strings now.
10715 (muscle_init): Quote filename as a C string.
10716 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
10717 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
10718 * src/output.c (escaped_file_name_output): New function.
10719 (prepare_symbols): Quote tokens for M4.
10720 (prepare): Don't insert output_infix, output_prefix,
10721 output_parser_name, output_header_name; this is now down by scan-skel.
10722 Insert skeleton as a C string.
10723
10724 * src/output.c (user_actions_output, symbol_destructors_output,
10725 symbol_printers_output): Quote filenames for C and M4.
10726 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10727
10728 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
10729 escapes other than \\ and \'; this simplifies the code.
10730 (<SC_STRING>): Likewise, for \\ and \".
10731 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
10732 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
10733 Use new escapes @{ and @} for [ and ].
10734
10735 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
10736 them with auto vars.
10737 Switch to new escape scheme, where @ is the escape character uniformly.
10738 Abort if a stray escape character is found. Avoid unbounded input
10739 buffer when parsing non-escaped text.
10740
10741 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
10742 __oline__, #output, $@, and @{ do not have unintended meanings.
10743
107442002-11-09 Paul Eggert <eggert@twinsun.com>
10745
10746 Fix the test failure due to GCC warnings described in
10747 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
10748 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
10749 evaluate to 0 if it's impossible for NINF to be in the respective
10750 table.
10751 (yygetLRActions, yyrecoverParseError): Use them.
10752
10753 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
10754 counted in the token inserted at end of file. Now takes
10755 location_t *, not location_t, so that the location can be
10756 adjusted. All uses changed.
10757
10758 * tests/regression.at (Invalid inputs): Adjust wording in
10759 diagnostic to match the new behavior.
10760
10761 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
10762 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
10763 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
10764 abort ();'. This reduces the runtime of the "Many lookaheads"
10765 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
10766 GCC 3.2.
10767
107682002-11-07 Paul Eggert <eggert@twinsun.com>
10769
10770 * src/parse-gram.y (CHARACTER): Remove unused token.
10771 All uses removed.
10772
10773 * src/scan-gram.l: Remove stack option. We no longer use the
10774 stack, since the stack was never deeper than 1; instead, use the
10775 new auto var c_context to record the stacked value.
10776
10777 Remove nounput option. At an unexpected end of file, we now unput
10778 the minimal input necessary to end cleanly; this simplifies the
10779 code.
10780
10781 Avoid unbounded token sizes where this is easy.
10782
10783 (unexpected_end_of_file): New function.
10784 Use it to systematize the error message on unexpected EOF.
10785 (last-string): Now auto, not static.
10786 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
10787 (scanner_last_string_free): Remove; not used.
10788 (percent_percent_count): Move decl to just before use.
10789 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
10790 not the (never otherwised-used) CHARACTER.
10791
107922002-11-07 Akim Demaille <akim@epita.fr>
10793
10794 Let yyerror always receive the msg as last argument, so that
10795 yyerror can be variadic.
10796
10797 * data/yacc.c (b4_yyerror_args): New.
10798 Use it when calling yyerror.
10799 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
10800 Use it when calling yyerror.
10801 * doc/bison.texinfo (Error Reporting): Adjust.
10802 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
10803 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
10804
108052002-11-06 Akim Demaille <akim@epita.fr>
10806
10807 #line should have quoted strings.
10808 Ideally, this should be done by m4_quotearg.
10809
10810 * src/scan-skel.l: Include quotearg.h.
10811 Quote __ofile__.
10812 * src/output.c (symbol_printers_output)
10813 (symbol_destructors_output): Quote the file name.
10814
108152002-11-06 Akim Demaille <akim@epita.fr>
10816
10817 * tests/regression.at (Invalid inputs): Adjust to the recent
10818 messages.
10819
108202002-11-06 Akim Demaille <akim@epita.fr>
10821
10822 Restore --no-lines.
10823 Reported by Jim Kent.
10824
10825 * data/c.m4 (b4_syncline): New.
10826 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
10827 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
10828 * src/output.c (user_actions_output): Likewise.
10829 (prepare): Define 'b4_synclines_flag'.
10830 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
10831
108322002-11-06 Akim Demaille <akim@epita.fr>
10833
10834 * src/main.c (main): Free `infile'.
10835 * src/scan-gram.l (handle_syncline): New.
10836 Recognize `#line'.
10837 * src/output.c (user_actions_output, symbol_destructors_output)
10838 (symbol_printers_output): Use the location's file name, not
10839 infile.
10840 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10841
108422002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10843
10844 * src/tables.c (matching_state): Don't allow states to match if
10845 either has GLR conflict entries.
10846
108472002-11-05 Paul Eggert <eggert@twinsun.com>
10848
10849 * src/scan-gram.l: Use more accurate diagnostics, e.g.
10850 "integer out of range" rather than "invalid value".
10851 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
10852 accordingly.
10853
10854 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
10855 Also, remove one static variable in the scanner.
10856
10857 * src/scan-gram.l (braces_level): Now auto, not static.
10858 Initialize to zero if the compiler is being picky.
10859 (INITIAL): Clear braces_level instead of incrementing it.
10860 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
10861 as POSIX 1003.1-2001 requires.
10862 * src/system.h (IF_LINT): New macro, taken from coreutils.
10863 * configure.ac: Define "lint" if --enable-gcc-warnings.
10864
108652002-11-05 Akim Demaille <akim@epita.fr>
10866
10867 * src/scan-gram.l: When it starts with `%', complain about the
10868 whole directive, not just that `invalid character: %'.
10869
108702002-11-04 Akim Demaille <akim@epita.fr>
10871
10872 * Makefile.maint: Update from Autoconf.
10873 (update, cvs-update, po-update, do-po-update): New.
10874
108752002-11-04 Akim Demaille <akim@epita.fr>
10876
10877 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
10878 and yyerror.
10879 Have yyerror `use' its arguments.
10880 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
10881 returns true when location & yacc & pure & parse-param.
10882 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
10883
108842002-11-04 Akim Demaille <akim@epita.fr>
10885
10886 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
10887 clashes.
10888 * src/scan-gram.l: Use [\'] instead of ['] to pacify
10889 font-lock-mode.
10890 Use complain_at.
10891 Use quote, not quote_n since LOCATION_PRINT no longer uses the
10892 slot 0.
10893
108942002-11-03 Paul Eggert <eggert@twinsun.com>
10895
10896 * src/reader.c (get_merge_function, grammar_current_rule_check):
10897 Use consistent diagnostics for reporting type name clashes.
10898 Quote the types with <>, for consistency with Yacc.
10899 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
10900
109012002-11-03 Akim Demaille <akim@epita.fr>
10902
10903 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
10904 New.
10905 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
10906 (b4_parse_param): Remove.
10907 Use b4_identification.
10908 Propagate b4_pure_args where needed to pass them to yyerror.
10909 * data/glr.m4 (b4_parse_param): Remove.
10910 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
10911 (b4_lpure_formals): New.
10912 Use b4_identification.
10913 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
10914 b4_user_formals and b4_user_args.
10915 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
10916 (yyreportAmbiguity): When using a pure parser, also need
10917 the location, and the parse-params.
10918 Adjust callers.
10919 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
10920 When using a pure parser, also need the parse-params.
10921 Adjust callers.
10922 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
10923 (%pure-parser + %parse-param) LALR and GLR parsers.
10924 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
10925 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
10926 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
10927 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
10928 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
10929 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
10930 * doc/bison.texinfo: Untabify the whole file.
10931 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
10932 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
10933 (Error Reporting): Adjust to these new directives.
10934 Document %error-verbose, deprecate YYERROR_VERBOSE.
10935
109362002-11-03 Akim Demaille <akim@epita.fr>
10937
10938 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
10939 AT_CHECK_CALC_GLR invocations to use % directives, instead of
10940 command line options.
10941 * tests/cxx-type.at: Formatting changes.
10942
109432002-11-03 Paul Eggert <eggert@twinsun.com>
10944
10945 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
10946 to count columns correctly, and to check for invalid inputs.
10947
10948 Use mbsnwidth to count columns correctly. Account for tabs, too.
10949 Include mbswidth.h.
10950 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
10951 (extend_location): New function.
10952 (YY_LINES): Remove.
10953
10954 Handle CRLF in C code rather than in Lex code.
10955 (YY_INPUT): New macro.
10956 (no_cr_read): New function.
10957
10958 Scan UCNs, even though we don't fully handle them yet.
10959 (convert_ucn_to_byte): New function.
10960
10961 Handle backslash-newline correctly in C code.
10962 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
10963 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
10964 all uses changed.
10965 (tag, splice): New EREs. Do not allow NUL or newline in tags.
10966 Use {splice} wherever C allows backslash-newline.
10967 YY_STEP after space, newline, vertical-tab.
10968 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
10969
10970 (letter, id): Don't assume ASCII; e.g., spell out a-z.
10971
10972 ({int}, handle_action_dollar, handle_action_at): Check for integer
10973 overflow.
10974
10975 (YY_STEP): Omit trailing semicolon, so that it's more like C.
10976
10977 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
10978 as well as \000. Check for UCHAR_MAX, not 255.
10979 Allow \x with an arbitrary positive number of digits, as in C.
10980 Check for overflow here.
10981 Allow \? and UCNs, for compatibility with C.
10982
10983 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
10984 with quote slot used by complain_at.
10985
10986 * tests/input.at: Add tests for backslash-newline, m4 quotes
10987 in symbols, long literals, and funny escapes in strings.
10988
10989 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
10990 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
10991 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
10992 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
10993 * m4/mbswidth.m4: New file, from GNU coreutils.
10994
10995 * doc/bison.texinfo (Grammar Outline): Document // comments.
10996 (Symbols): Document that trigraphs have no special meaning in Bison,
10997 nor is backslash-newline allowed.
10998 (Actions): Document that trigraphs have no special meaning.
10999
11000 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11001 no longer used.
11002
110032002-11-02 Paul Eggert <eggert@twinsun.com>
11004
11005 * src/reader.c: Don't include quote.h; not needed.
11006 (get_merge_function): Reword warning to be consistent with
11007 type clash diagnostic in grammar_current_rule_check.
11008
11009 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11010 bug in trigraph handling.
11011
11012 * src/output.c (prepare_symbols): When printing token names,
11013 escape "[" as "@<:@" and likewise for "]".
11014
11015 * src/system.h (errno): Remove declaration, as we are now
11016 assuming C89 or better, and C89 guarantees errno.
11017
110182002-10-30 Paul Eggert <eggert@twinsun.com>
11019
11020 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11021 Check for close failures.
11022 * src/files.h (xfclose): Return void, not int, since it always
11023 returned zero.
11024 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11025 indicates one.
11026 * src/output.c (output_skeleton): Use xfclose rather than fclose
11027 and ferror. xfclose now checks ferror.
11028
11029 * data/glr.c (YYLEFTMOST_STATE): Remove.
11030 (yyreportTree): Use a stack-based leftmost state. This avoids
11031 our continuing battles with bogus warnings about initializers.
11032
110332002-10-30 Akim Demaille <akim@epita.fr>
11034
11035 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11036 #if.
11037
110382002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11039
11040 * tests/glr-regr1.at: New test for reported regressions.
11041 * tests/testsuite.at: Add glr-regr1.at test.
11042 * tests/Makefile.am: Add glr-regr1.at test.
11043
110442002-10-24 Paul Eggert <eggert@twinsun.com>
11045
11046 Version 1.75a.
11047
11048 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11049 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11050 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11051 Don't assume strdup exists; POSIX says its an XSI extension.
11052 Check for buffer overflow on input.
11053
110542002-10-24 Akim Demaille <akim@epita.fr>
11055
11056 * src/output.c (output_skeleton): Don't disable M4sugar comments
11057 too soon: it results in comments being expanded.
11058 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11059 first output.
11060
110612002-10-24 Akim Demaille <akim@epita.fr>
11062
11063 * data/yacc.c (m4_int_type): New.
11064 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11065 char' as only yacc.c wants K&R portability.
11066 * data/glr.c (yysigned_char): Remove.
11067 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11068 Reported by Quoc Peyrot.
11069
110702002-10-23 Paul Eggert <eggert@twinsun.com>
11071
11072 * src/main.c (main): With --trace=time, report times even if a
11073 non-fatal error occurs. Formerly, the times were reported in some
11074 such cases but not in others.
11075 * src/reader.c (reader): Just return if a complaint has been issued,
11076 instead of exiting, so that 'main' can report times.
11077
110782002-10-22 Akim Demaille <akim@epita.fr>
11079
11080 * src/system.h: Include sys/types.
11081 Reported by Bert Deknuydt.
11082
110832002-10-23 Paul Eggert <eggert@twinsun.com>
11084
11085 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11086 Suggested by Art Haas.
11087
110882002-10-22 Paul Eggert <eggert@twinsun.com>
11089
11090 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11091 decl; not needed any more.
11092 * src/main.c (main): Use return to exit, undoing yesterday's change.
11093 The last OS that we could find where this wouldn't work is
11094 SunOS 3.5, and that's too old to worry about now.
11095
11096 * data/glr.c (struct yyltype): Define members even when not
11097 doing locations. This is more consistent with yacc.c, and it
11098 works around the following bug reports:
11099 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11100 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
11101
11102 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11103 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11104 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11105
111062002-10-22 Akim Demaille <akim@epita.fr>
11107
11108 * data/README: New.
11109
111102002-10-21 Paul Eggert <eggert@twinsun.com>
11111
11112 Be consistent about 'bool'; the old code used an enum in one
11113 module and an int in another, and this violates the C standard.
11114 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11115 * configure.ac (AC_HEADER_STDBOOL): Add.
11116 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11117 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11118 * src/symtab.c (hash_compare_symbol_t): Likewise.
11119 * src/system.h (bool, false, true): Use a definition consistent
11120 with ../lib/hash.c. All uses changed.
11121
11122 * src/complain.c (warning_issued): Renamed from warn_message_count,
11123 so that we needn't worry about integer overflow (!).
11124 Now of type bool. All uses changed.
11125 (complaint_issued): Renamed from complain_message_count; likewise.
11126
11127 * src/main.c (main): Use exit to exit with failure.
11128
11129 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11130 rather than 1 and 0.
11131 * src/main.c (main): Likewise.
11132 * src/getargs.c (getargs): Likewise.
11133 * src/reader.c (reader): Likewise.
11134
11135 * src/getarg.c (getargs): Remove duplicate code for
11136 "Try `bison --help'".
11137
11138 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11139 What was that "2" for?
11140
11141 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11142 * src/getargs.c (usage): Likewise.
11143
11144 * src/getargs.c (getargs): When there are too few operands, report
11145 the last one. When there are too many, report the first extra
11146 one. This is how diffutils does it.
11147
111482002-10-20 Paul Eggert <eggert@twinsun.com>
11149
11150 Remove K&R vestiges.
11151 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11152 * src/complain.c (VA_START): Remove. Assume prototypes.
11153 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11154 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11155 fatal): Assume prototypes.
11156 * src/complain.h: Assume prototypes.
11157 * src/system.h (PARAMS): Remove.
11158 Include <limits.h> unconditionally, since it's guaranteeed even
11159 for a freestanding C89 compiler.
11160 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11161 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11162
111632002-10-20 Akim Demaille <akim@epita.fr>
11164
11165 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11166 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11167 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11168 (yyresolveStates, yyresolveAction, yyresolveStack)
11169 (yyprocessOneStack): Use them.
11170 (yy_reduce_print): New.
11171 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11172
111732002-10-20 Akim Demaille <akim@epita.fr>
11174
11175 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11176 arguments and output `void'.
11177 (b4_c_function): Rename as...
11178 (b4_c_function_def): this.
11179 (b4_c_function_decl, b4_c_ansi_function_def)
11180 (b4_c_ansi_function_decl): New.
11181 Change the interpretation of the arguments: before `int, foo', now
11182 `int foo, foo'.
11183 * data/yacc.c (yyparse): Prototype and define thanks to these.
11184 Adjust b4_c_function_def uses.
11185 * data/glr.c (yyparse): Likewise, but ANSI only.
11186
111872002-10-20 Akim Demaille <akim@epita.fr>
11188
11189 * src/output.c (prepare): Move the definition of `tokens_number',
11190 `nterms_number', `undef_token_number', `user_token_number_max'
11191 to...
11192 (prepare_tokens): Here.
11193 (prepare_tokens): Rename as...
11194 (prepare_symbols): this.
11195 (prepare): Move the definition of `rules_number' to...
11196 (prepare_rules): here.
11197 (prepare): Move the definition of `last', `final_state_number',
11198 `states_number' to...
11199 (prepare_states): here.
11200 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11201
112022002-10-20 Akim Demaille <akim@epita.fr>
11203
11204 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11205
112062002-10-20 Akim Demaille <akim@epita.fr>
11207
11208 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11209 * data/c.m4: here.
11210
112112002-10-20 Akim Demaille <akim@epita.fr>
11212
11213 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11214 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11215 `pair'.
11216 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11217 `name' to...
11218 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11219 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11220 These.
11221
112222002-10-19 Paul Eggert <eggert@twinsun.com>
11223
11224 Do not create a temporary file, as that involves security and
11225 cleanup headaches. Instead, use a pair of pipes.
11226 Derived from a suggestion by Florian Krohm.
11227 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11228 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11229 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11230 (BISON_PREREQ_SUBPIPE): Add.
11231 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11232 Add subpipe.h, subpipe.c.
11233 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11234 * po/POTFILES.in: Add lib/subpipe.c.
11235 * src/output.c: Include "subpipe.h".
11236 (m4_invoke): Remove decl.
11237 (scan_skel): New decl.
11238 (output_skeleton): Use pipe rather than temporary file for m4 input.
11239 Check that m4sugar.m4 is readable, to avoid deadlock.
11240 Check for pipe I/O error.
11241 * src/scan-skel.l (readpipe): Remove decl.
11242 (scan_skel): New function, to be used in place of m4_invoke.
11243 Read from stream rather than file.
11244
11245 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11246 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11247 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11248 this generates a more-accurate value anyway.
11249
11250 * lib/timevar.c (timervar_accumulate): Rename locals to
11251 avoid confusion with similarly-named more-global.
11252 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11253
11254 * src/output.c (prepare): Use xstrdup to convert char const *
11255 to char *, to avoid GCC warning.
11256
112572002-10-19 Akim Demaille <akim@epita.fr>
11258
11259 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11260 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11261 Use them to have `calc.y' ready for %pure-parser.
11262 * data/yacc.c (YYLEX): Pass a yylex return type to
11263 b4_c_function_call.
11264
112652002-10-19 Akim Demaille <akim@epita.fr>
11266
11267 Prototype support of %lex-param and %parse-param.
11268
11269 * src/parse-gram.y: Add the definition of the %lex-param and
11270 %parse-param tokens, plus their rules.
11271 Drop the `_' version of %glr-parser.
11272 Add the "," token.
11273 * src/scan-gram.l (INITIAL): Scan them.
11274 * src/muscle_tab.c: Comment changes.
11275 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11276 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11277 (muscle_entry_s): The `value' member is no longer const.
11278 Adjust all dependencies.
11279 * src/muscle_tab.c (muscle_init): Adjust: use
11280 MUSCLE_INSERT_STRING.
11281 Initialize the obstack earlier.
11282 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11283 (muscle_pair_list_grow): New.
11284 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11285 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11286 * tests/calc.at: Use %locations, not --locations.
11287 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11288
112892002-10-19 Akim Demaille <akim@epita.fr>
11290
11291 * src/getargs.c (usage): Take status as argument and exit
11292 accordingly.
11293 Report the traditional `Try ... --help' message when status != 0.
11294 (usage, version): Don't take a FILE * as arg, it is pointless.
11295 (getargs): When there is an incorrect number of arguments, make it
11296 an error, and report it GNUlically thanks to `usage ()'.
11297
112982002-10-18 Paul Eggert <eggert@twinsun.com>
11299
11300 * data/glr.c (yyreportParseError): Don't assume that sprintf
11301 yields the length of the printed string, as this is not true
11302 on SunOS 4.1.4. Reported by Peter Klein.
11303
11304 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11305 * tests/conflicts.at (%nonassoc and eof): Likewise.
11306 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11307
113082002-10-17 Akim Demaille <akim@epita.fr>
11309
11310 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11311 * src/getargs.c (trace_types, trace_args): Adjust.
11312 * src/reader.c (grammar_current_rule_prec_set)
11313 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11314 Standardize error messages.
11315 And s/@prec/%prec/!
11316 (reader): Use trace_flag to enable scanner/parser debugging,
11317 instead of an adhoc scheme.
11318 * src/scan-gram.l: Remove trailing debugging code.
11319
113202002-10-16 Paul Eggert <eggert@twinsun.com>
11321
11322 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11323 MUSCLE_TAB_H.
11324
11325 * NEWS: Officially drop support for building Bison with K&R C,
11326 since it didn't work anyway and it's not worth worrying about.
11327 * Makefile.maint (wget_files): Remove ansi2knr.c.
11328 (ansi2knr.c-url_prefix): Remove.
11329 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11330 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11331 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11332
113332002-10-15 Paul Eggert <eggert@twinsun.com>
11334
11335 Stop using the "enum_" trick for K&R-style function definitions;
11336 it confused me, and I was the author! Instead, assume that people
11337 who want to use K&R C compilers (when using these modules in GCC,
11338 perhaps?) will run ansi2knr.
11339
11340 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11341 All uses of "enum_" changed to "enum ".
11342 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11343 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11344
11345 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11346 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11347 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11348 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11349 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11350 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11351 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11352 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11353 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11354 Use function prototypes; this removes the need for declaring
11355 static functions simply to provide their prototypes.
11356 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11357 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11358 bitset_count_, bitset_create, bitset_dump, bitset_first,
11359 bitset_free, bitset_init, bitset_last, bitset_next,
11360 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11361 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11362 bitset_print, bitset_release_memory, bitset_toggle_,
11363 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11364 debug_bitset): Likewise.
11365 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11366 * lib/bitset_stats.c (bitset_log_histogram_print,
11367 bitset_percent_histogram_print, bitset_stats_and,
11368 bitset_stats_and_cmp, bitset_stats_and_or,
11369 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11370 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11371 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11372 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11373 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11374 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11375 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11376 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11377 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11378 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11379 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11380 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11381 bitset_stats_zero): Likewise.
11382 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11383 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11384 bitsetv_dump, debug_bitsetv): Likewise.
11385 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11386 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11387 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11388 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11389 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11390 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11391 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11392 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11393 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11394 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11395 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11396 Likewise.
11397 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11398 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11399 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11400 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11401 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11402 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11403 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11404 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11405 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11406 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11407 lbitset_xor_cmp, lbitset_zero): Likewise.
11408
114092002-10-14 Akim Demaille <akim@epita.fr>
11410
11411 Version 1.75.
11412
114132002-10-14 Akim Demaille <akim@epita.fr>
11414
11415 * tests/Makefile.am (maintainer-check-posix): New.
11416
114172002-10-14 Akim Demaille <akim@epita.fr>
11418
11419 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11420 member.
11421
114222002-10-14 Akim Demaille <akim@epita.fr>
11423
11424 * src/tables.c (table_ninf_remap): base -> tab.
11425 Reported by Matt Rosing.
11426
114272002-10-14 Paul Eggert <eggert@twinsun.com>
11428
11429 * tests/action.at, tests/calc.at, tests/conflicts.at,
11430 tests/cxx-type.at, tests/headers.at, tests/input.at,
11431 tests/regression.at, tests/synclines.at, tests/torture.at:
11432 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11433 so that the tests still work even if POSIXLY_CORRECT is set.
11434 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11435
11436 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11437 for portability to K&R hosts. Fix typo: signed char is guaranteed
11438 only to 127, not to 128.
11439 * data/glr.c (yysigned_char): New type.
11440 * data/yacc.c (yysigned_char): Likewise.
11441 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11442
114432002-10-13 Paul Eggert <eggert@twinsun.com>
11444
11445 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11446 true due to limited range of data type" warning from GCC.
11447
11448 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11449 by wrapping enum yytokentype's definition inside #ifndef
11450 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11451
114522002-10-13 Akim Demaille <akim@epita.fr>
11453
11454 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11455 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11456
114572002-10-13 Akim Demaille <akim@epita.fr>
11458
11459 * Makefile.maint: Update from Autoconf 2.54.
11460 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11461
114622002-10-13 Akim Demaille <akim@epita.fr>
11463
11464 * src/print.c (print_state): Separate the list of solved conflicts
11465 from the other items.
11466 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11467
114682002-10-13 Akim Demaille <akim@epita.fr>
11469
11470 Let nondeterministic skeletons be usable with deterministic
11471 tables.
11472
11473 With the patch, GAWK compiled by GCC without -O2 passes its test
11474 suite using a GLR parser driven by LALR tables. It fails with -O2
11475 because `struct stat' gives two different answers on my machine:
11476 88 (definition of an auto var) and later 96 (memset on this var).
11477 Hence the stack is badly corrumpted. The headers inclusion is to
11478 blame: if I move the awk.h inclusion before GLR's system header
11479 inclusion, the two struct stat have the same size.
11480
11481 * src/tables.c (pack_table): Always create conflict_table.
11482 (token_actions): Always create conflict_list.
11483 * data/glr.c (YYFLAG): Remove, unused.
11484
114852002-10-13 Akim Demaille <akim@epita.fr>
11486
11487 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11488 (O0FLAGS): New.
11489 (VALGRIND, GXX): New.
11490 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11491 * tests/bison.in: Run $PREBISON a pre-command.
11492 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11493 (maintainer-check-g++): New.
11494 * Makefile.am (maintainer-check): New.
11495
114962002-10-13 Akim Demaille <akim@epita.fr>
11497
11498 * data/glr.c: Formatting changes.
11499 Tweak some trace messages to match yacc.c's.
11500
115012002-10-13 Akim Demaille <akim@epita.fr>
11502
11503 GLR parsers sometimes raise parse errors instead of performing the
11504 default reduction.
11505 Reported by Charles-Henry de Boysson.
11506
11507 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11508 check the length of the traces when %glr.
11509 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11510 GLR's traces.
11511 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11512 Test GLR parsers.
11513 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11514 (yyltype): Remove the yy prefix from the member names.
11515 (yytable): Complete its comment.
11516 (yygetLRActions): Map error action number from YYTABLE from
11517 YYTABLE_NINF to 0.
11518 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11519 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11520 not satisfying as we could compare an YYACTION computed from
11521 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11522 only value for error actions.
11523 (yyreportParseError): In verbose parse error messages, don't issue
11524 `error' in the list of expected tokens.
11525 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11526 next action to perform to match glr.c's decoding.
11527 (yytable): Complete its comment.
11528
115292002-10-13 Paul Eggert <eggert@twinsun.com>
11530
11531 Fix problem reported by Henrik Grubbstroem in
11532 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11533 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11534 because the Bison parser reads the second action before reducing
11535 the first one.
11536 * src/scan-gram.l (rule_length): New static var.
11537 Use it to keep track of the rule length in the scanner, since
11538 we can't expect the parser to be in lock-step sync with the scanner.
11539 (handle_action_dollar, handle_action_at): Use this var.
11540 * tests/actions.at (Exotic Dollars): Test for the problem.
11541
115422002-10-12 Paul Eggert <eggert@twinsun.com>
11543
11544 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11545 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11546 Include <sys/time.h> when checking for clock_t and struct tms.
11547 Use same include order as source.
11548 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11549 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11550
11551 * lib/timevar.c: Update copyright date and clarify comments.
11552 (get_time) [IN_GCC]: Keep the GCC version for reference.
11553
11554 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11555 GCC version as of today, then merge Bison's changes.
11556 Change "GCC" to "Bison" in copyright notice. timevar.def's
11557 author is Akim, so change that too.
11558
11559 * src/reader.c (grammar_current_rule_check):
11560 Don't worry about the default action if $$ is untyped.
11561 Prevents bogus warnings reported by Jim Gifford in
11562 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11563
11564 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11565 * data/glr.c, data/lalr1.cc, data/yacc.c:
11566 Output token definitions before the first part of user declarations.
11567 Fixes compatibility problem reported by Jim Gifford for kbd in
11568 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11569
115702002-10-11 Paul Eggert <eggert@twinsun.com>
11571
11572 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11573 (yyparse): here. This undoes some of the 2002-07-25 change.
11574 Compatibility problem reported by Ralf S. Engelschall with
11575 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11576
115772002-10-11 Akim Demaille <akim@epita.fr>
11578
11579 * tests/regression.at Characters Escapes): New.
11580 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11581 characters.
11582 Reported by Jan Nieuwenhuizen.
11583
115842002-10-11 Akim Demaille <akim@epita.fr>
11585
11586 * po/id.po: New.
11587
115882002-10-10 Paul Eggert <eggert@twinsun.com>
11589
11590 Portability fixes for bitsets; this also avoids several GCC
11591 warnings.
11592
11593 * lib/abitset.c: Include <stddef.h>, for offsetof.
11594 * lib/lbitset.c: Likewise.
11595
11596 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11597 properly for vectors of objects. Do not assume that adding a
11598 header size to a multiple of a word size yields a value that is
11599 properly aligned for the whole union.
11600 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11601
11602 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11603 unique names for structures.
11604 * lib/ebitset.c (ebitset_bytes): Likewise.
11605 * lib/lbitset.c (lbitset_bytes): Likewise.
11606
11607 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11608 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11609 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11610 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11611 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11612 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11613 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11614 to improve the type-checking that GCC can do.
11615 * lib/bitset.c (bitset_op4_cmp): Likewise.
11616 * lib/bitset_stats.c (bitset_stats_count,
11617 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11618 bitset_stats_copy, bitset_stats_disjoint_p,
11619 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11620 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11621 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11622 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11623 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11624 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11625 bitset_stats_or_and_cmp): Likewise.
11626 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11627 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11628 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11629 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11630
11631 * lib/abitset.h: Include bitset.h, not bbitset.h.
11632 * lib/ebitset.h: Likewise.
11633 * lib/lbitset.h: Likewise.
11634
11635 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11636 All instances of parameters of type enum bitset_opts are now of
11637 type enum_bitset_opts, to conform to the C Standard, and similarly
11638 for enum_bitset_type.
11639 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11640 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11641
11642 Do not use "struct bitset_struct" to mean different things in
11643 different modules. Not only is this confusing, it violates
11644 the C Standard, which requires that structure types in different
11645 modules must be compatible if one is to be passed to the other.
11646 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11647 All instances of "struct bitset_struct *" replaced with "bitset".
11648 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11649 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11650 struct lbitset_struct, struct bitset_stats_struct): New types.
11651 All uses of struct bitset_struct changed to union bitset_union,
11652 etc.
11653 * lib/abitset.c (struct abitset_struct, abitset,
11654 struct bitset_struct): Remove.
11655 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11656 struct bitset_struct): Remove.
11657 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11658 bitset_struct): Remove.
11659 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11660 Likewise.
11661
11662 Do not call a function of type T using a call that assumes the
11663 function is of a different type U. Standard C requires that a
11664 function must be called with a type that is compatible with its
11665 definition.
11666 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11667 New decls.
11668 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11669 New functions.
11670 * lib/ebitset.c (PFV): Remove.
11671 * lib/lbitset.c (PFV): Likewise.
11672 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11673 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11674 decls.
11675 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11676 (ebitset_vtable): Use them.
11677 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11678 lbitset_xor): New functions.
11679 (lbitset_vtable): Use them.
11680
11681 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11682 Declare.
11683
11684 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
11685 GCC warning.
11686 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
11687 Use offsetof, for simplicity.
11688
116892002-10-06 Paul Eggert <eggert@twinsun.com>
11690
11691 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
11692 the same width as int. This reapplies a hunk of the 2002-08-12 patch
11693 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
11694 which was inadvertently undone by the 2002-09-30 patch.
11695 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
11696 the same width as int.
11697
116982002-10-04 Paul Eggert <eggert@twinsun.com>
11699
11700 Version 1.50.
11701
11702 * configure.ac (AC_INIT), NEWS: Increment version number.
11703
11704 * doc/bison.texinfo: Minor spelling, grammar, and white space
11705 fixes.
11706 (Symbols): Mention that any negative value returned from yylex
11707 signifies end-of-input. Warn about negative chars. Mention
11708 the portable Standard C character set.
11709
11710 The GNU coding standard says CFLAGS and YFLAGS are reserved
11711 for the installer to set.
11712 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
11713 * src/Makefile.am (AM_CFLAGS): Likewise.
11714 (AM_YFLAGS): Renamed from YFLAGS.
11715
11716 Fix some MAX and MIN problems.
11717 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
11718 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
11719 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
11720 * src/reader.c (reader): Use it.
11721
11722 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
11723 POSIX 1003.1-2001 has removed fgrep.
11724
117252002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
11726
11727 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
11728 interpreted as signed.
11729 * lib/ebitset.c (ebitset_list): Fix bug.
11730
117312002-10-01 Paul Eggert <eggert@twinsun.com>
11732
11733 More fixes for 64-bit hosts and large bitsets.
11734
11735 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
11736 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
11737 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
11738 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
11739 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
11740 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
11741 bitset_count_): Likewise.
11742 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
11743 bitset_first, bitset_last): Likewise.
11744 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
11745 bitset_stats_list_reverse, bitset_stats_size,
11746 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
11747 Likewise.
11748 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11749 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11750 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11751 bitsetv_reflexive_transitive_closure): Likewise.
11752 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
11753 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
11754 Likewise.
11755 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
11756 Likewise.
11757
11758 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
11759 Use size_t, not unsigned int, to count bytes.
11760 * lib/abitset.h (abitset_bytes): Likewise.
11761 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
11762 Likewise.
11763 * lib/bitset.h (bitset_bytes): Likewise.
11764 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
11765 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
11766 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11767 * lib/ebitset.c (ebitset_bytes): Likewise.
11768 * lib/ebitset.h (ebitset_bytes): Likewise.
11769 * lib/lbitset.c (lbitset_bytes): Likewise.
11770 * lib/lbitset.h (lbitset_bytes): Likewise.
11771
11772 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
11773 abitset_subset_p, abitset_disjoint_p, abitset_and,
11774 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
11775 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
11776 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
11777 abitset_or_and, abitset_or_and_cmp):
11778 Use bitset_windex instead of unsigned int.
11779 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11780 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
11781 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
11782 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
11783 Likewise.
11784 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
11785
11786 * lib/bitset.c (bitset_print):
11787 Use proper printf formats for widths of integer types.
11788 * lib/bitset_stats.c (bitset_percent_histogram_print,
11789 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
11790 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11791 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11792 * lib/lbitset.c (lbitset_bytes): Likewise.
11793
11794 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
11795 BITSET_SIZE_MAX): New macros.
11796 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
11797 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
11798 to BITSET_WINDEX_MAX.
11799
11800 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
11801 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
11802 since we now return the bitset_bindex type (not int).
11803
11804 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
11805 when computing sizes.
11806 * lib/ebitset.c (ebitset_elts_grow): Likewise.
11807
11808 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
11809 and avoid cast to unsigned.
11810
118112002-09-30 Akim Demaille <akim@epita.fr>
11812
11813 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11814 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
11815 Updates from Michael Hayes.
11816
118172002-09-30 Art Haas <ahaas@neosoft.com>
11818
11819 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
11820 invocations.
11821 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
11822 defined.
11823
118242002-09-27 Akim Demaille <akim@epita.fr>
11825
11826 Version 1.49c.
11827
118282002-09-27 Akim Demaille <akim@epita.fr>
11829
11830 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
11831 (Because of AC_LIBSOURCE).
11832
118332002-09-27 Akim Demaille <akim@epita.fr>
11834
11835 Playing with Autoscan.
11836
11837 * configure.ac: Remove the old LIBOBJ tweaks.
11838 (AC_REPLACE_FUNCS): Add strrchr and strtol.
11839 * lib/strrchr.c: New.
11840 * lib/strtol.c: New, from the Coreutils 4.5.1.
11841
118422002-09-27 Akim Demaille <akim@epita.fr>
11843
11844 Playing with Autoscan.
11845
11846 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
11847 * lib/Makefile.am (libbison_a_SOURCES): No longer include
11848 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
11849 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
11850 Coreutils 4.5.1.
11851
118522002-09-24 Akim Demaille <akim@epita.fr>
11853
11854 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
11855 (Frequently Asked Questions, Parser Stack Overflow): New.
11856
118572002-09-13 Akim Demaille <akim@epita.fr>
11858
11859 Playing with autoscan.
11860
11861 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
11862 * src/files.c (skeleton_find): Remove, unused.
11863 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
11864 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
11865
118662002-09-13 Akim Demaille <akim@epita.fr>
11867
11868 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
11869 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
11870
118712002-09-13 Akim Demaille <akim@epita.fr>
11872
11873 * configure.ac: Require 2.54.
11874 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
11875 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
11876 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
11877 Remove, provided by Autoconf macros.
11878
118792002-09-12 Akim Demaille <akim@epita.fr>
11880
11881 * m4/prereq.m4: Update, from Coreutils 4.5.1.
11882
118832002-09-12 Akim Demaille <akim@epita.fr>
11884
11885 * m4/prereq.m4: Update, from Fileutils 4.1.5.
11886 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
11887 Reported by Martin Mokrejs.
11888
118892002-09-10 Akim Demaille <akim@epita.fr>
11890
11891 * src/parse-gram.y: Associate a human readable string to each
11892 token type.
11893 * tests/regression.at (Invalid inputs): Adjust.
11894
118952002-09-10 Gary V. Vaughan <gary@gnu.org>
11896
11897 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
11898 with an Autoconf-2.5x style configure.ac.
11899
119002002-09-06 Paul Eggert <eggert@twinsun.com>
11901
11902 * doc/bison.texinfo (Conditions): Make explicit that the GPL
11903 exception applies only to yacc.c. This is a modification of a
11904 patch originally suggested by Akim Demaille.
11905
119062002-09-06 Akim Demaille <akim@epita.fr>
11907
11908 * data/c.m4 (b4_copyright): Move the GPL exception comment from
11909 here to...
11910 * data/yacc.c: here.
11911
11912 * data/lalr1.cc (struct yyltype): Don't define it, since we use
11913 LocationType.
11914 (b4_ltype): Default to yy::Location from location.hh.
11915
119162002-09-04 Jim Meyering <jim@meyering.net>
11917
11918 * data/yacc.c: Guard the declaration of yytoknum also with
11919 `#ifdef YYPRINT', so it is declared only when used.
11920
119212002-09-04 Akim Demaille <akim@epita.fr>
11922
11923 * configure.in: Rename as...
11924 * configure.ac: this.
11925 Bump to 1.49c.
11926
119272002-09-04 Akim Demaille <akim@epita.fr>
11928
11929 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
11930 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
11931 translate maintainer only messages.
11932
119332002-08-12 Paul Eggert <eggert@twinsun.com>
11934
11935 Version 1.49b.
11936
11937 * Makefile.am (SUBDIRS): Remove intl.
11938 (DISTCLEANFILES): Remove.
11939 * NEWS: Mention that GNU M4 is now required. Clarify what is
11940 meant by "larger grammars". Mention the pt_BR translation.
11941 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
11942 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
11943 Bump version from 0.11.2 to 0.11.5.
11944 (BISON_PREREQ_STAGE): Remove.
11945 (AM_GNU_GETTEXT): Use external gettext.
11946 (AC_OUTPUT): Remove intl/Makefile.
11947
11948 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
11949
11950 * data/glr.c: Include string.h, for strlen.
11951 (yyreportParseError): Use size_t for yysize.
11952 (yy_yypstack): No longer nested inside yypstates, as nested
11953 functions are not portable. Do not assume size_t is the
11954 same width as int.
11955 (yypstates): Do not assume that ptrdiff_t is the same width
11956 as int, and similarly for yyposn and YYINDEX.
11957
11958 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
11959
11960 * lib/Makefile.am (INCLUDES): Do not include from the intl
11961 directory, which has been removed.
11962 * src/Makefile.am (INCLUDES): Likewise.
11963
11964 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
11965 (bitsets_sources, additional_bitsets_sources, timevars_sources):
11966 New vars.
11967
11968 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
11969 * tests/Makefile.am (EXTRA_DIST): Likewise.
11970
11971 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
11972 Do not assume that bitset_windex is the same width as unsigned.
11973
11974 * lib/abitset.c (abitset_unused_clear): Do not assume that
11975 bitset_word is the same width as int.
11976 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
11977 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
11978 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
11979 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
11980 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
11981
11982 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
11983 portability to one's complement hosts!).
11984 * lib/ebitset.c (ebitset_op1): Likewise.
11985 * lib/lbitset.c (lbitset_op1): Likewise.
11986
11987 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
11988 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11989 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
11990 Sync with fileutils.
11991 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
11992 lib/gettext.h: Sync with diffutils.
11993
11994 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
11995 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
11996
11997 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
11998 PROTOTYPES to check for prototypes, and "defined __STDC__" to
11999 check for void *.
12000
12001 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12002 size_t; the old version tried to do this but casted improperly.
12003 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12004 (bitset_test): Now returns int, not unsigned long.
12005
12006 * lib/bitset_stats.c: Include "gettext.h".
12007 (_): New macro.
12008 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12009 name locals "index", as it generates unnecessary warnings on some
12010 hosts that have an "index" function.
12011
12012 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12013 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12014 they need translation.
12015 * src/LR0.c (state_list_append, new_itemsets, get_state,
12016 append_states, generate_states): Likewise.
12017 * src/assoc.c (assoc_to_string): Likewise.
12018 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12019 * src/gram.c (grammar_dump): Likewise.
12020 * src/injections.c (injections_compute): Likewise.
12021 * src/lalr.c (lookaheads_print): Likewise.
12022 * src/relation.c (relation_transpose): Likewise.
12023 * src/scan-gram.l: Likewise.
12024 * src/tables.c (table_grow, pack_vector): Likewise.
12025
12026 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12027 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12028 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12029 * m4/mbstate_t.m4: Sync with fileutils.
12030 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12031
12032 * po/LINGUAS: Add pt_BR.
12033 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12034 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12035 lib/timevar.c.
12036 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12037 manual recommends.
12038 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12039
12040 * src/complain.c (strerror_r): Remove decl; not needed.
12041 (strerror): Use same pattern as ../lib/error.c.
12042
12043 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12044
12045 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12046
12047 * src/main.c (main): Cast result of bindtextdomain and textdomain
12048 to void, to avoid a GCC warning when --disable-nls is in effect.
12049
12050 * src/scan-gram.l: Use strings rather than escapes when possible,
12051 to minimize the number of warnings from xgettext.
12052 (handle_action_dollar, handle_action_at): Don't use isdigit,
12053 as it mishandles negative chars and it may not work as expected
12054 outside the C locale.
12055
12056 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12057 this is a GCC extension and is not portable to other compilers.
12058
12059 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12060 Do not include <ctype.h>; no longer needed.
12061 Do not include <malloc.h>; no longer needed (and generates
12062 warnings on OpenBSD 3.0).
12063
12064 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12065 it's not portable.
12066
12067 * tests/regression.at: Do not use 'cc -c input.c -o input';
12068 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12069
12070 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12071 exit status as failure, not just exit status 1. Sun C exits
12072 with status 2 sometimes.
12073
12074 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12075 Use it for the two large tests.
12076
120772002-08-02 Akim Demaille <akim@epita.fr>
12078
12079 * src/conflicts.c (conflicts_output): Don't output rules never
12080 reduced here, since anyway that computation doesn't work.
12081 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12082 (rule_useless_p, rule_never_reduced_p): New.
12083 (grammar_rules_partial_print): Use a filter instead of a range.
12084 Display the title only if needed.
12085 (grammar_rules_print): Adjust.
12086 (grammar_rules_never_reduced_report): New.
12087 * src/tables.c (action_row): Move the computation of rules never
12088 reduced to...
12089 (token_actions): here.
12090 * src/main.c (main): Make the parser before making the report, so
12091 that rules never reduced are computed.
12092 Call grammar_rules_never_reduced_report.
12093 * src/print.c (print_results): Report rules never reduced.
12094 * tests/conflicts.at, tests/reduce.at: Adjust.
12095
120962002-08-01 Akim Demaille <akim@epita.fr>
12097
12098 Instead of attaching lookaheads and duplicating the rules being
12099 reduced by a state, attach the lookaheads to the reductions.
12100
12101 * src/state.h (state_t): Remove the `lookaheads',
12102 `lookaheads_rule' member.
12103 (reductions_t): Add a `lookaheads' member.
12104 Use a regular array for the `rules'.
12105 * src/state.c (reductions_new): Initialize the lookaheads member
12106 to 0.
12107 (state_rule_lookaheads_print): Adjust.
12108 * src/state.h, src/state.c (state_reductions_find): New.
12109 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12110 (count_rr_conflicts): Adjust.
12111 * src/lalr.c (LArule): Remove.
12112 (add_lookback_edge): Adjust.
12113 (state_lookaheads_count): New.
12114 (states_lookaheads_initialize): Merge into...
12115 (initialize_LA): this.
12116 (lalr_free): Adjust.
12117 * src/main.c (main): Don't free nullable and derives too early: it
12118 is used by --verbose.
12119 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12120
121212002-08-01 Akim Demaille <akim@epita.fr>
12122
12123 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12124 `rule_number_t**'.
12125 (set_derives, free_derives): Rename as...
12126 (derives_compute, derives_free): this.
12127 Adjust all dependencies.
12128 * src/nullable.c (set_nullable, free_nullable): Rename as...
12129 (nullable_compute, nullable_free): these.
12130 (rule_list_t): Store rule_t *, not rule_number_t.
12131 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12132 pointers, instead of their numbers.
12133 * src/main.c (main): Call nullable_free, and derives_free earlier,
12134 as they were lo longer used.
12135
121362002-08-01 Akim Demaille <akim@epita.fr>
12137
12138 * lib/timevar.c (get_time): Include children time.
12139 * src/lalr.h (LA, LArule): Don't export them: used with the
12140 state_t.
12141 * src/lalr.c (LA, LArule): Static.
12142 * src/lalr.h, src/lalr.c (lalr_free): New.
12143 * src/main.c (main): Call it.
12144 * src/tables.c (pack_vector): Check whether loc is >= to the
12145 table_size, not >.
12146 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12147 (tables_generate): do it, since that's also it which allocates
12148 them.
12149 Don't free LA and LArule, main does.
12150
121512002-07-31 Akim Demaille <akim@epita.fr>
12152
12153 Separate parser tables computation and output.
12154
12155 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12156 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12157 (yydefgoto, yydefact, high): Move to...
12158 * src/tables.h, src/tables.c: here.
12159 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12160 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12161 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12162 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12163 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12164 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12165 (action_row, save_row, token_actions, save_column, default_goto)
12166 (goto_actions, sort_actions, matching_state, pack_vector)
12167 (table_ninf_remap, pack_table, prepare_actions): Move to...
12168 * src/tables.c: here.
12169 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12170 * src/output.c (token_actions, output_base, output_conflicts)
12171 (output_check): Merge into...
12172 (prepare_actions): this.
12173 (actions_output): Rename as...
12174 (user_actions_output): this.
12175 * src/main.c (main): Call tables_generate and tables_free.
12176
121772002-07-31 Akim Demaille <akim@epita.fr>
12178
12179 Steal GCC's --time-report support.
12180
12181 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12182 stolen/adjusted from GCC.
12183 * m4/stage.m4: Remove time related checks.
12184 * m4/timevar.m4: New.
12185 * configure.in: Adjust.
12186 * src/system.h: Adjust to using timevar.h.
12187 * src/getargs.h, src/getargs.c: Support trace_time for
12188 --trace=time.
12189 * src/main.c (stage): Remove.
12190 (main): Replace `stage' invocations with timevar calls.
12191 * src/output.c: Insert pertinent timevar calls.
12192
121932002-07-31 Akim Demaille <akim@epita.fr>
12194
12195 Let --trace have arguments.
12196
12197 * src/getargs.h (enum trace_e): New.
12198 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12199 (long_options, short_options): --trace/-T takes an optional
12200 argument.
12201 Change all the uses of trace_flag to reflect the new flags.
12202 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12203
12204 Strengthen `stage' portability.
12205
12206 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12207 * configure.in: Use it.
12208 Don't check for malloc.h and sys/times.h.
12209 * src/system.h: Include them when appropriate.
12210 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12211 times and struct tms are available.
12212
122132002-07-30 Akim Demaille <akim@epita.fr>
12214
12215 In verbose parse error message, don't report `error' as an
12216 expected token.
12217 * tests/actions.at (Printers and Destructors): Adjust.
12218 * tests/calc.at (Calculator $1): Adjust.
12219 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12220 error message, do not report the parser accepts the error token in
12221 that state.
12222
122232002-07-30 Akim Demaille <akim@epita.fr>
12224
12225 Normalize conflict related messages.
12226
12227 * src/complain.h, src/complain.c (warn, complain): New.
12228 * src/conflicts.c (conflicts_print): Use them.
12229 (conflict_report_yacc): New, extracted from...
12230 (conflicts_print): here.
12231 * tests/conflicts.at, tests/existing.at: Adjust.
12232
122332002-07-30 Akim Demaille <akim@epita.fr>
12234
12235 Report rules which are never reduced by the parser: those hidden
12236 by conflicts.
12237
12238 * src/LR0.c (save_reductions): Don't make the final state too
12239 different: save its reduction (accept) instead of having a state
12240 without any action (no shift or goto, no reduce).
12241 Note: the final state is now a ``regular'' state, i.e., the
12242 parsers now contain `reduce 0' as default reduction.
12243 Nevertheless, since they decide to `accept' when yystate =
12244 final_state, they still will not reduce rule 0.
12245 * src/print.c (print_actions, print_reduction): Adjust.
12246 * src/output.c (action_row): Track reduced rules.
12247 (token_actions): Report rules never reduced.
12248 * tests/conflicts.at, tests/regression.at: Adjust.
12249
122502002-07-30 Akim Demaille <akim@epita.fr>
12251
12252 `stage' was accidently included in a previous patch.
12253 Initiate its autoconfiscation.
12254
12255 * configure.in: Look for malloc.h and sys/times.h.
12256 * src/main.c (stage): Adjust.
12257 Report only when trace_flag.
12258
122592002-07-29 Akim Demaille <akim@epita.fr>
12260
12261 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12262 state_number_t.
12263 (errs_t): symbol_t*, not symbol_number_t.
12264 (reductions_t): rule_t*, not rule_number_t.
12265 (FOR_EACH_SHIFT): New.
12266 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12267 * src/print.c, src/print_graph.c: Adjust.
12268
122692002-07-29 Akim Demaille <akim@epita.fr>
12270
12271 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12272
12273 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12274 (endtoken, accept): these.
12275 * src/reader.c (reader): Set endtoken's default tag to "$end".
12276 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12277 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12278 Adjust.
12279
122802002-07-29 Akim Demaille <akim@epita.fr>
12281
12282 * src/reduce.c (reduce_grammar): When the language is empty,
12283 complain about the start symbol, not the axiom.
12284 Use its location.
12285 * tests/reduce.at (Empty Language): New.
12286
122872002-07-26 Akim Demaille <akim@epita.fr>
12288
12289 * src/reader.h, src/reader.c (gram_error): ... can't get
12290 yycontrol without making too strong assumptions on the parser
12291 itself.
12292 * src/output.c (prepare_tokens): Use the real 0th value of
12293 token_translations instead of `0'.
12294 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12295 visible here.
12296 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12297 for the time being: %locations ought to provide it to yyerror.
12298
122992002-07-25 Akim Demaille <akim@epita.fr>
12300
12301 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12302 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12303 * tests/regression.at (Web2c Actions): Adjust.
12304
123052002-07-25 Akim Demaille <akim@epita.fr>
12306
12307 Stop storing rules from 1 to nrules + 1.
12308
12309 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12310 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12311 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12312 Iterate from 0 to nrules.
12313 Use rule_number_as_item_number and item_number_as_rule_number.
12314 Adjust to `derive' now containing possibly 0.
12315 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12316 Handle the `- 1' part in rule numbers from/to item numbers.
12317 * src/conflicts.c (log_resolution): Fix the message which reversed
12318 shift and reduce.
12319 * src/output.c (action_row): Initialize default_rule to -1.
12320 (token_actions): Adjust.
12321 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12322 expected output.
12323 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12324
123252002-07-25 Akim Demaille <akim@epita.fr>
12326
12327 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12328 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12329 (b4_c_knr_arg_decl): New.
12330 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12331 yyreport_parse_error.
12332
123332002-07-25 Akim Demaille <akim@epita.fr>
12334
12335 * data/yacc.c (yyreport_parse_error): New, extracted from...
12336 (yyparse): here.
12337 (yydestruct, yysymprint): Move above yyparse.
12338 Be K&R compliant.
12339
123402002-07-25 Akim Demaille <akim@epita.fr>
12341
12342 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12343 replace...
12344 (b4_sint_type, b4_uint_type): these.
12345 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12346 * tests/regression.at (Web2c Actions): Adjust.
12347
123482002-07-25 Akim Demaille <akim@epita.fr>
12349
12350 * src/gram.h (TIEM_NUMBER_MAX): New.
12351 (item_number_of_rule_number, rule_number_of_item_number): Rename
12352 as...
12353 (rule_number_as_item_number, item_number_as_rule_number): these.
12354 Adjust dependencies.
12355 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12356 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12357 (symbol_number_to_vector_number): New.
12358 (order): Of vector_number_t* type.
12359 (base_t, BASE_MAX, BASE_MIN): New.
12360 (froms, tos, width, pos, check): Of base_t type.
12361 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12362 (actrow): Of action_number_t type.
12363 (conflrow): Of unsigned int type.
12364 (table_ninf, base_ninf): New.
12365 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12366 (muscle_insert_int_table, muscle_insert_base_table)
12367 (muscle_insert_rule_number_table): New.
12368 (prepare_tokens): Output `toknum' as int_table.
12369 (action_row): Returns a rule_number_t.
12370 Use ACTION_MIN, not SHRT_MIN.
12371 (token_actions): yydefact is rule_number_t*.
12372 (table_ninf_remap): New.
12373 (pack_table): Use it for `base' and `table'.
12374 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12375 replaced with...
12376 (YYPACT_NINF, YYTABLE_NINF): these.
12377 (yypact, yytable): Compute their types instead of hard-coded
12378 `short'.
12379 * tests/regression.at (Web2c Actions): Adjust.
12380
123812002-07-19 Akim Demaille <akim@epita.fr>
12382
12383 * src/scan-gram.l (id): Can start with an underscore.
12384
123852002-07-16 Akim Demaille <akim@epita.fr>
12386
12387 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12388 Adjust all former `associativity' dependencies.
12389 * src/symtab.c (symbol_new): Default associativity is `undef', not
12390 `right'.
12391 (symbol_check_alias_consistence): Adjust.
12392
123932002-07-09 Akim Demaille <akim@epita.fr>
12394
12395 * doc/bison.texinfo: Properly set the ``header'' part.
12396 Use @dircategory ``GNU programming tools'' as per Texinfo's
12397 documentation.
12398 Use @copying.
12399
124002002-07-09 Akim Demaille <akim@epita.fr>
12401
12402 * lib/quotearg.h: Protect against multiple inclusions.
12403 * src/location.h (location_t): Add a `file' member.
12404 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12405 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12406 `error_one_per_line' support.
12407
124082002-07-09 Akim Demaille <akim@epita.fr>
12409
12410 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12411 * src/reader.c (lineno): Remove.
12412 Adjust all dependencies.
12413 (get_merge_function): Take a location and use complain_at.
12414 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12415 * tests/regression.at (Invalid inputs, Mixing %token styles):
12416 Adjust.
12417
124182002-07-09 Akim Demaille <akim@epita.fr>
12419
12420 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12421 recovery rule, and forbid extensions when --yacc.
12422 (gram_error): Use complain_at.
12423 * src/reader.c (reader): Exit if there were parse errors.
12424
124252002-07-09 Akim Demaille <akim@epita.fr>
12426
12427 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12428 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12429 Reported by R Blake <blakers@mac.com>.
12430
124312002-07-09 Akim Demaille <akim@epita.fr>
12432
12433 * data/yacc.c: Output the copyright notive in the header.
12434
124352002-07-03 Akim Demaille <akim@epita.fr>
12436
12437 * src/output.c (froms, tos): Are state_number_t.
12438 (save_column): sp, sp1, and sp2 are state_number_t.
12439 (prepare): Rename `final' as `final_state_number', `nnts' as
12440 `nterms_number', `nrules' as `rules_number', `nstates' as
12441 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12442 unused.
12443 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12444 * data/lalr1.cc (nsym_): Remove, unused.
12445
124462002-07-03 Akim Demaille <akim@epita.fr>
12447
12448 * src/lalr.h, src/lalr.c (goto_number_t): New.
12449 * src/lalr.c (goto_list_t): New.
12450 Propagate them.
12451 * src/nullable.c (rule_list_t): New.
12452 Propagate.
12453 * src/types.h: Remove.
12454
124552002-07-03 Akim Demaille <akim@epita.fr>
12456
12457 * src/closure.c (print_fderives): Use rule_rhs_print.
12458 * src/derives.c (print_derives): Use rule_rhs_print.
12459 (rule_list_t): New, replaces `shorts'.
12460 (set_derives): Add comments.
12461 * tests/sets.at (Nullable, Firsts): Adjust.
12462
124632002-07-03 Akim Demaille <akim@epita.fr>
12464
12465 * src/output.c (prepare_actions): Free `tally' and `width'.
12466 (prepare_actions): Allocate and free `order'.
12467 * src/symtab.c (symbols_free): Free `symbols'.
12468 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12469 * src/output.c (m4_invoke): Move to...
12470 * src/scan-skel.l: here.
12471 (<<EOF>>): Close yyout, and free its name.
12472
124732002-07-03 Akim Demaille <akim@epita.fr>
12474
12475 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12476
12477 * src/LR0.c (new_state): Merge into...
12478 (state_list_append): this.
12479 (new_states): Merge into...
12480 (generate_states): here.
12481 (set_states): Don't ensure a proper `errs' state member here, do it...
12482 * src/conflicts.c (conflicts_solve): here.
12483 * src/state.h, src/state.c: Comment changes.
12484 (state_t): Rename member `shifts' as `transitions'.
12485 Adjust all dependencies.
12486 (errs_new): For consistency, also take the values as argument.
12487 (errs_dup): Remove.
12488 (state_errs_set): New.
12489 (state_reductions_set, state_transitions_set): Assert that no
12490 previous value was assigned.
12491 (state_free): New.
12492 (states_free): Use it.
12493 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12494 temporary storage: use `errs' and `nerrs' as elsewhere.
12495 (set_conflicts): Allocate and free this `errs'.
12496
124972002-07-02 Akim Demaille <akim@epita.fr>
12498
12499 * lib/libiberty.h: New.
12500 * lib: Update the bitset implementation from upstream.
12501 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12502 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12503 * src/main.c: Adjust bitset stats calls.
12504
125052002-07-01 Paul Eggert <eggert@twinsun.com>
12506
12507 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12508 char, so that negative chars don't collide with $.
12509
125102002-06-30 Akim Demaille <akim@epita.fr>
12511
12512 Have the GLR tests be `warning' checked, and fix the warnings.
12513
12514 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12515 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12516 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12517 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12518 (yyaddDeferredAction): static.
12519 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12520 (yyreportParseError): yyprefix is const.
12521 yytokenp is used only when verbose.
12522 (yy__GNUC__): Replace with __GNUC__.
12523 (yypdumpstack): yyi is size_t.
12524 (yypreference): Un-yy local variables and arguments, to avoid
12525 clashes with `yyr1'. Anyway, we are not in the user name space.
12526 (yytname_size): be an int, as is compared with ints.
12527 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12528 Use them.
12529 * tests/cxx-gram.at: Use quotation to protect $1.
12530 Use AT_COMPILE to enable warnings hunts.
12531 Prototype yylex and yyerror.
12532 `Use' argc.
12533 Include `string.h', not `strings.h'.
12534 Produce and prototype stmtMerge only when used.
12535 yylex takes a location.
12536
125372002-06-30 Akim Demaille <akim@epita.fr>
12538
12539 We spend a lot of time in quotearg, in particular when --verbose.
12540
12541 * src/symtab.c (symbol_get): Store a quoted version of the key.
12542 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12543 Adjust all callers.
12544
125452002-06-30 Akim Demaille <akim@epita.fr>
12546
12547 * src/state.h (reductions_t): Rename member `nreds' as num.
12548 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12549 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12550
125512002-06-30 Akim Demaille <akim@epita.fr>
12552
12553 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12554 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12555 (shifts_to): Rename as...
12556 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12557 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12558 (TRANSITION_IS_DISABLED, transitions_to): these.
12559
125602002-06-30 Akim Demaille <akim@epita.fr>
12561
12562 * src/print.c (print_shifts, print_gotos): Merge into...
12563 (print_transitions): this.
12564 (print_transitions, print_errs, print_reductions): Align the
12565 lookaheads columns.
12566 (print_core, print_transitions, print_errs, print_state,
12567 print_grammar): Output empty lines separator before, not after.
12568 (state_default_rule_compute): Rename as...
12569 (state_default_rule): this.
12570 * tests/conflicts.at (Defaulted Conflicted Reduction),
12571 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12572 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12573
125742002-06-30 Akim Demaille <akim@epita.fr>
12575
12576 Display items as we display rules.
12577
12578 * src/gram.h, src/gram.c (rule_lhs_print): New.
12579 * src/gram.c (grammar_rules_partial_print): Use it.
12580 * src/print.c (print_core): Likewise.
12581 * tests/conflicts.at (Defaulted Conflicted Reduction),
12582 (Unresolved SR Conflicts): Adjust.
12583 (Unresolved SR Conflicts): Adjust and rename as...
12584 (Resolved SR Conflicts): this, as was meant.
12585 * tests/regression.at (Web2c Report): Adjust.
12586
125872002-06-30 Akim Demaille <akim@epita.fr>
12588
12589 * src/print.c (state_default_rule_compute): New, extracted from...
12590 (print_reductions): here.
12591 Pessimize, but clarify the code.
12592 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12593
125942002-06-30 Akim Demaille <akim@epita.fr>
12595
12596 * src/output.c (action_row): Let default_rule be always a rule
12597 number.
12598
125992002-06-30 Akim Demaille <akim@epita.fr>
12600
12601 * src/closure.c (print_firsts, print_fderives, closure):
12602 Use BITSET_EXECUTE.
12603 * src/lalr.c (lookaheads_print): Likewise.
12604 * src/state.c (state_rule_lookaheads_print): Likewise.
12605 * src/print_graph.c (print_core): Likewise.
12606 * src/print.c (print_reductions): Likewise.
12607 * src/output.c (action_row): Likewise.
12608 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12609
126102002-06-30 Akim Demaille <akim@epita.fr>
12611
12612 * src/print_graph.c: Use report_flag.
12613
126142002-06-30 Akim Demaille <akim@epita.fr>
12615
12616 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12617 to...
12618 * src/relation.h, src/relation.c (traverse, relation_digraph)
12619 (relation_print, relation_transpose): New.
12620
126212002-06-30 Akim Demaille <akim@epita.fr>
12622
12623 * src/state.h, src/state.c (shifts_to): New.
12624 * src/lalr.c (build_relations): Use it.
12625
126262002-06-30 Akim Demaille <akim@epita.fr>
12627
12628 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12629 (item_number_of_rule_number, rule_number_of_item_number): New.
12630 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12631 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12632 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12633 Propagate their use.
12634 Much remains to be done, in particular wrt `shorts' from types.h.
12635
126362002-06-30 Akim Demaille <akim@epita.fr>
12637
12638 * src/symtab.c (symbol_new): Initialize the `printer' member.
12639
126402002-06-30 Akim Demaille <akim@epita.fr>
12641
12642 * src/LR0.c (save_reductions): Remove, replaced by...
12643 * src/state.h, src/state.c (state_reductions_set): New.
12644 (reductions, errs): Rename as...
12645 (reductions_t, errs_t): these.
12646 Adjust all dependencies.
12647
126482002-06-30 Akim Demaille <akim@epita.fr>
12649
12650 * src/LR0.c (state_list_t, state_list_append): New.
12651 (first_state, last_state): Now symbol_list_t.
12652 (this_state): Remove.
12653 (new_itemsets, append_states, save_reductions): Take a state_t as
12654 argument.
12655 (set_states, generate_states): Adjust.
12656 (save_shifts): Remove, replaced by...
12657 * src/state.h, src/state.c (state_shifts_set): New.
12658 (shifts): Rename as...
12659 (shifts_t): this.
12660 Adjust all dependencies.
12661 * src/state.h (state_t): Remove the `next' member.
12662
126632002-06-30 Akim Demaille <akim@epita.fr>
12664
12665 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12666 escaped in slot 0.
12667
126682002-06-30 Akim Demaille <akim@epita.fr>
12669
12670 Use hash.h for the state hash table.
12671
12672 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12673 (allocate_storage): Use state_hash_new.
12674 (free_storage): Use state_hash_free.
12675 (new_state, get_state): Adjust.
12676 * src/lalr.h, src/lalr.c (states): Move to...
12677 * src/states.h (state_t): Remove the `link' member, no longer
12678 used.
12679 * src/states.h, src/states.c: here.
12680 (state_hash_new, state_hash_free, state_hash_lookup)
12681 (state_hash_insert, states_free): New.
12682 * src/states.c (state_table, state_compare, state_hash): New.
12683 * src/output.c (output_actions): Do not free states now, since we
12684 still need to know the final_state number in `prepare', called
12685 afterwards. Do it...
12686 * src/main.c (main): here: call states_free after `output'.
12687
126882002-06-30 Akim Demaille <akim@epita.fr>
12689
12690 * src/state.h, src/state.c (state_new): New, extracted from...
12691 * src/LR0.c (new_state): here.
12692 * src/state.h (STATE_ALLOC): Move to...
12693 * src/state.c: here.
12694 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
12695 * src/state.h, src/state.c: here.
12696
126972002-06-30 Akim Demaille <akim@epita.fr>
12698
12699 * src/reader.c (gensym): Rename as...
12700 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
12701 (getsym): Rename as...
12702 (symbol_get): this.
12703
127042002-06-30 Akim Demaille <akim@epita.fr>
12705
12706 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
12707 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
12708 * src/output.c, src/print.c, src/print_graph.c: Propagate.
12709 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
12710
127112002-06-30 Akim Demaille <akim@epita.fr>
12712
12713 Make the test suite pass with warnings checked.
12714
12715 * tests/actions.at (Printers and Destructors): Improve.
12716 Avoid unsigned vs. signed issues.
12717 * tests/calc.at: Don't exercise the scanner here, do it...
12718 * tests/input.at (Torturing the Scanner): here.
12719
127202002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12721
12722 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
12723 reorganize first lines parallel to yacc.c.
12724
127252002-06-28 Akim Demaille <akim@epita.fr>
12726
12727 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
12728 (b4_token_enum, b4_token_defines): New, factored from...
12729 * data/lalr1.cc, data/yacc.c, glr.c: here.
12730
127312002-06-28 Akim Demaille <akim@epita.fr>
12732
12733 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
12734 unused variables.
12735 * src/output.c (merger_output): static.
12736
127372002-06-28 Akim Demaille <akim@epita.fr>
12738
12739 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
12740 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
12741 pacify GCC.
12742 * src/output.c (save_row): Initialize all the variables to pacify GCC.
12743
127442002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12745
12746 Accumulated changelog for new GLR parsing features.
12747
12748 * src/conflicts.c (count_total_conflicts): Change name to
12749 conflicts_total_count.
12750 * src/conflicts.h: Ditto.
12751 * src/output.c (token_actions): Use the new name.
12752 (output_conflicts): Change conflp => conflict_list_heads, and
12753 confl => conflict_list for better readability.
12754 * data/glr.c: Use the new names.
12755 * NEWS: Add self to GLR announcement.
12756
12757 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
12758
12759 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
12760 Akim Demaille.
12761
12762 * data/bison.glr: Change name to glr.c
12763 * data/glr.c: Renamed from bison.glr.
12764 * data/Makefile.am: Add glr.c
12765
12766 * src/getargs.c:
12767
12768 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
12769 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
12770
12771 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12772
12773 * data/bison.glr: Be sure to restore the
12774 current #line when returning to the skeleton contents after having
12775 exposed the input file's #line.
12776
12777 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12778
12779 * data/bison.glr: Bring up to date with changes to bison.simple.
12780
12781 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12782
12783 * data/bison.glr: Correct definitions that use b4_prefix.
12784 Various reformatting.
12785 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
12786 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
12787 yytokenp argument; now part of stack.
12788 (yychar): Define to behave as documented.
12789 (yyclearin): Ditto.
12790
12791 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12792
12793 * src/reader.h: Add declaration for free_merger_functions.
12794
12795 * src/reader.c (merge_functions): New variable.
12796 (get_merge_function): New function.
12797 (free_merger_functions): New function.
12798 (readgram): Check for %prec that is not followed by a symbol.
12799 Handle %dprec and %merge declarations.
12800 (packgram): Initialize dprec and merger fields in rules array.
12801
12802 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
12803 conflict_list_cnt, conflict_list_free): New variables.
12804 (table_grow): Also grow conflict_table.
12805 (prepare_rules): Output dprec and merger tables.
12806 (conflict_row): New function.
12807 (action_row): Output conflict lists for GLR parser. Don't use
12808 default reduction in conflicted states for GLR parser so that there
12809 are spaces for the conflict lists.
12810 (save_row): Also save conflict information.
12811 (token_actions): Allocate conflict list.
12812 (merger_output): New function.
12813 (pack_vector): Pack conflict table, too.
12814 (output_conflicts): New function to output yyconflp and yyconfl.
12815 (output_check): Allocate conflict_tos.
12816 (output_actions): Output conflict tables, also.
12817 (output_skeleton): Output b4_mergers definition.
12818 (prepare): Output b4_max_rhs_length definition.
12819 Use 'bison.glr' as default skeleton for GLR parsers.
12820
12821 * src/gram.c (glr_parser): New flag.
12822 (grammar_free): Call free_merger_functions.
12823
12824 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
12825 all pairs of conflicting reductions, rather than just all tokens
12826 causing conflicts. Needed to size conflict tables.
12827 (conflicts_output): Modify call to count_rr_conflicts for new
12828 interface.
12829 (conflicts_print): Ditto.
12830 (count_total_conflicts): New function.
12831
12832 * src/reader.h (merger_list): New type.
12833 (merge_functions): New variable.
12834
12835 * src/lex.h (tok_dprec, tok_merge): New token types.
12836
12837 * src/gram.h (rule_s): Add dprec and merger fields.
12838 (glr_parser): New flag.
12839
12840 * src/conflicts.h (count_total_conflicts): New function.
12841
12842 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
12843
12844 * doc/bison.texinfo (Generalized LR Parsing): New section.
12845 (GLR Parsers): New section.
12846 (Language and Grammar): Mention GLR parsing.
12847 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
12848 Correct typo ("tge" -> "the").
12849
12850 * data/bison.glr: New skeleton for GLR parsing.
12851
12852 * tests/cxx-gram.at: New tests for GLR parsing.
12853
12854 * tests/testsuite.at: Include cxx-gram.at.
12855
12856 * tests/Makefile.am: Add cxx-gram.at.
12857
12858 * src/parse-gram.y:
12859
12860 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
12861
12862 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
12863
128642002-06-27 Akim Demaille <akim@epita.fr>
12865
12866 * src/options.h, src/options.c: Remove.
12867 * src/getargs.c (short_options, long_options): New.
12868
128692002-06-27 Akim Demaille <akim@epita.fr>
12870
12871 * data/bison.simple, data/bison.c++: Rename as...
12872 * data/yacc.c, data/lalr1.cc: these.
12873 * doc/bison.texinfo (Environment Variables): Remove.
12874
128752002-06-25 Raja R Harinath <harinath@cs.umn.edu>
12876
12877 * src/getargs.c (report_argmatch): Initialize strtok().
12878
128792002-06-20 Akim Demaille <akim@epita.fr>
12880
12881 * data/bison.simple (b4_symbol_actions): New, replaces...
12882 (b4_symbol_destructor, b4_symbol_printer): these.
12883 (yysymprint): Be sure to call YYPRINT only for tokens, and using
12884 user token numbers.
12885
128862002-06-20 Akim Demaille <akim@epita.fr>
12887
12888 * data/bison.simple (yydestructor): Rename as...
12889 (yydestruct): this.
12890
128912002-06-20 Akim Demaille <akim@epita.fr>
12892
12893 * src/symtab.h, src/symtab.c (symbol_type_set)
12894 (symbol_destructor_set, symbol_precedence_set): The location is
12895 the last argument.
12896 Adjust all callers.
12897
128982002-06-20 Akim Demaille <akim@epita.fr>
12899
12900 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
12901 internals.
12902 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
12903 Takes a location.
12904 * src/symtab.h, src/symtab.c (symbol_class_set)
12905 (symbol_user_token_number_set): Likewise.
12906 Adjust all callers.
12907 Promote complain_at.
12908 * tests/input.at (Type Clashes): Adjust.
12909
129102002-06-20 Akim Demaille <akim@epita.fr>
12911
12912 * data/bison.simple (YYLEX): Fix the declaration when
12913 %pure-parser.
12914
129152002-06-20 Akim Demaille <akim@epita.fr>
12916
12917 * data/bison.simple (yysymprint): Don't print the token number,
12918 just its name.
12919 * tests/actions.at (Destructors): Rename as...
12920 (Printers and Destructors): this.
12921 Also exercise %printer.
12922
129232002-06-20 Akim Demaille <akim@epita.fr>
12924
12925 * data/bison.simple (YYDSYMPRINT): New.
12926 Use it to remove many of the #if YYDEBUG/if (yydebug).
12927
129282002-06-20 Akim Demaille <akim@epita.fr>
12929
12930 * src/symtab.h, src/symtab.c (symbol_t): printer and
12931 printer_location are new members.
12932 (symbol_printer_set): New.
12933 * src/parse-gram.y (PERCENT_PRINTER): New token.
12934 Handle its associated rule.
12935 * src/scan-gram.l: Adjust.
12936 (handle_destructor_at, handle_destructor_dollar): Rename as...
12937 (handle_symbol_code_at, handle_symbol_code_dollar): these.
12938 * src/output.c (symbol_printers_output): New.
12939 (output_skeleton): Call it.
12940 * data/bison.simple (yysymprint): New. Cannot be named yyprint
12941 since there are already many grammar files with a user `yyprint'.
12942 Replace the calls to YYPRINT to calls to yysymprint.
12943 * tests/calc.at: Adjust.
12944 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
12945 taking advantage of parser very internal details (stack size!).
12946
129472002-06-20 Akim Demaille <akim@epita.fr>
12948
12949 * src/scan-gram.l: Complete the scanner with the missing patterns
12950 to pacify Flex.
12951 Use `quote' and `symbol_tag_get' where appropriate.
12952
129532002-06-19 Akim Demaille <akim@epita.fr>
12954
12955 * tests/actions.at (Destructors): Augment to test locations.
12956 * data/bison.simple (yydestructor): Pass it the current location
12957 if locations are enabled.
12958 Prototype only when __STDC__ or C++.
12959 Change the argument names to move into the yy name space: there is
12960 user code here.
12961
129622002-06-19 Akim Demaille <akim@epita.fr>
12963
12964 * data/bison.simple (b4_pure_if): New.
12965 Use it instead of #ifdef YYPURE.
12966
129672002-06-19 Akim Demaille <akim@epita.fr>
12968
12969 * data/bison.simple (b4_location_if): New.
12970 Use it instead of #ifdef YYLSP_NEEDED.
12971
129722002-06-19 Akim Demaille <akim@epita.fr>
12973
12974 Prepare @$ in %destructor, but currently don't bind it in the
12975 skeleton, as %location use is not cleaned up yet.
12976
12977 * src/scan-gram.l (handle_dollar, handle_destructor_at)
12978 (handle_action_at): New.
12979 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
12980 a braced_code_t and a location as additional arguments.
12981 (handle_destructor_dollar): Instead of requiring `b4_eval', just
12982 unquote one when outputting `b4_dollar_dollar'.
12983 Adjust callers.
12984 * data/bison.simple (b4_eval): Remove.
12985 (b4_symbol_destructor): Adjust.
12986 * tests/input.at (Invalid @n): Adjust.
12987
129882002-06-19 Zack Weinberg <zack@codesourcery.com>
12989
12990 * doc/bison.texinfo: Document ability to have multiple
12991 prologue sections.
12992
129932002-06-18 Akim Demaille <akim@epita.fr>
12994
12995 * src/files.c (compute_base_names): When computing the output file
12996 names from the input file name, strip the directory part.
12997
129982002-06-18 Akim Demaille <akim@epita.fr>
12999
13000 * data/bison.simple.new: Comment changes.
13001 Reported by Andreas Schwab.
13002
130032002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13004
13005 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13006 there are no `label `yyoverflowlab' defined but not used' warnings
13007 when yyoverflow is defined.
13008
130092002-06-18 Akim Demaille <akim@epita.fr>
13010
13011 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13012 new member.
13013 (symbol_destructor_set): Adjust.
13014 * src/output.c (symbol_destructors_output): Output the destructor
13015 locations.
13016 Output the symbol name.
13017 * data/bison.simple (b4_symbol_destructor): Adjust.
13018
130192002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13020 and Akim Demaille <akim@epita.fr>
13021
13022 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13023 what's left on the stack when the error recovery hits EOF.
13024 * tests/actions.at (Destructors): Complete to exercise this case.
13025
130262002-06-17 Akim Demaille <akim@epita.fr>
13027
13028 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13029 arguments is really empty, not only equal to `[]'.
13030 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13031 member.
13032 (symbol_destructor_set): New.
13033 * src/output.c (symbol_destructors_output): New.
13034 * src/reader.h (brace_code_t, current_braced_code): New.
13035 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13036 (handle_dollar): Rename as...
13037 (handle_action_dollar): this.
13038 (handle_destructor_dollar): New.
13039 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13040 (grammar_declaration): Use it.
13041 * data/bison.simple (yystos): Is always defined.
13042 (yydestructor): New.
13043 * tests/actions.at (Destructors): New.
13044 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13045
130462002-06-17 Akim Demaille <akim@epita.fr>
13047
13048 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13049 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13050 rule_length only when needed.
13051 * src/output.c (actions_output, token_definitions_output): Output
13052 the full M4 block.
13053 * src/symtab.c: Don't access directly to the symbol tag, use
13054 symbol_tag_get.
13055 * src/parse-gram.y: Use symbol_list_free.
13056
130572002-06-17 Akim Demaille <akim@epita.fr>
13058
13059 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13060 (symbol_list_prepend, get_type_name): Move to...
13061 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13062 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13063 Adjust all callers.
13064 (symbol_list_free): New.
13065 * src/scan-gram.l (handle_dollar): Takes a location.
13066 * tests/input.at (Invalid $n): Adjust.
13067
130682002-06-17 Akim Demaille <akim@epita.fr>
13069
13070 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13071 (symbol_list_prepend): New.
13072 * src/parse-gram.y (%union): `list' is a new member.
13073 (symbols.1): New, replaces...
13074 (terms_to_prec.1, nterms_to_type.1): these.
13075 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13076 Take a location as additional argument.
13077 Adjust all callers.
13078
130792002-06-15 Akim Demaille <akim@epita.fr>
13080
13081 * src/parse-gram.y: Move %token in the declaration section so that
13082 we don't depend upon CVS Bison.
13083
130842002-06-15 Akim Demaille <akim@epita.fr>
13085
13086 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13087 * src/print.c (print_core): Use it.
13088
130892002-06-15 Akim Demaille <akim@epita.fr>
13090
13091 * src/conflicts.c (log_resolution): Accept the rule involved in
13092 the sr conflicts instead of the lookahead number that points to
13093 that rule.
13094 (flush_reduce): Accept the current lookahead vector as argument,
13095 instead of the index in LA.
13096 (resolve_sr_conflict): Accept the current number of lookahead
13097 bitset to consider for the STATE, instead of the index in LA.
13098 (set_conflicts): Adjust.
13099 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13100
131012002-06-15 Akim Demaille <akim@epita.fr>
13102
13103 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13104 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13105 Adjust all dependencies.
13106 * src/lalr.c (initialize_lookaheads): Split into...
13107 (states_lookaheads_count, states_lookaheads_initialize): these.
13108 (lalr): Adjust.
13109
131102002-06-15 Akim Demaille <akim@epita.fr>
13111
13112 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13113 out of...
13114 (grammar_rules_print): here.
13115 * src/reduce.c (reduce_output): Use it.
13116 * tests/reduce.at (Useless Rules, Reduced Automaton)
13117 (Underivable Rules): Adjust.
13118
131192002-06-15 Akim Demaille <akim@epita.fr>
13120
13121 Copy BYacc's nice way to report the grammar.
13122
13123 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13124 New.
13125 Don't print the rules' location, it is confusing and useless.
13126 (rule_print): Use grammar_rhs_print.
13127 * src/print.c (print_grammar): Use grammar_rules_print.
13128
131292002-06-15 Akim Demaille <akim@epita.fr>
13130
13131 Complete and rationalize `useless thing' warnings.
13132
13133 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13134 (symbol_tag_print): New.
13135 Use them everywhere in place of accessing directly the tag member.
13136 * src/gram.h, src/gram.c (rule_print): New.
13137 Use it where a rule used to be printed `by hand'.
13138 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13139 (reduce_grammar_tables): Report the useless rules.
13140 (reduce_print): Useless things are a warning, not an error.
13141 Report it as such.
13142 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13143 (Reduced Automaton, Underivable Rules): Adjust.
13144 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13145 * tests/conflicts.at (Unresolved SR Conflicts)
13146 (Solved SR Conflicts): Adjust.
13147
131482002-06-15 Akim Demaille <akim@epita.fr>
13149
13150 Let symbols have a location.
13151
13152 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13153 (getsym): Adjust.
13154 Adjust all callers.
13155 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13156 Use location_t, not int.
13157 * src/symtab.c (symbol_check_defined): Take advantage of the
13158 location.
13159 * tests/regression.at (Invalid inputs): Adjust.
13160
131612002-06-15 Akim Demaille <akim@epita.fr>
13162
13163 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13164 (input): Don't try to initialize yylloc here, do it in the
13165 scanner.
13166 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13167 * src/gram.h (rule_t): Change line and action_line into location
13168 and action_location, of location_t type.
13169 Adjust all dependencies.
13170 * src/location.h, src/location.c (empty_location): New.
13171 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13172 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13173 (grammar_current_rule_symbol_append)
13174 (grammar_current_rule_action_append): Expect a location as argument.
13175 * src/reader.c (grammar_midrule_action): Adjust to attach an
13176 action's location as dummy symbol location.
13177 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13178 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13179 the line numbers.
13180
131812002-06-14 Akim Demaille <akim@epita.fr>
13182
13183 Grammar declarations may be found in the grammar section.
13184
13185 * src/parse-gram.y (rules_or_grammar_declaration): New.
13186 (declarations): Each declaration may end with a semicolon, not
13187 just...
13188 (grammar_declaration): `"%union"'.
13189 (grammar): Branch to rules_or_grammar_declaration.
13190
131912002-06-14 Akim Demaille <akim@epita.fr>
13192
13193 * src/main.c (main): Invoke scanner_free.
13194
131952002-06-14 Akim Demaille <akim@epita.fr>
13196
13197 * src/output.c (m4_invoke): Extracted from...
13198 (output_skeleton): here.
13199 Free tempfile.
13200
132012002-06-14 Akim Demaille <akim@epita.fr>
13202
13203 * src/parse-gram.y (directives, directive, gram)
13204 (grammar_directives, precedence_directives, precedence_directive):
13205 Rename as...
13206 (declarations, declaration, grammar, grammar_declaration)
13207 (precedence_declaration, precedence_declarator): these.
13208 (symbol_declaration): New.
13209
132102002-06-14 Akim Demaille <akim@epita.fr>
13211
13212 * src/files.c (action_obstack): Remove, unused.
13213 (output_obstack): Remove it, and all its dependencies, as it is no
13214 longer needed.
13215 * src/reader.c (epilogue_set): Build the epilogue in the
13216 muscle_obstack.
13217 * src/output.h, src/output.c (muscle_obstack): Move to...
13218 * src/muscle_tab.h, src/muscle_tab.h: here.
13219 (muscle_init): Initialize muscle_obstack.
13220 (muscle_free): New.
13221 * src/main.c (main): Call it.
13222
132232002-06-14 Akim Demaille <akim@epita.fr>
13224
13225 * src/location.h: New, extracted from...
13226 * src/reader.h: here.
13227 * src/Makefile.am (noinst_HEADERS): Merge into
13228 (bison_SOURCES): this.
13229 Add location.h.
13230 * src/parse-gram.y: Use location_t instead of Bison's.
13231 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13232 Use location_t instead of ints.
13233
132342002-06-14 Akim Demaille <akim@epita.fr>
13235
13236 * data/bison.simple, data/bison.c++: Be sure to restore the
13237 current #line when returning to the skeleton contents after having
13238 exposed the input file's #line.
13239
132402002-06-12 Akim Demaille <akim@epita.fr>
13241
13242 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13243 eager.
13244 * tests/actions.at (Exotic Dollars): New.
13245
132462002-06-12 Akim Demaille <akim@epita.fr>
13247
13248 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13249 ['"/] too eagerly.
13250 * tests/input.at (Torturing the Scanner): New.
13251
132522002-06-11 Akim Demaille <akim@epita.fr>
13253
13254 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13255 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13256 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13257 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13258 * src/reader.c (reader): Use it.
13259
132602002-06-11 Akim Demaille <akim@epita.fr>
13261
13262 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13263 Adjust all callers.
13264 (scanner_last_string_free): New.
13265
132662002-06-11 Akim Demaille <akim@epita.fr>
13267
13268 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13269 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13270 (last_string, YY_OBS_FREE): New.
13271 Use them when returning an ID.
13272
132732002-06-11 Akim Demaille <akim@epita.fr>
13274
13275 Have Bison grammars parsed by a Bison grammar.
13276
13277 * src/reader.c, src/reader.h (prologue_augment): New.
13278 * src/reader.c (copy_definition): Remove.
13279
13280 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13281 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13282 (grammar_current_rule_prec_set, grammar_current_rule_check)
13283 (grammar_current_rule_symbol_append)
13284 (grammar_current_rule_action_append): Export.
13285 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13286 (symbol_list_action_append): Remove.
13287 Hook the routines from reader.
13288 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13289 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13290
13291 * src/reader.c (read_declarations): Remove, unused.
13292
13293 * src/parse-gram.y: Handle the epilogue.
13294 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13295 (grammar_start_symbol_set): this.
13296 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13297 * src/reader.c (readgram): Remove, unused.
13298 (reader): Adjust to insert eoftoken and axiom where appropriate.
13299
13300 * src/reader.c (copy_dollar): Replace with...
13301 * src/scan-gram.h (handle_dollar): this.
13302 * src/parse-gram.y: Remove `%thong'.
13303
13304 * src/reader.c (copy_at): Replace with...
13305 * src/scan-gram.h (handle_at): this.
13306
13307 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13308 New.
13309
13310 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13311 time being.
13312
13313 * src/reader.h, src/reader.c (grammar_rule_end): New.
13314
13315 * src/parse.y (current_type, current_class): New.
13316 Implement `%nterm', `%token' support.
13317 Merge `%term' into `%token'.
13318 (string_as_id): New.
13319 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13320 type name.
13321
13322 * src/parse-gram.y: Be sure to handle properly the beginning of
13323 rules.
13324
13325 * src/parse-gram.y: Handle %type.
13326 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13327
13328 * src/parse-gram.y: More directives support.
13329 * src/options.c: No longer handle source directives.
13330
13331 * src/parse-gram.y: Fix %output.
13332
13333 * src/parse-gram.y: Handle %union.
13334 Use the prologue locations.
13335 * src/reader.c (parse_union_decl): Remove.
13336
13337 * src/reader.h, src/reader.c (epilogue_set): New.
13338 * src/parse-gram.y: Use it.
13339
13340 * data/bison.simple, data/bison.c++: b4_stype is now either not
13341 defined, then default to int, or to the contents of %union,
13342 without `union' itself.
13343 Adjust.
13344 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13345
13346 * src/output.c (actions_output): Don't output braces, as they are
13347 already handled by the scanner.
13348
13349 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13350 characters to themselves.
13351
13352 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13353 that the epilogue has a proper #line.
13354
13355 * src/parse-gram.y: Handle precedence/associativity.
13356
13357 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13358 a terminal.
13359 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13360 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13361 at all to define terminals that cannot be emitted.
13362
13363 * src/scan-gram.l: Escape M4 characters.
13364
13365 * src/scan-gram.l: Working properly with escapes in user
13366 strings/characters.
13367
13368 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13369 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13370 grammar.
13371 Use more modest sizes, as for the time being the parser does not
13372 release memory, and therefore the process swallows a huge amount
13373 of memory.
13374
13375 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13376 stricter %token grammar.
13377
13378 * src/symtab.h (associativity): Add `undef_assoc'.
13379 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13380 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13381
13382 * tests/regression.at (Invalid %directive): Remove, as it is now
13383 meaningless.
13384 (Invalid inputs): Adjust to the new error messages.
13385 (Token definitions): The new grammar doesn't allow too many
13386 eccentricities.
13387
13388 * src/lex.h, src/lex.c: Remove.
13389 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13390 (copy_character, copy_string2, copy_string, copy_identifier)
13391 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13392 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13393 (parse_action): Remove.
13394 * po/POTFILES.in: Adjust.
13395
133962002-06-11 Akim Demaille <akim@epita.fr>
13397
13398 * src/reader.c (parse_action): Don't store directly into the
13399 rule's action member: return the action as a string.
13400 Don't require `rule_length' as an argument: compute it.
13401 (grammar_current_rule_symbol_append)
13402 (grammar_current_rule_action_append): New, eved out from
13403 (readgram): here.
13404 Remove `action_flag', `rulelength', unused now.
13405
134062002-06-11 Akim Demaille <akim@epita.fr>
13407
13408 * src/reader.c (grammar_current_rule_prec_set).
13409 (grammar_current_rule_check): New, eved out from...
13410 (readgram): here.
13411 Remove `xaction', `first_rhs': useless.
13412 * tests/input.at (Type clashes): New.
13413 * tests/existing.at (GNU Cim Grammar): Adjust.
13414
134152002-06-11 Akim Demaille <akim@epita.fr>
13416
13417 * src/reader.c (grammar_midrule_action): New, Eved out from
13418 (readgram): here.
13419
134202002-06-11 Akim Demaille <akim@epita.fr>
13421
13422 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13423 New.
13424 (readgram): Use them as replacement of inlined code, crule and
13425 crule1.
13426
134272002-06-11 Akim Demaille <akim@epita.fr>
13428
13429 * src/reader.c (grammar_end, grammar_symbol_append): New.
13430 (readgram): Use them.
13431 Make the use of `p' as local as possible.
13432
134332002-06-10 Akim Demaille <akim@epita.fr>
13434
13435 GCJ's parser requires the tokens to be defined before the prologue.
13436
13437 * data/bison.simple: Output the token definition before the user's
13438 prologue.
13439 * tests/regression.at (Braces parsing, Duplicate string)
13440 (Mixing %token styles): Check the output from bison.
13441 (Early token definitions): New.
13442
134432002-06-10 Akim Demaille <akim@epita.fr>
13444
13445 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13446 assigning twice the same user number to a token, so that we can
13447 use it in...
13448 * src/lex.c (lex): here.
13449 Also use `symbol_class_set' instead of hand written code.
13450 * src/reader.c (parse_assoc_decl): Likewise.
13451
134522002-06-10 Akim Demaille <akim@epita.fr>
13453
13454 * src/symtab.c, src/symtab.c (symbol_class_set)
13455 (symbol_user_token_number_set): New.
13456 * src/reader.c (parse_token_decl): Use them.
13457 Use a switch instead of ifs.
13458 Use a single argument.
13459
134602002-06-10 Akim Demaille <akim@epita.fr>
13461
13462 Remove `%thong' support as it is undocumented, unused, duplicates
13463 `%token's job, and creates useless e-mail traffic with people who
13464 want to know what it is, why it is undocumented, unused, and
13465 duplicates `%token's job.
13466
13467 * src/reader.c (parse_thong_decl): Remove.
13468 * src/options.c (option_table): Remove "thong".
13469 * src/lex.h (tok_thong): Remove.
13470
134712002-06-10 Akim Demaille <akim@epita.fr>
13472
13473 * src/symtab.c, src/symtab.c (symbol_type_set)
13474 (symbol_precedence_set): New.
13475 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13476 (value_components_used): Remove, unused.
13477
134782002-06-09 Akim Demaille <akim@epita.fr>
13479
13480 Move symbols handling code out of the reader.
13481
13482 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13483 (axiom): Move to...
13484 * src/symtab.h, src/symtab.c: here.
13485
13486 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13487 * src/reader.c (startval): Rename as...
13488 * src/symtab.h, src/symtab.c (startsymbol): this.
13489 * src/reader.c: Adjust.
13490
13491 * src/reader.c (symbol_check_defined, symbol_make_alias)
13492 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13493 (token_translations_init)
13494 Move to...
13495 * src/symtab.c: here.
13496 * src/reader.c (packsymbols): Move to...
13497 * src/symtab.h, src/symtab.c (symbols_pack): here.
13498 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13499 argument.
13500
135012002-06-03 Akim Demaille <akim@epita.fr>
13502
13503 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13504 then statements.
13505
135062002-06-03 Akim Demaille <akim@epita.fr>
13507
13508 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13509 structs with non literals.
13510 * src/scan-skel.l: never-interactive.
13511 * src/conflicts.c (enum conflict_resolution_e): No trailing
13512 comma.
13513 * src/getargs.c (usage): Split long literal strings.
13514 Reported by Hans Aberg.
13515
135162002-05-28 Akim Demaille <akim@epita.fr>
13517
13518 * data/bison.c++: Use C++ ostreams.
13519 (cdebug_): New member.
13520
135212002-05-28 Akim Demaille <akim@epita.fr>
13522
13523 * src/output.c (output_skeleton): Be sure to allocate enough room
13524 for `/' _and_ for `\0' in full_skeleton.
13525
135262002-05-28 Akim Demaille <akim@epita.fr>
13527
13528 * data/bison.c++: Catch up with bison.simple:
13529 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13530 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13531 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13532 and popping traces.
13533
135342002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13535
13536 * src/output.c (output_skeleton): Put an explicit path in front of
13537 the skeleton file name, rather than relying on the -I directory,
13538 to partially alleviate effects of having a skeleton file lying around
13539 in the current directory.
13540
135412002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13542
13543 * src/conflicts.c (log_resolution): Correct typo:
13544 obstack_printf should be obstack_fgrow1.
13545
135462002-05-26 Akim Demaille <akim@epita.fr>
13547
13548 * src/state.h (state_t): `solved_conflicts' is a new member.
13549 * src/LR0.c (new_state): Set it to 0.
13550 * src/conflicts.h, src/conflicts.c (print_conflicts)
13551 (free_conflicts, solve_conflicts): Rename as...
13552 (conflicts_print, conflicts_free, conflicts_solve): these.
13553 Adjust callers.
13554 * src/conflicts.c (enum conflict_resolution_e)
13555 (solved_conflicts_obstack): New, used by...
13556 (log_resolution): this.
13557 Adjust to attach the conflict resolution to each state.
13558 Complete the description with the precedence/associativity
13559 information.
13560 (resolve_sr_conflict): Adjust.
13561 * src/print.c (print_state): Output its solved_conflicts.
13562 * tests/conflicts.at (Unresolved SR Conflicts)
13563 (Solved SR Conflicts): Exercise --report=all.
13564
135652002-05-26 Akim Demaille <akim@epita.fr>
13566
13567 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13568 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13569 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13570 (token_number_t, item_number_as_token_number)
13571 (token_number_as_item_number, muscle_insert_token_number_table):
13572 Rename as...
13573 (symbol_number_t, item_number_as_symbol_number)
13574 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13575 these, since it is more appropriate.
13576
135772002-05-26 Akim Demaille <akim@epita.fr>
13578
13579 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13580 `Error:' lines.
13581 * data/bison.simple (yystos) [YYDEBUG]: New.
13582 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13583 error recovery.
13584 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13585
135862002-05-25 Akim Demaille <akim@epita.fr>
13587
13588 * doc/bison.texinfo (Debugging): Split into...
13589 (Tracing): this new section, its former contents, and...
13590 (Understanding): this new section.
13591 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13592 by...
13593 (report_flag): this.
13594 Adjust all dependencies.
13595 (report_args, report_types, report_argmatch): New.
13596 (usage, getargs): Report/support -r, --report.
13597 * src/options.h
13598 (struct option_table_struct): Rename as..,
13599 (struct option_table_s): this.
13600 Rename the `set_flag' member to `flag' to match with getopt_long's
13601 struct.
13602 * src/options.c (option_table): Split verbose into an entry for
13603 %verbose, and another for --verbose.
13604 Support --report/-r, so remove -r from the obsolete --raw.
13605 * src/print.c: Attach full item sets and lookaheads reports to
13606 report_flag instead of trace_flag.
13607 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13608
136092002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13610 and Paul Eggert <eggert@twinsun.com>
13611
13612 * data/bison.simple (yyparse): Correct error handling to conform to
13613 POSIX and yacc. Specifically, after syntax error is discovered,
13614 do not reduce further before shifting the error token.
13615 Clean up the code a bit by removing the labels yyerrdefault,
13616 yyerrhandle, yyerrpop.
13617 * NEWS: Document the above.
13618
136192002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13620
13621 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13622 type; it isn't always big enough, since it doesn't necessarily
13623 include non-terminals.
13624 (yytranslate): Expand definition of yy_token_number_type, so that
13625 the latter can be removed.
13626 (yy_token_number_type): Remove, only one use.
13627 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13628 don't use TokenNumberType as element type.
13629
13630 * tests/regression.at: Modify expected output to agree with change
13631 to yyr1 and yytranslate.
13632
136332002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13634
13635 * src/reader.c (parse_action): Use copy_character instead of
13636 obstack_1grow.
13637
136382002-05-13 Akim Demaille <akim@epita.fr>
13639
13640 * tests/regression.at (Token definitions): Prototype yylex and
13641 yyerror.
13642
136432002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13644
13645 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
13646 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13647 32-bit arithmetic.
13648 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13649
136502002-05-07 Akim Demaille <akim@epita.fr>
13651
13652 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13653 avoid GCC warnings.
13654
136552002-05-07 Akim Demaille <akim@epita.fr>
13656
13657 Kill GCC warnings.
13658
13659 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13660 over the RHS of each rule.
13661 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13662 * src/state.h (state_t): Member `nitems' is unsigned short.
13663 * src/LR0.c (get_state): Adjust.
13664 * src/reader.c (packgram): Likewise.
13665 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13666 `Type'.
13667 (muscle_insert_int_table): Remove, unused.
13668 (prepare_rules): Remove `max'.
13669
136702002-05-06 Akim Demaille <akim@epita.fr>
13671
13672 * src/closure.c (print_firsts): Display of the symbol tags.
13673 (bitmatrix_print): Move to...
13674 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13675 here.
13676 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13677
136782002-05-06 Akim Demaille <akim@epita.fr>
13679
13680 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13681 hash_do_for_each.
13682
136832002-05-06 Akim Demaille <akim@epita.fr>
13684
13685 * src/LR0.c (new_state, get_state): Instead of using the global
13686 `kernel_size' and `kernel_base', have two new arguments:
13687 `core_size' and `core'.
13688 Adjust callers.
13689
136902002-05-06 Akim Demaille <akim@epita.fr>
13691
13692 * src/reader.c (packgram): No longer end `ritem' with a 0
13693 sentinel: it is not used.
13694
136952002-05-05 Akim Demaille <akim@epita.fr>
13696
13697 New experimental feature: display the lookaheads in the report and
13698 graph.
13699
13700 * src/print (print_core): When --trace-flag, display the rules
13701 lookaheads.
13702 * src/print_graph.c (print_core): Likewise.
13703 Swap the arguments.
13704 Adjust caller.
13705
137062002-05-05 Akim Demaille <akim@epita.fr>
13707
13708 * tests/torture.at (Many lookaheads): New test.
13709
137102002-05-05 Akim Demaille <akim@epita.fr>
13711
13712 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
13713 (GENERATE_MUSCLE_INSERT_TABLE): this.
13714 (output_int_table, output_unsigned_int_table, output_short_table)
13715 (output_token_number_table, output_item_number_table): Replace with...
13716 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
13717 (muscle_insert_short_table, muscle_insert_token_number_table)
13718 (muscle_insert_item_number_table): these.
13719 Adjust all callers.
13720 (prepare_tokens): Don't free `translations', since...
13721 * src/reader.h, src/reader.c (grammar_free): do it.
13722 Move to...
13723 * src/gram.h, src/gram.c (grammar_free): here.
13724 * data/bison.simple, data/bison.c++: b4_token_number_max is now
13725 b4_translate_max.
13726
137272002-05-05 Akim Demaille <akim@epita.fr>
13728
13729 * src/output.c (output_unsigned_int_table): New.
13730 (prepare_rules): `i' is unsigned.
13731 `prhs', `rline', `r2' are unsigned int.
13732 Rename muscle `rhs_number_max' as `rhs_max'.
13733 Output muscles `prhs_max', `rline_max', and `r2_max'.
13734 Free rline and r1.
13735 * data/bison.simple, data/bison.c++: Adjust to use these muscles
13736 to compute types instead of constant types.
13737 * tests/regression.at (Web2c Actions): Adjust.
13738
137392002-05-04 Akim Demaille <akim@epita.fr>
13740
13741 * src/symtab.h (SALIAS, SUNDEF): Rename as...
13742 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
13743 Adjust dependencies.
13744 * src/output.c (token_definitions_output): Be sure not to output a
13745 `#define 'a'' when fed with `%token 'a' "a"'.
13746 * tests/regression.at (Token definitions): New.
13747
137482002-05-03 Paul Eggert <eggert@twinsun.com>
13749
13750 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
13751 for K&R C.
13752
137532002-05-03 gettextize <bug-gnu-gettext@gnu.org>
13754
13755 * Makefile.am (SUBDIRS): Remove intl.
13756 (EXTRA_DIST): Add config/config.rpath.
13757
137582002-05-03 Akim Demaille <akim@epita.fr>
13759
13760 * data/bison.simple (m4_if): Don't output empty enums.
13761 And actually, output valid enum definitions :(.
13762
137632002-05-03 Akim Demaille <akim@epita.fr>
13764
13765 * configure.bat: Remove, completely obsolete.
13766 * Makefile.am (EXTRA_DIST): Adjust.
13767 Don't distribute config.rpath...
13768 * config/Makefile.am (EXTRA_DIST): Do it.
13769
137702002-05-03 Akim Demaille <akim@epita.fr>
13771
13772 * configure.in (GETTEXT_VERSION): New.
13773 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
13774
137752002-05-03 Akim Demaille <akim@epita.fr>
13776
13777 * data/bison.simple (b4_token_enum): New.
13778 (b4_token_defines): Use it to output tokens both as #define and
13779 enums.
13780 Suggested by Paul Eggert.
13781 * src/output.c (token_definitions_output): Don't output spurious
13782 white spaces.
13783
137842002-05-03 Akim Demaille <akim@epita.fr>
13785
13786 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13787
137882002-05-02 Robert Anisko <robert@lrde.epita.fr>
13789
13790 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
13791 Update the stack class, give a try to deque as the default container.
13792
137932002-05-02 Akim Demaille <akim@epita.fr>
13794
13795 * data/bison.simple (yyparse): Do not implement @$ = @1.
13796 (YYLLOC_DEFAULT): Adjust to do it.
13797 * doc/bison.texinfo (Location Default Action): Fix.
13798
137992002-05-02 Akim Demaille <akim@epita.fr>
13800
13801 * src/reader.c (parse_braces): Merge into...
13802 (parse_action): this.
13803
138042002-05-02 Akim Demaille <akim@epita.fr>
13805
13806 * configure.in (ALL_LINGUAS): Remove.
13807 * po/LINGUAS, hr.po: New.
13808
138092002-05-02 Akim Demaille <akim@epita.fr>
13810
13811 Remove the so called hairy (semantic) parsers.
13812
13813 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
13814 * src/gram.h, src/gram.c (semantic_parser): Remove.
13815 (rule_t): Remove the guard and guard_line members.
13816 * src/lex.h (token_t): remove tok_guard.
13817 * src/options.c (option_table): Remove %guard and %semantic_parser
13818 support.
13819 * src/output.c, src/output.h (guards_output): Remove.
13820 (prepare): Adjust.
13821 (token_definitions_output): Don't output the `T'
13822 tokens (???).
13823 (output_skeleton): Don't output the guards.
13824 * src/files.c, src/files.c (attrsfile): Remove.
13825 * src/reader.c (symbol_list): Remove the guard and guard_line
13826 members.
13827 Adjust dependencies.
13828 (parse_guard): Remove.
13829 * data/bison.hairy: Remove.
13830 * doc/bison.texinfo (Environment Variables): Remove occurrences of
13831 BISON_HAIRY.
13832
138332002-05-02 Akim Demaille <akim@epita.fr>
13834
13835 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
13836 (parse_guard): Rename the formal argument `stack_offset' as
13837 `rule_length', which is more readable.
13838 Adjust callers.
13839 (copy_at, copy_dollar): Instead of outputting the hard coded
13840 values of $$, $n and so forth, output invocation to b4_lhs_value,
13841 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
13842 Note: this patch partially drops `semantic-parser' support: it
13843 always does `rule_length - n', where semantic parsers ought to
13844 always use `-n'.
13845 * data/bison.simple, data/bison.c++ (b4_lhs_value)
13846 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
13847
138482002-05-02 Akim Demaille <akim@epita.fr>
13849
13850 * configure.in (AC_INIT): Bump to 1.49b.
13851 (AM_INIT_AUTOMAKE): Short invocation.
13852
138532002-05-02 Akim Demaille <akim@epita.fr>
13854
13855 Version 1.49a.
13856
138572002-05-01 Akim Demaille <akim@epita.fr>
13858
13859 * src/skeleton.h: Remove.
13860
138612002-05-01 Akim Demaille <akim@epita.fr>
13862
13863 * src/skeleton.h: Fix the #endif.
13864 Reported by Magnus Fromreide.
13865
138662002-04-26 Paul Eggert <eggert@twinsun.com>
13867
13868 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
13869 Define if we define YYSTYPE and YYLTYPE, respectively.
13870 (YYCOPY): Fix [] quoting problem in the non-GCC case.
13871
138722002-04-25 Robert Anisko <robert@lrde.epita.fr>
13873
13874 * src/scan-skel.l: Postprocess quadrigraphs.
13875
13876 * src/reader.c (copy_character): New function, used to output
13877 single characters while replacing `[' and `]' with quadrigraphs, to
13878 avoid troubles with M4 quotes.
13879 (copy_comment): Output characters with copy_character.
13880 (read_additionnal_code): Likewise.
13881 (copy_string2): Likewise.
13882 (copy_definition): Likewise.
13883
13884 * tests/calc.at: Exercise M4 quoting.
13885
138862002-04-25 Akim Demaille <akim@epita.fr>
13887
13888 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
13889 between `!' and the command.
13890 Reported by Paul Eggert.
13891
138922002-04-24 Robert Anisko <robert@lrde.epita.fr>
13893
13894 * tests/calc.at: Exercise prologue splitting.
13895
13896 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
13897 `b4_post_prologue' instead of `b4_prologue'.
13898
13899 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
13900 muscles.
13901 (output): Free pre_prologue_obstack and post_prologue_obstack.
13902 * src/files.h, src/files.c (attrs_obstack): Remove.
13903 (pre_prologue_obstack, post_prologue_obstack): New.
13904 * src/reader.c (copy_definition): Add a parameter to specify the
13905 obstack to fill, instead of using attrs_obstack unconditionally.
13906 (read_declarations): Pass pre_prologue_obstack to copy_definition if
13907 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
13908
139092002-04-23 Paul Eggert <eggert@twinsun.com>
13910
13911 * data/bison.simple: Remove unnecessary commentary and white
13912 space differences from 1_29-branch.
13913 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
13914
13915 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
13916 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
13917 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
13918 constructors or destructors.
13919
13920 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
13921
139222002-04-23 Akim Demaille <akim@epita.fr>
13923
13924 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
13925 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
13926 location with columns.
13927 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
13928 All reported by Paul Eggert.
13929
139302002-04-22 Akim Demaille <akim@epita.fr>
13931
13932 * src/reduce.c (dump_grammar): Move to...
13933 * src/gram.h, src/gram.c (grammar_dump): here.
13934 Be sure to separate long item numbers.
13935 Don't read the members of a rule's prec if its nil.
13936
139372002-04-22 Akim Demaille <akim@epita.fr>
13938
13939 * src/output.c (table_size, table_grow): New.
13940 (MAXTABLE): Remove, replace uses with table_size.
13941 (pack_vector): Instead of dying when the table is too big, grow it.
13942
139432002-04-22 Akim Demaille <akim@epita.fr>
13944
13945 * data/bison.simple (yyr1): Its type is that of a token number.
13946 * data/bison.c++ (r1_): Likewise.
13947 * tests/regression.at (Web2c Actions): Adjust.
13948
139492002-04-22 Akim Demaille <akim@epita.fr>
13950
13951 * src/reader.c (token_translations_init): 256 is now the default
13952 value for the error token, i.e., it will be assigned another
13953 number if the user assigned 256 to one of her tokens.
13954 (reader): Don't force 256 to error.
13955 * doc/bison.texinfo (Symbols): Adjust.
13956 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
13957 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
13958 etc. instead of 10, 20, 30 (which was used to `jump' over error
13959 (256) and undefined (2)).
13960
139612002-04-22 Akim Demaille <akim@epita.fr>
13962
13963 Propagate more token_number_t.
13964
13965 * src/gram.h (token_number_as_item_number)
13966 (item_number_as_token_number): New.
13967 * src/output.c (GENERATE_OUTPUT_TABLE): New.
13968 Use it to create output_item_number_table and
13969 output_token_number_table.
13970 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13971 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
13972 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
13973 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
13974
139752002-04-22 Akim Demaille <akim@epita.fr>
13976
13977 * src/output.h, src/output.c (get_lines_number): Remove.
13978
139792002-04-19 Akim Demaille <akim@epita.fr>
13980
13981 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
13982 as Lex/Flex'.
13983 (Debugging): More details about enabling the debugging features.
13984 (Table of Symbols): Describe $$, $n, @$, and @n.
13985 Suggested by Tim Josling.
13986
139872002-04-19 Akim Demaille <akim@epita.fr>
13988
13989 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
13990
139912002-04-10 Akim Demaille <akim@epita.fr>
13992
13993 * src/system.h: Rely on HAVE_LIMITS_H.
13994 Suggested by Paul Eggert.
13995
139962002-04-09 Akim Demaille <akim@epita.fr>
13997
13998 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
13999 full stderr, and strip it according to the bison options, instead
14000 of composing the error message from different bits.
14001 This makes it easier to check for several error messages.
14002 Adjust all the invocations.
14003 Add an invocation exercising the error token.
14004 Add an invocation demonstrating a stupid error message.
14005 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14006 Adjust the tests.
14007 Error message are for stderr, not stdout.
14008
140092002-04-09 Akim Demaille <akim@epita.fr>
14010
14011 * src/gram.h, src/gram.c (error_token_number): Remove, use
14012 errtoken->number.
14013 * src/reader.c (reader): Don't specify the user token number (2)
14014 for $undefined, as it uselessly prevents using it.
14015 * src/gram.h (token_number_t): Move to...
14016 * src/symtab.h: here.
14017 (state_t.number): Is a token_number_t.
14018 * src/print.c, src/reader.c: Use undeftoken->number instead of
14019 hard coded 2.
14020 (Even though this 2 is not the same as above: the number of the
14021 undeftoken remains being 2, it is its user token number which
14022 might not be 2).
14023 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14024 `user_token_number_max'.
14025 Output `undef_token_number'.
14026 * data/bison.simple, data/bison.c++: Use them.
14027 Be sure to map invalid yylex return values to
14028 `undef_token_number'. This saves us from gratuitous SEGV.
14029
14030 * tests/conflicts.at (Solved SR Conflicts)
14031 (Unresolved SR Conflicts): Adjust.
14032 * tests/regression.at (Web2c Actions): Adjust.
14033
140342002-04-08 Akim Demaille <akim@epita.fr>
14035
14036 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14037 Adding #line.
14038 Remove the duplicate `typedefs'.
14039 (RhsNumberType): Fix the declaration and various other typos.
14040 Use __ofile__.
14041 * data/bison.simple: Use __ofile__.
14042 * src/scan-skel.l: Handle __ofile__.
14043
140442002-04-08 Akim Demaille <akim@epita.fr>
14045
14046 * src/gram.h (item_number_t): New, the type of item numbers in
14047 RITEM. Note that it must be able to code symbol numbers as
14048 positive number, and the negation of rule numbers as negative
14049 numbers.
14050 Adjust all dependencies (pretty many).
14051 * src/reduce.c (rule): Remove this `short *' pointer: use
14052 item_number_t.
14053 * src/system.h (MINSHORT, MAXSHORT): Remove.
14054 Include `limits.h'.
14055 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14056 (shortcpy): Remove.
14057 (MAXTABLE): Move to...
14058 * src/output.c (MAXTABLE): here.
14059 (prepare_rules): Use output_int_table to output rhs.
14060 * data/bison.simple, data/bison.c++: Adjust.
14061 * tests/torture.at (Big triangle): Move the limit from 254 to
14062 500.
14063 * tests/regression.at (Web2c Actions): Ajust.
14064
14065 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14066 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14067 passes, but produces negative #line number, once fixed, GCC is
14068 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14069 C), it passes.
14070 * src/state.h (state_h): Code input lines on ints, not shorts.
14071
140722002-04-08 Akim Demaille <akim@epita.fr>
14073
14074 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14075 and then the grammar.
14076
140772002-04-08 Akim Demaille <akim@epita.fr>
14078
14079 * src/system.h: No longer using strndup.
14080
140812002-04-07 Akim Demaille <akim@epita.fr>
14082
14083 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14084 * src/output.c (output_table_data): Return the longest number.
14085 (prepare_tokens): Output `token_number_max').
14086 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14087 New.
14088 Use them to define yy_token_number_type/TokenNumberType.
14089 Use this type for yytranslate.
14090 * tests/torture.at (Big triangle): Push the limit from 124 to
14091 253.
14092 * tests/regression.at (Web2c Actions): Adjust.
14093
140942002-04-07 Akim Demaille <akim@epita.fr>
14095
14096 * tests/torture.at (Big triangle): New.
14097 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14098 * tests/existing.at: here.
14099
141002002-04-07 Akim Demaille <akim@epita.fr>
14101
14102 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14103 nritems.
14104 Adjust dependencies.
14105
141062002-04-07 Akim Demaille <akim@epita.fr>
14107
14108 * src/reader.c: Normalize increments to prefix form.
14109
141102002-04-07 Akim Demaille <akim@epita.fr>
14111
14112 * src/reader.c, symtab.c: Remove debugging code.
14113
141142002-04-07 Akim Demaille <akim@epita.fr>
14115
14116 Rename all the `bucket's as `symbol_t'.
14117
14118 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14119 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14120 * src/symtab.c, src/symtab.h (bucket): Rename as...
14121 (symbol_t): this.
14122 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14123 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14124 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14125 (buckets_new, buckets_free, buckets_do): Rename as...
14126 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14127 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14128 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14129 (symbols_new, symbols_free, symbols_do): these.
14130
141312002-04-07 Akim Demaille <akim@epita.fr>
14132
14133 Use lib/hash for the symbol table.
14134
14135 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14136 EOF.
14137 * src/lex.c (lex): Set the `number' member of new terminals.
14138 * src/reader.c (bucket_check_defined, bucket_make_alias)
14139 (bucket_check_alias_consistence, bucket_translation): New.
14140 (reader, grammar_free, readgram, token_translations_init)
14141 (packsymbols): Adjust.
14142 (reader): Number the predefined tokens.
14143 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14144 for predefined tokens.
14145 * src/symtab.h (bucket): Remove all the hash table related
14146 members.
14147 * src/symtab.c (symtab): Replace by...
14148 (bucket_table): this.
14149 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14150 (buckets_new, buckets_do): New.
14151
141522002-04-07 Akim Demaille <akim@epita.fr>
14153
14154 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14155 (start_symbol, max_user_token_number, semantic_parser)
14156 (error_token_number): Initialize.
14157 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14158 Initialize.
14159 (reader): Don't.
14160 (errtoken, eoftoken, undeftoken, axiom): Extern.
14161
141622002-04-07 Akim Demaille <akim@epita.fr>
14163
14164 * src/gram.h (rule_s): prec and precsym are now pointers
14165 to the bucket giving the priority/associativity.
14166 Member `associativity' removed: useless.
14167 * src/reduce.c, src/conflicts.c: Adjust.
14168
141692002-04-07 Akim Demaille <akim@epita.fr>
14170
14171 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14172 Properly escape the symbols' TAG when outputting them.
14173
141742002-04-07 Akim Demaille <akim@epita.fr>
14175
14176 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14177
141782002-04-07 Akim Demaille <akim@epita.fr>
14179
14180 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14181 (LArule): this, which is an array to rule_t*.
14182 * src/print.c, src/conflicts.c: Adjust.
14183
141842002-04-07 Akim Demaille <akim@epita.fr>
14185
14186 * src/gram.h (rule_t): Rename `number' as `user_number'.
14187 `number' is a new member.
14188 Adjust dependencies.
14189 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14190
141912002-04-07 Akim Demaille <akim@epita.fr>
14192
14193 As a result of the previous patch, it is no longer needed
14194 to reorder ritem itself.
14195
14196 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14197
141982002-04-07 Akim Demaille <akim@epita.fr>
14199
14200 Be sure never to walk through RITEMS, but use only data related to
14201 the rules themselves. RITEMS should be banished.
14202
14203 * src/output.c (output_token_translations): Rename as...
14204 (prepare_tokens): this.
14205 In addition to `translate', prepare the muscles `tname' and
14206 `toknum', which were handled by...
14207 (output_rule_data): this.
14208 Remove, and move the remainder of its outputs into...
14209 (prepare_rules): this new routines, which also merges content from
14210 (output_gram): this.
14211 (prepare_rules): Be sure never to walk through RITEMS.
14212 (output_stos): Rename as...
14213 (prepare_stos): this.
14214 (output): Always invoke prepare_states, after all, just don't use it
14215 in the output if you don't need it.
14216
142172002-04-07 Akim Demaille <akim@epita.fr>
14218
14219 * src/LR0.c (new_state): Display `nstates' as the name of the
14220 newly created state.
14221 Adjust to initialize first_state and last_state if needed.
14222 Be sure to distinguish the initial from the final state.
14223 (new_states): Create the itemset of the initial state, and use
14224 new_state.
14225 * src/closure.c (closure): Now that the initial state has its
14226 items properly set, there is no need for a special case when
14227 creating `ruleset'.
14228
14229 As a result, now the rule 0, reducing to $axiom, is visible in the
14230 outputs. Adjust the test suite.
14231
14232 * tests/conflicts.at (Solved SR Conflicts)
14233 (Unresolved SR Conflicts): Adjust.
14234 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14235 * tests/conflicts.at (S/R in initial): New.
14236
142372002-04-07 Akim Demaille <akim@epita.fr>
14238
14239 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14240 the RHS of the rules.
14241 * src/output.c (output_gram): Likewise.
14242
142432002-04-07 Akim Demaille <akim@epita.fr>
14244
14245 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14246 bucket.
14247 Adjust all dependencies.
14248 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14249 `number' of the buckets too.
14250 * src/gram.h: Include `symtab.h'.
14251 (associativity): Move to...
14252 * src/symtab.h: here.
14253 No longer include `gram.h'.
14254
142552002-04-07 Akim Demaille <akim@epita.fr>
14256
14257 * src/gram.h, src/gram.c (rules_rhs_length): New.
14258 (ritem_longest_rhs): Use it.
14259 * src/gram.h (rule_t): `number' is a new member.
14260 * src/reader.c (packgram): Set it.
14261 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14262 the end of `rules', and count them out of `nrules'.
14263 (reduce_output, dump_grammar): Adjust.
14264 * src/print.c (print_grammar): It is no longer needed to check for
14265 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14266 * tests/reduce.at (Reduced Automaton): New test.
14267
142682002-04-07 Akim Demaille <akim@epita.fr>
14269
14270 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14271 lacking `+ 1' to nrules, Bison reported as useless a token if it
14272 was used solely to set the precedence of the last rule...
14273
142742002-04-07 Akim Demaille <akim@epita.fr>
14275
14276 * data/bison.c++, data/bison.simple: Don't output the current file
14277 name in #line, to avoid useless diffs between two identical
14278 outputs under different names.
14279
142802002-04-07 Akim Demaille <akim@epita.fr>
14281
14282 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14283 Normalize loops to using `< nrules + 1', not `<= nrules'.
14284
142852002-04-07 Akim Demaille <akim@epita.fr>
14286
14287 * TODO: Update.
14288
142892002-04-07 Akim Demaille <akim@epita.fr>
14290
14291 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14292 bucket.value as bucket.number.
14293
142942002-04-07 Akim Demaille <akim@epita.fr>
14295
14296 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14297 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14298 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14299 RHS, instead of being an index in RITEMS.
14300
143012002-04-04 Paul Eggert <eggert@twinsun.com>
14302
14303 * doc/bison.texinfo: Update copyright date.
14304 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14305 (Symbols): Warn about running Bison in one character set,
14306 but compiling and/or running in an incompatible one.
14307 Warn about character code 256, too.
14308
143092002-04-03 Paul Eggert <eggert@twinsun.com>
14310
14311 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14312 YYERROR_VERBOSE is nonzero, not whether it is defined.
14313
14314 Merge changes from bison-1_29-branch.
14315
143162002-03-20 Paul Eggert <eggert@twinsun.com>
14317
14318 Merge fixes from Debian bison_1.34-1.diff.
14319
14320 * configure.in (AC_PREREQ): 2.53.
14321
143222002-03-20 Akim Demaille <akim@epita.fr>
14323
14324 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14325
143262002-03-19 Paul Eggert <eggert@twinsun.com>
14327
14328 * src/bison.simple (YYCOPY): New macro.
14329 (YYSTACK_RELOCATE): Use it.
14330 Remove Type arg; no longer needed. All callers changed.
14331 (yymemcpy): Remove; no longer needed.
14332
14333 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14334 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14335
143362002-03-19 Akim Demaille <akim@epita.fr>
14337
14338 Test and fix the #line outputs.
14339
14340 * tests/atlocal.at (GCC): New.
14341 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14342 (Prologue synch line, %union synch line, Postprologue synch line)
14343 (Action synch line, Epilogue synch line): New tests.
14344 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14345 * data/bison.simple, data/bison.c++: Use it.
14346
143472002-03-19 Akim Demaille <akim@epita.fr>
14348
14349 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14350 (Solved SR Conflicts, %expect not enough, %expect right)
14351 (%expect too much): Move to...
14352 * tests/conflicts.at: this new file.
14353
143542002-03-19 Akim Demaille <akim@epita.fr>
14355
14356 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14357 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14358 that we can move to enums for instance.
14359 * src/output.c (token_definitions_output): Output a list of
14360 `token-name, token-number' instead of the #define.
14361 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14362
143632002-03-14 Akim Demaille <akim@epita.fr>
14364
14365 Use Gettext 0.11.1.
14366
143672002-03-09 Robert Anisko <robert@lrde.epita.fr>
14368
14369 * data/bison.c++: Make the user able to add members to the generated
14370 parser by subclassing.
14371
143722002-03-05 Robert Anisko <robert@lrde.epita.fr>
14373
14374 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14375 a character.
14376 Reported by Nicolas Tisserand and Nicolas Burrus.
14377
143782002-03-04 Robert Anisko <robert@lrde.epita.fr>
14379
14380 * src/reader.c: Warn about lacking semi-colons, do not complain.
14381
143822002-03-04 Robert Anisko <robert@lrde.epita.fr>
14383
14384 * data/bison.c++: Remove a debug line.
14385
143862002-03-04 Robert Anisko <robert@lrde.epita.fr>
14387
14388 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14389 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14390 provide a default implementation.
14391
143922002-03-04 Akim Demaille <akim@epita.fr>
14393
14394 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14395 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14396 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14397 * tests/semantic.at (Parsing Guards): Similarly.
14398 * src/reader.at (readgram): Complain if the last rule is not ended
14399 with a semi-colon.
14400
144012002-03-04 Akim Demaille <akim@epita.fr>
14402
14403 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14404 * src/closure.c: here.
14405 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14406 RTC.
14407 * src/warshall.h, src/warshall.c: Remove.
14408 * tests/sets.at (Broken Closure): Adjust.
14409
144102002-03-04 Akim Demaille <akim@epita.fr>
14411
14412 * src/output.c (output_skeleton): tempdir is const.
14413 bytes_read is unused.
14414
144152002-03-04 Akim Demaille <akim@epita.fr>
14416
14417 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14418 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14419 Update.
14420 From Michael Hayes.
14421
144222002-03-04 Akim Demaille <akim@epita.fr>
14423
14424 * src/closure.c (closure): `r' is unused.
14425
144262002-03-04 Akim Demaille <akim@epita.fr>
14427
14428 * tests/sets.at (Broken Closure): Add the ending `;'.
14429 * src/reader.at (readgram): Complain if a rule is not ended with a
14430 semi-colon.
14431
144322002-03-04 Akim Demaille <akim@epita.fr>
14433
14434 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14435 (count_sr_conflicts): Use bitset_count.
14436 * src/reduce.c (inaccessable_symbols): Ditto.
14437 (bits_size): Remove.
14438 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14439
144402002-03-04 Akim Demaille <akim@epita.fr>
14441
14442 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14443 * src/reduce.c: Remove the `bitset_zero's following the
14444 `bitset_create's, as now it is performed by the latter.
14445
144462002-03-04 Akim Demaille <akim@epita.fr>
14447
14448 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14449 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14450 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14451 latest sources from Michael.
14452
144532002-03-04 Akim Demaille <akim@epita.fr>
14454
14455 * src/output.c (output): Don't free the grammar.
14456 * src/reader.c (grammar_free): New.
14457 * src/main.c (main): Call it and don't free symtab here.
14458
144592002-03-04 Akim Demaille <akim@epita.fr>
14460
14461 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14462 before returning.
14463 Reported by Benoit Perrot.
14464
144652002-03-04 Akim Demaille <akim@epita.fr>
14466
14467 Use bitset operations when possible, not loops over bits.
14468
14469 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14470 bitset_or.
14471 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14472 * src/reduce.c (useless_nonterminals): Formatting changes.
14473 * src/warshall.c (TC): Use bitset_or.
14474
144752002-03-04 Akim Demaille <akim@epita.fr>
14476
14477 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14478 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14479 Ditto.
14480
144812002-03-04 Akim Demaille <akim@epita.fr>
14482
14483 * src/lalr.c (F): Now a bitset*.
14484 Adjust all dependencies.
14485
144862002-03-04 Akim Demaille <akim@epita.fr>
14487
14488 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14489 Adjust all dependencies.
14490
144912002-03-04 Akim Demaille <akim@epita.fr>
14492
14493 * src/L0.c, src/LR0.h (nstates): Be size_t.
14494 Adjust comparisons (signed vs unsigned).
14495 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14496 bitset*.
14497 Adjust all dependencies.
14498
144992002-03-04 Akim Demaille <akim@epita.fr>
14500
14501 * src/closure.c (firsts): Now, also a bitset.
14502 Adjust all dependencies.
14503 (varsetsize): Remove, now unused.
14504 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14505
145062002-03-04 Akim Demaille <akim@epita.fr>
14507
14508 * src/print.c: Convert to use bitset.h, not hand coded iterations
14509 over ints.
14510
145112002-03-04 Akim Demaille <akim@epita.fr>
14512
14513 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14514
145152002-03-04 Akim Demaille <akim@epita.fr>
14516
14517 * src/closure.c (ruleset): Be a bitset.
14518 (rulesetsize): Remove.
14519
145202002-03-04 Akim Demaille <akim@epita.fr>
14521
14522 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14523 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14524 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14525 * src/closure.c (fderives): Be an array of bitsets.
14526
145272002-02-28 Robert Anisko <robert@lrde.epita.fr>
14528
14529 * data/bison.c++: Merge the two generated headers. Insert a copyright
14530 notice in each output file.
14531
145322002-02-28 Akim Demaille <akim@epita.fr>
14533
14534 * data/bison.c++: Copy the prologue of bison.simple to fetch
14535 useful M4 definitions, such as b4_header_guard.
14536
145372002-02-25 Akim Demaille <akim@epita.fr>
14538
14539 * src/getargs.c (version): Give the name of the authors, and use a
14540 translator friendly scheme for the bgr
14541 copyright notice.
14542
145432002-02-25 Akim Demaille <akim@epita.fr>
14544
14545 * src/output.c (header_output): Remove, now handled completely via
14546 M4.
14547
145482002-02-25 Akim Demaille <akim@epita.fr>
14549
14550 * m4/m4.m4: New, from CVS Autoconf.
14551 * configure.in: Invoke it.
14552 * src/output.c (output_skeleton): Use its result instead of the
14553 hard coded name.
14554
145552002-02-25 Akim Demaille <akim@epita.fr>
14556
14557 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14558 Fileutils 4.1.5.
14559 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14560 * src/output.c (output_skeleton): Use mkstemp to create a real
14561 temporary file.
14562 Move the filling of `skeleton' and its muscle to...
14563 (prepare): here.
14564 (output): Move the definition of the prologue muscle to...
14565 (prepare): here.
14566 * src/system.h (DEFAULT_TMPDIR): New.
14567
145682002-02-14 Paul Eggert <eggert@twinsun.com>
14569
14570 Remove the support for C++ namespace cleanliness; it was
14571 causing more problems than it was curing, since it didn't work
14572 properly on some nonstandard C++ compilers. This can wait
14573 for a proper C++ parser.
14574
14575 * NEWS: Document this.
14576 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14577 of C++, as it's treated like C now.
14578 * src/bison.simple (YYSTD): Remove.
14579 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14580 Treat C++ just like Standard C instead of trying to support
14581 namespace cleanliness.
14582
145832002-02-14 Akim Demaille <akim@epita.fr>
14584
14585 * tests/regression.at (else): Adjust to Andreas' change.
14586
145872002-02-14 Akim Demaille <akim@epita.fr>
14588
14589 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14590
145912002-02-13 Andreas Schwab <schwab@suse.de>
14592
14593 * src/output.c (output_rule_data): Don't output NULL, it might
14594 not be defined yet.
14595
145962002-02-11 Robert Anisko <robert@lrde.epita.fr>
14597
14598 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14599 (Copyright notice): Update.
14600
146012002-02-11 Akim Demaille <akim@epita.fr>
14602
14603 * tests/regression.at (%nonassoc and eof): Don't include
14604 nonportable headers.
14605
146062002-02-08 Robert Anisko <robert@lrde.epita.fr>
14607
14608 * data/bison.c++: Correct error recovery. Make the user able to
14609 initialize the starting location.
14610
146112002-02-07 Akim Demaille <akim@epita.fr>
14612
14613 * tests/input.at: New.
14614
146152002-02-07 Robert Anisko <robert@lrde.epita.fr>
14616
14617 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14618 more consistent when naming methods and variables. Put preprocessor
14619 directives around tables only needed for debugging.
14620
146212002-02-07 Robert Anisko <robert@lrde.epita.fr>
14622
14623 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14624 C++ parsers.
14625 (yy::b4_name::parse): Use print_.
14626
146272002-02-07 Robert Anisko <robert@lrde.epita.fr>
14628
14629 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14630
146312002-02-07 Robert Anisko <robert@lrde.epita.fr>
14632
14633 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14634 C++ parsers.
14635 (yy::b4_name::parse): Build verbose error messages, and use error_.
14636
146372002-02-06 Robert Anisko <robert@lrde.epita.fr>
14638
14639 * data/bison.c++: Fix m4 quoting in comments.
14640
146412002-02-06 Robert Anisko <robert@lrde.epita.fr>
14642
14643 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14644 not expanded by m4.
14645
146462002-02-05 Akim Demaille <akim@epita.fr>
14647
14648 * data/bison.c++: Adjust to the M4 back end.
14649 More is certainly needed.
14650
146512002-02-05 Akim Demaille <akim@epita.fr>
14652
14653 Give a try to M4 as a back end.
14654
14655 * lib/readpipe.c: New, from wdiff.
14656 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14657 BISON_HAIRY.
14658 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14659 specific values. Now it is m4 that performs the lookup.
14660 * src/parse-skel.y: Remove.
14661 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14662 * src/output.c (actions_output, guards_output)
14663 (token_definitions_output): No longer keeps track of the output
14664 line number, hence remove the second argument.
14665 (guards_output): Check against the guard member of a rule, not the
14666 action member.
14667 Adjust callers.
14668 (output_skeleton): Don't look for the skeleton location, let m4 do
14669 that.
14670 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14671 file will be used.
14672 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14673 (prepare): Given that for the time being changesyntax is not
14674 usable in M4, rename the muscles using `-' to `_'.
14675 Define `defines_flag', `output_parser_name' and `output_header_name'.
14676 * src/output.h (actions_output, guards_output)
14677 (token_definitions_output): Adjust prototypes.
14678 * src/scan-skel.l: Instead of scanning the skeletons, it now
14679 processes the output of m4: `__oline__' and `#output'.
14680 * data/bison.simple: Adjust to be used by M4(sugar).
14681 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14682 to date.
14683 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14684 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
14685 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
14686 shamelessly stolen from CVS Autoconf.
14687
146882002-02-05 Akim Demaille <akim@epita.fr>
14689
14690 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
14691 * configure.in: Check for the declarations of free and malloc.
14692 * src/muscle_tab.c: Adjust.
14693
146942002-02-05 Akim Demaille <akim@epita.fr>
14695
14696 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
14697 which have no values.
14698
146992002-02-05 Akim Demaille <akim@epita.fr>
14700
14701 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
14702 * data/: here.
14703
147042002-01-29 Paul Eggert <eggert@twinsun.com>
14705
14706 * src/bison.simple (YYSIZE_T): Do not define merely because
14707 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
14708 On some platforms, <alloca.h> does not declare YYSTD (size_t).
14709
147102002-01-27 Akim Demaille <akim@epita.fr>
14711
14712 Fix `%nonassoc and eof'.
14713
14714 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
14715 which were not properly copied! Replace
14716 memcpy (res->errs, src->errs, src->nerrs);
14717 with
14718 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
14719 !!!
14720 * tests/regression.at (%nonassoc and eof): Adjust to newest
14721 Autotest: `.' is not in the PATH.
14722
147232002-01-27 Akim Demaille <akim@epita.fr>
14724
14725 * tests/sets.at (AT_EXTRACT_SETS): New.
14726 (Nullable): Use it.
14727 (Firsts): New.
14728
147292002-01-26 Akim Demaille <akim@epita.fr>
14730
14731 * tests/actions.at, tests/calc.at, tests/headers.at,
14732 * tests/torture.at: Adjust to the newest Autotest which no longer
14733 forces `.' in the PATH.
14734
147352002-01-25 Akim Demaille <akim@epita.fr>
14736
14737 * tests/regression.at (%nonassoc and eof): New.
14738 Suggested by Robert Anisko.
14739
147402002-01-24 Akim Demaille <akim@epita.fr>
14741
14742 Bison dumps core when trying to complain about broken input files.
14743 Reported by Cris van Pelt.
14744
14745 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
14746 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
14747 into...
14748 (Invalid inputs): Strengthen: exercise parse_percent_token.
14749
147502002-01-24 Robert Anisko <robert.anisko@epita.fr>
14751
14752 * src/Makefile.am: Add bison.c++.
14753 * src/bison.c++: New skeleton.
14754
147552002-01-21 Paolo Bonzini <bonzini@gnu.org>
14756
14757 * po/it.po: New.
14758
147592002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
14760
14761 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
14762
147632002-01-20 Marc Autret <marc@gnu.org>
14764
14765 * src/files.c (compute_output_file_names): Fix
14766
147672002-01-20 Marc Autret <marc@gnu.org>
14768
14769 * tests/output.at: New test.
14770 * src/files.c (compute_base_names): Don't map extensions when
14771 the YACC flag is set, use defaults.
14772 Reported by Evgeny Stambulchik.
14773
147742002-01-20 Marc Autret <marc@gnu.org>
14775
14776 * src/system.h: Need to define __attribute__ away for non-GCC
14777 compilers as well (i.e., the vendor C compiler).
14778 Suggested by Albert Chin-A-Young.
14779
147802002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
14781
14782 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
14783 canonical definition.
14784 * src/system.h: Use the canonical definition for PARAMS (avoids
14785 a conflict with the macro from lib/hash.h).
14786
147872002-01-11 Akim Demaille <akim@epita.fr>
14788
14789 * configure.in: Use AC_FUNC_STRNLEN.
14790 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
14791
147922002-01-09 Akim Demaille <akim@epita.fr>
14793
14794 * src/files.c, src/files.h (output_infix): New.
14795 (tab_extension): Remove.
14796 (compute_base_names): Compute the former, drop the latter.
14797 * src/output.c (prepare): Insert the muscles `output-infix', and
14798 `output-suffix'.
14799 * src/parse-skel.y (string, string.1): New.
14800 (section.header): Use it.
14801 (section.yacc): Remove.
14802 (prefix): Remove too.
14803 * src/scan-skel.l: Adjust.
14804 * src/bison.simple, src/bison.hairy: Adjust.
14805
148062002-01-09 Akim Demaille <akim@epita.fr>
14807
14808 * configure.in (WERROR_CFLAGS): Compute it.
14809 * src/Makefile.am (CFLAGS): Pass it.
14810 * tests/atlocal.in (CFLAGS): Idem.
14811 * src/files.c: Fix a few warnings.
14812 (get_extension_index): Remove, unused.
14813
148142002-01-08 Akim Demaille <akim@epita.fr>
14815
14816 * src/getargs.c (AS_FILE_NAME): New.
14817 (getargs): Use it to convert DOSish file names.
14818 * src/files.c (base_name): Rename as full_base_name to avoid
14819 clashes with `base_name ()'.
14820 (filename_split): New.
14821 (compute_base_names): N-th rewrite, using filename_split.
14822
148232002-01-08 Akim Demaille <akim@epita.fr>
14824
14825 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
14826 New, stolen from the Fileutils 4.1.
14827 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
14828 * configure.in: Check for the presence of memrchr, and of its
14829 prototype.
14830
148312002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
14832
14833 * lib/hash.h (__P): Added definition for this macro.
14834 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
14835 BUILT_SOURCES, to ensure they are generated first.
14836 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
14837 %error-verbose to allow bootstrapping with bison 1.30x.
14838
148392002-01-06 Akim Demaille <akim@epita.fr>
14840
14841 * src/reader.c (parse_braces): Don't fetch the next char, the
14842 convention is to fetch on entry.
14843 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
14844 'switch' without a following semicolon.
14845 * tests/regression.at (braces parsing): New.
14846
148472002-01-06 Akim Demaille <akim@epita.fr>
14848
14849 Bison is dead wrong in its RR conflict reports.
14850
14851 * tests/torture.at (GNU Cim Grammar): New.
14852 * src/conflicts.c (count_rr_conflicts): Fix.
14853
148542002-01-06 Akim Demaille <akim@epita.fr>
14855
14856 Creating package.m4 from configure.ac causes too many problems.
14857
14858 * tests/Makefile.am (package.m4): Create it by hand,
14859 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
14860
148612002-01-06 Akim Demaille <akim@epita.fr>
14862
14863 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
14864 skeleton.h.
14865
148662002-01-04 Paul Eggert <eggert@twinsun.com>
14867
14868 * doc/bison.texinfo (Debugging):
14869 Remove YYSTDERR; it's no longer defined or used.
14870 Also, s/cstdio.h/cstdio/.
14871
148722002-01-03 Akim Demaille <akim@epita.fr>
14873
14874 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
14875
148762002-01-03 Akim Demaille <akim@epita.fr>
14877
14878 * src/parse-skel.y (process_skeleton): Don't bind the parser's
14879 tracing code to --trace, wait for a better --trace option, with
14880 args.
14881
148822002-01-03 Akim Demaille <akim@epita.fr>
14883
14884 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
14885 The ISO C++ standard is extremely clear about it: stderr is
14886 considered a macro, not a regular symbol (see table 94 `Header
14887 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
14888 Therefore std:: does not apply to it. It still does with fprintf.
14889 Also, s/cstdio.h/cstdio/.
14890
148912002-01-03 Akim Demaille <akim@epita.fr>
14892
14893 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
14894 for non system headers.
14895
148962002-01-02 Akim Demaille <akim@epita.fr>
14897
14898 Equip the skeleton chain with location tracking, runtime trace,
14899 pure parser and scanner.
14900
14901 * src/parse-skel.y: Request a pure parser, locations, and prefix
14902 renaming.
14903 (%union): Having several members with the same type does not help
14904 type mismatches, simplify.
14905 (YYPRINT, yyprint): New.
14906 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
14907 (skel_error): this.
14908 Handle locations.
14909 * src/scan-skel.l: Adjust to these changes.
14910 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
14911 (LOCATION_PRINT, skel_control_t): New.
14912
149132001-12-30 Akim Demaille <akim@epita.fr>
14914
14915 * src/parse-skel.y: Get rid of the shift/reduce conflict:
14916 replace `gb' with BLANKS.
14917 * src/scan-skel.l: Adjust.
14918
149192001-12-30 Akim Demaille <akim@epita.fr>
14920
14921 * src/system.h: We don't need nor want bcopy.
14922 Throw away MS-DOS crap: we don't need getpid.
14923 * configure.in: We don't need strndup. It was even causing
14924 problems: because Flex includes the headers *before* us,
14925 _GNU_SOURCE is not defined by config.h, and therefore strndup was
14926 not visible.
14927 * lib/xstrndup.c: New.
14928 * src/scan-skel.l: Use it.
14929 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
14930 * src/parse-skel.y: Use %directives instead of #defines.
14931
149322001-12-30 Akim Demaille <akim@epita.fr>
14933
14934 * src/skeleton.h: New.
14935 * src/output.c (output_parser, output_master_parser): Remove, dead
14936 code.
14937 * src/output.h (get_lines_number, actions_output, guards_output)
14938 (token_definitions_output): Prototype them.
14939 * src/parse-skel.y: Add the license notice.
14940 Include output.h and skeleton.h.
14941 (process_skeleton): Returns void, and takes a single parameter.
14942 * src/scan-skel.l: Add the license notice.
14943 Include skeleton.h.
14944 Don't use %option yylineno: it seems that then Flex imagines
14945 REJECT has been used, and therefore it won't reallocate its
14946 buffers (which makes no other sense to me than a bug). It results
14947 in warnings for `unused: yy_flex_realloc'.
14948
149492001-12-30 Robert Anisko <robert.anisko@epita.fr>
14950
14951 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
14952 (MUSCLE_INSERT_PREFIX): ...to there.
14953 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
14954 (MUSCLE_INSERT_PREFIX): Move from here...
14955
14956 * src/bison.hairy: Add a section directive. Put braces around muscle
14957 names. This parser skeleton is still broken, but Bison should not
14958 choke on a bad muscle 'syntax'.
14959 * src/bison.simple: Add a section directive. Put braces around muscle
14960 names.
14961
14962 * src/files.h (strsuffix, stringappend): Add declarations.
14963 (tab_extension): Add declaration.
14964 (short_base_name): Add declaration.
14965
14966 * src/files.c (strsuffix, stringappend): No longer static. These
14967 functions are used in the skeleton parser.
14968 (tab_extension): New.
14969 (compute_base_names): Use the computations done in this function
14970 to guess if the generated parsers should have '.tab' in their
14971 names.
14972 (short_base_name): No longer static.
14973
14974 * src/output.c (output_skeleton): New.
14975 (output): Disable call to output_master_parser, and give a try to
14976 a new skeleton handling system.
14977 (guards_output, actions_output): No longer static.
14978 (token_definitions_output, get_lines_number): No longer static.
14979
14980 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
14981
14982 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
14983 parse-skel.y.
14984
14985 * src/parse-skel.y: New file.
14986 * src/scan-skel.l: New file.
14987
149882001-12-29 Akim Demaille <akim@epita.fr>
14989
14990 %name-prefix is broken.
14991
14992 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
14993 Adjust all dependencies.
14994 * tests/headers.at (export YYLTYPE): Strengthen this test: use
14995 %name-prefix.
14996
14997 Renaming yylval but not yylloc is not consistent. Now we do.
14998
14999 * src/bison.simple: Prefix yylloc if used.
15000 * doc/bison.texinfo (Decl Summary): Document that.
15001
150022001-12-29 Akim Demaille <akim@epita.fr>
15003
15004 * doc/bison.texinfo: Promote `%long-directive' over
15005 `%long_directive'.
15006 Remove all references to fixed-output-files, yacc is enough.
15007
150082001-12-29 Akim Demaille <akim@epita.fr>
15009
15010 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15011 user prologue. These are defaults.
15012 * tests/actions.at (Mid-rule actions): Make sure the user can
15013 define YYDEBUG and YYERROR_VERBOSE.
15014
150152001-12-29 Akim Demaille <akim@epita.fr>
15016
15017 * src/output.c (header_output): Don't forget to export YYLTYPE and
15018 yylloc.
15019 * tests/headers.at (export YYLTYPE): New, make sure it does.
15020 * tests/regression.at (%union and --defines, Invalid CPP headers):
15021 Move to...
15022 * tests/headers.at: here.
15023
150242001-12-29 Akim Demaille <akim@epita.fr>
15025
15026 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15027
150282001-12-29 Akim Demaille <akim@epita.fr>
15029
15030 * tests/actions.at (Mid-rule actions): Output on a single line
15031 instead of several.
15032
150332001-12-29 Akim Demaille <akim@epita.fr>
15034
15035 * doc/bison.texinfo: Formatting changes.
15036
150372001-12-29 Akim Demaille <akim@epita.fr>
15038
15039 Don't store the token defs in a muscle, just be ready to output it
15040 on command. Now possible via `symbols'. Fixes a memory leak.
15041
15042 * src/output.c (token_definitions_output): New.
15043 (output_parser, header_output): Use it.
15044 * src/reader.c (symbols_save): Remove.
15045
150462001-12-29 Akim Demaille <akim@epita.fr>
15047
15048 * src/bison.simple: Do not provide a default for YYSTYPE and
15049 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15050 default.
15051
150522001-12-29 Akim Demaille <akim@epita.fr>
15053
15054 Mid-rule actions are simply... ignored!
15055
15056 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15057 the empty-rule associated to the dummy symbol, not to the host
15058 rule.
15059 * tests/actions.at (Mid-rule actions): New.
15060
150612001-12-29 Akim Demaille <akim@epita.fr>
15062
15063 Memory leak.
15064
15065 * src/reader.c (reader): Free grammar.
15066
150672001-12-29 Akim Demaille <akim@epita.fr>
15068
15069 Memory leak.
15070
15071 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15072 since it allocates it for each state, although only one is needed.
15073 (allocate_storage): Do it here.
15074
150752001-12-29 Akim Demaille <akim@epita.fr>
15076
15077 * src/options.h, src/options.c (create_long_option_table): Rename
15078 as...
15079 (long_option_table_new): this, with a clearer prototype.
15080 (percent_table): Remove, unused,
15081 * src/getargs.c (getargs): Adjust.
15082
150832001-12-29 Akim Demaille <akim@epita.fr>
15084
15085 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15086 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15087 as states.
15088
150892001-12-29 Akim Demaille <akim@epita.fr>
15090
15091 * src/lalr.c (build_relations): Rename `states' as `states1'.
15092 Sorry, I don't understand exactly what it is, no better name...
15093
150942001-12-29 Akim Demaille <akim@epita.fr>
15095
15096 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15097 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15098 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15099 as rules.
15100
151012001-12-29 Akim Demaille <akim@epita.fr>
15102
15103 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15104 ago.
15105
151062001-12-29 Akim Demaille <akim@epita.fr>
15107
15108 * src/reader.c, src/reader.h (user_toknums): Remove.
15109 Adjust all users to use symbols[i]->user_token_number.
15110
151112001-12-29 Akim Demaille <akim@epita.fr>
15112
15113 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15114 Adjust all users to use symbols[i]->prec or ->assoc.
15115
151162001-12-29 Akim Demaille <akim@epita.fr>
15117
15118 * src/reader.c, src/reader.h (tags): Remove.
15119 Adjust all users to use symbols[i]->tag.
15120
151212001-12-29 Akim Demaille <akim@epita.fr>
15122
15123 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15124 and rule_table.
15125 * src/reader.c (packsymbols): Fill this table.
15126 Drop sprec.
15127 * src/conflicts.c (resolve_sr_conflict): Adjust.
15128 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15129 single table.
15130 Use symbols[i]->tag instead of tags[i].
15131
151322001-12-29 Akim Demaille <akim@epita.fr>
15133
15134 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15135 In addition, put a comment in there, to replace...
15136 * tests/regression.at (%union and C comments): Remove.
15137
151382001-12-29 Akim Demaille <akim@epita.fr>
15139
15140 * tests/regression.at (Web2c Actions): Blindly move the actual
15141 output as expected output. The contents *seem* right to me, but I
15142 can't pretend reading perfectly parser tables... Nonetheless, all
15143 the other tests pass correctly, the table look OK, even though the
15144 presence of `$axiom' is to be noted: AFAICS it is useless (but
15145 harmless).
15146
151472001-12-29 Akim Demaille <akim@epita.fr>
15148
15149 * src/reader.c (readgram): Don't add the rule 0 if there were no
15150 rules read. In other words, add it _after_ having performed
15151 grammar sanity checks.
15152 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15153
151542001-12-29 Akim Demaille <akim@epita.fr>
15155
15156 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15157 visible, and some states have now a different number.
15158
151592001-12-29 Akim Demaille <akim@epita.fr>
15160
15161 * src/reader.c (readgram): Bind the initial rule's lineno to that
15162 of the first rule.
15163 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15164 (Solved SR Conflicts): Adjust rule 0's line number.
15165
151662001-12-29 Akim Demaille <akim@epita.fr>
15167
15168 Fix the `GAWK Grammar' failure.
15169
15170 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15171 the reductions of the first state which was mistakenly confused
15172 with the final state because precisely final_state was initialized
15173 to 0.
15174 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15175 now noticed by Bison.
15176 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15177 have a reduction on $default.
15178
151792001-12-29 Akim Demaille <akim@epita.fr>
15180
15181 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15182 rule line numbers.
15183 * src/closure.c (print_closure): Likewise.
15184 * src/derives.c (print_derives): Likewise.
15185 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15186 now.
15187
151882001-12-29 Akim Demaille <akim@epita.fr>
15189
15190 * src/lalr.c (lookaheads_print): New.
15191 (lalr): Call it when --trace-flag.
15192 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15193 are dumped.
15194
151952001-12-29 Akim Demaille <akim@epita.fr>
15196
15197 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15198 when walking through ritem, even via rule->rhs.
15199 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15200 (useful_production, useless_nonterminals): Likewise.
15201 (reduce_grammar_tables): Likewise, plus update nritems.
15202 * src/nullable.c (set_nullable): Likewise.
15203 * src/lalr.c (build_relations): Likewise.
15204 * tests/sets.at (Nullable): Adjust.
15205 Fortunately, now, the $axiom is no longer nullable.
15206
152072001-12-29 Akim Demaille <akim@epita.fr>
15208
15209 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15210 the 0-sentinel.
15211 * src/gram.c (ritem_longest_rhs): Likewise.
15212 * src/reduce.c (nonterminals_reduce): Likewise.
15213 * src/print_graph.c (print_graph): Likewise.
15214 * src/output.c (output_rule_data): Likewise.
15215 * src/nullable.c (set_nullable): Likewise.
15216
152172001-12-29 Akim Demaille <akim@epita.fr>
15218
15219 * src/output.c: Comment changes.
15220
152212001-12-27 Paul Eggert <eggert@twinsun.com>
15222
15223 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15224 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15225 Sparc, as they were causing more porting problems than the
15226 (minor) performance improvement was worth.
15227
15228 Also, catch up with 1.31's YYSTD.
15229
152302001-12-27 Akim Demaille <akim@epita.fr>
15231
15232 * src/output.c (output_gram): Rely on nritems, not the
15233 0-sentinel. See below.
15234 Use -1 as separator, not 0.
15235 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15236 Rely on -1 as separator in yyrhs, instead of 0.
15237 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15238 twice `Now at end of input', therefore there are two lines less to
15239 expect.
15240
152412001-12-27 Akim Demaille <akim@epita.fr>
15242
15243 * tests/regression.at (Unresolved SR Conflicts):
15244 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15245 below.
15246
152472001-12-27 Akim Demaille <akim@epita.fr>
15248
15249 * src/LR0.c (new_state): Recognize the final state by the fact it
15250 is reached by eoftoken.
15251 (insert_start_shifting_state, insert_eof_shifting_state)
15252 (insert_accepting_state, augment_automaton): Remove, since now
15253 these states are automatically computed from the initial state.
15254 (generate_states): Adjust.
15255 * src/print.c: When reporting a rule number to the user, substract
15256 1, so that the axiom rule is rule 0, and the first user rule is 1.
15257 * src/reduce.c: Likewise.
15258 * src/print_graph.c (print_core): For the time being, just as for
15259 the report, depend upon --trace-flags to dump the full set of
15260 items.
15261 * src/reader.c (readgram): Once the grammar read, insert the rule
15262 0: `$axiom: START-SYMBOL $'.
15263 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15264 number of the states has changed (the final state is no longer
15265 necessarily the last), catch up.
15266
152672001-12-27 Akim Demaille <akim@epita.fr>
15268
15269 Try to make the use of the eoftoken valid. Given that its value
15270 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15271 is used instead of > 0 where appropriate, (ii), depend upon nritems
15272 instead of the 0-sentinel.
15273
15274 * src/gram.h, src/gram.c (nritems): New.
15275 Expected to be duplication of nitems, but for the time being...
15276 * src/reader.c (packgram): Assert nritems and nitems are equal.
15277 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15278 * src/closure.c (print_closure, print_fderives): Likewise.
15279 * src/gram.c (ritem_print): Likewise.
15280 * src/print.c (print_core, print_grammar): Likewise.
15281 * src/print_graph.c: Likewise.
15282
152832001-12-27 Akim Demaille <akim@epita.fr>
15284
15285 * src/main.c (main): If there are complains after grammar
15286 reductions, then output the report anyway if requested, then die.
15287 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15288 * src/reader.c (eoftoken): New.
15289 (parse_token_decl): If the token being defined has value `0', it
15290 is the eoftoken.
15291 (packsymbols): No longer hack `tags' to insert `$' by hand.
15292 Be sure to preserve the value of the eoftoken.
15293 (reader): Make sure eoftoken is defined.
15294 Initialize nsyms to 0: now eoftoken is created just like the others.
15295 * src/print.c (print_grammar): Don't special case the eof token.
15296 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15297 lie anyway, albeit pleasant.
15298 * tests/calc.at: Exercise error messages with eoftoken.
15299 Change the grammar so that empty input is invalid.
15300 Adjust expectations.
15301 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15302
153032001-12-27 Akim Demaille <akim@epita.fr>
15304
15305 * configure.in: Check the protos of strchr ans strspn.
15306 Replace strchr if needed.
15307 * src/system.h: Provide the protos of strchr, strspn and memchr if
15308 missing.
15309 * lib/strchr.c: New.
15310 * src/reader.c (symbols_save): Use strchr.
15311
153122001-12-27 Akim Demaille <akim@epita.fr>
15313
15314 * src/print.c, src/print_graph.c (escape): New.
15315 Use it to quote the TAGS outputs.
15316 * src/print_graph.c (print_state): Now errors are in red, and
15317 reductions in green.
15318 Prefer high to wide: output the state number on a line of its own.
15319
153202001-12-27 Akim Demaille <akim@epita.fr>
15321
15322 * src/state.h, src/state.c (reductions_new): New.
15323 * src/LR0.c (set_state_table): Let all the states have a
15324 `reductions', even if reduced to 0.
15325 (save_reductions): Adjust.
15326 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15327 * src/print.c (print_reductions, print_actions): Adjust.
15328 * src/output.c (action_row): Adjust.
15329
153302001-12-27 Akim Demaille <akim@epita.fr>
15331
15332 * src/state.h, src/state.c (errs_new, errs_dup): New.
15333 * src/LR0.c (set_state_table): Let all the states have an errs,
15334 even if reduced to 0.
15335 * src/print.c (print_errs, print_reductions): Adjust.
15336 * src/output.c (output_actions, action_row): Adjust.
15337 * src/conflicts.c (resolve_sr_conflict): Adjust.
15338
153392001-12-27 Akim Demaille <akim@epita.fr>
15340
15341 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15342
153432001-12-27 Akim Demaille <akim@epita.fr>
15344
15345 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15346 * src/print.c: here.
15347 (lookaheadset, shiftset): New, used as additional storage by
15348 print_reductions.
15349 (print_results): Adjust.
15350 (print_shifts, print_gotos, print_errs): New, extracted from...
15351 (print_actions): here.
15352 * src/print_graph.c (print_actions): Remove dead code.
15353
153542001-12-27 Akim Demaille <akim@epita.fr>
15355
15356 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15357 `$n' and `@n'.
15358
153592001-12-27 Akim Demaille <akim@epita.fr>
15360
15361 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15362 (build_relations): Adjust.
15363
153642001-12-27 Akim Demaille <akim@epita.fr>
15365
15366 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15367 duplication.
15368
153692001-12-27 Akim Demaille <akim@epita.fr>
15370
15371 * src/reader.c (packgram): Catch nitems overflows.
15372
153732001-12-27 Akim Demaille <akim@epita.fr>
15374
15375 * src/files.c, src/files.h (guard_obstack): Remove.
15376 * src/output.c (output): Adjust.
15377 * src/reader.c (parse_braces): New, factoring...
15378 (copy_action, copy_guard): these two which are renamed as...
15379 (parse_action, parse_guard): these.
15380 As a voluntary consequence, using braces around guards is now
15381 mandatory.
15382
153832001-12-27 Akim Demaille <akim@epita.fr>
15384
15385 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15386 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15387 members.
15388 (symbol_list_new): Adjust.
15389 (copy_action): action_line is the first line, not the last.
15390 (copy_guard): Just as for actions, store the `action' only, not
15391 the switch/case/break flesh.
15392 Don't parse the user action that might follow the guard, let...
15393 (readgram): do it, i.e., now, there can be an action after a
15394 guard.
15395 In other words the guard is just explicitly optional.
15396 (packgram): Adjust.
15397 * src/output.c (guards_output): New.
15398 (output_parser): Call it when needed.
15399 (output): Also free the guard and attrs obstacks.
15400 * src/files.c, src/files.h (obstack_save): Remove.
15401 (output_files): Remove.
15402 As a result, if one needs the former `.act' file, using an
15403 appropriate skeleton which requires actions and guards is now
15404 required.
15405 * src/main.c (main): Adjust.
15406 * tests/semantic.at: New.
15407 * tests/regression.at: Use `input.y' as input file name.
15408 Avoid 8+3 problems by requiring input.c when the test needs the
15409 parser.
15410
154112001-12-27 Akim Demaille <akim@epita.fr>
15412
15413 * src/reader.c (symbol_list_new): Be sure to initialize all the
15414 fields.
15415
154162001-12-27 Akim Demaille <akim@epita.fr>
15417
15418 All the hacks using a final pseudo state are now useless.
15419
15420 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15421 * src/lalr.c (nLA): New.
15422 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15423 instead of lookaheadsp from the pseudo state (nstate + 1).
15424
154252001-12-27 Akim Demaille <akim@epita.fr>
15426
15427 * src/output.c (action_row, token_actions): Use a state_t instead
15428 of a integer, and nlookaheads instead of the following state's
15429 lookaheadsp.
15430
154312001-12-27 Akim Demaille <akim@epita.fr>
15432
15433 * src/conflicts.c (log_resolution, flush_shift)
15434 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15435 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15436 (conflicts_print, print_reductions): Use a state_t instead of an
15437 integer when referring to a state.
15438 As much as possible, depend upon nlookaheads, instead of the
15439 `lookaheadsp' member of the following state (since lookaheads of
15440 successive states are successive, the difference between state n + 1
15441 and n served as the number of lookaheads for state n).
15442 * src/lalr.c (add_lookback_edge): Likewise.
15443 * src/print.c (print_core, print_actions, print_state)
15444 (print_results): Likewise.
15445 * src/print_graph.c (print_core, print_actions, print_state)
15446 (print_graph): Likewise.
15447 * src/conflicts.h: Adjust.
15448
154492001-12-27 Akim Demaille <akim@epita.fr>
15450
15451 * src/bison.hairy: Formatting/comment changes.
15452 ANSIfy.
15453 Remove `register' indications.
15454 Add plenty of `static'.
15455
154562001-12-27 Akim Demaille <akim@epita.fr>
15457
15458 * src/output.c (prepare): Drop the muscle `ntbase' which
15459 duplicates ntokens.
15460 * src/bison.simple: Formatting/comment changes.
15461 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15462 is an undocumented synonym.
15463
154642001-12-22 Akim Demaille <akim@epita.fr>
15465
15466 * src/output.c (output_table_data): Change the prototype to use
15467 `int' for array ranges: some invocations do pass an int, not a
15468 short.
15469 Reported by Wayne Green.
15470
154712001-12-22 Akim Demaille <akim@epita.fr>
15472
15473 Some actions of web2c.y are improperly triggered.
15474 Reported by Mike Castle.
15475
15476 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15477 * tests/regression.at (Web2c): Rename as...
15478 (Web2c Report): this.
15479 (Web2c Actions): New.
15480
154812001-12-22 Akim Demaille <akim@epita.fr>
15482
15483 Reductions in web2c.y are improperly reported.
15484 Reported by Mike Castle.
15485
15486 * src/conflicts.c (print_reductions): Fix.
15487 * tests/regression.at (Web2c): New.
15488
154892001-12-18 Akim Demaille <akim@epita.fr>
15490
15491 Some host fail on `assert (!"foo")', which expands to
15492 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15493 Reported by Nelson Beebee.
15494
15495 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15496 `#define it_succeeded 0' and `assert (it_succeeded)'.
15497
154982001-12-17 Marc Autret <autret_m@epita.fr>
15499
15500 * src/bison.simple: Don't hard code the skeleton line and filename.
15501 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15502 New line counter 'skeleton_line' (skeleton-line muscle).
15503
155042001-12-17 Paul Eggert <eggert@twinsun.com>
15505
15506 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15507 YYDEBUG must be defined to a nonzero value.
15508
15509 * src/bison.simple (yytname): Do not assume that the user defines
15510 YYDEBUG to a properly parenthesized expression.
15511
155122001-12-17 Akim Demaille <akim@epita.fr>
15513
15514 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15515 nlookaheads is a new member.
15516 Adjust all users.
15517 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15518 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15519 state.
15520
155212001-12-17 Akim Demaille <akim@epita.fr>
15522
15523 * src/files.h, src/files.c (open_files, close_files): Remove.
15524 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15525 let...
15526 * src/reader.c (reader): Do it.
15527
155282001-12-17 Akim Demaille <akim@epita.fr>
15529
15530 * src/conflicts.c (print_reductions): Formatting changes.
15531
155322001-12-17 Akim Demaille <akim@epita.fr>
15533
15534 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15535 (flush_reduce): New.
15536 (resolve_sr_conflict): Adjust.
15537
155382001-12-17 Akim Demaille <akim@epita.fr>
15539
15540 * src/output.c (output_obstack): Be static and rename as...
15541 (format_obstack): this, to avoid any confusion with files.c's
15542 output_obstack.
15543 * src/reader.h (muscle_obstack): Move to...
15544 * src/output.h: here, since it's defined in output.c.
15545
155462001-12-17 Akim Demaille <akim@epita.fr>
15547
15548 * src/output.c (action_row, save_column, default_goto)
15549 (sort_actions, matching_state, pack_vector): Better variable
15550 locality.
15551
155522001-12-17 Akim Demaille <akim@epita.fr>
15553
15554 * src/output.c: Various formatting changes.
15555
155562001-12-17 Akim Demaille <akim@epita.fr>
15557
15558 * src/files.c (output_files): Free the output_obstack.
15559 * src/main.c (main): Call print and print_graph conditionally.
15560 * src/print.c (print): Work unconditionally.
15561 * src/print_graph.c (print_graph): Work unconditionally.
15562 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15563
155642001-12-16 Marc Autret <autret_m@epita.fr>
15565
15566 * src/output.c (actions_output): Fix. When we use %no-lines,
15567 there is one less line per action.
15568
155692001-12-16 Marc Autret <autret_m@epita.fr>
15570
15571 * src/bison.simple: Remove a useless #line directive.
15572 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15573 * src/output.c (get_lines_number): New.
15574 (output_parser): Adjust, now takes care about the lines of a
15575 output muscles.
15576 Fix line numbering.
15577 (actions_output): Computes the number of lines taken by actions.
15578 (output_master_parser): Insert new skeleton which is the name of
15579 the output parser file name.
15580
155812001-12-15 Marc Autret <autret_m@epita.fr>
15582
15583 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15584
155852001-12-15 Marc Autret <autret_m@epita.fr>
15586
15587 * src/output.c (output_gram): Keep track of the hairy one.
15588
155892001-12-15 Akim Demaille <akim@epita.fr>
15590
15591 Make `make distcheck' work.
15592
15593 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15594 system.h which uses libgettext.h.
15595
155962001-12-15 Akim Demaille <akim@epita.fr>
15597
15598 * src/nullable.c (set_nullable): Useless rules must be skipped,
15599 otherwise, since we range over their symbols, we might look at a
15600 nonterminal which no longer ``exists'', i.e., it is not counted in
15601 `nvars', hence we overflow our arrays.
15602
156032001-12-15 Akim Demaille <akim@epita.fr>
15604
15605 The header can also be produced directly, without any obstack!
15606 Yahoo!
15607
15608 * src/files.c, src/files.h (defines_obstack): Remove.
15609 (compute_header_macro): Global.
15610 (defines_obstack_save): Remove.
15611 * src/reader.c (parse_union_decl): No longer output to
15612 defines_obstack: its content can be found in the `stype' muscle
15613 anyway.
15614 (output_token_translations): Merge into...
15615 (symbols_output): this.
15616 Rename as...
15617 (symbols_save): this.
15618 (reader): Adjust.
15619 * src/output.c (header_output): New.
15620 (output): Call it.
15621
156222001-12-15 Akim Demaille <akim@epita.fr>
15623
15624 * src/reader.c (parse_union_decl): Instead of handling two obstack
15625 simultaneously, use one to define the `stype' muscle, and use the
15626 value of the latter to fill defines_obstack.
15627 (copy_comment): Remove.
15628 (copy_comment2): Work for a single obstack.
15629 Rename as...
15630 (copy_comment): this.
15631
156322001-12-15 Akim Demaille <akim@epita.fr>
15633
15634 * src/lex.c, src/lex.h (xgetc): No longer static.
15635 * src/reader.c (parse_union_decl): Revamp.
15636
156372001-12-15 Akim Demaille <akim@epita.fr>
15638
15639 Still making progress in separating Bison into (i) input, (ii)
15640 process, (iii) output: now we can directly output the parser file
15641 without using table_obstack at all.
15642
15643 * src/files.c, src/files.h (table_obstack): Bye bye.
15644 (parser_file_name): New.
15645 * src/files.c (compute_output_file_names): Compute it.
15646 * src/output.c (actions_output, output_parser)
15647 (output_master_parser): To a file instead of an obstack.
15648
156492001-12-15 Akim Demaille <akim@epita.fr>
15650
15651 Attach actions to rules, instead of pre-outputting them to
15652 actions_obstack.
15653
15654 * src/gram.h (rule_t): action and action_line are new members.
15655 * src/reader.c (symbol_list): Likewise.
15656 (copy_action): Save the actions within the rule.
15657 (packgram): Save them in rule_table.
15658 * src/output.c (actions_output): New.
15659 (output_parser): Use it on `%%actions'.
15660 (output_rule_data): Don't free rule_table.
15661 (output): Do it.
15662 (prepare): Don't save the `action' muscle.
15663 * src/bison.simple: s/%%action/%%actions/.
15664
156652001-12-15 Akim Demaille <akim@epita.fr>
15666
15667 * src/reader.c (copy_action): When --yacc, don't append a `;'
15668 to the user action: let it fail if lacking.
15669 Suggested by Arnold Robbins and Tom Tromey.
15670
156712001-12-14 Akim Demaille <akim@epita.fr>
15672
15673 * src/lex.c (literalchar): Simply return the char you decoded, non
15674 longer mess around with obstacks and int pointers.
15675 Adjust all callers.
15676
156772001-12-14 Akim Demaille <akim@epita.fr>
15678
15679 * src/lex.c (literalchar): Don't escape the special characters,
15680 just decode them, and keep them as char (before, eol was output as
15681 the 2 char string `\n' etc.).
15682 * src/output.c (output_rule_data): Use quotearg to output the
15683 token strings.
15684
156852001-12-13 Paul Eggert <eggert@twinsun.com>
15686
15687 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
15688 Do not infringe on the global user namespace when using C++.
15689 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
15690 All uses of `fprintf' and `stderr' changed.
15691
15692 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
15693
156942001-12-13 Akim Demaille <akim@epita.fr>
15695
15696 The computation of nullable is broken: it doesn't handle empty
15697 RHS's properly.
15698
15699 * tests/torture.at (GNU AWK Grammar): New.
15700 * tests/sets.at (Nullable): New.
15701 * src/nullable.c (set_nullable): Instead of blindly looping over
15702 `ritems', loop over the rules, and then over their rhs's.
15703
15704 Work around Autotest bugs.
15705
15706 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
15707 frame, because Autotest understand lines starting with a `+' as
15708 traces from the shell. Then, they are not processed properly.
15709 Admittedly an Autotest bug, but we don't have time to wait for
15710 Autotest to catch up.
15711 * tests/regression.at (Broken Closure): Adjust to the new table
15712 frames.
15713 Move to...
15714 * tests/sets.at: here.
15715
157162001-12-13 Akim Demaille <akim@epita.fr>
15717
15718 * src/closure.c (closure): Use nrules instead of playing tricks
15719 with BITS_PER_WORD.
15720
157212001-12-13 Akim Demaille <akim@epita.fr>
15722
15723 * src/print.c (print_actions): Output the handling of `$' as the
15724 traces do: shifting the token EOF. Before EOF was treated as a
15725 nonterminal.
15726 * tests/regression.at: Adjust some tests.
15727 * src/print_graph.c (print_core): Complete the set of items via
15728 closure. The next-to-final and final states are still unsatisfying,
15729 but that's to be addressed elsewhere.
15730 No longer output the rule numbers, but do output the state number.
15731 A single loop for the shifts + gotos is enough, but picked a
15732 distinct color for each.
15733 (print_graph): Initialize and finalize closure.
15734
157352001-12-13 Akim Demaille <akim@epita.fr>
15736
15737 * src/reader.c (readgram): Remove dead code, an strip useless
15738 braces.
15739 (get_type): Remove, unused.
15740
157412001-12-12 Akim Demaille <akim@epita.fr>
15742
15743 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
15744 on that of lib/error.c.
15745
157462001-12-12 Akim Demaille <akim@epita.fr>
15747
15748 Some hosts don't like `/' in includes.
15749
15750 * src/system.h: Include libgettext.h without qualifying the path.
15751 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
15752 $(top_srcdir).
15753
157542001-12-11 Marc Autret <autret_m@epita.fr>
15755
15756 * src/output.c (output_parser): Remove useless muscle.
15757
157582001-12-11 Marc Autret <autret_m@epita.fr>
15759
15760 * src/bison.simple: Remove #line just before %%epilogue. It
15761 is now handled in ...
15762 * src/reader.c (read_additionnal_code): Add the output of a
15763 #line for the epilogue.
15764
157652001-12-10 Marc Autret <autret_m@epita.fr>
15766
15767 * src/reader.c (copy_definition): Re-use CPP-outed code which
15768 replace precedent remove.
15769 * src/bison.simple: Remove #line before %%prologue because
15770 %%input-line is wrong at this time.
15771
157722001-12-10 Marc Autret <autret_m@epita.fr>
15773
15774 * src/reader.c (symbols_output): Clean up.
15775 * src/output.c (output_gram, output): Clean up.
15776
157772001-12-10 Akim Demaille <akim@epita.fr>
15778
15779 * src/lalr.c (initialize_lookaheads): New. Extracted from...
15780 * src/LR0.c (set_state_table): here.
15781 * src/lalr.c (lalr): Call it.
15782
157832001-12-10 Akim Demaille <akim@epita.fr>
15784
15785 * src/state.h (shifts): Remove the `number' member: shifts are
15786 attached to state, hence no longer need to be labelled with a
15787 state number.
15788
157892001-12-10 Akim Demaille <akim@epita.fr>
15790
15791 Now that states have a complete set of members, the linked list of
15792 shifts is useless: just fill directly the state's shifts member.
15793
15794 * src/state.h (shifts): Remove the `next' member.
15795 * src/LR0.c (first_state, last_state): Remove.
15796 Adjust the callers.
15797 (augment_automaton): Don't look for the shifts that must be added
15798 a shift on EOF: it is those of the state we looked for! But now,
15799 since shifts are attached, it is no longer needed to looking
15800 merely by its id: its number.
15801
158022001-12-10 Akim Demaille <akim@epita.fr>
15803
15804 * src/LR0.c (augment_automaton): Better variable locality.
15805 Remove an impossible branch: if there is a state corresponding to
15806 the start symbol being shifted, then there is shift for the start
15807 symbol from the initial state.
15808
158092001-12-10 Akim Demaille <akim@epita.fr>
15810
15811 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
15812 only when appropriate: when insert_start_shifting_state' is not
15813 invoked.
15814 * tests/regression.at (Rule Line Numbers): Adjust.
15815
158162001-12-10 Akim Demaille <akim@epita.fr>
15817
15818 * src/LR0.c (augment_automaton): Now that all states have shifts,
15819 merge the two cases addition shifts to the initial state.
15820
158212001-12-10 Akim Demaille <akim@epita.fr>
15822
15823 * src/lalr.c (set_state_table): Move to...
15824 * src/LR0.c: here.
15825 * src/lalr.c (lalr): Don't call it...
15826 * src/LR0.c (generate_states): do it.
15827 * src/LR0.h (first_state): Remove, only the table is used.
15828
158292001-12-10 Akim Demaille <akim@epita.fr>
15830
15831 * src/LR0.h (first_shift, first_reduction): Remove.
15832 * src/lalr.c: Don't use first_shift: find shifts through the
15833 states.
15834
158352001-12-10 Akim Demaille <akim@epita.fr>
15836
15837 * src/LR0.c: Attach shifts to states as soon as they are
15838 computed.
15839 * src/lalr.c (set_state_table): Instead of assigning shifts to
15840 state, just assert that the mapping was properly done.
15841
158422001-12-10 Akim Demaille <akim@epita.fr>
15843
15844 * src/LR0.c (insert_start_shift): Rename as...
15845 (insert_start_shifting_state): this.
15846 (insert_eof_shifting_state, insert_accepting_state): New.
15847 (augment_automaton): Adjust.
15848 Better locality of the variables.
15849 When looking if the start_symbol is shifted from the initial
15850 state, using `while (... symbol != start_symbol ...)' sounds
15851 better than `while (... symbol < start_symbol ...)': If fail
15852 to see how the order between symbols could be relevant!
15853
158542001-12-10 Akim Demaille <akim@epita.fr>
15855
15856 * src/getargs.h: Don't declare `spec_name_prefix' and
15857 `spec_file_prefix', declared by src/files.h.
15858 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
15859 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
15860 * src/output.c (prepare): Adjust.
15861 * src/reader.c (symbols_output): Likewise.
15862 * src/vmsgetargs.c: Vaguely adjust, but who cares?
15863
158642001-12-10 Akim Demaille <akim@epita.fr>
15865
15866 * src/muscle_tab.c (muscle_init): NULL is a better default than
15867 `"0"'.
15868
158692001-12-10 Akim Demaille <akim@epita.fr>
15870
15871 * src/reader.c (reader): Calling symbols_output once is enough.
15872
158732001-12-10 Akim Demaille <akim@epita.fr>
15874
15875 Now that states have a complete set of members, the linked list of
15876 reductions is useless: just fill directly the state's reductions
15877 member.
15878
15879 * src/state.h (struct reductions): Remove member `number' and
15880 `next'.
15881 * src/LR0.c (first_reduction, last_reduction): Remove.
15882 (save_reductions): Don't link the new reductions, store them in
15883 this_state.
15884 * src/lalr.c (set_state_table): No need to attach reductions to
15885 states, it's already done.
15886 * src/output.c (output_actions): No longer free the shifts, then
15887 the reductions, then the states: free all the states and their
15888 members.
15889
158902001-12-10 Akim Demaille <akim@epita.fr>
15891
15892 * src/options.c (OPTN, DRTV, BOTH): New.
15893 (option_table): Use them.
15894
15895 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
15896 the job of system.h.
15897 * src/options.c: Don't include stdio.h and xalloc.h for the same
15898 reasons.
15899
159002001-12-10 Akim Demaille <akim@epita.fr>
15901
15902 * src/output.c (output, prepare): Make sure the values of the
15903 muscles `action' and `prologue' are 0-terminated.
15904
159052001-12-10 Akim Demaille <akim@epita.fr>
15906
15907 Clean up GCC warnings.
15908
15909 * src/reader.c (copy_action): `buf' is not used.
15910 (parse_skel_decl): Be static.
15911 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
15912 * src/options.h (create_long_option_table): Have a real prototype.
15913 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
15914 (hash_delete_at): Return const void *.
15915 Adjust casts to preserve the const.
15916
159172001-12-10 Akim Demaille <akim@epita.fr>
15918
15919 * configure.in: Require 2.52g.
15920 M4 is not needed, but AUTOM4TE is.
15921 * m4/m4.m4: Remove.
15922 * tests/Makefile.am: Adjust.
15923
159242001-12-10 Akim Demaille <akim@epita.fr>
15925
15926 One structure for states is enough, even though theoretically
15927 there are LR(0) states and LALR(1) states.
15928
15929 * src/lalr.h (state_t): Remove.
15930 (state_table): Be state_t **, not state_t *.
15931 * src/state.h (core, CORE_ALLOC): Rename as...
15932 (state_t, STATE_ALLOC): this.
15933 Add the LALR(1) members: shifts, reductions, errs.
15934 * src/LR0.c (state_table): Rename as...
15935 (state_hash): this, to avoid name clashes with the global
15936 `state_table'.
15937 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
15938 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
15939
159402001-12-10 Akim Demaille <akim@epita.fr>
15941
15942 Bison dumps core on bash.y.
15943 Reported by Pascal Bart.
15944
15945 * src/warshall.c (bitmatrix_print): New.
15946 (TC): Use it.
15947 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
15948 j must be the outer loop.
15949 * tests/regression.at (Broken Closure): New.
15950
159512001-12-05 Akim Demaille <akim@epita.fr>
15952
15953 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
15954 its argument.
15955 Reported by Peter Hamorsky.
15956
159572001-12-05 Akim Demaille <akim@epita.fr>
15958
15959 * src/conflicts.c (err_table): Remove.
15960 (resolve_sr_conflict): Adjust.
15961 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
15962 Rename as...
15963 (state_t.reductions, state_t.shifts): this.
15964
159652001-12-05 Akim Demaille <akim@epita.fr>
15966
15967 * src/reduce.c (reduce_grammar_tables): No longer disable the
15968 removal of useless rules via CPP but via `if (0)', so that the
15969 compiler still check the code is valid.
15970 For instance, it should have noticed `rline' no longer exists: use
15971 the `line' member of rule_t.
15972 * src/gram.c (dummy, rline): Remove, unused.
15973
159742001-12-05 Akim Demaille <akim@epita.fr>
15975
15976 * src/output.c (pack_vector): Use assert, not berror.
15977 * src/main.c (berror): Remove, unused.
15978
159792001-12-05 Akim Demaille <akim@epita.fr>
15980
15981 New experimental feature: if --verbose --trace output all the
15982 items of a state, not only its kernel.
15983
15984 * src/print.c (print_core): If `trace_flag', then invoke closure
15985 before outputting the items of the state (print_core is no longer
15986 a correct name them).
15987 (print_results): Invoke new_closure/free_closure if needed.
15988
159892001-12-05 Akim Demaille <akim@epita.fr>
15990
15991 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
15992 * src/closure.c, src/closure.h (itemsetsize): Rename as...
15993 (nitemset): for consistency with the rest of the project.
15994
159952001-12-05 Akim Demaille <akim@epita.fr>
15996
15997 * src/closure.c (print_closure): Improve.
15998 (closure): Use it for printing input and output.
15999
160002001-12-05 Akim Demaille <akim@epita.fr>
16001
16002 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16003 indexed by nonterminals.
16004
160052001-12-05 Akim Demaille <akim@epita.fr>
16006
16007 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16008 what it was!).
16009 * src/warshall.h: Remove accidental duplication of the content.
16010
160112001-12-05 Akim Demaille <akim@epita.fr>
16012
16013 * src/closure.c (set_fderives): De-obfuscate.
16014
160152001-12-05 Akim Demaille <akim@epita.fr>
16016
16017 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16018
160192001-12-05 Akim Demaille <akim@epita.fr>
16020
16021 * src/closure.c (set_firsts): De-obfuscate.
16022
160232001-12-05 Akim Demaille <akim@epita.fr>
16024
16025 * src/output.c (action_row): De-obfuscate
16026 using the good o' techniques: arrays not pointers, variable
16027 locality, BITISSET, RESETBIT etc.
16028
160292001-12-05 Akim Demaille <akim@epita.fr>
16030
16031 Pessimize the code to simplify it: from now on, all the states
16032 have a valid SHIFTS, which NSHIFTS is possibly 0.
16033
16034 * src/LR0.c (shifts_new): Be global and move to..
16035 * src/state.c, src/state.h: here.
16036 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16037 * src/print_graph: Adjust.
16038
160392001-12-05 Akim Demaille <akim@epita.fr>
16040
16041 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16042 * src/conflicts.c: Use it.
16043 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16044 incorrectly ``simplified''.
16045
160462001-12-05 Akim Demaille <akim@epita.fr>
16047
16048 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16049 using the good o' techniques: arrays not pointers, variable
16050 locality, BITISSET, RESETBIT etc.
16051
160522001-12-05 Akim Demaille <akim@epita.fr>
16053
16054 * src/state.h (SHIFT_SYMBOL): New.
16055 * src/conflicts.c: Use it to deobfuscate.
16056
160572001-12-05 Akim Demaille <akim@epita.fr>
16058
16059 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16060 (print_reductions): De-obfuscate using the good o' techniques:
16061 arrays not pointers, variable locality, BITISSET.
16062
160632001-12-05 Akim Demaille <akim@epita.fr>
16064
16065 * src/conflicts.c (print_reductions): Arrays, not pointers.
16066 Use BITISSET.
16067
160682001-12-05 Akim Demaille <akim@epita.fr>
16069
16070 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16071
160722001-12-05 Akim Demaille <akim@epita.fr>
16073
16074 * src/conflicts.c (print_reductions): Improve variable locality.
16075
160762001-12-05 Akim Demaille <akim@epita.fr>
16077
16078 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16079
160802001-12-05 Akim Demaille <akim@epita.fr>
16081
16082 * src/conflicts.c (print_reductions): Improve variable locality.
16083
160842001-12-05 Akim Demaille <akim@epita.fr>
16085
16086 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16087 * src/lalr.c: Use them.
16088
160892001-12-05 Akim Demaille <akim@epita.fr>
16090
16091 * src/LR0.c (augment_automaton): Formatting changes.
16092 Better variable locality.
16093
160942001-12-05 Akim Demaille <akim@epita.fr>
16095
16096 * src/lalr.c (matrix_print): New.
16097 (transpose): Use it.
16098 Use arrays instead of pointers.
16099
161002001-12-05 Akim Demaille <akim@epita.fr>
16101
16102 * src/lalr.c (maxrhs): Move to...
16103 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16104 * src/lalr.c (build_relations): Adjust.
16105
161062001-12-05 Akim Demaille <akim@epita.fr>
16107
16108 * src/lalr.c (transpose): Free the memory allocated to the
16109 argument, as it is replaced by the results by the unique caller.
16110 (build_relations): Merely invoke transpose: it handles the memory
16111 deallocation.
16112 Improve variable locality.
16113 Avoid variables used as mere abbreviations.
16114 (compute_lookaheads): Use arrays instead of pointers.
16115
161162001-12-05 Akim Demaille <akim@epita.fr>
16117
16118 * src/lalr.c (initialize_F): Improve variable locality.
16119 Avoid variables used as mere abbreviations.
16120
161212001-12-05 Akim Demaille <akim@epita.fr>
16122
16123 * src/derives.c (print_derives): Display the ruleno.
16124 * src/lalr.c (initialize_F, transpose): Better variable locality
16125 to improve readability.
16126 Avoid variables used as mere abbreviations.
16127
161282001-12-05 Akim Demaille <akim@epita.fr>
16129
16130 * src/lalr.c (traverse): Use arrays instead of pointers.
16131
161322001-12-05 Akim Demaille <akim@epita.fr>
16133
16134 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16135 the handling of squeue.
16136 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16137
161382001-12-05 Akim Demaille <akim@epita.fr>
16139
16140 Because useless nonterminals are now kept alive (instead of being
16141 `destroyed'), we now sometimes examine them, and store information
16142 related to them. Hence we need to know their number, and adjust
16143 memory allocations.
16144
16145 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16146 static.
16147 * src/LR0.c (allocate_itemsets): The memory allocated to
16148 `symbol_count' was used for two different purpose: once to count
16149 the number of occurrences of each symbol, and later reassigned to
16150 `shift_symbol', containing the symbol that can be shifted from a
16151 given state.
16152 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16153 only, and...
16154 (new_itemsets): Allocate `shift_symbol' here.
16155 (allocate_itemsets): symbol_count includes useless nonterminals.
16156 Make room for them.
16157 (free_storage): Use `free', not `XFREE', for pointers that cannot
16158 be null.
16159
161602001-12-05 Akim Demaille <akim@epita.fr>
16161
16162 * src/nullable.c (set_nullable): Deobfuscate the handling of
16163 ritem.
16164 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16165
161662001-12-05 Akim Demaille <akim@epita.fr>
16167
16168 * src/gram.c, src/gram.h (ritem_print): New.
16169 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16170 (This useless function was defined only to work around VMS linkers
16171 that can't handle compilation units with variables only).
16172 * src/reduce.c (dump_grammar): Use it to trace the construction of
16173 ritem.
16174
161752001-12-04 Paul Eggert <eggert@twinsun.com>
16176
16177 * src/bison.simple (union yyalloc): Change member names
16178 to be the same as the stack names.
16179 (yyparse): yyptr is now union yyalloc *, not char *.
16180 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16181 and may generate better code on some machines.
16182 (yystpcpy): Use prototype if __STDC__ is defined, not just
16183 if __cplusplus is defined.
16184
161852001-11-30 Akim Demaille <akim@epita.fr>
16186
16187 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16188 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16189 Gettext doesn't compile cleanly, and dies with -Werror.
16190 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16191 Include WARNING_CFLAGS here.
16192 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16193 before being defined.
16194
161952001-11-27 Paul Eggert <eggert@twinsun.com>
16196
16197 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16198 First arg is int, not unsigned.
16199 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16200 (SIZE_MAX, UINT_MAX): New macros.
16201 (quotearg_n_options): Abort if N is negative.
16202 Avoid overflow check on hosts where size_t is 64 bits and int
16203 is 32 bits, as overflow is impossible there.
16204 Fix off-by-one typo that caused unnecessary reallocation.
16205
162062001-11-29 Paul Eggert <eggert@twinsun.com>
16207
16208 Name space cleanup in generated parser.
16209
16210 * doc/bison.texinfo (Bison Parser): Discuss system headers
16211 and their effect on the user name space.
16212
16213 * src/bison.simple:
16214 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16215 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16216 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16217
16218 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16219 on user names when possible.
16220
16221 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16222 Simplify test for whather <alloca.h> exists.
16223
16224 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16225
16226 (<stdio.h>): Include if YYDEBUG.
16227
16228 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16229 ! defined (yyoverflow) && ! defined (yymemcpy).
16230
16231 (yymemcpy, yyparse): Rename local variables as needed so that
16232 they all begin with 'yy'.
16233
16234 (yystrlen, yystpcpy): New functions.
16235
16236 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16237 All uses changed.
16238
16239 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16240 instead of relying on string.h functions. Use YYSTACK_ALLOC
16241 and YYSTACK_FREE instead of malloc and free.
16242
162432001-11-30 Akim Demaille <akim@epita.fr>
16244
16245 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16246 before their first uses.
16247 (YYBISON, YYPURE): Move to the top of the output.
16248
162492001-11-30 Akim Demaille <akim@epita.fr>
16250
16251 * tests/reduce.at (Useless Nonterminals): Fix.
16252
162532001-11-30 Akim Demaille <akim@epita.fr>
16254
16255 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16256 if body instead of `;' to pacify GCC's warnings.
16257
162582001-11-30 Akim Demaille <akim@epita.fr>
16259
16260 Instead of mapping the LHS of unused rules to -1, keep the LHS
16261 valid, but flag the rules as invalid.
16262
16263 * src/gram.h (rule_t): `useful' is a new member.
16264 * src/print.c (print_grammar): Adjust.
16265 * src/derives.c (set_derives): Likewise.
16266 * src/reader.c (packgram, reduce_output): Likewise.
16267 * src/reduce.c (reduce_grammar_tables): Likewise.
16268 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16269
162702001-11-30 Akim Demaille <akim@epita.fr>
16271
16272 * src/reduce.c (reduce_output): Formatting changes.
16273 * src/print.c (print_results, print_grammar): Likewise.
16274 * tests/regression.at (Rule Line Numbers)
16275 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16276
162772001-11-30 Akim Demaille <akim@epita.fr>
16278
16279 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16280 useless nonterminals, move them at the end of the symbol arrays.
16281 (reduce_output): Adjust.
16282 * tests/reduce.at (Useless Nonterminals): Adjust.
16283
162842001-11-30 Akim Demaille <akim@epita.fr>
16285
16286 * src/reduce.c: Various comment/formatting changes.
16287 (nonterminals_reduce): New, extracted from...
16288 (reduce_grammar_tables): here.
16289 (reduce_grammar): Call nonterminals_reduce.
16290
162912001-11-29 Paul Eggert <eggert@twinsun.com>
16292
16293 * src/bison.simple (YYSTACK_REALLOC): Remove.
16294 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16295 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16296 New macros.
16297 (union yyalloc): New type.
16298 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16299 an arbitrary restriction on hosts where size_t is wider than int.
16300
16301 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16302 a parser stack overflow. Allocate just one block of memory for all
16303 three stacks, instead of allocating three blocks; this typically is
16304 faster and reduces fragmentation.
16305
16306 Do not limit the number of items in the stack to a value that fits
16307 in 'int', as this is an arbitrary limit on hosts with 64-bit
16308 size_t and 32-bit int.
16309
163102001-11-29 Marc Autret <autret_m@epita.fr>
16311
16312 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16313 of defining YYERROR_VERBOSE.
16314 [AT_DATA]: $4 is now out of C declarations in the prologue.
16315
163162001-11-28 Marc Autret <autret_m@epita.fr>
16317
16318 * src/reader.c (parse_dquoted_param): New.
16319 (parse_skel_decl): Use it.
16320 * src/lex.h: Add its prototype.
16321 * src/lex.c (literalchar): Become not static.
16322
163232001-11-28 Marc Autret <autret_m@epita.fr>
16324
16325 * src/output.h: And put its extern declaration here.
16326 * src/output.c (error_verbose): Define here.
16327 (prepare): Echo name modification.
16328 * src/getargs.h: Clean its extern declaration.
16329 * src/getargs.c (error_verbose_flag): Remove.
16330 (getargs): Remove case 'e'.
16331 * src/options.c (option_table): 'error-verbose' is now seen as simple
16332 percent option.
16333 Include output.h.
16334
16335 * src/reader.c (read_declarations): Remove case tok_include.
16336 (parse_include_decl): Remove.
16337 * src/lex.h (token_t): Remove tok_include.
16338 * src/options.c (option_table): 'include' is now a simple command line
16339 option.
16340
163412001-11-28 Marc Autret <autret_m@epita.fr>
16342
16343 * src/bison.simple: Adjust muscle names.
16344 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16345 * src/output.c (prepare): s/_/-/ for the muscles names.
16346 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16347
163482001-11-28 Marc Autret <autret_m@epita.fr>
16349
16350 * src/bison.simple: Fix debug.
16351 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16352
163532001-11-28 Akim Demaille <akim@epita.fr>
16354
16355 * src/LR0.c (shifts_new): New.
16356 (save_shifts, insert_start_shift, augment_automaton): Use it.
16357
163582001-11-28 Akim Demaille <akim@epita.fr>
16359
16360 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16361 keep ruleno only.
16362
163632001-11-28 Akim Demaille <akim@epita.fr>
16364
16365 * src/closure.c (closure): Instead of looping over word in array
16366 then bits in words, loop over bits in array.
16367
163682001-11-28 Akim Demaille <akim@epita.fr>
16369
16370 * src/closure.c (closure): No longer optimize the special case
16371 where all the bits of `ruleset[r]' are set to 0, to make the code
16372 clearer.
16373
163742001-11-28 Akim Demaille <akim@epita.fr>
16375
16376 * src/closure.c (closure): `r' and `c' are new variables, used to
16377 de-obfuscate accesses to RULESET and CORE.
16378
163792001-11-28 Akim Demaille <akim@epita.fr>
16380
16381 * src/reduce.c (reduce_print): Use ngettext.
16382 (dump_grammar): Improve the trace accuracy.
16383
163842001-11-28 Akim Demaille <akim@epita.fr>
16385
16386 * src/reduce.c (dump_grammar): Don't translate trace messages.
16387
163882001-11-28 Akim Demaille <akim@epita.fr>
16389
16390 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16391 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16392 as all tags are free'ed afterwards.
16393 From Enrico Scholz.
16394
163952001-11-27 Paul Eggert <eggert@twinsun.com>
16396
16397 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16398 use alloca when we didn't want to, and vice versa.
16399
164002001-11-27 Marc Autret <autret_m@epita.fr>
16401
16402 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16403 initialization.
16404 * src/output.c (prepare): Remove its update.
16405
164062001-11-27 Marc Autret <autret_m@epita.fr>
16407
16408 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16409 Use %error-verbose.
16410
164112001-11-27 Marc Autret <autret_m@epita.fr>
16412
16413 * src/bison.simple: Remove YYERROR_VERBOSE using.
16414 Use %%error_verbose.
16415 (yyparse): Likewise.
16416 * src/output.c (prepare): Give its final value.
16417 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16418 * src/getargs.h: Add its extern declaration.
16419 * src/getargs.c (error_verbose_flag): New int.
16420 (getargs): Update to catch new case.
16421 * src/options.c (option_table): 'error-verbose' is a new option.
16422 (shortopts): Update.
16423
164242001-11-27 Akim Demaille <akim@epita.fr>
16425
16426 * src/system.h: Use intl/libgettext.h.
16427 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16428
164292001-11-27 Akim Demaille <akim@epita.fr>
16430
16431 * tests/torture.at (Exploding the Stack Size with Malloc):
16432 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16433
164342001-11-27 Akim Demaille <akim@epita.fr>
16435
16436 * src/files.c: Include error.h.
16437 Reported by Hans Aberg.
16438
164392001-11-26 Marc Autret <autret_m@epita.fr>
16440
16441 * src/reader.c (parse_include_decl): New, not yet implemented.
16442 (read_declarations): Add case tok_include.
16443 * src/getargs.h (include): Add its extern definition.
16444 * src/getargs.c (include): New const char *.
16445 (getargs): Add case '-I'.
16446 * src/options.c (option_table): Add include as command line and
16447 percent option.
16448 * src/lex.h (token_t): Add tok_include.
16449
164502001-11-26 Akim Demaille <akim@epita.fr>
16451
16452 * src/reader.c (readgram): Make sure rules for mid-rule actions
16453 have a lineno equal to that of their host rule.
16454 Reported by Hans Aberg.
16455 * tests/regression.at (Rule Line Numbers): New.
16456
164572001-11-26 Akim Demaille <akim@epita.fr>
16458
16459 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16460 size_ts.
16461
164622001-11-26 Akim Demaille <akim@epita.fr>
16463
16464 * src/complain.c, src/complain.h (error): Remove, provided by
16465 lib/error.[ch].
16466
164672001-11-26 Akim Demaille <akim@epita.fr>
16468
16469 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16470 issue an error message.
16471 * tests/regression.at (Invalid %directive): New.
16472 Reported by Hans Aberg.
16473
164742001-11-26 Akim Demaille <akim@epita.fr>
16475
16476 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16477 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16478
164792001-11-26 Akim Demaille <akim@epita.fr>
16480
16481 * src/conflicts.c (conflicts_print): Don't complain at all when
16482 there are no reduce/reduce conflicts, and as many shift/reduce
16483 conflicts as expected.
16484 * tests/regression.at (%expect right): Adjust.
16485
164862001-11-23 Akim Demaille <akim@epita.fr>
16487
16488 * lib/alloca.c: Update, from fileutils.
16489
164902001-11-23 Akim Demaille <akim@epita.fr>
16491
16492 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16493
164942001-11-23 Akim Demaille <akim@epita.fr>
16495
16496 * src/system.h: Include alloca.h.
16497 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16498
164992001-11-23 Akim Demaille <akim@epita.fr>
16500
16501 * src/print_graph.c (print_actions): Remove `rule', unused.
16502 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16503 pacify GCC's signed < unsigned warnings.
16504 * src/closure.c (itemsetsize): Likewise.
16505 * src/reader.c (symbol_list_new): Static.
16506
165072001-11-23 Akim Demaille <akim@epita.fr>
16508
16509 Attaching lineno to buckets is stupid, since only one copy of each
16510 symbol is kept, only the line of the first occurrence is kept too.
16511
16512 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16513 * src/reader.c (rline_allocated): Remove, unused.
16514 (symbol_list): Have a `line' member.
16515 (symbol_list_new): New.
16516 (readgram): Use it.
16517 * src/print.c (print_grammar): Output the rule line numbers.
16518 * tests/regression.at (Solved SR Conflicts)
16519 (Unresolved SR Conflicts): Adjust.
16520 Reported by Hans Aberg.
16521
165222001-11-22 Marc Autret <autret_m@epita.fr>
16523
16524 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16525
165262001-11-22 Marc Autret <autret_m@epita.fr>
16527
16528 * src/muscle_tab.c (muscle_init): Remove initialization of
16529 skeleton muscle.
16530 * src/output.c (output_master_parser): Do it here.
16531
165322001-11-20 Akim Demaille <akim@epita.fr>
16533
16534 * po/sv.po: New.
16535 * configure.in (ALL_LINGUAS): Adjust.
16536 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16537 longer contains strings to translate.
16538
165392001-11-19 Akim Demaille <akim@epita.fr>
16540
16541 * src/conflicts.c (conflicts_print): Add a missing \n.
16542
165432001-11-19 Akim Demaille <akim@epita.fr>
16544
16545 * src/nullable.c (nullable_print): New.
16546 (set_nullable): Call it when tracing.
16547 Better locality of variables.
16548
165492001-11-19 Akim Demaille <akim@epita.fr>
16550
16551 * src/print.c (print_actions): Better locality of variables.
16552
165532001-11-19 Akim Demaille <akim@epita.fr>
16554
16555 * src/derives.c (print_derives): Fix and enrich.
16556 * src/closure.c (print_fderives): Likewise.
16557
165582001-11-19 Akim Demaille <akim@epita.fr>
16559
16560 * src/closure.c (itemsetend): Remove, replaced with...
16561 (itemsetsize): new.
16562
165632001-11-19 Akim Demaille <akim@epita.fr>
16564
16565 * src/LR0.c (kernel_end): Remove, replaced with...
16566 (kernel_size): new.
16567
165682001-11-19 Akim Demaille <akim@epita.fr>
16569
16570 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16571 to clarify.
16572
165732001-11-19 Akim Demaille <akim@epita.fr>
16574
16575 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16576
165772001-11-19 Akim Demaille <akim@epita.fr>
16578
16579 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16580 trace messages.
16581 * src/LR0.c: Likewise.
16582 (allocate_itemsets): Use arrays instead of pointers to clarify.
16583
165842001-11-19 Akim Demaille <akim@epita.fr>
16585
16586 * src/getargs.c (statistics_flag): Replace with...
16587 (trace_flag): New.
16588 (longopts): Accept --trace instead of --statistics.
16589 * src/getargs.h, src/options.c: Adjust.
16590 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16591 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16592
165932001-11-19 Akim Demaille <akim@epita.fr>
16594
16595 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16596 pointers to clarify the code.
16597 (save_reductions, save_shifts): Factor common parts of alternatives.
16598
165992001-11-19 Akim Demaille <akim@epita.fr>
16600
16601 * src/LR0.c (new_state, get_state): Complete TRACE code.
16602 * src/closure.c: Include `reader.h' to get `tags', needed by the
16603 trace code.
16604 Rename the conditional DEBUG as TRACE.
16605 Output consistently TRACEs to stderr, not stdout.
16606 * src/derives.c: Likewise.
16607 * src/reduce.c: (inaccessable_symbols): Using if is better style
16608 than goto.
16609 Use `#if TRACE' instead of `#if 0' for tracing code.
16610
166112001-11-19 Akim Demaille <akim@epita.fr>
16612
16613 * src/system.h (LIST_FREE, shortcpy): New.
16614 * src/LR0.c: Use them.
16615 * src/output.c (free_itemsets, free_reductions, free_shifts):
16616 Remove, replaced by LIST_FREE.
16617
166182001-11-19 Akim Demaille <akim@epita.fr>
16619
16620 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16621 (REDUCTIONS_ALLOC): New.
16622 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16623 allocation.
16624
166252001-11-19 Akim Demaille <akim@epita.fr>
16626
16627 * src/LR0.c (new_state): Complete trace code.
16628 * src/nullable.c (set_nullable): Don't translate traces.
16629
166302001-11-19 Akim Demaille <akim@epita.fr>
16631
16632 * src/print_graph.c (print_core): Better locality of variables.
16633 * src/print.c (print_core): Likewise.
16634
166352001-11-19 Akim Demaille <akim@epita.fr>
16636
16637 * src/vcg.c: You do the output, so you are responsible of the
16638 handling of VCG syntax, in particular: use quotearg.
16639 * src/print_graph.c: Don't.
16640 (print_actions): Don't output the actions as part of the nodes,
16641 since that's the job of the edges.
16642 (print_state): Don't output by hand: fill the node description,
16643 and ask for its output.
16644
166452001-11-19 Akim Demaille <akim@epita.fr>
16646
16647 * src/bison.simple (yyparse): When verbosely reporting an error,
16648 no longer put additional quotes around token names.
16649 * tests/calc.at: Adjust.
16650
166512001-11-19 Akim Demaille <akim@epita.fr>
16652
16653 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16654 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16655 * src/output.c: Adjust.
16656
166572001-11-19 Akim Demaille <akim@epita.fr>
16658
16659 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16660 (rule_t): this.
16661 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16662
166632001-11-19 Akim Demaille <akim@epita.fr>
16664
16665 * src/gram.h (rule_t): New.
16666 (rule_table): New.
16667 (rrhs, rlhs): Remove, part of state_t.
16668 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16669 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16670 * src/reader.c, src/reduce.c: Adjust.
16671
166722001-11-19 Akim Demaille <akim@epita.fr>
16673
16674 * src/reader.c (symbols_output): New, extracted from...
16675 (packsymbols): Here.
16676 (reader): Call it.
16677
166782001-11-19 Akim Demaille <akim@epita.fr>
16679
16680 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16681 (maxrhs): this new function.
16682
166832001-11-19 Akim Demaille <akim@epita.fr>
16684
16685 * src/lalr.c (F): New macro to access the variable F.
16686 Adjust.
16687
166882001-11-19 Akim Demaille <akim@epita.fr>
16689
16690 * src/lalr.h (LA): New macro to access the variable LA.
16691 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16692 * src/lalr.c: Adjust.
16693
166942001-11-19 Akim Demaille <akim@epita.fr>
16695
16696 * src/lalr.c (initialize_LA): Only initialize LA. Let...
16697 (set_state_table): handle the `lookaheads' members.
16698
166992001-11-19 Akim Demaille <akim@epita.fr>
16700
16701 * src/lalr.h (lookaheads): Removed array, whose contents is now
16702 a member of...
16703 (state_t): this structure.
16704 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16705 Adjust.
16706
167072001-11-19 Akim Demaille <akim@epita.fr>
16708
16709 * src/lalr.h (consistent): Removed array, whose contents is now
16710 a member of...
16711 (state_t): this structure.
16712 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16713 Adjust.
16714
167152001-11-19 Akim Demaille <akim@epita.fr>
16716
16717 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
16718 contents are now members of...
16719 (state_t): this structure.
16720 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16721 Adjust.
16722
167232001-11-19 Akim Demaille <akim@epita.fr>
16724
16725 * src/lalr.h (state_t): New.
16726 (state_table): Be a state_t * instead of a core **.
16727 (accessing_symbol): Remove, part of state_t.
16728 * src/lalr.c: Adjust.
16729 (set_accessing_symbol): Merge into...
16730 (set_state_table): this.
16731 * src/print_graph.c, src/conflicts.c: Adjust.
16732
167332001-11-14 Akim Demaille <akim@epita.fr>
16734
16735 * tests/calc.at, tests/output.at, tests/regression.at,
16736 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
16737 now the tests are run in private dirs, therefore AC_CLEANUP and
16738 family can be simplified to 0-ary.
16739 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
16740 use abs. path to find config.h.
16741 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
16742 stderr, there can be way too much random noise.
16743 Instead pass -Werror to GCC and rely on the exit status.
16744 Reported by Wolfram Wagner.
16745
167462001-11-14 Akim Demaille <akim@epita.fr>
16747
16748 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
16749 defined only if yyoverflow is defined, to avoid `warning: unused
16750 variable `yyvs1''.
16751 Reported by The Test Suite.
16752
167532001-11-14 Akim Demaille <akim@epita.fr>
16754
16755 * src/print.c: Include reduce.h.
16756 Reported by Hans Aberg.
16757
167582001-11-14 Akim Demaille <akim@epita.fr>
16759
16760 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
16761 Revert a previous patch: these are really const.
16762 * src/conflicts.c (conflict_report): Additional useless pair of
16763 braces to pacify GCC's warnings for `if () if () {} else {}'.
16764 * src/lex.c (parse_percent_token): Replace equal_offset with
16765 arg_offset.
16766 arg is const.
16767 Be sure to strdup `arg' when used, since there is no reason for
16768 token_buffer not to change.
16769
167702001-11-14 Akim Demaille <akim@epita.fr>
16771
16772 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
16773 definition.
16774 * src/main.c (main): Use them.
16775 Suggested by Hans Aberg.
16776
167772001-11-12 Akim Demaille <akim@epita.fr>
16778
16779 * src/system.h (ngettext): Now that we use ngettext, be sure to
16780 provide a default definition when NLS are not used.
16781
167822001-11-12 Akim Demaille <akim@epita.fr>
16783
16784 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
16785 Use @kbd to denote user input.
16786 (Language and Grammar): ANSIfy the example.
16787 Adjust its layout for info/notinfo.
16788 (Location Tracking Calc): Output error messages to stderr.
16789 Output locations in a more GNUtically correct way.
16790 Fix a couple of Englishos.
16791 Adjust @group/@end group pairs.
16792
167932001-11-12 Akim Demaille <akim@epita.fr>
16794
16795 %expect was not functioning at all.
16796
16797 * src/conflicts.c (expected_conflicts): Set to -1.
16798 (conflict_report): Use ngettext.
16799 (conflicts_print): Check %expect and make its violation an error.
16800 * doc/bison.texinfo (Expect Decl): Adjust.
16801 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
16802 * tests/regression.at (%expect not enough, %expect right)
16803 (%expect too much): New.
16804
168052001-11-12 Akim Demaille <akim@epita.fr>
16806
16807 * tests/regression.at (Conflicts): Rename as...
16808 (Unresolved SR Conflicts): this.
16809 (Solved SR Conflicts): New.
16810
168112001-11-12 Akim Demaille <akim@epita.fr>
16812
16813 * src/reduce.c (print_results): Rename as...
16814 (reduce_output): This.
16815 Output to OUT, passed as argument, instead of output_obstack.
16816 (dump_grammar): Likewise.
16817 (reduce_free): New.
16818 Also free V1.
16819 (reduce_grammar): No longer call reduce_output, since...
16820 * src/print.c (print_results): do it.
16821 * src/main.c (main): Call reduce_free;
16822
168232001-11-12 Akim Demaille <akim@epita.fr>
16824
16825 * src/conflicts.c (print_reductions): Accept OUT as argument.
16826 Output to it, not to output_obstack.
16827 * src/print.c (print_actions): Adjust.
16828
168292001-11-12 Akim Demaille <akim@epita.fr>
16830
16831 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
16832 the result instead of using...
16833 (src_total, rrc_total, src_count, rrc_count): Remove.
16834 (any_conflicts): Remove.
16835 (print_conflicts): Split into...
16836 (conflicts_print, conflicts_output): New.
16837 * src/conflicts.h: Adjust.
16838 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
16839 * src/print.c (print_grammar): Issue `\n' between two rules.
16840 * tests/regression.at (Conflicts): New.
16841 Reported by Tom Lane.
16842
168432001-11-12 Akim Demaille <akim@epita.fr>
16844
16845 * tests/regression.at (Invalid input): Remove, duplicate with
16846 ``Invalid input: 1''.
16847
168482001-11-12 Akim Demaille <akim@epita.fr>
16849
16850 * tests/torture.at (AT_DATA_STACK_TORTURE)
16851 (Exploding the Stack Size with Alloca)
16852 (Exploding the Stack Size with Malloc): New.
16853
168542001-11-12 Akim Demaille <akim@epita.fr>
16855
16856 * src/bison.simple (YYSTACK_REALLOC): New.
16857 (yyparse) [!yyoverflow]: Use it and free the old stack.
16858 Reported by Per Allansson.
16859
168602001-11-12 Pascal Bart <pascal.bart@epita.fr>
16861
16862 * src/bison.simple: Define type yystype instead of YYSTYPE, and
16863 define CPP macro, which substitute YYSTYPE by yystype.
16864 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
16865 with yyltype/YYLTYPE. This allows inclusion of the generated
16866 header within the parser if the compiler, such as GGC, accepts
16867 multiple equivalent #defines.
16868 From Akim.
16869
168702001-11-05 Akim Demaille <akim@epita.fr>
16871
16872 * src/reader.c (symbols_output): New, extracted from...
16873 (packsymbols): here.
16874 (reader): Adjust.
16875
168762001-11-05 Akim Demaille <akim@epita.fr>
16877
16878 * src/lex.c (parse_percent_token): s/quotearg/quote/.
16879
168802001-11-05 Akim Demaille <akim@epita.fr>
16881
16882 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
16883 pattern.
16884
168852001-11-05 Akim Demaille <akim@epita.fr>
16886
16887 * src/options.h (struct option_table_struct): set_flags is void*.
16888 * src/options.c (longopts): Support `--output' and `%output'.
16889 (usage): Adjust.
16890 * src/lex.h (tok_setopt): Remove, replaced with...
16891 (tok_intopt, tok_stropt): these new guys.
16892 * src/lex.c (getopt.h): Not needed.
16893 (token_buffer, unlexed_token_buffer): Not const.
16894 (percent_table): Promote `-' over `_' in directive names.
16895 Active `%name-prefix', `file-prefix', and `output'.
16896 (parse_percent_token): Accept possible arguments to directives.
16897 Promote `-' over `_' in directive names.
16898
168992001-11-04 Akim Demaille <akim@epita.fr>
16900
16901 * doc/bison.texinfo (Decl Summary): Split the list into
16902 `directives for grammars' and `directives for bison'.
16903 Sort'em.
16904 Add description of `%name-prefix', `file-prefix', and `output'.
16905 Promote `-' over `_' in directive names.
16906 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
16907 Simplify the description of `--name-prefix'.
16908 Promote `-' over `_' in directive names.
16909 Promote `--output' over `--output-file'.
16910 Fix the description of `--defines'.
16911 * tests/output.at: Exercise %file-prefix and %output.
16912
169132001-11-02 Akim Demaille <akim@epita.fr>
16914
16915 * doc/refcard.tex: Update.
16916
169172001-11-02 Akim Demaille <akim@epita.fr>
16918
16919 * src/symtab.h (SUNDEF): New.
16920 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
16921 stand for `uninitialized', instead of 0.
16922 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
16923 * src/lex.c (lex): Adjust.
16924
16925 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
16926 Number it 0.
16927 Let yylex return it instead of a plain 0.
16928 Reported by Dick Streefland.
16929
169302001-11-02 Akim Demaille <akim@epita.fr>
16931
16932 * tests/regression.at (Mixing %token styles): New test.
16933
169342001-11-02 Akim Demaille <akim@epita.fr>
16935
16936 * src/reader.c (parse_thong_decl): Formatting changes.
16937 (token_translations_init): New, extracted from...
16938 (packsymbols): Here.
16939 Adjust.
16940
169412001-11-01 Akim Demaille <akim@epita.fr>
16942
16943 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
16944 Check that `9foo.y' produces correct cpp guards.
16945 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
16946 guards.
16947 Reported by Wwp.
16948
169492001-11-01 Akim Demaille <akim@epita.fr>
16950
16951 * tests/regression.at (Invalid input: 2): New.
16952 * src/lex.c (unlexed_token_buffer): New.
16953 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
16954 too.
16955 Reported by Wwp.
16956
169572001-11-01 Akim Demaille <akim@epita.fr>
16958
16959 * tests/calc.at: Catch up with 1.30.
16960 * configure.in: Bump to 1.49a.
16961 Adjust to newer Autotest.
16962
169632001-10-19 Pascal Bart <pascal.bart@epita.fr>
16964
16965 * src/conflicts.c: Move global variables rrc_total and src_total ...
16966 (print_conflicts): here.
16967 * src/output.c (output): Free global variable user_toknums.
16968 * src/lex.c (token_obstack): Become static.
16969
169702001-10-18 Akim Demaille <akim@epita.fr>
16971
16972 * tests/atlocal.in (GCC): Add.
16973 * tests/calc.at: s/m4_match/m4_bmatch/.
16974 s/m4_patsubst/m4_bpatsubst/.
16975 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
16976 * configure.in: AC_SUBST(GCC).
16977
169782001-10-14 Marc Autret <autret_m@epita.fr>
16979
16980 * src/options.c (create_long_option_table): Fix.
16981
169822001-10-10 Akim Demaille <akim@epita.fr>
16983
16984 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
16985
169862001-10-04 Akim Demaille <akim@epita.fr>
16987
16988 * src/reader.c (parse_union_decl): Push the caracters in
16989 union_obstack, not attrs_obstack.
16990
169912001-10-04 Akim Demaille <akim@epita.fr>
16992
16993 Merge in the branch 1.29.
16994
16995 * src/reader.c (packsymbols): Use a temporary obstack for
16996 `%%tokendef', since output_stack is already used elsewhere.
16997
16998 2001-10-02 Akim Demaille <akim@epita.fr>
16999
17000 Bump 1.29d.
17001
17002 2001-10-02 Akim Demaille <akim@epita.fr>
17003
17004 Version 1.29c.
17005
17006 2001-10-02 Akim Demaille <akim@epita.fr>
17007
17008 * tests/regression.at (Invalid CPP headers): New.
17009 From Alexander Belopolsky.
17010 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17011
17012 2001-10-02 Akim Demaille <akim@epita.fr>
17013
17014 * tests/regression.at (Invalid input): New.
17015 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17016 Reported by Shura.
17017
17018 2001-10-02 Akim Demaille <akim@epita.fr>
17019
17020 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17021
17022 2001-10-02 Akim Demaille <akim@epita.fr>
17023
17024 * src/output.c (output_parser): Assert `skeleton'.
17025 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17026 systems.
17027 From Shura.
17028
17029 2001-10-01 Marc Autret <autret_m@epita.fr>
17030
17031 * src/lex.h: Echo modifications.
17032 * src/lex.c (unlex): Parameter is now token_t.
17033 From Hans Aberg.
17034
17035 2001-10-01 Marc Autret <autret_m@epita.fr>
17036
17037 * src/main.c: Include lex.h.
17038 From Hans Aberg.
17039
17040 2001-09-29 Akim Demaille <akim@epita.fr>
17041
17042 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17043
17044 2001-09-28 Akim Demaille <akim@epita.fr>
17045
17046 * tests/testsuite.at: Update to newer Autotest.
17047 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17048
17049 2001-09-27 Akim Demaille <akim@epita.fr>
17050
17051 Position independent wrapper.
17052
17053 * tests/bison: Remove.
17054 * tests/bison.in: New.
17055 * configure.in: Adjust.
17056
17057 2001-09-27 Paul Eggert <eggert@twinsun.com>
17058
17059 Port quotearg fixes from tar 1.13.24.
17060
17061 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17062 tm to be declared.
17063 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17064 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17065
17066 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17067 * m4/mbrtowc.m4: New file.
17068 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17069 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17070
17071 2001-09-27 Akim Demaille <akim@epita.fr>
17072
17073 Bump to 1.29c.
17074
17075 2001-09-27 Akim Demaille <akim@epita.fr>
17076
17077 Version 1.29b.
17078
17079 2001-09-25 Akim Demaille <akim@epita.fr>
17080
17081 * src/system.h: Include `xalloc.h'.
17082 Remove it from the C files.
17083 * src/files.c (output_files): Free the obstacks.
17084 * src/lex.c (init_lex): Rename as...
17085 (lex_init): this.
17086 (lex_free): New.
17087 * src/main.c (main): Use it.
17088
17089 2001-09-24 Marc Autret <autret_m@epita.fr>
17090
17091 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17092 to output informations in fout (FILE*).
17093 (open_graph, close_graph): Likewise.
17094 (output_graph, output_edge, output_node): Likewise.
17095 * src/vcg.h: Update function prototypes.
17096 * src/print_graph.c (print_graph): Open output graph file.
17097 (print_actions): Adjust.
17098 * src/files.h: Remove extern declaration.
17099 * src/files.c: Remove graph_obstack declaration.
17100 (open_files): Remove graph_obstack initialization.
17101 (output_files): Remove graph_obstack saving.
17102
17103 2001-09-24 Marc Autret <autret_m@epita.fr>
17104
17105 * src/files.c (compute_output_file_names): Fix.
17106
17107 2001-09-24 Marc Autret <autret_m@epita.fr>,
17108 Akim Demaille <akim@epita.fr>
17109
17110 * src/reader.c (reader): Remove call to free_symtab ().
17111 * src/main.c (main): Call it here.
17112 Include symtab.h.
17113 * src/conflicts.c (initialize_conflicts): Rename as...
17114 (solve_conflicts): this.
17115 * src/print.c (print_core, print_actions, print_state)
17116 (print_grammar): Dump to a file instead a `output_obstack'.
17117 (print_results): Dump `output_obstack', and then proceed with the
17118 FILE *.
17119 * src/files.c (compute_output_file_names, close_files): New.
17120 (output_files): Adjust.
17121 * src/main.c (main): Adjust.
17122
17123 2001-09-23 Marc Autret <autret_m@epita.fr>
17124
17125 * src/files.c (compute_header_macro): Computes header macro name
17126 from spec_defines_file when given.
17127
17128 2001-09-23 Marc Autret <autret_m@epita.fr>
17129
17130 * src/files.c (output_files): Add default extensions.
17131
17132 2001-09-22 Akim Demaille <akim@epita.fr>
17133
17134 * src/conflicts.c (finalize_conflicts): Rename as...
17135 (free_conflicts): this.
17136
17137 2001-09-22 Akim Demaille <akim@epita.fr>
17138
17139 * src/gram.c (gram_free): Rename back as...
17140 (dummy): this.
17141 (output_token_translations): Free `token_translations'.
17142 * src/symtab.c (free_symtab): Free the tag field.
17143
17144 2001-09-22 Akim Demaille <akim@epita.fr>
17145
17146 Remove `translations' as it is always set to true.
17147
17148 * src/gram.h: Adjust.
17149 * src/reader.c (packsymbols, parse_token_decl): Adjust
17150 * src/print.c (print_grammar): Adjust.
17151 * src/output.c (output_token_translations): Adjust.
17152 * src/lex.c (lex): Adjust.
17153 * src/gram.c: Be sure the set pointers to NULL.
17154 (dummy): Rename as...
17155 (gram_free): this.
17156
17157 2001-09-22 Akim Demaille <akim@epita.fr>
17158
17159 * configure.in: Invoke AM_LIB_DMALLOC.
17160 * src/system.h: Use dmalloc.
17161 * src/LR0.c: Be sure to have pointers initialized to NULL.
17162 (allocate_itemsets): Allocate kernel_items only if needed.
17163
17164 2001-09-22 Akim Demaille <akim@epita.fr>
17165
17166 * configure.in: Bump to 1.29b.
17167 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17168 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17169 need xmalloc.c in calc.y.
17170 From Pascal Bart.
17171
17172 2001-09-21 Akim Demaille <akim@epita.fr>
17173
17174 Version 1.29a.
17175 * Makefile.maint, config/config.guess, config/config.sub,
17176 * config/missing: Update from masters.
17177 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17178 upon package.m4.
17179 * configure.in (ALL_LINGUAS): Add `tr'.
17180
17181 2001-09-21 Akim Demaille <akim@epita.fr>
17182
17183 * tests/Makefile.am (package.m4): Move to...
17184 ($(srcdir)/$(TESTSUITE)): here.
17185
17186 2001-09-20 Akim Demaille <akim@epita.fr>
17187
17188 * src/complain.c: No longer try to be standalone: use system.h.
17189 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17190 * src/complain.h: Likewise.
17191 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17192 Remove the unused variable `n'.
17193 From Albert Chin-A-Young.
17194
17195 2001-09-18 Marc Autret <autret_m@epita.fr>
17196
17197 * doc/bison.1: Update.
17198 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17199 descriptions.
17200 (Option Cross Key): Update.
17201 Add --graph.
17202
17203 2001-09-18 Marc Autret <autret_m@epita.fr>
17204
17205 * tests/regression.at: New test (comment in %union).
17206
17207 2001-09-18 Marc Autret <autret_m@epita.fr>
17208
17209 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17210 do that.
17211 Reported by Keith Browne.
17212
17213 2001-09-18 Marc Autret <autret_m@epita.fr>
17214
17215 * tests/output.at: Add tests for --defines and --graph.
17216
17217 2001-09-18 Marc Autret <autret_m@epita.fr>
17218
17219 * tests/output.at: Removes tests of %{header,src}_extension features.
17220
17221 2001-09-18 Akim Demaille <akim@epita.fr>
17222
17223 * tests/Makefile.am (package.m4): New.
17224 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17225 (_AT_CHECK_CALC_ERROR): Likewise.
17226 Factor the `, ' part of verbose error messages.
17227
17228 2001-09-18 Marc Autret <autret_m@epita.fr>
17229
17230 * src/getargs.c (longopts): Declare --defines and --graph as options
17231 with optional arguments.
17232 * src/files.h: Add extern declarations.
17233 * src/files.c (spec_graph_file, spec_defines_file): New.
17234 (output_files): Update.
17235 Remove CPP-outed code.
17236
17237 2001-09-18 Marc Autret <autret_m@epita.fr>
17238
17239 Turn off %{source,header}_extension feature.
17240
17241 * src/files.c (compute_exts_from_gf): Update.
17242 (compute_exts_from_src): Update.
17243 (output_files): CPP-out useless code.
17244 * src/files.h: Remove {header,source}_extension extern declarations.
17245 * src/reader.c (parse_dquoted_param): CPP-out.
17246 (parse_header_extension_decl): Remove.
17247 (parse_source_extension_decl): Remove.
17248 (read_declarations): Remove cases tok_{hdrext,srcext}.
17249 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17250 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17251
17252 2001-09-10 Akim Demaille <akim@epita.fr>
17253
17254 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17255 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17256 (AT_CHECK_OUTPUT): this.
17257 Merely check ls' exit status, its output is useless.
17258
17259 2001-09-10 Akim Demaille <akim@epita.fr>
17260
17261 * tests/calc.at: Use m4_match.
17262 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17263
17264 2001-09-10 Marc Autret <autret_m@epita.fr>,
17265 Akim Demaille <akim@epita.fr>
17266
17267 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17268 enum color_e.
17269 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17270 to `normal'.
17271 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17272 * src/lex.h: Adjust prototype.
17273 (token_t): Add `tok_undef'.
17274 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17275 (parse_percent_token): Now returns token_t.
17276 Add default statement in switch.
17277 (lex): Separate `c' as an input variable, from the token_t result
17278 part.
17279 (unlexed): Is a token_t.
17280
17281 2001-09-10 Akim Demaille <akim@epita.fr>
17282
17283 * configure.in: Bump to 1.29a.
17284
17285 2001-09-07 Akim Demaille <akim@epita.fr>
17286
17287 Version 1.29.
17288
17289 2001-08-30 Akim Demaille <akim@epita.fr>
17290
17291 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17292 * m4/atconfig.m4: Remove.
17293 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17294 * tests/bison: New.
17295 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17296 m4_if, m4_patsubst, and m4_regexp.
17297 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17298 `input' file instead of echo.
17299
17300 2001-08-29 Akim Demaille <akim@epita.fr>
17301
17302 Bump to 1.28e.
17303
17304 2001-08-29 Akim Demaille <akim@epita.fr>
17305
17306 Version 1.28d.
17307
17308 2001-08-29 Paul Eggert <eggert@twinsun.com>
17309
17310 * src/bison.simple (yyparse): Don't take the address of an
17311 item before the start of an array, as that doesn't conform to
17312 the C Standard.
17313
17314 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17315
17316 * doc/bison.texinfo (Location Tracking Calc): New node.
17317
17318 2001-08-29 Paul Eggert <eggert@twinsun.com>
17319
17320 * src/output.c (output): Do not define const, as this now
17321 causes more problems than it cures.
17322
17323 2001-08-29 Akim Demaille <akim@epita.fr>
17324
17325 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17326 the nodes.
17327 Be sure to tag the `detailmenu'.
17328
17329 2001-08-29 Akim Demaille <akim@epita.fr>
17330
17331 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17332 download in a tmp dir.
17333
17334 2001-08-28 Marc Autret <autret_m@epita.fr>
17335
17336 * config/depcomp: New file.
17337
17338 2001-08-28 Marc Autret <autret_m@epita.fr>
17339
17340 * doc/bison.1 (mandoc): Adjust.
17341 From Juan Manuel Guerrero.
17342
17343 2001-08-28 Marc Autret <autret_m@epita.fr>
17344
17345 * src/print_graph.c (print_state): Fix.
17346
17347 2001-08-27 Marc Autret <autret_m@epita.fr>
17348
17349 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17350 char * members.
17351 Echo modifications to the functions prototypes.
17352 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17353
17354 2001-08-27 Marc Autret <autret_m@epita.fr>
17355
17356 * src/vcg.c: Include `xalloc.h'.
17357 (add_colorentry): New.
17358 (add_classname): New.
17359 (add_infoname): New.
17360 * src/vcg.h: Add new prototypes.
17361
17362 2001-08-27 Akim Demaille <akim@epita.fr>
17363
17364 * Makefile.maint: Sync. again with CVS Autoconf.
17365
17366 2001-08-27 Akim Demaille <akim@epita.fr>
17367
17368 * Makefile.maint: Formatting changes.
17369 (po-update, cvs-update, update): New targets.
17370 (AMTAR): Remove.
17371
17372 2001-08-27 Akim Demaille <akim@epita.fr>
17373
17374 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17375 * Makefile.maint: Sync. with CVS Autoconf.
17376
17377 2001-08-27 Marc Autret <autret_m@epita.fr>
17378
17379 * src/vcg.h (struct infoname_s): New.
17380 (struct colorentry_s): New.
17381 (graph_s): New fields {vertical,horizontal}_order in structure.
17382 Add `infoname' field.
17383 Add `colorentry' field;
17384 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17385 (G_HORIZONTAL_ORDER): New.
17386 (G_INFONAME): New.
17387 (G_COLORENTRY): New.
17388 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17389 Add output of `infoname'.
17390 Add output of `colorentry'.
17391
17392 2001-08-27 Marc Autret <autret_m@epita.fr>
17393
17394 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17395 This one shadowed a global parameter.
17396
17397 2001-08-24 Marc Autret <autret_m@epita.fr>
17398
17399 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17400 instead of `unsigned'.
17401 (print_state): Do not call obstack_object_size () in obstack_grow ()
17402 to avoid macro variables shadowing.
17403
17404 2001-08-23 Marc Autret <autret_m@epita.fr>
17405
17406 * src/lex.c (percent_table): Typo: s/naem/name/.
17407 Add graph option.
17408 Normalize new options declarations.
17409
17410 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17411
17412 * tests/suite.at: Exercise %header_extension and %source_extension.
17413
17414 2001-08-16 Marc Autret <autret_m@epita.fr>
17415
17416 * src/reader.c (parse_dquoted_param): New.
17417 (parse_header_extension_decl): Use it.
17418 (parse_source_extension_decl): Likewise.
17419
17420 2001-08-16 Marc Autret <autret_m@epita.fr>
17421
17422 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17423 (get_xxxx_str): Use assert () instead of complain ().
17424 Remove return invokations in default cases.
17425 (get_decision_str): Modify default behaviour. Remove second argument.
17426 Echo modifications on calls.
17427 (output_graph): Fix.
17428
17429 2001-08-16 Marc Autret <autret_m@epita.fr>
17430
17431 * src/getargs.c (usage): Update with ``-g, --graph''.
17432
17433 2001-08-16 Marc Autret <autret_m@epita.fr>
17434
17435 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17436 (Option Cross Key): Likewise.
17437 * doc/bison.1: Update.
17438
174392001-09-25 Pascal Bart <pascal.bart@epita.fr>
17440
17441 * src/output.c (output_master_parser): Don't finish action_obstack.
17442 (output_parser): Don't care about the muscle action, here.
17443 (prepare): Copy the action_obstack in the action muscle.
17444 (output): Free action_obstack.
17445
174462001-09-23 Pascal Bart <pascal.bart@epita.fr>
17447
17448 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17449 will contain `%union' declaration.
17450 (parse_union_decl): Delete #line directive output.
17451 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17452 informations about %union.
17453 (parse_union_decl): Copy the union_obstack in the muscle stype.
17454 * src/bison.simple: Add new #line directive.
17455 Add typdef %%stype YYSTYPE.
17456
174572001-09-23 Pascal Bart <pascal.bart@epita.fr>
17458
17459 * src/bison.simple: Add new `#line' directive.
17460
174612001-09-22 Pascal Bart <pascal.bart@epita.fr>
17462
17463 * src/bison.simple: New `#line' directive.
17464 * src/output.c (output_parser): Support new dynamic muscle input_line.
17465
174662001-09-22 Marc Autret <autret_m@epita.fr>
17467
17468 * src/output.c (output_master_parser): New.
17469 (output_parser): Be more re-entrant.
17470
174712001-09-21 Marc Autret <autret_m@epita.fr>
17472
17473 * src/reader.c (copy_definition, parse_union_decl): Update and use
17474 `linef' muscle.
17475 (copy_action): Likewise.
17476 Use obstack_1grow ().
17477 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17478
174792001-09-21 Marc Autret <autret_m@epita.fr>
17480
17481 * src/options.c (option_table): Adjust.
17482 * src/lex.c (parse_percent_token): Fix.
17483
174842001-09-20 Pascal Bart <pascal.bart@epita.fr>
17485
17486 * src/options.c (symtab.h): Include it, need by lex.h.
17487
174882001-09-20 Pascal Bart <pascal.bart@epita.fr>
17489
17490 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17491 is now an option_table_struct*.
17492 (option_strcmp): New function option_strcmp.
17493 (parse_percent_token): Call option_strcmp.
17494 * src/getargs.c (xalloc.h, options.h): Include it.
17495 (getargs): Call create_long_option_table.
17496 (getargs): Free longopts at the end of the function.
17497 (shortopts): Move in options.c.
17498 * src/options.c (create_long_option_table): New function. Convert
17499 information from option_table to option structure.
17500 * src/reader.c (options.h): Include it.
17501
17502 * src/Makefile.am: Adjust.
17503 * src/options.c (option_table): Create from longopts and percent_table.
17504 * src/getargs.c (longopts): Delete.
17505 * src/lex.c (struct percent_table_struct): Delete.
17506 (percent_table): Delete.
17507 (options.h): Include it.
17508 * src/options.c: Create.
17509 * src/options.h: Create.
17510 Declare enum opt_access_e.
17511 Define struct option_table_struct.
17512
175132001-09-20 Marc Autret <autret_m@epita.fr>
17514
17515 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17516 sections of Bison.
17517
175182001-09-19 Pascal Bart <pascal.bart@epita.fr>
17519
17520 * src/bison.simple: s/%%filename/%%skeleton.
17521 * src/muscle_tab.c (getargs.h): Include it.
17522 (muscle_init): Insert new muscle skeleton.
17523
175242001-09-18 Pascal Bart <pascal.bart@epita.fr>
17525
17526 * src/output.c (output_parser): Delete unused variable actions_dumped.
17527
175282001-09-07 Pascal Bart <pascal.bart@epita.fr>
17529
17530 * src/output.c (output): Delete call to reader_output_yylsp.
17531 * src/reader.c (reader): Likewise.
17532 * src/reader.h: Delete declaration of reader_output_yylsp.
17533
175342001-09-02 Marc Autret <autret_m@epita.fr>
17535
17536 * src/reader.c: Include muscle_tab.h.
17537 (parse_union_decl): Update.
17538 (parse_macro_decl): Rename parse_muscle_decl.
17539 Update to use renamed functions and variable.
17540 (read_declarations, copy_action, read_additionnal_code, : Updated
17541 with correct variables and functions names.
17542 (packsymbols, reader): Likewise.
17543
17544 * src/reader.h (muscle_obstack): Extern declaration update.
17545
17546 * src/output.c: Include muscle_tab.h
17547 In all functions using macro_insert, change by using muscle_insert ().
17548 (macro_obstack): Rename muscle_obstack.
17549 Echo modifications in the whole file.
17550 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17551 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17552 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17553
17554 * src/muscle_tab.h: Update double inclusion macros.
17555 (macro_entry_s): Rename muscle_entry_s.
17556 Update prototypes.
17557
17558 * src/muscle_tab.c: Include muscle_tab.h.
17559 Rename macro_tabble to muscle_table.
17560 (mhash1, mhash2, mcmp): Use muscle_entry.
17561 (macro_init): Rename muscle_init. Update.
17562 (macro_insert): Rename muscle_insert. Update.
17563 (macro_find): Rename muscle_find. Update.
17564
17565 * src/main.c: Include muscle_tab.h.
17566 (main): Call muscle_init ().
17567 * src/Makefile.am (bison_SOURCES): Echo modifications.
17568
175692001-09-02 Marc Autret <autret_m@epita.fr>
17570
17571 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17572
17573 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17574
175752001-09-02 Marc Autret <autret_m@epita.fr>
17576
17577 * src/macrotab.c, src/macrotab.h: Remove.
17578
175792001-09-01 Pascal Bart <pascal.bart@epita.fr>
17580
17581 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17582 filename.
17583
175842001-09-01 Marc Autret <autret_m@epita.fr>
17585
17586 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17587 to an explicit value to activate the feature. We do it here.
17588
175892001-08-31 Pascal Bart <pascal.bart@epita.fr>
17590
17591 * src/output.c (prepare): Delete the `filename' muscule insertion.
17592 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17593 (parse_union_decl): Likewise.
17594 * src/macrotab.c (macro_init): Initialize filename by infile.
17595
175962001-08-31 Marc Autret <autret_m@epita.fr>
17597
17598 * src/bison.simple (YYLSP_NEEDED): New definition.
17599 * src/output.c (prepare): Add macro insertion of `locations_flag'
17600
176012001-08-31 Pascal Bart <pascal.bart@epita.fr>
17602
17603 * src/output.c (prepare): Delete insertion of previous muscles,
17604 and insert the `prefix' muscles.
17605 * src/macrotab.c (macro_init): Likewise.
17606 (macro_init): Initialization prefix directive by `yy'.
17607 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17608 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17609 yylval, yydebug, yyerror, yynerrs and yyparse.
17610 New directive `#define' to substitute yydebug, ... with option
17611 name_prefix.
17612
176132001-08-31 Pascal Bart <pascal.bart@epita.fr>
17614
17615 * src/main.c (main): Standardize.
17616 * src/output.c (output_table_data, output_parser): Likewise.
17617 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17618
176192001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17620
17621 * src/reader.c (read_additionnal_code): Rename %%user_code to
17622 %%epilogue.
17623 * src/output.c (output): Rename %%declarations to %%prologue.
17624 * src/bison.simple: Echo modifications.
17625
176262001-08-31 Marc Autret <autret_m@epita.fr>
17627
17628 * src/reader.c (readgram): CleanUp.
17629 (output_token_defines): Likewise.
17630 (packsymbols): Likewise.
17631 (reader): Likewise.
17632 * src/output.c (output): CPP-out useless code.
17633
176342001-08-31 Pascal Bart <pascal.bart@epita.fr>
17635
17636 * src/reader.c (reader): Delete obsolete call to function
17637 output_trailers and output_headers.
17638 * src/output.h: Remove obsolete functions prototypes of output_headers
17639 and output_trailers.
17640
176412001-08-30 Pascal Bart <pascal.bart@epita.fr>
17642
17643 * src/main.c: Include macrotab.h.
17644 * src/macrotab.h (macro_entry_s): Constify fields.
17645 Adjust functions prototypes.
17646 * src/macrotab.c (macro_insert): Constify key and value.
17647 (macro_find): Constify key.
17648 (macro_insert): Include 'xalloc.h'
17649 (macro_insert): Use XMALLOC.
17650 (macro_find): Constify return value.
17651 * src/output.c (output_table_data): Rename table to table_data.
17652 (output_parser): Constify macro_key, macro_value.
17653
176542001-08-30 Marc Autret <autret_m@epita.fr>
17655
17656 * src/reader.c (parse_skel_decl): New.
17657 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
17658 * src/lex.h (token_t): New token `tok_skel'.
17659 * src/lex.c (percent_table): Add skeleton option entry.
17660 Standardize.
17661
176622001-08-29 Marc Autret <autret_m@epita.fr>
17663
17664 * src/bison.simple: Add %%user_code directive at the end.
17665 * src/reader.c (read_additionnal_code): New.
17666 (reader): Use it.
17667 * src/output.c (output_program): Remove.
17668 (output): Update.
17669
176702001-08-28 Marc Autret <autret_m@epita.fr>
17671
17672 * src/output.c (output_actions): Clean up.
17673 (output_gram): CPP-out useless code.
17674 * src/reader.c (reader): Clean up, CPP-out useless code.
17675
176762001-08-28 Pascal Bart <pascal.bart@epita.fr>
17677
17678 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
17679 directive.
17680 * src/bison.simple: Add `%%definitions'.
17681
176822001-08-28 Marc Autret <autret_m@epita.fr>
17683
17684 * config/depcomp: New file.
17685
176862001-08-27 Paul Eggert <eggert@twinsun.com>
17687
17688 * src/bison.simple (yyparse): Don't take the address of an
17689 item before the start of an array, as that doesn't conform to
17690 the C Standard.
17691
176922001-08-27 Robert Anisko <robert.anisko@epita.fr>
17693
17694 * src/output.c (output): Remove the initialization of the macro
17695 obstack. It was done too late here.
17696
17697 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
17698 completely wrong.
17699 (reader): Initialize the macro obstack here, since we need it to grow
17700 '%define' directives.
17701
17702 * src/reader.h: Declare the macro obstack as extern.
17703
177042001-08-27 Robert Anisko <robert.anisko@epita.fr>
17705
17706 * src/output.c (output_parser): Fix. Store single '%' characters in
17707 the output obstack instead of throwing them away.
17708
177092001-08-27 Akim Demaille <akim@epita.fr>
17710
17711 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17712
177132001-08-25 Robert Anisko <robert.anisko@epita.fr>
17714
17715 * lib/Makefile.am: Adjust.
17716
177172001-08-25 Robert Anisko <robert.anisko@epita.fr>
17718
17719 * src/bison.simple: Update and add '%%' directives.
17720
177212001-08-25 Robert Anisko <robert.anisko@epita.fr>
17722
17723 * src/reader.c (reader): Remove calls to 'output_headers' and
17724 'output_trailers'. Remove some C output.
17725 (readgram): Disable a piece of code that was writing a default
17726 definition for 'YYSTYPE'.
17727 (reader_output_yylsp): Remove.
17728 (packsymbols): Output token defintions to a macro.
17729 (copy_definition): Disable C output.
17730
17731 * src/reader.c (parse_macro_decl): New function used to parse macro
17732 declarations.
17733 (copy_string2): Put the body of copy_string into this new function.
17734 Add a parameter to let the caller choose whether he wants to copy the
17735 string delimiters or not.
17736 (copy_string): Be a simple call to copy_string2 with the last argument
17737 bound to true.
17738 (read_declarations): Add case for macro definition.
17739 (copy_identifier): New.
17740 (parse_macro_decl): Read macro identifiers using copy_identifier
17741 rather than lex.
17742
177432001-08-25 Robert Anisko <robert.anisko@epita.fr>
17744
17745 * src/output.c (prepare): Add prefixed names.
17746 (output_parser): Output semantic actions.
17747 (output_parser): Fix bug on '%%line' directives.
17748
17749 * src/output.c (output_headers): Remove. The C code printed by this
17750 function should now be in the skeletons.
17751 (output_trailers): Remove.
17752 (output): Disable call to 'reader_output_yylsp'.
17753 (output_rule_data): Do not output tables to the table obstack.
17754
17755 * src/output.c: Remove some C dedicated output.
17756 Improve the use of macro and output obstacks.
17757 (output_defines): Remove.
17758
17759 * src/output.c (output_token_translations): Associate 'translate'
17760 table with a macro. No output to the table obstack.
17761 (output_gram): Same for 'rhs' and 'prhs'.
17762 (output_stos): Same for 'stos'.
17763 (output_rule_data): Same for 'r1' and 'r2'.
17764 (token_actions): Same for 'defact'.
17765 (goto_actions): Same for 'defgoto'.
17766 (output_base): Same for 'pact' and 'pgoto'.
17767 (output_table): Same for 'table'.
17768 (output_check): Same for 'check'.
17769
17770 * src/output.c (output_table_data): New function.
17771 (output_short_table): Remove.
17772 (output_short_or_char_table): Remove.
17773
17774 * src/output.c (output_parser): Replace most of the skeleton copy code
17775 with something new. Skeletons are now processed character by character
17776 rather than line by line, and Bison looks for '%%' macros. This is the
17777 first step in making Bison's output process (a lot) more flexible.
17778 (output_parser): Use the macro table.
17779
177802001-08-25 Robert Anisko <robert.anisko@epita.fr>
17781
17782 * src/main.c (main): Initialize the macro table.
17783
177842001-08-25 Robert Anisko <robert.anisko@epita.fr>
17785
17786 * src/lex.c (percent_table): Add tok_define.
17787 * src/lex.h: Add tok_define.
17788
177892001-08-25 Robert Anisko <robert.anisko@epita.fr>
17790
17791 * src/macrotab.c: New file.
17792 * src/macrotab.h: New file.
17793 * src/Makefile.am: Update.
17794
177952001-08-25 Robert Anisko <robert.anisko@epita.fr>
17796
17797 * lib/hash.c: New file.
17798 * lib/hash.h: New file.
17799 * lib/Makefile.am: Update.
17800
178012001-08-15 Akim Demaille <akim@epita.fr>
17802
17803 Version 1.28c.
17804
178052001-08-15 Marc Autret <autret_m@epita.fr>
17806
17807 * src/reader.c (readgram): Indent output macro YYSTYPE.
17808 (packsymbols): Likewise.
17809 (output_token_defines): Likewise.
17810 * src/files.c: Standardize.
17811 (compute_header_macro): New.
17812 (defines_obstack_save): New. Use compute_header_macro.
17813 (output_files): Update. Use defines_obstack_save.
17814
178152001-08-15 Akim Demaille <akim@epita.fr>
17816
17817 * doc/bison.texinfo (Table of Symbols): Document
17818 YYSTACK_USE_ALLOCA.
17819
178202001-08-15 Akim Demaille <akim@epita.fr>
17821
17822 * missing: Update from CVS Automake.
17823 * config/config.guess, config/config.sub, config/texinfo.tex:
17824 Update from gnu.org.
17825
178262001-08-15 Akim Demaille <akim@epita.fr>
17827
17828 * Makefile.maint: Sync with CVS Autoconf.
17829
178302001-08-14 Pascal Bart <pascal.bart@epita.fr>
17831
17832 * doc/bison.texinfo: Include GNU Free Documentation License from
17833 `fdl.texi'.
17834 * doc/fdl.texi: Add to package.
17835
178362001-08-14 Marc Autret <autret_m@epita.fr>
17837
17838 Turn on %{source,header}_extension features.
17839
17840 * src/lex.c (percent_table): Un-CPP out header_extension and
17841 source_extension.
17842 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
17843 (compute_exts_from_src): Remove conditions. It restores priorities
17844 between options.
17845
178462001-08-14 Marc Autret <autret_m@epita.fr>
17847
17848 * src/files.c (compute_base_names): Add extensions computing when
17849 `--file-prefix' used.
17850 Standardize function calls.
17851
178522001-08-13 Marc Autret <autret_m@epita.fr>
17853
17854 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
17855 defining it (defined but null disables alloca).
17856
178572001-08-13 Marc Autret <autret_m@epita.fr>
17858
17859 * src/bison.simple (_yy_memcpy): CPP reformat.
17860
178612001-08-13 Pascal Bart <pascal.bart@epita.fr>
17862
17863 * tests/atconfig.in (CPPFLAGS): Fix.
17864
178652001-08-10 Pascal Bart <pascal.bart@epita.fr>
17866
17867 * doc/bison.texinfo: Include GNU General Public License from
17868 `gpl.texi'.
17869 * doc/gpl.texi: Add to package.
17870
178712001-08-10 Marc Autret <autret_m@epita.fr>
17872
17873 * src/print_graph.h: Fix.
17874 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
17875
178762001-08-10 Akim Demaille <akim@epita.fr>
17877
17878 * src/system.h: Provide default declarations for stpcpy, strndup,
17879 and strnlen.
17880
178812001-08-10 Robert Anisko <anisko_r@epita.fr>
17882
17883 * doc/bison.texinfo (Locations): Update @$ stuff.
17884
178852001-08-09 Robert Anisko <anisko_r@epita.fr>
17886
17887 * src/bison.simple (YYLLOC_DEFAULT): Update.
17888 (yyparse): Adjust.
17889
178902001-08-08 Marc Autret <autret_m@epita.fr>
17891
17892 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
17893 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
17894 Reported by Fabrice Bauzac.
17895
178962001-08-08 Marc Autret <autret_m@epita.fr>
17897
17898 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
17899 * src/vcg.c (output_node): Fix.
17900 * src/vcg.h: Cleanup.
17901 * src/print_graph.c: Add comments.
17902 (node_output_size): New global variable. Simplify the formatting of
17903 the VCG graph output.
17904 (print_actions): Unused code is now used. It notifies the final state
17905 and no action states in the VCG graph. It also give the reduce actions.
17906 The `shift and goto' edges are red and the `go to state' edges are
17907 blue.
17908 Get the current node name and node_obstack by argument.
17909 (node_obstack): New variable.
17910 (print_state): Manage node_obstack.
17911 (print_core): Use node_obstack given by argument.
17912 A node is not only computed here but in print_actions also.
17913 (print_graph): CPP out useless code instead of commenting it.
17914
179152001-08-07 Pascal Bart <pascal.bart@epita.fr>
17916
17917 * tests/atconfig.in (CPPFLAGS): Fix.
17918
179192001-08-07 Akim Demaille <akim@epita.fr>
17920
17921 * src/print_graph.c (quote): New.
17922 (print_core): Use it.
17923
179242001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
17925
17926 * src/vcg.c (complain.h): Include it.
17927 Unepitaize `return' invocations.
17928 [NDEBUG] (main): Remove.
17929 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
17930 * src/files.c (open_files): Initialize graph_obstack.
17931 * src/print_graph.c (print_actions): CPP out useless code.
17932 (print_core): Don't output the last `\n' in labels.
17933 Use `quote'.
17934 * src/files.c (output_files): Output the VCG file.
17935 * src/main.c (main): Invoke print_graph ();
17936
179372001-08-06 Marc Autret <autret_m@epita.fr>
17938
17939 Automaton VCG graph output.
17940 Using option ``-g'' or long option ``--graph'', you can generate
17941 a gram_filename.vcg file containing a VCG description of the LALR (1)
17942 automaton of your grammar.
17943
17944 * src/main.c: Call to print_graph() function.
17945 * src/getargs.h: Update.
17946 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
17947 (graph_flag): New flag.
17948 (longopts): Update.
17949 (getargs): Add case `g'.
17950 * src/files.c (graph_obstack): New obstack struct.
17951 (open_files): Initialize new obstack.
17952 (output_files): Saves graph_obstack if required.
17953 * src/files.h (graph_obstack): New extern declaration.
17954 * src/Makefile.am: Add new source files.
17955
179562001-08-06 Marc Autret <autret_m@epita.fr>
17957
17958 * src/print_graph.c, src/print_graph.h (graph): New.
17959 * src/vcg.h: New file.
17960 * src/vcg.c: New file, VCG graph handling.
17961
179622001-08-06 Marc Autret <autret_m@epita.fr>
17963
17964 Add of %source_extension and %header_extension which specify
17965 the source or/and the header output file extension.
17966
17967 * src/files.c (compute_base_names): Remove initialisation of
17968 src_extension and header_extension.
17969 (compute_exts_from_gf): Update.
17970 (compute_exts_from_src): Update.
17971 (output_files): Update.
17972 * src/reader.c (parse_header_extension_decl): New.
17973 (parse_source_extension_decl): New.
17974 (read_declarations): New case statements for the new tokens.
17975 * src/lex.c (percent_table): Add entries for %source_extension
17976 and %header_extension.
17977 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
17978
179792001-08-06 Marc Autret <autret_m@epita.fr>
17980
17981 * configure.in: Bump to 1.28c.
17982 * doc/bison.texinfo: Texinfo thingies.
17983
179842001-08-04 Pascal Bart <pascal.bart@epita.fr>
17985
17986 * tests/atconfig.in (CPPFLAGS): Add.
17987 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
17988
179892001-08-03 Akim Demaille <akim@epita.fr>
17990
17991 Version 1.28b.
17992
179932001-08-03 Akim Demaille <akim@epita.fr>
17994
17995 * tests/Makefile.am (check-local): Ship testsuite.
17996 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
17997 Include `string.h'.
17998
179992001-08-03 Akim Demaille <akim@epita.fr>
18000
18001 * configure.in: Try using -Wformat when compiling.
18002
180032001-08-03 Akim Demaille <akim@epita.fr>
18004
18005 * configure.in: Bump to 1.28b.
18006
180072001-08-03 Akim Demaille <akim@epita.fr>
18008
18009 * src/complain.c: Adjust strerror_r portability issues.
18010
180112001-08-03 Akim Demaille <akim@epita.fr>
18012
18013 Version 1.28a.
18014
180152001-08-03 Akim Demaille <akim@epita.fr>
18016
18017 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18018 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18019 * src/getargs.c: Include complain.h.
18020 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18021 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18022
180232001-08-03 Akim Demaille <akim@epita.fr>
18024
18025 * src/reader.c (readgram): Display hidden chars in error messages.
18026
180272001-08-03 Akim Demaille <akim@epita.fr>
18028
18029 Update to gettext 0.10.39.
18030
180312001-08-03 Akim Demaille <akim@epita.fr>
18032
18033 * lib/strspn.c: New.
18034
180352001-08-01 Marc Autret <autret_m@epita.fr>
18036
18037 * doc/bison.texinfo: Update.
18038 * doc/bison.1 (mandoc): Update.
18039 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18040 * src/files.c: Support output files extensions computing.
18041 (src_extension): New static variable.
18042 (header_extension): New static variable.
18043 (tr): New function.
18044 (get_extension_index): New function, gets the index of an extension
18045 filename in a string.
18046 (compute_exts_from_gf): New function, computes extensions from the
18047 grammar file extension.
18048 (compute_exts_from_src): New functions, computes extensions from the
18049 C source file extension, file given by ``-o'' option.
18050 (compute_base_names): Update.
18051 (output_files): Update.
18052
180532001-08-01 Robert Anisko <anisko_r@epita.fr>
18054
18055 * doc/bison.texi: Document @$.
18056 (Locations): New section.
18057
180582001-07-18 Akim Demaille <akim@epita.fr>
18059
18060 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18061 * config/prev-version.txt, config/move-if-change: New.
18062 * Makefile.am: Adjust.
18063
180642001-07-08 Pascal Bart <pascal.bart@epita.fr>
18065
18066 * src/bison.simple (yyparse): Suppress warning `comparaison
18067 between signed and unsigned'.
18068
180692001-07-05 Pascal Bart <pascal.bart@epita.fr>
18070
18071 * src/getargs.h (raw_flag): Remove.
18072 * src/getargs.c: Die on `-r'/`--raw'.
18073 * src/lex.c (parse_percent_token): Die on `%raw'.
18074 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18075 * tests/calc.at: Suppress test with option `--raw'.
18076
180772001-07-14 Akim Demaille <akim@epita.fr>
18078
18079 * config/: New.
18080 * configure.in: Require Autoconf 2.50.
18081 Update to gettext 0.10.38.
18082
180832001-03-16 Akim Demaille <akim@epita.fr>
18084
18085 * doc/bison.texinfo: ANSIfy the examples.
18086
180872001-03-16 Akim Demaille <akim@epita.fr>
18088
18089 * getargs.c (skeleton): New variable.
18090 (longopts): --skeleton is a new option.
18091 (shortopts, getargs): -S is a new option.
18092 * getargs.h: Declare skeleton.
18093 * output.c (output_parser): Use it.
18094
180952001-03-16 Akim Demaille <akim@epita.fr>
18096
18097 * m4/strerror_r.m4: New.
18098 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18099 * lib/error.h, lib/error.c: Update.
18100
181012001-03-16 Akim Demaille <akim@epita.fr>
18102
18103 * src/getargs.c (longopts): Clean up.
18104
181052001-02-21 Akim Demaille <akim@epita.fr>
18106
18107 * src/reader.c (gensym): `gensym_count' is your own.
18108 Use a static buf to create the symbol name, as token_buffer is no
18109 longer a buffer.
18110
181112001-02-08 Akim Demaille <akim@epita.fr>
18112
18113 * src/conflicts.c (conflict_report): Be sure not to append to res
18114 between two calls, which could happen if both first sprintf were
18115 skipped, but not the first cp += strlen.
18116
181172001-02-08 Akim Demaille <akim@epita.fr>
18118
18119 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18120 New, from fileutils 4.0.37.
18121 * configure.in: Require Autoconf 2.49c. I took some time before
18122 making this decision. This is the only way out for portability
18123 issues in Bison, it would mean way too much duplicate effort to
18124 import in Bison features implemented in 2.49c since 2.13.
18125 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18126
181272001-02-02 Akim Demaille <akim@epita.fr>
18128
18129 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18130 * lib/xalloc.h, lib/xmalloc.c: Update.
18131
181322001-01-19 Akim Demaille <akim@epita.fr>
18133
18134 Get rid of the ad hoc handling of token_buffer in the scanner: use
18135 the obstacks.
18136
18137 * src/lex.c (token_obstack): New.
18138 (init_lex): Initialize it. No longer call...
18139 (grow_token_buffer): this. Remove it.
18140 Adjust all the places which used it to use the obstack.
18141
181422001-01-19 Akim Demaille <akim@epita.fr>
18143
18144 * src/lex.h: Rename all the tokens:
18145 s/\bENDFILE\b/tok_eof/g;
18146 s/\bIDENTIFIER\b/tok_identifier/g;
18147 etc.
18148 Let them be enums, not #define, to ease debugging.
18149 Adjust all the code.
18150
181512001-01-18 Akim Demaille <akim@epita.fr>
18152
18153 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18154 * src/lex.c (maxtoken, grow_token_buffer): Static.
18155
181562001-01-18 Akim Demaille <akim@epita.fr>
18157
18158 Since we now use obstacks, more % directives can be enabled.
18159
18160 * src/lex.c (percent_table): Also accept `%yacc',
18161 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18162 `%debug'.
18163 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18164 instead of returning a token.
18165 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18166 * src/reader.c (read_declarations): Adjust.
18167 * src/files.c (open_files): Don't call `compute_base_names', don't
18168 compute `attrsfile' since they depend upon data which might be
18169 *in* the input file now.
18170 (output_files): Do it here.
18171 * src/output.c (output_headers): Document the fact that this patch
18172 introduces a guaranteed SEGV for semantic parsers.
18173 * doc/bison.texinfo: Document them.
18174 * tests/suite.at: Exercise these %options.
18175
181762000-12-20 Akim Demaille <akim@epita.fr>
18177
18178 Also handle the output file (--verbose) with obstacks.
18179
18180 * files.c (foutput): Remove.
18181 (output_obstack): New.
18182 Adjust all dependencies.
18183 * src/conflicts.c: Return a string.
18184 * src/system.h (obstack_grow_string): Rename as...
18185 (obstack_sgrow): this. Be ready to work with non literals.
18186 (obstack_fgrow4): New.
18187
181882000-12-20 Akim Demaille <akim@epita.fr>
18189
18190 * src/files.c (open_files): Fix the computation of short_base_name
18191 in the case of `-o foo.tab.c'.
18192
181932000-12-20 Akim Demaille <akim@epita.fr>
18194
18195 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18196 (copy_dollar): Now that everything uses obstacks, get rid of the
18197 FILE * parameters.
18198
181992000-12-20 Akim Demaille <akim@epita.fr>
18200
18201 * src/files.c (open_files): Actually the `.output' file is based
18202 on the short_base_name, not base_name.
18203 * tests/suite.at (Checking output file names): Adjust.
18204
182052000-12-20 Akim Demaille <akim@epita.fr>
18206
18207 * src/bison.s1: Remove, we now use directly...
18208 * src/bison.simple: this.
18209 * src/Makefile.am: Use pkgdata instead of data.
18210
182112000-12-20 Akim Demaille <akim@epita.fr>
18212
18213 * src/files.c (guard_obstack): New.
18214 (open_files): Initialize it.
18215 (output_files): Dump it...
18216 * src/files.h: Export it.
18217 * src/reader.c (copy_guard): Use it.
18218
182192000-12-19 Akim Demaille <akim@epita.fr>
18220
18221 * src/files.c (outfile, defsfile, actfile): Removed as global
18222 vars.
18223 (open_files): Don't compute them.
18224 (output_files): Adjust.
18225 (base_name, short_base_name): Be global.
18226 Adjust dependencies.
18227
182282000-12-19 Akim Demaille <akim@epita.fr>
18229
18230 * src/files.c (strsuffix): New.
18231 (stringappend): Be just like strcat but allocate.
18232 (base_names): Eve out from open_files.
18233 Try to simplify the rather hairy computation of base_name and
18234 short_base_name.
18235 (open_files): Use it.
18236 * tests/suite.at (Checking output file names): New test.
18237
182382000-12-19 Akim Demaille <akim@epita.fr>
18239
18240 * src/system.h (obstack_grow_literal_string): Rename as...
18241 (obstack_grow_string): this.
18242 * src/output.c (output_parser): Recognize `%% actions' instead of
18243 `$'.
18244 * src/bison.s1: s/$/%% actions/.
18245 * src/bison.hairy: Likewise.
18246
182472000-12-19 Akim Demaille <akim@epita.fr>
18248
18249 * src/output.c (output_parser): Compute the `#line' lines when
18250 there are.
18251 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18252 Suggested by Hans Aberg.
18253
182542000-12-19 Akim Demaille <akim@epita.fr>
18255
18256 Let the handling of the skeleton files be local to the procedures
18257 that use it.
18258
18259 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18260 longer static.
18261 (fparser, open_extra_files): Remove.
18262 (open_files, output_files): Don't take care of fparser.
18263 * src/files.h: Adjust.
18264 * src/output.c (output_parser): Open and close the file to the
18265 skeleton.
18266 * src/reader.c (read_declarations): When %semantic_parser, open
18267 fguard.
18268
182692000-12-19 Akim Demaille <akim@epita.fr>
18270
18271 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18272 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18273
182742000-12-19 Akim Demaille <akim@epita.fr>
18275
18276 * src/files.c (open_files): Yipee! We no longer need all the code
18277 looking for `/tmp' since we have no tmp file.
18278
182792000-12-19 Akim Demaille <akim@epita.fr>
18280
18281 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18282 New macros.
18283 * src/files.c (open_files): Less dependency on MSDOS etc.
18284
182852000-12-14 Akim Demaille <akim@epita.fr>
18286
18287 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18288 Provide a default definition.
18289 Use it when executing the default @ action.
18290 * src/reader.c (reader_output_yylsp): No longer include
18291 `timestamp' and `text' in the default YYLTYPE.
18292
182932000-12-12 Akim Demaille <akim@epita.fr>
18294
18295 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18296 (copy_guard): Quote the file names.
18297 Reported by Laurent Mascherpa.
18298
182992000-12-12 Akim Demaille <akim@epita.fr>
18300
18301 * src/output.c (output_headers, output_program, output): Be sure
18302 to escape special characters when outputting filenames.
18303 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18304 (output_headers): Don't depend on them, Use ACTSTR.
18305
183062000-11-17 Akim Demaille <akim@epita.fr>
18307
18308 * lib/obstack.h: Formatting changes.
18309 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18310 prevents type checking.
18311 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18312 cast the value to (void *): assigning a `foo *' to a `void *'
18313 variable is valid.
18314 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18315 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18316 append characters.
18317
183182000-11-17 Akim Demaille <akim@epita.fr>
18319
18320 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18321 as...
18322 (suite.m4, regression.m4, calc.m4): these.
18323 * tests/atgeneral.m4: Update from CVS Autoconf.
18324
183252000-11-17 Akim Demaille <akim@epita.fr>
18326
18327 * tests/regression.m4 (%union and --defines): New test,
18328 demonstrating a current bug in the obstack implementation.
18329
183302000-11-17 Akim Demaille <akim@epita.fr>
18331
18332 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18333 macros.
18334 Use them to declare the variables which are global or local to
18335 `yyparse'.
18336
183372000-11-17 Akim Demaille <akim@epita.fr>
18338
18339 * acconfig.h: Remove, no longer used.
18340
183412000-11-07 Akim Demaille <akim@epita.fr>
18342
18343 * src: s/Copyright (C)/Copyright/g.
18344
183452000-11-07 Akim Demaille <akim@epita.fr>
18346
18347 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18348 defining.
18349 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18350
183512000-11-07 Akim Demaille <akim@epita.fr>
18352
18353 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18354 Merge in a single CPP if/else.
18355
183562000-11-07 Akim Demaille <akim@epita.fr>
18357
18358 * src/output.c (output): Remove useless variables.
18359 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18360 argument `data' for consistency with the prototypes.
18361 Qualify it `const'.
18362 (obstack_copy, obstack_copy0): Rename the second argument as
18363 `address' for consistency. Qualify it `const'.
18364 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18365 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18366 `const' their input argument (`data' or `address').
18367 Adjust the corresponding macros to include `const' in casts.
18368
183692000-11-03 Akim Demaille <akim@epita.fr>
18370
18371 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18372 s/PFILE1/BISON_HAIRY/.
18373 Adjust dependencies.
18374
183752000-11-03 Akim Demaille <akim@epita.fr>
18376
18377 For some reason, this was not applied.
18378
18379 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18380 `unlink': it's no longer used.
18381
183822000-11-03 Akim Demaille <akim@epita.fr>
18383
18384 * src/files.c (skeleton_find): New function, eved out of...
18385 (open_files, open_extra_files): here.
18386
183872000-11-03 Akim Demaille <akim@epita.fr>
18388
18389 Don't use `atexit'.
18390
18391 * src/files.c (obstack_save): New function.
18392 (done): Rename as...
18393 (output_files): this.
18394 Use `obstack_save'.
18395 * src/main.c (main): Don't use `atexit' to register `done', since
18396 it no longer has to remove tmp files, just call `output_files'
18397 when there are no errors.
18398
183992000-11-02 Akim Demaille <akim@epita.fr>
18400
18401 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18402 `unlink': it's no longer used.
18403 * src/files.h: Formatting changes.
18404
184052000-11-02 Akim Demaille <akim@epita.fr>
18406
18407 Remove the last uses of mktemp and unlink/delete.
18408
18409 * src/files.c (fdefines, ftable): Removed.
18410 (defines_ostack, table_obstack): New.
18411 Adjust dependencies of the former into uses of the latter.
18412 * src/output.c (output_short_or_char_table, output_short_table):
18413 Convert to using obstacks.
18414 * src/reader.c (copy_comment2): Accept one FILE * and two
18415 obstacks.
18416 (output_token_defines, reader_output_yylsp): Use obstacks.
18417 * src/system.h (obstack_fgrow3): New.
18418 * po/POTFILES.in: Adjust.
18419
184202000-11-01 Akim Demaille <akim@epita.fr>
18421
18422 Change each use of `fattrs' into a use of `attrs_obstack'.
18423
18424 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18425 * src/files.c (fattrs): Remove.
18426 (attrs_obstack): New.
18427 Adjust all dependencies.
18428 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18429
184302000-11-01 Akim Demaille <akim@epita.fr>
18431
18432 Introduce obstacks.
18433 Change each use of `faction' into a use of `action_obstack'.
18434
18435 * lib/obstack.h, lib/obstack.c: New files.
18436 * src/files.c (faction): Remove.
18437 (action_obstack): New.
18438 Adjust all dependencies.
18439
184402000-10-20 Akim Demaille <akim@epita.fr>
18441
18442 * lib/quote.h (PARAMS): New macro. Use it.
18443
184442000-10-16 Akim Demaille <akim@epita.fr>
18445
18446 * src/output.c (output_short_or_char_table): New function.
18447 (output_short_table, output_token_translations): Use it.
18448 (goto_actions): Use output_short_table.
18449
184502000-10-16 Akim Demaille <akim@epita.fr>
18451
18452 * src/symtab.c (bucket_new): New function.
18453 (getsym): Use it.
18454
18455 * src/output.c (output_short_table): New argument to display the
18456 comment associated with the table.
18457 Adjust dependencies.
18458 (output_gram): Use it.
18459 (output_rule_data): Nicer output layout for YYTNAME.
18460
184612000-10-16 Akim Demaille <akim@epita.fr>
18462
18463 * src/lex.c (read_typename): New function.
18464 (lex): Use it.
18465 * src/reader.c (copy_dollar): Likewise.
18466
184672000-10-16 Akim Demaille <akim@epita.fr>
18468
18469 * src/reader.c (copy_comment2): Expect the input stream to be on
18470 the `/' which is suspected to open a comment, instead of being
18471 called after `//' or `/*' was read.
18472 (copy_comment, copy_definition, parse_union_decl, copy_action)
18473 (copy_guard): Adjust.
18474
184752000-10-16 Akim Demaille <akim@epita.fr>
18476
18477 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18478 `read_signed_integer'.
18479
184802000-10-16 Akim Demaille <akim@epita.fr>
18481
18482 * src/reader.c (copy_dollar): New function.
18483 (copy_guard, copy_action): Use it.
18484
184852000-10-16 Akim Demaille <akim@epita.fr>
18486
18487 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18488 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18489 New files, from Fileutils 4.0.27.
18490 * src/main.c (printable_version): Remove.
18491 * src/lex.c, src/reader.c: Use `quote'.
18492
184932000-10-04 Akim Demaille <akim@epita.fr>
18494
18495 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18496
184972000-10-04 Akim Demaille <akim@epita.fr>
18498
18499 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18500
185012000-10-04 Akim Demaille <akim@epita.fr>
18502
18503 When a literal string is used to define two different tokens,
18504 `bison -v' segfaults.
18505 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18506
18507 * tests/regression.m4: New file.
18508 Include the core of the sample provided by Piotr Gackiewicz.
18509 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18510 properly.
18511
185122000-10-04 Akim Demaille <akim@epita.fr>
18513
18514 * src/reader.c (parse_expect_decl): Keep `count' within the size
18515 of `buffer'.
18516 From Neil Booth.
18517
185182000-10-02 Paul Eggert <eggert@twinsun.com>
18519
18520 * bison.s1 (yyparse): Assign the default value
18521 unconditionally, to avoid a GCC warning and make the parser a
18522 tad smaller.
18523
185242000-10-02 Akim Demaille <akim@epita.fr>
18525
18526 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18527 options.
18528
185292000-10-02 Akim Demaille <akim@epita.fr>
18530
18531 * src/derives.c, src/print.c, src/reduce.c: To ease the
18532 translation, move some `\n' out of the translated strings.
18533
185342000-10-02 Akim Demaille <akim@epita.fr>
18535
18536 The location tracking mechanism is precious for parse error
18537 messages. Nevertheless, it is enabled only when `@n' is used in
18538 the grammar, which is a different issue (you can use it in error
18539 message, but not in the grammar per se). Therefore, there should
18540 be another means to enable it.
18541
18542 * src/getargs.c (getargs): Support `--locations'.
18543 (usage): Report it.
18544 * src/getargs.h (locationsflag): Export it.
18545 * src/lex.c (percent_table): Support `%locations'.
18546 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18547 with `locationsflag'.
18548 * doc/bison.texinfo: Document `--locations' and `%locations'.
18549 Sort the options.
18550 * tests/calc.m4: Test it.
18551
18552 For regularity of the names, replace each
18553 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18554 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18555 In addition replace each `flag' with `_flag'.
18556
185572000-10-02 Akim Demaille <akim@epita.fr>
18558
18559 Also test parse error messages, including with YYERROR_VERBOSE.
18560
18561 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18562 associative).
18563 Use it to check the computations.
18564 Use it to check `nonassoc' is honored.
18565 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18566 `--yyerror-verbose'.
18567 (_AT_CHECK_CALC): Adjust to this option.
18568 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18569
185702000-10-02 Akim Demaille <akim@epita.fr>
18571
18572 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18573 the latter demonstrates a flaw in the handling of non debugging
18574 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18575 was used in order to simplify:
18576
18577 #if YYDEBUG
18578 if (yydebug)
18579 {
18580 ...
18581 }
18582 #endif
18583
18584 into
18585
18586 if (yydebug)
18587 {
18588 ...
18589 }
18590
18591 unfortunately this leads to a CPP conflict when
18592 `--name-prefix=foo' is used since it produces `#define yydebug
18593 foodebug'.
18594
18595 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18596 (YYDPRINTF): New macro.
18597 Spread its use.
18598 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18599 the bison options.
18600 Also test `--verbose', `--defines' and `--name-prefix'.
18601
186022000-10-02 Akim Demaille <akim@epita.fr>
18603
18604 Improve the readability of the produced parsers.
18605
18606 * src/bison.s1: Formatting changes.
18607 Improve the comment related to the `$' mark.
18608 (yydefault): Don't fall through to `yyresume': `goto' there.
18609 * src/output.c (output_parser): When the `$' is met, skip the end
18610 of its line.
18611 New variable, `number_of_dollar_signs', to check there's exactly
18612 one `$' in the parser skeleton.
18613
186142000-10-02 Akim Demaille <akim@epita.fr>
18615
18616 * lib/xstrdup.c: New file, from the fileutils.
18617 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18618 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18619 instead of strlen + xmalloc + strcpy.
18620 * src/symtab.c (copys): Remove, use xstrdup instead.
18621
186222000-10-02 Akim Demaille <akim@epita.fr>
18623
18624 * src/gram.h (associativity): New enum type which replaces the
18625 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18626 `right_assoc', `left_assoc' and `non_assoc'.
18627 Adjust all dependencies.
18628 * src/reader.c: Formatting changes.
18629 (LTYPESTR): Don't define it, use it as a literal in
18630 `reader_output_yylsp'.
18631 * src/symtab.h (symbol_class): New enum type which replaces the
18632 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18633 `sunknown', `stoken and `snterm'.
18634
186352000-10-02 Akim Demaille <akim@epita.fr>
18636
18637 * src/getargs.c (fixed_outfiles): Rename as...
18638 (yaccflag): for consistency and accuracy.
18639 Adjust dependencies.
18640
186412000-10-02 Akim Demaille <akim@epita.fr>
18642
18643 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18644 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18645 difficult and introduced a lot of core dump. It turns out that
18646 Bison used an implementation of `xmalloc' based on `calloc', and
18647 at various places it does depend upon the initialization to 0. I
18648 have not tried to isolate the pertinent places, and all the former
18649 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18650 someone should address this issue.
18651
18652 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18653 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18654 files.
18655 Adjust dependencies.
18656 * src/warshall.h: New file.
18657 Propagate.
18658
186592000-10-02 Akim Demaille <akim@epita.fr>
18660
18661 Various anti-`extern in *.c' changes.
18662
18663 * src/system.h: Include `assert.h'.
18664
186652000-10-02 Akim Demaille <akim@epita.fr>
18666
18667 * src/state.h (nstates, final_state, first_state, first_shift)
18668 (first_reduction): Move their exportation from here...
18669 * src/LR0.h: to here.
18670 Adjust dependencies.
18671 * src/getargs.c (statisticsflag): New variable.
18672 Add support for `--statistics'.
18673 Adjust dependencies.
18674
18675 Remove a lot of now useless `extern' statements in most files.
18676
186772000-10-02 Akim Demaille <akim@epita.fr>
18678
18679 * src/LR0.h: New file.
18680 Propagate its use.
18681
186822000-10-02 Akim Demaille <akim@epita.fr>
18683
18684 * src/print.h: New file.
18685 Propagate its use.
18686 * src/print.c: Formatting and ordering changes.
18687 (verbose, terse): Replace with...
18688 (print_results): this new function.
18689 Adjust dependencies.
18690
186912000-10-02 Akim Demaille <akim@epita.fr>
18692
18693 * src/conflicts.c (conflict_report): New function.
18694 (conflict_log, verbose_conflict_log): Replace with...
18695 (print_conflicts): this function.
18696 Adjust dependencies.
18697 * src/conflicts.h: New file.
18698 Propagate its inclusion.
18699
187002000-10-02 Akim Demaille <akim@epita.fr>
18701
18702 * src/nullable.h: New file.
18703 Propagate its inclusion.
18704 * src/nullable.c: Formatting changes.
18705
187062000-10-02 Akim Demaille <akim@epita.fr>
18707
18708 * src/reduce.h: New file.
18709 Propagate its inclusion.
18710 * src/reduce.c: Topological sort and other formatting changes.
18711 (bool, TRUE, FALSE): Move their definition to...
18712 * src/system.h: here.
18713
187142000-10-02 Akim Demaille <akim@epita.fr>
18715
18716 * src/files.c: Formatting changes.
18717 (tryopen, tryclose, openfiles): Rename as...
18718 (xfopen, xfclose, open_files): this.
18719 (stringappend): static.
18720 * src/files.h: Complete the list of exported symbols.
18721 Propagate its use.
18722
187232000-10-02 Akim Demaille <akim@epita.fr>
18724
18725 * src/reader.h: New file.
18726 Propagate its use instead of tedious list of `extern' and
18727 prototypes.
18728 * src/reader.c: Formatting changes, topological sort,
18729 s/register//.
18730
187312000-10-02 Akim Demaille <akim@epita.fr>
18732
18733 * src/lex.h: Prototype `lex.c' exported functions.
18734 * src/reader.c: Adjust.
18735 * src/lex.c: Formatting changes.
18736 (safegetc): Rename as...
18737 (xgetc): this.
18738
187392000-10-02 Akim Demaille <akim@epita.fr>
18740
18741 * src/lalr.h: New file.
18742 Propagate its inclusion instead of prototypes and `extern'.
18743 * src/lalr.c: Formatting changes, topological sorting etc.
18744
187452000-10-02 Akim Demaille <akim@epita.fr>
18746
18747 * src/output.c (token_actions): Introduce a temporary array,
18748 YYDEFACT, that makes it possible for this function to use
18749 output_short_table.
18750
187512000-10-02 Akim Demaille <akim@epita.fr>
18752
18753 `user_toknums' is output as a `short[]' in `output.c', while it is
18754 defined as a `int[]' in `reader.c'. For consistency with the
18755 other output tables, `user_toknums' is now defined as a table of
18756 shorts.
18757
18758 * src/reader.c (user_toknums): Be a short table instead of an int
18759 table.
18760 Adjust dependencies.
18761
18762 Factor the short table outputs.
18763
18764 * src/output.c (output_short_table): New function.
18765 * src/output.c (output_gram, output_stos, output_rule_data)
18766 (output_base, output_table, output_check): Use it.
18767
187682000-10-02 Akim Demaille <akim@epita.fr>
18769
18770 * src/output.c (output): Topological sort of the functions, in
18771 order to get rid of the `static' prototypes.
18772 No longer use `register'.
18773 * src/output.h: New file.
18774 Propagate its inclusion in files explicitly prototyping functions
18775 from output.c.
18776
187772000-09-21 Akim Demaille <akim@epita.fr>
18778
18779 * src/atgeneral.m4: Update from Autoconf.
18780
187812000-09-21 Akim Demaille <akim@epita.fr>
18782
18783 * src/closure.h: New file.
18784 * src/closure.c: Formatting changes, topological sort over the
18785 functions, use of closure.h.
18786 (initialize_closure, finalize_closure): Rename as...
18787 (new_closure, free_closure): these. Adjust dependencies.
18788 * src/LR0.c: Formatting changes, topological sort, use of
18789 cloture.h.
18790 (initialize_states): Rename as...
18791 (new_states): this.
18792 * src/Makefile.am (noinst_HEADERS): Adjust.
18793
187942000-09-20 Akim Demaille <akim@epita.fr>
18795
18796 * src/acconfig.h: Don't protect config.h against multiple
18797 inclusion.
18798 Don't define PARAMS.
18799 * src/system.h: Define PARAMS.
18800 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
18801 purpose of config.h. system.h must not try to fix wrong
18802 definitions in config.h.
18803
188042000-09-20 Akim Demaille <akim@epita.fr>
18805
18806 * src/derives.h: New file.
18807 * src/main.c, src/derives.h: Use it.
18808 Formatting changes.
18809 * src/Makefile.am (noinst_HEADERS): Adjust.
18810
188112000-09-20 Akim Demaille <akim@epita.fr>
18812
18813 * tests/atgeneral.m4: Update from Autoconf.
18814 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
18815 (AT_CHECK_CALC): New macros.
18816 Use these macros to test bison with options `', `--raw',
18817 `--debug', `--yacc', `--yacc --debug'.
18818
188192000-09-19 Akim Demaille <akim@epita.fr>
18820
18821 * src/output.c: Formatting changes.
18822 * src/machine.h: Remove, leaving its contents in...
18823 * src/system.h: here.
18824 Include stdio.h.
18825 Adjust all dependencies on stdio.h and machine.h.
18826 * src/getargs.h: New file.
18827 Let all `extern' declarations about getargs.c be replaced with
18828 inclusion of `getargs.h'.
18829 * src/Makefile.am (noinst_HEADERS): Adjust.
18830
18831 * tests/calc.m4 (yyin): Be initialized in main, not on the global
18832 scope.
18833 (yyerror): Returns void, not int.
18834 * doc/bison.texinfo: Formatting changes.
18835
188362000-09-19 Akim Demaille <akim@epita.fr>
18837
18838 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
18839 portable.
18840
188412000-09-18 Akim Demaille <akim@epita.fr>
18842
18843 * configure.in: Append WARNING_CFLAGS to CFLAGS.
18844 * src/Makefile.am (INCLUDES): Don't.
18845 Be ready to fetch headers in lib/.
18846
188472000-09-18 Akim Demaille <akim@epita.fr>
18848
18849 * doc/bison.texinfo: Update the copyright.
18850 ANSIfy and GNUify the examples.
18851 Remove the old menu.
18852
188532000-09-18 Akim Demaille <akim@epita.fr>
18854
18855 First set of tests: use the `calc' example from the documentation.
18856
18857 * src/bison.s1 (yyparse): Condition the code using `yytname' which
18858 is defined only when YYDEBUG is.
18859 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
18860 * src/files.c (tryopen, tryclose): Formatting changes.
18861 Move to the top and be static.
18862 * src/reader.c (read_signed_integer): Likewise.
18863 * tests/calc.m4: New file.
18864 * Makefile.am, suite.m4: Adjust.
18865 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
18866
188672000-09-18 Akim Demaille <akim@epita.fr>
18868
18869 Add support for an Autotest test suite for Bison.
18870
18871 * m4/m4.m4, m4/atconfig.m4: New files.
18872 * m4/Makefile.am (EXTRA_DIST): Adjust.
18873 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
18874 files.
18875 * src/getargs.c: Display a more standard --version message.
18876 * src/reader.c (reader): Formatting changes.
18877 No longer depend upon VERSION_STRING.
18878 * configure.in: No longer use `dnl'.
18879 Set up the test suite and the new directory `tests/.
18880 (VERSION_STRING): Remove.
18881
188822000-04-14 Akim Demaille <akim@epita.fr>
18883
18884 * src/reader.c (copy_comment2): New function, same as former
18885 `copy_comment', but outputs into two FILE *.
18886 (copy_comment): Use it.
18887 (parse_union_decl): Use it.
18888 (get_type, parse_start_decl): Use the same `invalid' message.
18889 (parse_start_decl, parse_union_decl): Use the same `multiple'
18890 message.
18891 (parse_union_decl, copy_guard, copy_action): Use the same
18892 `unmatched' message.
18893 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
18894
188952000-03-31 Akim Demaille <akim@epita.fr>
18896
18897 * src/files.c (tryopen, tryclose): Move to the top.
18898 Be static.
18899
189002000-03-31 Akim Demaille <akim@epita.fr>
18901
18902 * src/main.c (main): Don't call `done', exit does it.
18903
189042000-03-31 Akim Demaille <akim@epita.fr>
18905
18906 * allocate.c: s/return (foo)/return foo/.
18907 * lalr.c: Likewise.
18908 * LR0.c: Likewise.
18909 * output.c: Likewise.
18910 * reader.c: Likewise.
18911 * symtab.c: Likewise.
18912 * vmsgetargs.c: Likewise.
18913
189142000-03-31 Akim Demaille <akim@epita.fr>
18915
18916 Clean up the error reporting functions.
18917
18918 * src/report.c: New file.
18919 * src/report.h: Likewise.
18920 * src/Makefile.am: Adjust.
18921 * m4/error.m4: New file.
18922 * m4/Makefile.am: Adjust.
18923 * configure.in (jm_PREREQ_ERROR): Call it.
18924 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
18925 Remove.
18926 (fatal, fatals): Remove. All callers use complain.c::fatal.
18927 (warn, warni, warns, warnss, warnss): Remove. All callers use
18928 complain.c::complain.
18929 (toomany): Remove, use fatal instead.
18930 * src/files.c (done): No argument, use complain_message_count.
18931 * src/main.c (main): Register `done' to `atexit'.
18932
18933 * src/getargs.c (usage): More `fputs', less `fprintf'.
18934
189352000-03-28 Akim Demaille <akim@epita.fr>
18936
18937 * lib/: New directory.
18938 * Makefile.am (SUBDIRS): Adjust.
18939 * configure.in: Adjust.
18940 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
18941 useless.
18942 * src/alloca.c: Moved to lib/.
18943 * src/getopt.c: Likewise.
18944 * src/getopt1.c: Likewise.
18945 * src/getopt.h: Likewise.
18946 * src/ansi2knr.c: Likewise.
18947 * src/ansi2knr.1: Likewise.
18948 * src/Makefile.am: Adjust.
18949 * lib/Makefile.am: New file.
18950
189512000-03-28 Akim Demaille <akim@epita.fr>
18952
18953 * src/getargs.c (usage): Refresh the help message.
18954
189552000-03-17 Akim Demaille <akim@epita.fr>
18956
18957 * src/getopt1.c: Updated from textutils 2.0e
18958 * src/getopt.c: Likewise.
18959 * src/getopt.h: Likewise.
18960
189612000-03-17 Akim Demaille <akim@epita.fr>
18962
18963 * src/Makefile.am (bison.simple): Fix the awk program: quote only
18964 the file name, not the whole `#line LINE FILE'.
18965
189662000-03-17 Akim Demaille <akim@epita.fr>
18967
18968 On syntax errors, report the token on which we choked.
18969
18970 * src/bison.s1 (yyparse): In the label yyerrlab, when
18971 YYERROR_VERBOSE, add yychar in msg.
18972
189732000-03-17 Akim Demaille <akim@epita.fr>
18974
18975 * src/reader.c (copy_at): New function.
18976 (copy_guard): Use it.
18977 (copy_action): Use it.
18978
189792000-03-17 Akim Demaille <akim@epita.fr>
18980
18981 Be kind to translators, save some useless translations.
18982
18983 * src/main.c (banner): New function.
18984 (fatal_banner): Use it.
18985 (warn_banner): Use it.
18986
189872000-03-17 Akim Demaille <akim@epita.fr>
18988
18989 * src/reader.c (copy_definition): Use copy_string and
18990 copy_comment. Removed now unused `match', `ended',
18991 `cplus_comment'.
18992 (copy_comment, copy_string): Moved, to be visible from
18993 copy_definition.
18994
189952000-03-17 Akim Demaille <akim@epita.fr>
18996
18997 * src/reader.c (copy_string): Declare `static inline'. No
18998 problems with inline, since it is checked by configure.
18999 (copy_comment): Likewise.
19000
190012000-03-17 Akim Demaille <akim@epita.fr>
19002
19003 * src/reader.c (packsymbols): Formatting changes.
19004
190052000-03-17 Akim Demaille <akim@epita.fr>
19006
19007 * src/reader.c (copy_comment): New function, factored out from:
19008 (copy_action): Use it. Removed now unused `match', `ended',
19009 `cplus_comment'.
19010 (copy_guard): Likewise.
19011
190122000-03-17 Akim Demaille <akim@epita.fr>
19013
19014 * src/reader.c (copy_string): New function, factored out from:
19015 (copy_action): Use it.
19016 (copy_guard): Likewise.
19017
190182000-03-17 Akim Demaille <akim@epita.fr>
19019
19020 Change the handling of @s so that they behave exactly like $s.
19021 There is now a pseudo variable @$ (readble and writable), location
19022 of the lhs of the rule (by default ranging from the location of
19023 the first symbol of the rhs, to the location of the last symbol,
19024 or, if the rhs is empty, YYLLOC).
19025
19026 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19027 yyval.
19028 (yyparse): When providing a default semantic action, provide a
19029 default location action.
19030 (after the $): No longer change `*YYLSP', just stack YYLOC the
19031 same way you stack YYVAL.
19032 * src/reader.c (read_declarations): Use warns.
19033 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19034 (copy_action, case '@'): Likewise.
19035 Use a standard error message, to save useless work from
19036 translators.
19037
190382000-03-17 Akim Demaille <akim@epita.fr>
19039
19040 * src/bison.s1: Formatting and cosmetics changes.
19041 * src/reader.c: Likewise.
19042 Update the Copyright notice.
19043
190442000-03-17 Akim Demaille <akim@epita.fr>
19045
19046 * src/bison.s1 (#line): All set to `#line' only, since the
19047 Makefile now handles them.
19048
190492000-03-16 Akim Demaille <akim@epita.fr>
19050
19051 * src/output.c (output_rule_data): Output the documentation of
19052 some of the tables.
19053 (Copyright notice): Update.
19054 Formatting changes.
19055
190562000-03-16 Akim Demaille <akim@epita.fr>
19057
19058 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19059 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19060 One `#if YYDEBUG' remains, since it uses variables which are
19061 defined only if `YYDEBUG != 0'.
19062
190632000-03-16 Akim Demaille <akim@epita.fr>
19064
19065 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19066 and related variables so that the similarities are highlighted.
19067
190682000-03-16 Akim Demaille <akim@epita.fr>
19069
19070 * src/bison.s1: Properly indent CPP directives.
19071
190722000-03-16 Akim Demaille <akim@epita.fr>
19073
19074 * src/bison.s1: Properly indent the `alloca' CPP section.
19075
190762000-03-16 Akim Demaille <akim@epita.fr>
19077
19078 Do not hard code values of directories in `configure.in'.
19079 Update the `configure' tool chain.
19080
19081 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19082 src/makefile.am.
19083 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19084 (AC_OUTPUT): Add m4/Makefile.
19085 Bump to bison 1.28a, 1.29 has never been released.
19086 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19087 handled via src/Makefile.am.
19088 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19089 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19090 autoheader.
19091 * Makefile.am (SUBDIRS): Add m4.
19092 (ACLOCAL_AM_FLAGS): New variable.
19093 (AUTOMAKE_OPTIONS): Add check-news.
19094 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19095 the proper line number and file name.
19096 (DEFS): Propagate the location of bison library files and of the
19097 locale files.
19098 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19099 builddir.
19100 * acinclude.m4: Remove, replaced by the directory m4.
19101 * m4/Makefile.am (EXTRA_DIST): New variable.
19102 * m4/gettext.m4: New file, from the fileutils.
19103 * m4/lcmessage.m4: Likewise
19104 * m4/progtest.m4: Likewise.
19105 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19106
191072000-03-10 Akim Demaille <akim@epita.fr>
19108
19109 * src/closure.c:
19110 Formatting changes of various comments.
19111 Respect the GNU coding standards at various places.
19112 Don't use `_()' when no translation is needed.
19113
191141999-12-13 Jesse Thilo <jthilo@gnu.org>
19115
19116 * src/files.c:
19117 OS/2 honors TMPDIR environment variable.
19118
191191999-12-13 Jesse Thilo <jthilo@gnu.org>
19120
19121 * doc/bison.texinfo: Tweaked spelling and grammar.
19122 Updated ISBN.
19123 Removed reference to price of printed copy.
19124 Mention BISON_SIMPLE and BISON_HAIRY.
19125
191261999-12-13 Jesse Thilo <jthilo@gnu.org>
19127
19128 * configure.in, NEWS:
19129 Bison 1.29 released.
19130
191311999-10-27 Jesse Thilo <jthilo@gnu.org>
19132
19133 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19134 Added reference card.
19135
191361999-07-26 Jesse Thilo <jthilo@gnu.org>
19137
19138 * po/ru.po: Added Russian translation.
19139
191401999-07-26 Jesse Thilo <jthilo@gnu.org>
19141
19142 * configure.in: Added Russian translation.
19143
191441999-07-06 Jesse Thilo <jthilo@gnu.org>
19145
19146 * configure.in, NEWS, README:
19147 Released version 1.28.
19148
191491999-06-14 Jesse Thilo <jthilo@gnu.org>
19150
19151 * src/system.h:
19152 Squashed redefinition warning on some systems.
19153
19154 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19155 Have configure build version string instead of relying on ANSI string
19156 concatentation.
19157
191581999-06-14 Jesse Thilo <jthilo@gnu.org>
19159
19160 * po/POTFILES.in: Got rid of version.c.
19161
191621999-06-14 Jesse Thilo <jthilo@gnu.org>
19163
19164 * acconfig.h, configure.in:
19165 Have configure build version string instead of relying on ANSI string
19166 concatentation.
19167
191681999-06-08 Jesse Thilo <jthilo@gnu.org>
19169
19170 * doc/bison.1:
19171 Dropped mention of `+' for long-named options.
19172
191731999-05-30 Jesse Thilo <jthilo@gnu.org>
19174
19175 * src/files.c: Added <unistd.h> for unlink().
19176
19177 * src/Makefile.am, src/system.h:
19178 I18n fixes.
19179
191801999-05-30 Jesse Thilo <jthilo@gnu.org>
19181
19182 * README: Added a FAQ list.
19183
19184 * configure.in, acconfig.h:
19185 I18n fixes.
19186
191871999-05-30 Jesse Thilo <jthilo@gnu.org>
19188
19189 * doc/FAQ, doc/Makefile.am:
19190 Added a FAQ list.
19191
191921999-05-19 Jesse Thilo <jthilo@gnu.org>
19193
19194 * src/alloc.h, src/symtab.h, src/version.c:
19195 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19196
191971999-04-18 Jesse Thilo <jthilo@gnu.org>
19198
19199 * src/.cvsignore, src/Makefile.am:
19200 Reorganized: sources in `src', documentation in `doc'.
19201
19202 * src/lex.c (literalchar):
19203 fixed the code for escaping double quotes (thanks
19204 Jonathan Czisny.)
19205
192061999-04-18 Jesse Thilo <jthilo@gnu.org>
19207
19208 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19209 Adjusted paths to reflect directory reorganization.
19210
192111999-04-18 Jesse Thilo <jthilo@gnu.org>
19212
19213 * doc/.cvsignore, doc/Makefile.am:
19214 Reorganized: sources in `src', documentation in `doc'.
19215
192161999-04-18 Jesse Thilo <jthilo@gnu.org>
19217
19218 * configure.in:
19219 Updated AC_INIT file to reflect directory reorganization.
19220
19221 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19222 Reorganized: sources in `src', documentation in `doc'.
19223
192241999-04-13 Jesse Thilo <jthilo@gnu.org>
19225
19226 * src/allocate.c:
19227 Don't declare calloc() and realloc() if not necessary.
19228
192291999-04-13 Jesse Thilo <jthilo@gnu.org>
19230
19231 * configure.in, acconfig.h, acinclude.m4:
19232 Don't declare calloc() and realloc() if not necessary.
19233
192341999-03-23 Jesse Thilo <jthilo@gnu.org>
19235
19236 * po/.cvsignore: Added i18n support.
19237
192381999-03-23 Jesse Thilo <jthilo@gnu.org>
19239
19240 * acconfig.h, configure.in, Makefile.am:
19241 Added i18n support.
19242
192431999-03-22 Jesse Thilo <jthilo@gnu.org>
19244
19245 * src/bison.s1: Fixed #line numbers.
19246
192471999-03-15 Jesse Thilo <jthilo@gnu.org>
19248
19249 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19250 Added PO files from Translation Project.
19251
192521999-03-03 Jesse Thilo <jthilo@gnu.org>
19253
19254 * Makefile.am:
19255 Added support for non-ANSI compilers (ansi2knr).
19256
192571999-02-16 Jesse Thilo <jthilo@gnu.org>
19258
19259 * configure.in: Bumped version number to 1.27.
19260
19261 * Makefile.am:
19262 Added `bison.simple' to list of files removed by `make distclean'.
19263
192641999-02-12 Jesse Thilo <jthilo@gnu.org>
19265
19266 * src/files.c, src/files.h:
19267 Defined locations of parser files in config.h instead of Makefile.
19268
192691999-02-12 Jesse Thilo <jthilo@gnu.org>
19270
19271 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19272 Defined locations of parser files in config.h instead of Makefile.
19273
192741999-02-09 Jesse Thilo <jthilo@gnu.org>
19275
19276 * Makefile.am:
19277 Removed inappropriate use of $< macro.
19278
192791999-02-05 Jesse Thilo <jthilo@gnu.org>
19280
19281 * po/Makefile.in.in, po/POTFILES.in:
19282 Add `po' directory skeleton.
19283
192841999-01-27 Jesse Thilo <jthilo@gnu.org>
19285
19286 * README: Document help-bison list.
19287
19288 * configure.in: Add check for mkstemp().
19289
192901999-01-20 Jesse Thilo <jthilo@gnu.org>
19291
19292 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19293 Hush a few compiler warnings.
19294
19295 * src/files.c:
19296 Add tryclose(), which verifies that fclose was successful.
19297 Hush a couple of compiler warnings.
19298
192991999-01-20 Jesse Thilo <jthilo@gnu.org>
19300
19301 * Makefile.am, OChangeLog:
19302 ChangeLog is now automatically generated. Include the old version as
19303 OChangeLog.
19304
193051999-01-14 Jesse Thilo <jthilo@gnu.org>
19306
19307 * 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:
19308 Update FSF address.
19309
193101999-01-14 Jesse Thilo <jthilo@gnu.org>
19311
19312 * doc/bison.texinfo: Fix formatting glitch.
19313
19314 * doc/bison.texinfo: Update FSF address.
19315
193161999-01-14 Jesse Thilo <jthilo@gnu.org>
19317
19318 * acconfig.h: Update FSF address.
19319
193201999-01-08 Jesse Thilo <jthilo@gnu.org>
19321
19322 * src/system.h:
19323 Don't define PACKAGE here, since config.h defines it.
19324
193251998-12-30 Jesse Thilo <jthilo@gnu.org>
19326
19327 * src/reader.c: Update copyright date.
19328
19329 * src/main.c:
19330 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19331 favor of output directly to stderr (avoids buffer overruns).
19332
19333 * src/reader.c: Some checks for premature EOF.
19334
19335 * 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:
19336 Use prototypes if the compiler understands them.
19337
19338 * src/files.c: Honor TMPDIR on Unix hosts.
19339 Use prototypes if the compiler understands them.
19340
19341 * src/reader.c:
19342 Fix a couple of buffer overrun bugs.
19343 Use prototypes if the compiler understands them.
19344
19345 * src/system.h: Include unistd.h and ctype.h.
19346 Use #ifdef instead of #if for NLS symbols.
19347
193481998-12-30 Jesse Thilo <jthilo@gnu.org>
19349
19350 * doc/bison.texinfo:
19351 Delete comment "consider using @set for edition number, etc..." since
19352 we now are doing so.
19353
193541998-12-30 Jesse Thilo <jthilo@gnu.org>
19355
19356 * configure.in:
19357 Use prototypes if the compiler understands them.
19358
19359 * NEWS: Document 1.26 highlights.
19360
19361 * Makefile.am: Require Automake 1.3 or later.
19362
19363 * acconfig.h:
19364 Use prototypes if the compiler understands them.
19365
193661998-12-29 Jesse Thilo <jthilo@gnu.org>
19367
19368 * src/version.c:
19369 Use VERSION symbol from automake for version number.
19370
193711998-12-29 Jesse Thilo <jthilo@gnu.org>
19372
19373 * acconfig.h, configure.in, version.cin:
19374 Use VERSION symbol from automake for version number.
19375
193761998-11-28 Jesse Thilo <jthilo@gnu.org>
19377
19378 * Makefile.am:
19379 Distribute original version of simple parser (bison.s1), not built
19380 version (bison.simple).
19381
193821998-11-28 Jesse Thilo <jthilo@gnu.org>
19383
19384 * doc/bison.texinfo: Add info dir entry.
19385
19386 * doc/bison.texinfo:
19387 Let automake put version number into documentation.
19388
193891998-11-26 Jesse Thilo <jthilo@gnu.org>
19390
19391 * src/bison.cld, src/build.com, src/vmshlp.mar:
19392 Add non-RCS files from /gd/gnu/bison.
19393
193941998-11-26 Jesse Thilo <jthilo@gnu.org>
19395
19396 * doc/bison.1:
19397 Document the BISON_HAIRY and BISON_SIMPLE variables.
19398
193991998-11-25 Jesse Thilo <jthilo@gnu.org>
19400
19401 * src/version.c: Build version.c automatically.
19402
19403 * src/reader.c:
19404 Fix token numbering (used to start at 258, not 257).
19405
19406 * src/system.h: Include config.h.
19407
19408 * src/getargs.c: Update bug report address.
19409
19410 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19411 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19412
194131998-11-25 Jesse Thilo <jthilo@gnu.org>
19414
19415 * Makefile.am:
19416 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19417
19418 * configure.in, version.cin:
19419 Build version.c automatically.
19420
19421 * AUTHORS: Add AUTHORS file.
19422
19423 * README: Update bug report address.
19424
19425 * bison.simple:
19426 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19427
19428 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19429 Add automake stuff.
19430
194311998-11-25 Jesse Thilo <jthilo@gnu.org>
19432
19433 * doc/bison.texinfo: Clean up some formatting.
19434
194351998-05-05 Richard Stallman <rms@gnu.org>
19436
19437 * doc/bison.texinfo:
19438 Explain better why to make a pure parser.
19439
194401998-01-05 Richard Stallman <rms@gnu.org>
19441
19442 * src/files.c (openfiles):
19443 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19444 find a temporary directory, if possible. Do not unlink files while
19445 they are open.
19446
194471997-08-25 Richard Stallman <rms@gnu.org>
19448
19449 * src/reader.c (stack_offset;):
19450 Change some warni to warns.
19451
19452 * src/lex.c (literalchar): Use warns, not warni.
19453
194541997-06-28 Richard Stallman <rms@gnu.org>
19455
19456 * src/bison.s1: Add a Bison version comment.
19457
19458 * src/main.c (fatal, warn, berror):
19459 Use program_name.
19460
194611997-06-28 Richard Stallman <rms@gnu.org>
19462
19463 * Makefile.in (bison_version): New variable.
19464 (dist): Use that variable.
19465 (bison.s1): Substitute the Bison version into bison.simple.
19466
19467 * bison.simple: Add a Bison version comment.
19468
194691997-06-18 Richard Stallman <rms@gnu.org>
19470
19471 * src/main.c (fatal, warn, berror):
19472 Make error messages standard.
19473 (toomany): Improve error message text.
19474
19475 * 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:
19476 new.h renamed to alloc.h.
19477
194781997-06-18 Richard Stallman <rms@gnu.org>
19479
19480 * Makefile.in: new.h renamed to alloc.h.
19481
194821997-05-24 Richard Stallman <rms@gnu.org>
19483
19484 * src/lex.c (literalchar):
19485 Fix the code for escaping \, " and '.
19486
19487 (lex): Avoid trouble when there are many chars
19488 to discard in a char literal with just several chars in it.
19489
194901997-05-17 Richard Stallman <rms@gnu.org>
19491
19492 * src/bison.s1:
19493 Use malloc, if using alloca is troublesome.
19494 (YYSTACK_USE_ALLOCA): New flag macro.
19495 Define it for some systems and compilers.
19496 (YYSTACK_ALLOC): New macro.
19497 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19498 If it was malloc'd, free it.
19499
195001997-05-17 Richard Stallman <rms@gnu.org>
19501
19502 * bison.simple:
19503 Use malloc, if using alloca is troublesome.
19504 (YYSTACK_USE_ALLOCA): New flag macro.
19505 Define it for some systems and compilers.
19506 (YYSTACK_ALLOC): New macro.
19507 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19508 If it was malloc'd, free it.
19509
195101997-04-23 Richard Stallman <rms@gnu.org>
19511
19512 * src/bison.s1:
19513 (alloca) [__hpux]: Always define as __builtin_alloca.
19514
195151997-04-23 Richard Stallman <rms@gnu.org>
19516
19517 * bison.simple:
19518 (alloca) [__hpux]: Always define as __builtin_alloca.
19519
195201997-04-22 Richard Stallman <rms@gnu.org>
19521
19522 * src/bison.s1:
19523 [__hpux]: Include alloca.h (right for HPUX 10)
19524 instead of declaring alloca (right for HPUX 9).
19525
19526 * src/bison.s1 (__yy_memcpy):
19527 Declare arg `count' as unsigned int.
19528 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19529
195301997-04-22 Richard Stallman <rms@gnu.org>
19531
19532 * bison.simple:
19533 [__hpux]: Include alloca.h (right for HPUX 10)
19534 instead of declaring alloca (right for HPUX 9).
19535
19536 * bison.simple (__yy_memcpy):
19537 Declare arg `count' as unsigned int.
19538 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19539
195401997-01-03 Richard Stallman <rms@gnu.org>
19541
19542 * src/allocate.c: [__STDC__ or _MSC_VER]:
19543 Declare calloc and realloc to return void *.
19544
195451997-01-02 Richard Stallman <rms@gnu.org>
19546
19547 * src/system.h:
19548 [_MSC_VER]: Include stdlib.h and process.h.
19549 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19550
19551 * src/main.c (main): Return FAILURE as a value.
19552 (printable_version): Declare arg as int, not char.
19553
195541997-01-02 Richard Stallman <rms@gnu.org>
19555
19556 * Makefile.in (dist):
19557 Explicitly check for symlinks, and copy them.
19558
195591996-12-19 Richard Stallman <rms@gnu.org>
19560
19561 * src/files.c:
19562 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19563
195641996-12-18 Paul Eggert <eggert@gnu.org>
19565
19566 * src/bison.s1 (yyparse):
19567 If __GNUC__ and YYPARSE_PARAM are both defined,
19568 declare yyparse to have a void * argument.
19569
195701996-12-18 Paul Eggert <eggert@gnu.org>
19571
19572 * bison.simple (yyparse):
19573 If __GNUC__ and YYPARSE_PARAM are both defined,
19574 declare yyparse to have a void * argument.
19575
195761996-12-17 Richard Stallman <rms@gnu.org>
19577
19578 * src/reduce.c (nbits): Add some casts.
19579
195801996-08-12 Richard Stallman <rms@gnu.org>
19581
19582 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19583
195841996-08-12 Richard Stallman <rms@gnu.org>
19585
19586 * bison.simple: Test _MSDOS as well as _MSDOS_.
19587
195881996-07-31 Richard Stallman <rms@gnu.org>
19589
19590 * src/bison.s1:
19591 [__sun && __i386]: Include alloca.h.
19592
195931996-07-31 Richard Stallman <rms@gnu.org>
19594
19595 * bison.simple:
19596 [__sun && __i386]: Include alloca.h.
19597
195981996-07-30 Richard Stallman <rms@gnu.org>
19599
19600 * src/bison.s1: Comment change.
19601
19602 * src/bison.s1: Test _MSDOS_, not MSDOS.
19603
196041996-07-30 Richard Stallman <rms@gnu.org>
19605
19606 * bison.simple: Comment change.
19607
19608 * bison.simple: Test _MSDOS_, not MSDOS.
19609
196101996-06-01 Richard Stallman <rms@gnu.org>
19611
19612 * 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:
19613 Insert `_' macro around many string constants.
19614
19615 * src/main.c:
19616 Insert `_' macro around many string constants.
19617
19618 (main): Call setlocale, bindtextdomain and textdomain.
19619
19620 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19621 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19622 [ENABLE_NLS]: Include libintl.h.
19623 [ENABLE_NLS] (gettext): Define.
19624 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19625 (N_, PACKAGE, LOCALEDIR): New macros.
19626
196271996-06-01 Richard Stallman <rms@gnu.org>
19628
19629 * POTFILES.in: New file.
19630
19631 * Makefile.in (allocate.o):
19632 Define target explicitly.
19633
19634 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19635 (LDFLAGS): Set to @LDFLAGS@.
19636 (configure): Run autoconf only if preceding `cd' succeeds.
19637 (bison.s1): Redirect output to temporary file then move the
19638 temporary to the target, rather than redirecting directly to bison.s1.
19639 (clean): Remove config.status and config.log.
19640 (distclean): Don't remove config.status here.
19641
196421996-05-12 Richard Stallman <rms@gnu.org>
19643
19644 * src/bison.s1:
19645 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19646
196471996-05-12 Richard Stallman <rms@gnu.org>
19648
19649 * bison.simple:
19650 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19651
196521996-05-11 Richard Stallman <rms@gnu.org>
19653
19654 * src/bison.s1 (__yy_memcpy):
19655 Really reorder the args, as was supposedly done on Feb 14 1995.
19656 (yyparse): Calls changed accordingly.
19657
196581996-05-11 Richard Stallman <rms@gnu.org>
19659
19660 * Makefile.in (dist): Don't use $(srcdir).
19661
19662 * bison.simple (__yy_memcpy):
19663 Really reorder the args, as was supposedly done on Feb 14 1995.
19664 (yyparse): Calls changed accordingly.
19665
196661996-01-27 Richard Stallman <rms@gnu.org>
19667
19668 * src/output.c (output_rule_data):
19669 Test YYERROR_VERBOSE in the conditional
19670 around the definition of ttyname.
19671
196721995-12-29 Richard Stallman <rms@gnu.org>
19673
19674 * src/bison.s1:
19675 Fix line numbers in #line commands.
19676
196771995-12-29 Richard Stallman <rms@gnu.org>
19678
19679 * bison.simple:
19680 Fix line numbers in #line commands.
19681
196821995-12-27 Richard Stallman <rms@gnu.org>
19683
19684 * src/bison.s1 (YYPARSE_PARAM_DECL):
19685 In C++, make it always null.
19686 (YYPARSE_PARAM_ARG): New macro.
19687 (yyparse): Use YYPARSE_PARAM_ARG.
19688
196891995-12-27 Richard Stallman <rms@gnu.org>
19690
19691 * bison.simple (YYPARSE_PARAM_DECL):
19692 In C++, make it always null.
19693 (YYPARSE_PARAM_ARG): New macro.
19694 (yyparse): Use YYPARSE_PARAM_ARG.
19695
196961995-11-29 Richard Stallman <rms@gnu.org>
19697
19698 * doc/bison.texinfo:
19699 Describe literal string tokens, %raw, %no_lines, %token_table.
19700
197011995-11-29 Daniel Hagerty <hag@gnu.org>
19702
19703 * doc/bison.texinfo: Fixed update date
19704
197051995-10-16 Richard Stallman <rms@gnu.org>
19706
19707 * src/version.c: Version 1.25.
19708
197091995-10-16 Richard Stallman <rms@gnu.org>
19710
19711 * NEWS: *** empty log message ***
19712
197131995-10-16 Richard Stallman <rms@gnu.org>
19714
19715 * doc/bison.1, doc/bison.rnh:
19716 Add new options.
19717
197181995-10-15 Richard Stallman <rms@gnu.org>
19719
19720 * src/vmsgetargs.c, src/getargs.c:
19721 Added -n, -k, and -raw switches.
19722 (noparserflag, toknumflag, rawtoknumflag): New variables.
19723
19724 * src/symtab.h (SALIAS):
19725 New #define for adding aliases to %token.
19726 (struct bucket): Added `alias' field.
19727
19728 * src/reduce.c (reduce_grammar):
19729 Revise error message.
19730 (print_notices): Remove final `.' from error message.
19731
19732 * src/reader.c (reader_output_yylsp):
19733 New function.
19734 (readgram): Use `#if 0' around code that accepted %command
19735 inside grammar rules: The documentation doesn't allow it,
19736 and it will fail since the %command processors scan for the next %.
19737 (parse_token_decl): Extended the %token
19738 declaration to allow a multi-character symbol as an alias.
19739 (parse_thong_decl): New function.
19740 (read_declarations): Added %thong declarations.
19741 (read_declarations): Handle NOOP to deal with allowing
19742 % declarations as another means to specify the flags.
19743 (readgram): Allow %prec prior to semantics embedded in a rule.
19744 (skip_to_char, read_declarations, copy_definition)
19745 (parse_token_decl, parse_start_decl, parse_type_decl)
19746 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
19747 (get_type_name, copy_guard, copy_action, readgram)
19748 (get_type, packsymbols): Revised most error messages.
19749 Changed `fatal' to `warnxxx' to avoid aborting for error.
19750 Revised and use multiple warnxxx functions to avoid using VARARGS1.
19751 (read_declarations): Improve the error message for
19752 an invalid character. Do not abort.
19753 (read_declarations, copy_guard, copy_action): Use
19754 printable_version to avoid unprintable characters in printed output.
19755 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
19756 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
19757 Allow the type of a non-terminal can be given
19758 more than once, as long as all specifications give the same type.
19759
19760 * src/output.c:
19761 (output_headers, output_trailers, output, output_gram)
19762 (output_rule_data): Implement noparserflag variable.
19763 Implement toknumflag variable.
19764 (output): Call reader_output_yylsp to output LTYPESTR.
19765
19766 * src/main.c (main):
19767 If reader sees an error, don't process the grammar.
19768 (fatals): Updated to not use VARARGS1.
19769 (printable_version, int_to_string, warn, warni, warns, warnss)
19770 (warnsss): New error reporting functions. Avoid abort for error.
19771
19772 * src/lex.h:
19773 Added THONG and NOOP for alias processing.
19774 Added SETOPT for the new code that allows setting options with %flags.
19775
19776 * src/lex.c:
19777 Include getopt.h. Add some extern decls.
19778 (safegetc): New function to deal with EOF gracefully.
19779 (literalchar); new function to deal with reading \ escapes.
19780 (lex): Use literalchar.
19781 (lex): Implemented "..." tokens.
19782 (literalchar, lex, parse_percent_token): Made tokenbuffer
19783 always contain the token. This includes growing the token
19784 buffer while reading an integer.
19785 (parse_percent_token): Replaced if-else statement with percent_table.
19786 (parse_percent_token): Added % declarations as another
19787 way to specify the flags -n, -l, and -r. Also added hooks for
19788 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
19789 major changes to files.c.
19790 (lex) Retain in the incoming stream a character following
19791 an incorrect '/'.
19792 (skip_white_space, lex): Revised most error messages
19793 and changed fatal to warn to avoid aborting.
19794 (percent_table): Added %thong declarations.
19795
19796 * src/gram.h: Comment changes.
19797
19798 * src/files.c (openfiles, open_extra_files, done):
19799 Add faction flag
19800 and actfile file. Handle noparserflag. Both for -n switch.
19801
19802 * src/conflicts.c (resolve_sr_conflict):
19803 Remove use of alloca.
19804
198051995-06-01 Jim Meyering <meyering@gnu.org>
19806
19807 * doc/bison.texinfo: *** empty log message ***
19808
198091995-05-06 Richard Stallman <rms@gnu.org>
19810
19811 * src/bison.s1: Comment change.
19812
198131995-05-06 Richard Stallman <rms@gnu.org>
19814
19815 * bison.simple: Comment change.
19816
198171995-05-03 Richard Stallman <rms@gnu.org>
19818
19819 * src/version.c: Version now 1.24.
19820
19821 * src/bison.s1: Change distribution terms.
19822
19823 * src/version.c: Version now 1.23.
19824
198251995-05-03 Richard Stallman <rms@gnu.org>
19826
19827 * doc/bison.texinfo:
19828 Rewrite "Conditions for Using Bison".
19829 Update version to 1.24.
19830
198311995-05-03 Richard Stallman <rms@gnu.org>
19832
19833 * bison.simple: Change distribution terms.
19834
198351995-02-23 Richard Stallman <rms@gnu.org>
19836
19837 * src/files.c: Test __VMS_POSIX as well as VMS.
19838
198391995-02-14 Jim Meyering <meyering@gnu.org>
19840
19841 * src/bison.s1 (__yy_memcpy):
19842 Renamed from __yy_bcopy to avoid
19843 confusion. Reverse FROM and TO arguments to be consistent with
19844 those of memcpy.
19845
198461995-02-14 Jim Meyering <meyering@gnu.org>
19847
19848 * bison.simple (__yy_memcpy):
19849 Renamed from __yy_bcopy to avoid
19850 confusion. Reverse FROM and TO arguments to be consistent with
19851 those of memcpy.
19852
198531994-11-10 David J. MacKenzie <djm@gnu.org>
19854
19855 * NEWS: reformat
19856
19857 * NEWS: New file.
19858
19859 * Makefile.in (DISTFILES): Include NEWS.
19860
19861 * Makefile.in (DISTFILES):
19862 Include install-sh, not install.sh.
19863
19864 * configure.in: Update to Autoconf v2 macro names.
19865
198661994-10-05 David J. MacKenzie <djm@gnu.org>
19867
19868 * Makefile.in: fix typo
19869
19870 * Makefile.in (prefix, exec_prefix):
19871 Let configure set them.
19872
198731994-09-28 David J. MacKenzie <djm@gnu.org>
19874
19875 * Makefile.in: Set datadir to $(prefix)/share.
19876
198771994-09-15 Richard Stallman <rms@gnu.org>
19878
19879 * src/bison.s1:
19880 Update copyright notice and GPL version.
19881
198821994-09-15 Richard Stallman <rms@gnu.org>
19883
19884 * bison.simple:
19885 Update copyright notice and GPL version.
19886
198871994-07-12 Richard Stallman <rms@gnu.org>
19888
19889 * src/reduce.c, src/reader.c:
19890 entered into RCS
19891
198921994-05-05 David J. MacKenzie <djm@gnu.org>
19893
19894 * Makefile.in: entered into RCS
19895
198961994-03-26 Richard Stallman <rms@gnu.org>
19897
19898 * src/bison.s1: entered into RCS
19899
199001994-03-26 Richard Stallman <rms@gnu.org>
19901
19902 * bison.simple: entered into RCS
19903
199041994-03-25 Richard Stallman <rms@gnu.org>
19905
19906 * src/main.c: entered into RCS
19907
199081994-03-24 Richard Stallman <rms@gnu.org>
19909
19910 * src/conflicts.c: entered into RCS
19911
199121994-01-02 Richard Stallman <rms@gnu.org>
19913
19914 * Makefile.in: *** empty log message ***
19915
199161993-11-21 Richard Stallman <rms@gnu.org>
19917
19918 * src/bison.s1: *** empty log message ***
19919
199201993-11-21 Richard Stallman <rms@gnu.org>
19921
19922 * doc/bison.texinfo: entered into RCS
19923
19924 * doc/bison.texinfo: *** empty log message ***
19925
199261993-11-21 Richard Stallman <rms@gnu.org>
19927
19928 * bison.simple: *** empty log message ***
19929
199301993-10-25 David J. MacKenzie <djm@gnu.org>
19931
19932 * doc/bison.texinfo: *** empty log message ***
19933
199341993-10-19 Richard Stallman <rms@gnu.org>
19935
19936 * src/bison.s1: *** empty log message ***
19937
199381993-10-19 Richard Stallman <rms@gnu.org>
19939
19940 * bison.simple: *** empty log message ***
19941
199421993-10-14 Richard Stallman <rms@gnu.org>
19943
19944 * src/bison.s1: *** empty log message ***
19945
199461993-10-14 Richard Stallman <rms@gnu.org>
19947
19948 * bison.simple: *** empty log message ***
19949
199501993-09-14 David J. MacKenzie <djm@gnu.org>
19951
19952 * doc/bison.texinfo: *** empty log message ***
19953
199541993-09-13 Noah Friedman <friedman@gnu.org>
19955
19956 * Makefile.in: *** empty log message ***
19957
199581993-09-10 Richard Stallman <rms@gnu.org>
19959
19960 * src/conflicts.c: *** empty log message ***
19961
19962 * src/system.h: entered into RCS
19963
199641993-09-10 Richard Stallman <rms@gnu.org>
19965
19966 * doc/bison.1: entered into RCS
19967
199681993-09-06 Noah Friedman <friedman@gnu.org>
19969
19970 * src/version.c: entered into RCS
19971
199721993-09-06 Noah Friedman <friedman@gnu.org>
19973
19974 * Makefile.in: *** empty log message ***
19975
199761993-07-30 David J. MacKenzie <djm@gnu.org>
19977
19978 * Makefile.in: *** empty log message ***
19979
199801993-07-24 Richard Stallman <rms@gnu.org>
19981
19982 * src/bison.s1: *** empty log message ***
19983
199841993-07-24 Richard Stallman <rms@gnu.org>
19985
19986 * bison.simple: *** empty log message ***
19987
199881993-07-08 David J. MacKenzie <djm@gnu.org>
19989
19990 * Makefile.in: *** empty log message ***
19991
199921993-07-04 Richard Stallman <rms@gnu.org>
19993
19994 * src/bison.s1: *** empty log message ***
19995
199961993-07-04 Richard Stallman <rms@gnu.org>
19997
19998 * bison.simple: *** empty log message ***
19999
200001993-06-26 David J. MacKenzie <djm@gnu.org>
20001
20002 * src/getargs.c: entered into RCS
20003
200041993-06-26 David J. MacKenzie <djm@gnu.org>
20005
20006 * doc/bison.texinfo: *** empty log message ***
20007
20008 * doc/bison.1: New file.
20009
200101993-06-25 Richard Stallman <rms@gnu.org>
20011
20012 * src/getargs.c: New file.
20013
200141993-06-16 Richard Stallman <rms@gnu.org>
20015
20016 * src/bison.s1: *** empty log message ***
20017
200181993-06-16 Richard Stallman <rms@gnu.org>
20019
20020 * bison.simple: *** empty log message ***
20021
200221993-06-03 Richard Stallman <rms@gnu.org>
20023
20024 * src/bison.s1: New file.
20025
200261993-06-03 Richard Stallman <rms@gnu.org>
20027
20028 * doc/bison.texinfo: *** empty log message ***
20029
200301993-06-03 Richard Stallman <rms@gnu.org>
20031
20032 * bison.simple: New file.
20033
200341993-05-19 Richard Stallman <rms@gnu.org>
20035
20036 * doc/bison.texinfo: New file.
20037
200381993-05-07 Noah Friedman <friedman@gnu.org>
20039
20040 * Makefile.in: *** empty log message ***
20041
200421993-04-28 Noah Friedman <friedman@gnu.org>
20043
20044 * src/reader.c: *** empty log message ***
20045
200461993-04-23 Noah Friedman <friedman@gnu.org>
20047
20048 * src/alloc.h: entered into RCS
20049
200501993-04-20 David J. MacKenzie <djm@gnu.org>
20051
20052 * src/version.c: *** empty log message ***
20053
20054 * src/files.c, src/allocate.c:
20055 entered into RCS
20056
20057 * src/reader.c: *** empty log message ***
20058
20059 * src/lex.c: entered into RCS
20060
20061 * src/conflicts.c: New file.
20062
20063 * src/symtab.c: entered into RCS
20064
20065 * src/alloc.h: New file.
20066
20067 * src/LR0.c: entered into RCS
20068
200691993-04-18 Noah Friedman <friedman@gnu.org>
20070
20071 * src/reader.c: New file.
20072
20073 * src/version.c: *** empty log message ***
20074
200751993-04-18 Noah Friedman <friedman@gnu.org>
20076
20077 * Makefile.in: *** empty log message ***
20078
200791993-04-17 Noah Friedman <friedman@gnu.org>
20080
20081 * Makefile.in: *** empty log message ***
20082
200831993-04-15 Richard Stallman <rms@gnu.org>
20084
20085 * src/main.c, src/files.c:
20086 New file.
20087
200881993-04-15 Noah Friedman <friedman@gnu.org>
20089
20090 * configure.in: entered into RCS
20091
20092 * configure.in: *** empty log message ***
20093
20094 * configure.in: New file.
20095
200961993-04-14 Richard Stallman <rms@gnu.org>
20097
20098 * Makefile.in: New file.
20099
201001993-04-13 Richard Stallman <rms@gnu.org>
20101
20102 * src/version.c: New file.
20103
201041993-03-25 Richard Stallman <rms@gnu.org>
20105
20106 * src/output.c: entered into RCS
20107
201081992-09-25 Richard Stallman <rms@gnu.org>
20109
20110 * configure.bat: entered into RCS
20111
201121992-06-22 Richard Stallman <rms@gnu.org>
20113
20114 * src/vmsgetargs.c: entered into RCS
20115
201161992-06-22 Richard Stallman <rms@gnu.org>
20117
20118 * doc/bison.rnh: entered into RCS
20119
201201992-04-20 David J. MacKenzie <djm@gnu.org>
20121
20122 * README: entered into RCS
20123
201241992-01-22 Richard Stallman <rms@gnu.org>
20125
20126 * src/machine.h: entered into RCS
20127
201281991-12-21 Richard Stallman <rms@gnu.org>
20129
20130 * src/lalr.c, src/closure.c:
20131 entered into RCS
20132
201331991-12-20 Richard Stallman <rms@gnu.org>
20134
20135 * src/state.h: entered into RCS
20136
201371991-12-18 Richard Stallman <rms@gnu.org>
20138
20139 * src/print.c, src/nullable.c, src/derives.c:
20140 entered into RCS
20141
201421991-11-03 David J. MacKenzie <djm@gnu.org>
20143
20144 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20145 entered into RCS
20146
201471988-09-09 Richard Stallman <rms@gnu.org>
20148
20149 * src/bison.hairy: entered into RCS
20150
201511987-12-16 Richard Stallman <rms@gnu.org>
20152
20153 * REFERENCES: entered into RCS
20154
20155
20156 -----
20157
20158 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20159 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20160 Free Software Foundation, Inc.
20161
20162 Copying and distribution of this file, with or without
20163 modification, are permitted provided the copyright notice and this
20164 notice are preserved.
20165
20166$Id$