]> git.saurik.com Git - bison.git/blob - ChangeLog
5e70863e7b2e3ffa13fe8cc798ecf006990413c0
[bison.git] / ChangeLog
1 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4 `"%code top" blocks' instead of `%code "top" blocks'.
5 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
6 Clean up whitespace in the output a little.
7
8 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
9
10 Fix documentation problems reported by Tim Josling at
11 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
12 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
13 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
14 integers. Explain the effect of literal string aliases on error
15 messages. Copy token 0 documentation from the C++ skeleton
16 documentation.
17
18 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
19
20 Accept a token number in a %left, %right, or %nonassoc for POSIX
21 conformance. Reported by Tim Josling at
22 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
23 * NEWS (2.3a+): Mention.
24 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
25 and code numbers are treated by precedence declarations.
26 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
27 of symbols.1.
28 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
29 of symbol.
30 (symbol.prec): New, just like symbol but allows INT.
31 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
32 longer holds.
33 * tests/regression.at (Token number in precedence declaration): New
34 test case.
35
36 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
37
38 DJGPP specific issues.
39 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
40 be changed. Copyright timestamp adjusted.
41 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
42 be changed. Copyright timestamp adjusted.
43 * djgpp/config.site: Copyright timestamp adjusted.
44 * djgpp/config_h.sed: Copyright timestamp adjusted.
45 * djgpp/djunpack.bat: Copyright timestamp adjusted.
46 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
47 filename translation list.
48 * djgpp/subpipe.c (init_subpipe): Check the environment variables
49 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
50 files shall be created. Before trying to use the temp dir where the
51 environment variable points to check that the dir really exists. If
52 not default to the cwd as temp dir. Copyright timestamp adjusted.
53 * djgpp/subpipe.h: Copyright timestamp adjusted.
54 * djgpp/testsuite.sed: Copyright timestamp adjusted.
55
56 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
57
58 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
59
60 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
61
62 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
63 Problem reported by Claudio Saavedra in
64 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
65
66 2008-01-05 Wojciech Polak <polak@gnu.org>
67
68 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
69 document's title with the input grammar file name.
70
71 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
72
73 Automate regression testing of the XML/XSLT implementation. Discussed
74 starting at
75 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
76 * configure.ac (XSLTPROC): New substitution.
77 * Makefile.am (maintainer-xml-check): New phony target invoking...
78 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
79 invoking make maintainer-check with BISON_TEST_XML=1.
80 * tests/atlocal.in (XSLTPROC): New.
81 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
82 not to report reachable memory when Bison is expected to have a
83 non-zero exit status and (2) to compare XML/XSLT output with --graph
84 and --report=all output for every working grammar when
85 BISON_TEST_XML=1.
86 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
87 (AT_BISON_CHECK_XML): New.
88 (AT_QUELL_VALGRIND): New.
89 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
90 (AT_CHECK): ... don't redefine this since this was the old way to
91 quell Valgrind.
92 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
93 AT_BISON_CHECK invocations.
94 * tests/c++.at: Likewise.
95 * tests/calc.at: Likewise.
96 * tests/conflicts.at: Likewise.
97 * tests/cxx-type.at: Likewise.
98 * tests/existing.at: Likewise.
99 * tests/glr-regression.at: Likewise.
100 * tests/headers.at: Likewise.
101 * tests/input.at: Likewise.
102 * tests/java.at: Likewise.
103 * tests/output.at: Likewise.
104 * tests/push.at: Likewise.
105 * tests/reduce.at: Likewise.
106 * tests/regression.at: Likewise.
107 * tests/sets.at: Likewise.
108 * tests/skeletons.at: Likewise.
109 * tests/synclines.at: Likewise.
110 * tests/torture.at: Likewise.
111 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
112 tends to hang xsltproc.
113 (Big horizontal): Likewise.
114
115 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
116
117 In XML output, remove redundant class attribute on symbol element.
118 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
119 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
120 look up a symbol to determine whether it's a nonterminal or terminal.
121 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
122 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
123
124 Add prec/assoc information to XML output.
125 * src/gram.c (grammar_rules_print_xml): For each rule that has a
126 %prec, add a percent_prec attribute.
127 * src/print-xml.c (print_grammar): For each terminal that has a
128 precedence or associativity, add a prec or assoc attribute.
129 (xml_indent): New.
130 (xml_puts): Use xml_indent.
131 (xml_printf): Use xml_indent.
132 * src/print-xml.h (xml_indent): Prototype.
133
134 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
135 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
136
137 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
138
139 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
140 (bison:ruleByNumber): ... this for clarity.
141 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
142 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
143 (xsl:template match="reduction"): Update.
144 (xsl:template match="item"): Update.
145 (xsl:template match="reduction"): Update.
146
147 In the XML output, don't print the list of rules where symbols appear.
148 Compute it in XSLT instead. Discussed at
149 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
150 * data/xslt/bison.xsl (bison:ruleByLhs): New.
151 (bison:ruleByRhs): New.
152 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
153 bison:ruleByRhs.
154 (xsl:template match="terminal/rule"): Remove.
155 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
156 bison:ruleByRhs.
157 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
158 Remove.
159 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
160 bison:ruleByRhs and mode="number-link" for rule template.
161 (xsl:template match="terminal/rule"): Remove.
162 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
163 bison:ruleByRhs and mode="number-link" for rule template.
164 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
165 Rewrite as...
166 (xsl:template match="rule" mode="number-link"): ... this.
167 * src/print-xml.c (print_grammar): Don't print the list of rules.
168
169 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
170
171 Don't let --report affect XML output; always print all information.
172 Discussed at
173 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
174 * src/conflicts.c (log_resolution): Implement.
175 * src/print-xml.c (print_core): Implement.
176 (print_state): Implement.
177 (print_xml): Implement.
178
179 * NEWS (2.3a+): Fix quotes.
180 * src/parse-gram.y (prologue_declaration): For consistency with -v,
181 don't let %verbose clear the list specified by --report.
182
183 2007-11-26 Akim Demaille <akim@epita.fr>
184
185 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
186
187 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
188
189 In the XML output, list useless and unused symbols and rules with the
190 useful ones and add a "usefulness" attribute. Discussed starting at
191 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
192 * src/gram.c (grammar_rules_partial_print_xml): Remove.
193 (grammar_rules_print_xml): Print all rules instead of just those
194 useful in the grammar, and add a "usefulness" attribute.
195 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
196 * src/print-xml.c (print_rules_useless_in_parser): Remove.
197 (print_grammar): Print all nonterminals instead of just useful ones,
198 and add a "usefulness" attribute to nonterminals and terminals.
199 (print_xml): Don't print a separate "reductions" or
200 "rules-useless-in-parser" element.
201 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
202 (reduce_xml): Remove.
203 (reduce_token_unused_in_grammar): New.
204 (reduce_nonterminal_useless_in_grammar): New.
205 * src/reduce.h (reduce_xml): Remove prototype.
206 (reduce_token_unused_in_grammar): Add prototype.
207 (reduce_nonterminal_useless_in_grammar): Add prototype.
208 * data/xslt/xml2text.xsl: Update for XML changes.
209 * data/xslt/xml2xhtml.xsl: Update for XML changes.
210 * tests/reduce.at (Useless Terminals): Update output.
211 (Useless Rules): Update output.
212 (Reduced Automaton): Update output.
213
214 Say "Terminals unused in grammar" instead of "Unused terminals".
215 * NEWS (2.3a+): Update.
216 * doc/bison.texinfo (Understanding): Update example output.
217 * src/reduce.c (reduce_output): Implement.
218 * data/xslt/xml2text.xsl: Implement.
219 * data/xslt/xml2xhtml.xsl: Implement.
220
221 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
222
223 Accept --report-file=FILE to override the default `.output' filename.
224 * NEWS (2.3a+): Mention.
225 * doc/bison.texinfo (Bison Options): Add an entry.
226 * src/files.c (compute_output_file_names): Don't override
227 spec_verbose_file if already set.
228 * src/getargs.c (usage): Document --report-file.
229 (REPORT_FILE_OPTION): New anonymous enum member.
230 (long_options): Add entry for it.
231 (getargs): Add case for it setting spec_verbose_file.
232
233 * build-aux/cross-options.pl: Don't record a short option just because
234 there's an arg.
235 * doc/.cvsignore: Add yacc.1.
236
237 2007-11-14 Akim Demaille <akim@epita.fr>
238
239 * doc/yacc.1.in: New.
240 * configure.ac, doc/Makefile.am: Adjust.
241 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
242 config.h symbol.
243 Use AC_SUBST for assignments too.
244 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
245
246 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
247
248 * src/gram.c: Remove comments that duplicate comments in gram.h.
249
250 When reporting useless rules and nonterminals, say "useless in grammar"
251 instead of "useless", and say "useless in parser" instead of "never
252 reduced". Discussed starting at
253 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
254 * NEWS (2.3a+): Mention this change.
255 * data/xslt/xml2text.xsl: Update output text and expected input XML
256 element names to match changes below.
257 * data/xslt/xml2xhtml.xsl: Likewise.
258 (xsl:template match="bison-xml-report"): Add missing entry in Table of
259 Contents: "Rules useless in parser due to conflicts".
260 * doc/bison.texinfo (Decl Summary): Reword a little.
261 (Understanding): Update example output for changes below.
262 * src/gram.c: (rule_useful_p): Rename to...
263 (rule_useful_in_grammar_p): ... this.
264 (rule_useless_p): Rename to...
265 (rule_useless_in_grammar_p): ... this.
266 (rule_never_reduced_p): Rename to...
267 (rule_useless_in_parser_p): ... this.
268 (grammar_rules_print): Update for renames.
269 (grammar_rules_print_xml): Update for renames.
270 (grammar_rules_never_reduced_report): Rename to...
271 (grammar_rules_useless_report): ... this since it is used for either
272 kind of useless rule.
273 * src/gram.h: Reword comments and update function names in prototypes.
274 * src/main.c (main): Say "rule useless in parser due to conflicts".
275 * src/print-xml.c (print_rules_never_reduced): Rename to...
276 (print_rules_useless_in_parser): ... this, and rename output XML
277 element "rules-never-reduced" to "rules-useless-in-parser".
278 (print_xml): Update for rename.
279 * src/print.c (print_results): Say "Rules useless in parser due to
280 conflicts".
281 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
282 (nonterminals_reduce): Say "nonterminal useless in grammar".
283 (reduce_output): Say "Nonterminals useless in grammar".
284 Say "Rules useless in grammar".
285 (reduce_xml): Rename output XML element "useless" to
286 "useless-in-grammar".
287 (reduce_print): Don't report the count of grammatically useless rules
288 as "rules never reduced" just because %yacc is specified.
289 In the correct report of this count, say nonterminal(s) and rule(s)
290 "useless in grammar".
291 * tests/conflicts.at (S/R in initial): Update expected output.
292 (Defaulted Conflicted Reduction): Likewise.
293 (Unreachable States After Conflict Resolution): Likewise.
294 * tests/existing.at (GNU pic Grammar): Likewise.
295 * tests/reduce.at (Useless Nonterminals): Likewise.
296 (Useless Rules): Likewise.
297 (Reduced Automaton): Likewise.
298 (Underivable Rules): Likewise.
299 (Empty Language): Likewise.
300
301 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
302
303 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
304 here document and before the EOF so that BSD's implementation of Bourne
305 shell doesn't parse the delimiter as part of the here document.
306 * doc/.cvsignore: Add cross-options.texi.
307 * src/getargs.c (usage): Add a blank line after the warning categories.
308
309 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
310
311 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
312
313 2007-11-05 Akim Demaille <akim@epita.fr>
314
315 Remove Id: from bison.1.
316 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
317 (perl -0777 -pi -e 's/\.PP\nId): New.
318 (.x.1): Use it to ignore the version control revision.
319
320 2007-11-05 Akim Demaille <demaille@gostai.com>
321
322 * build-aux/Makefile.am: Ship cross-options.pl.
323 * doc/Makefile.am: Always refer to cross-options.texi with
324 $(srcdir).
325 (MAINTAINERCLEANFILES): Add it.
326
327 2007-11-04 Akim Demaille <demaille@gostai.com>
328
329 Generate the long/short option cross-table.
330 * build-aux/cross-options.pl: New.
331 * doc/Makefile.am (cross-options.texi): New.
332 * doc/bison.texinfo: Use it.
333
334 2007-11-04 Akim Demaille <demaille@gostai.com>
335
336 Generate bison.1 using help2man.
337 * doc/common.x, doc/bison.x: New.
338 * doc/Makefile.am (bison.1, .x.1): New.
339 The code is taken from autoconf-2.61/man/Makefile.am.
340 * configure.ac: Look for help2man.
341
342 2007-11-04 Akim Demaille <demaille@gostai.com>
343
344 Complete --help.
345 * src/getargs.c (usage): Document -W, make it clear that -d,
346 -g and -x have optional arguments.
347
348 2007-11-04 Akim Demaille <demaille@gostai.com>
349
350 Find sha1sum when named gsha1sum.
351 * bootstrap (find_tool): New.
352 ($SHA1SUM): New.
353
354 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
355
356 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
357 at
358 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
359 * NEWS (2.3a+): Mention.
360 * data/bison.m4 (b4_pure_if): Don't define it here.
361 * data/c.m4 (b4_identification): Depend on individual skeletons to
362 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
363 values of the %define variables api.pure or api.push_pull. Define
364 YYPURE, YYPUSH, and YYPULL accordingly.
365 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
366 glr.cc has already defined b4_pure_flag.
367 * data/push.c: Define b4_pure_if based on `%define api.pure'.
368 Remove YYPUSH and YYPULL since they're back in b4_identification again.
369 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
370 * doc/bison.texinfo (Pure Decl): Update.
371 (Push Decl): Update.
372 (Decl Summary): Add api.pure to %define entry.
373 In %pure-parser entry, say it's deprecated and reference %define.
374 (Pure Calling): Update.
375 (Error Reporting): Update.
376 (C++ Scanner Interface): Update.
377 (How Can I Reset the Parser): Update.
378 (Table of Symbols): In %pure-parser entry, say it's deprecated and
379 reference %define.
380 * src/getargs.c (pure_parser): Remove global variable.
381 * src/getargs.h (pure_parser): Remove extern.
382 * src/output.c (prepare): Don't define pure_flag muscle.
383 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
384 wrapper around `%define api.pure'.
385 * tests/calc.at (Simple LALR Calculator): Update.
386 (Simple GLR Calculator): Update.
387 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
388 Update.
389 (GLR: Resolve ambiguity, pure, locations): Update.
390 (GLR: Merge conflicting parses, pure, no locations): Update.
391 (GLR: Merge conflicting parses, pure, locations): Update.
392 * tests/glr-regression.at (Uninitialized location when reporting
393 ambiguity): Update
394 * tests/input.at (Unused %define api.pure): New test case.
395 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
396 AT_PURE_IF and AT_PURE_AND_LOC_IF.
397 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
398
399 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
400
401 %define push_pull -> %define api.push_pull. Discussed starting at
402 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
403 * data/push.c: Expect the new name.
404 * data/yacc.c: Likewise.
405 * doc/bison.texinfo (Push Decl): Update.
406 (Decl Summary): Update %define entry.
407 (Push Parser Function): Update.
408 (Pull Parser Function): Update.
409 (Parser Create Function): Update.
410 (Parser Delete Function): Update.
411 * tests/calc.at (Simple LALR Calculator): Update.
412 * tests/input.at (%define enum variables): Update.
413 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
414 (Push Parsing: Multiple impure instances): Update.
415 (Push Parsing: Unsupported Skeletons): Update.
416 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
417 (Exploding the Stack Size with Malloc): Update.
418
419 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
420 other entries some.
421
422 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
423
424 For the XML output's terminal element, rename @number to @token-number,
425 and add @symbol-number. In the nonterminal element, rename @number to
426 @symbol-number. Discussed starting at
427 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
428 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
429 renames.
430 (xsl:template match="nonterminal"): Likewise.
431 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
432 (xsl:template match="nonterminal"): Likewise.
433 * src/print-xml.c (print_grammar): Implement.
434
435 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
436
437 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
438 2007-10-11 change, the child elements here are items not rules.
439 (xsl:template match="item"): New.
440 (xsl:template match="rule"): Update for new reduced itemset.
441 (xsl:template match="point"): Remove.
442 (xsl:template match="empty"): For consistency with --graph, don't
443 output "/* empty */".
444 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
445 line-wrap, don't pass a negative value as first-line-length since this
446 won't work with the following changes.
447 (xsl:template name="line-wrap"): Simplify slightly.
448 (xsl:template name="ws-search"): Eliminate recursion.
449 * src/print_graph.c (print_core): Don't print a reduction's lookahead
450 set next to an item whose dot is not at the end of the RHS even if it
451 happens to be associated with the same rule.
452
453 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
454
455 Add %define lr.keep_unreachable_states.
456 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
457 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
458 * src/main.c (main): Implement it.
459 * tests/conflicts.at (Unreachable States After Conflict Resolution):
460 Extend to test it, and fix a typo.
461
462 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
463
464 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
465 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
466 the example .output text.
467 * tests/regression.at (Extra lookahead sets in report): Improve wording
468 of comments.
469
470 2007-10-17 Wojciech Polak <polak@gnu.org>
471
472 * src/print-xml.c (print_grammar): Renamed
473 <terminal> and <nonterminal> attributes:
474 "type" to "number" and "symbol" to "name".
475 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
476 Use new attribute names.
477 (xsl:template match="nonterminal"): Likewise.
478 * data/xslt/xml2xhtml.xsl: Likewise.
479
480 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
481
482 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
483 (Option Cross Key): Likewise.
484
485 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
486 next to an item whose dot is not at the end of the RHS even if it
487 happens to be associated with the same rule.
488 * src/print.c (print_core): Likewise.
489 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
490 (Resolved SR Conflicts): Update output.
491 * tests/regression.at (Extra lookahead sets in report): New test case.
492
493 2007-10-11 Wojciech Polak <polak@gnu.org>
494
495 * src/print-xml.c (print_core): Remove item set
496 redundancy.
497 * data/xslt/bison.xsl (bison:ruleNumber): New key.
498 Improve processing time. Suggested by Joel E. Denny.
499 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
500 Write xsl:param "required" attribute as comment.
501 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
502 (xsl:template match="rule"): Support new reduced itemset.
503 (xsl:template match="point"): Remove.
504 * data/xslt/xml2xhtml.xsl: Likewise.
505
506 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
507
508 * src/getargs.c (version): Update copyright year.
509
510 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
511
512 Make xml2dot.xsl and --graph produce the same output.
513 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
514 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
515 escaped later.
516 (xsl:template name="output-node"): Use the new escape template instead
517 of the string-replace template directly.
518 (xsl:template name="output-edge"): Likewise.
519 (xsl:template name="escape"): New, escapes backslashes and newlines in
520 addition to quotation marks.
521 * src/graphviz.c (start_graph, output_node, output_edge): Add
522 whitespace to output for legibility.
523
524 Make xml2text.xsl and --report produce the same output, and remove the
525 XML "conflicts" element since a conflict summary is easily extracted
526 from the automaton.
527 * data/xslt/bison.xsl: New.
528 (xsl:template match="state" mode="bison:count-conflicts): New.
529 * data/xslt/xml2text.xsl: Import bison.xsl.
530 (xsl:template match="bison-xml-report"): Instead of styling the
531 "conflicts" element, style the "automaton" element with mode
532 "conflicts". Unlike the former, the latter lists S/R and R/R
533 conflicts for a state on the same line.
534 (xsl:template match="conflicts"): Remove.
535 (xsl:template match="conflict"): Remove.
536 (xsl:template match="terminal"): Line-wrap the list of rules in which
537 the terminal is used.
538 (xsl:template match="nonterminal"): Likewise for nonterminals.
539 (xsl:template match="automaton" mode="conflicts"): New.
540 (xsl:template match="state" mode="conflicts"): New.
541 (xsl:template name="line-wrap"): New.
542 (xsl:template name="ws-search"): New.
543 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
544 (xsl:template match="bison-xml-report"): Instead of styling the
545 "conflicts" element, style the "automaton" element with mode
546 "conflicts."
547 (xsl:template match="conflicts"): Remove.
548 (xsl:template match="conflict"): Remove.
549 (xsl:template match="automaton" mode="conflicts"): New.
550 (xsl:template match="state" mode="conflicts): New.
551 * src/conflicts.c (conflicts_output_xml): Remove.
552 * src/conflicts.h (conflicts_output_xml): Remove prototype.
553 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
554 * src/print.c (print_grammar): Consistently wrap at the 66th column so
555 the corresponding XSLT is easier. Also, never wrap between a word and
556 the comma that follows it.
557
558 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
559
560 Improve C++ namespace support. Discussed starting at
561 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
562 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
563 b4_namespace_close): New macros that interpret the %define variable
564 "namespace" so its value can contain "::" to indicate nested
565 namespaces.
566 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
567 the above macros.
568 * data/lalr1.cc (b4_namespace): Likewise.
569 * data/location.cc (b4_namespace): Likewise.
570 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
571 inside a new table in the general %define entry. Document `%define
572 namespace' there as well. Point the %name-prefix entry to it since it
573 explains it more completely in the case of C++.
574 (C++ Bison Interface): Mention `%define namespace' instead of
575 %name-prefix.
576 (Table of Symbols): Remove the `%define push_pull' entry. The %define
577 entry suffices.
578 * tests/c++.at (Relative namespace references): New test case.
579 (Absolute namespace references): New test case.
580 (Syntactically invalid namespace references): New test case.
581 * tests/input.at (C++ namespace reference errors): New test case.
582
583 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
584
585 Add syncline support and location accessor to internal %define
586 interfaces.
587 * data/bison.m4 (b4_percent_define_get_loc): New.
588 (b4_percent_define_get_syncline): New.
589 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
590 (b4_percent_define_default): Record defining location as line 1 rather
591 than 0 for the sake of synchronizing #line's, and define
592 b4_percent_define_syncline(VARIABLE).
593 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
594 * src/muscle_tab.c (muscle_syncline_grow): New.
595 (muscle_code_grow): Use muscle_syncline_grow.
596 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
597 define b4_percent_define_syncline(VARIABLE).
598 (muscle_percent_define_get_loc): New.
599 (muscle_percent_define_get_syncline): New.
600 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
601 remove some unused variables.
602 (muscle_percent_define_default): Record defining location as line 1
603 rather than 0 for the sake of synchronizing #line's, and define
604 b4_percent_define_syncline(VARIABLE).
605 (muscle_percent_define_check_values): Use
606 muscle_percent_define_get_loc.
607 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
608 (muscle_percent_define_get_syncline): Prototype.
609 * tests/skeletons.at (%define Boolean variables: invalid skeleton
610 defaults): Update output for location change.
611 (Complaining during macro argument expansion): Extend to test
612 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
613
614 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
615
616 Fix some error-reporting macro bugs.
617 * data/bison.m4 (b4_cat): New.
618 (b4_error, b4_error_at): Use b4_cat to send error directives directly
619 to stdout so they don't become arguments to other macros. Update
620 comments and add examples.
621 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
622 add examples.
623 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
624 after printing the error directive so that M4 doesn't report subsequent
625 problems that are induced by this problem.
626 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
627 instead of just in them. Recognize @\n in both places. Both expand to
628 the empty string. Needed by b4_cat.
629 * tests/skeletons.at (Complaining during macro argument expansion):
630 New test case.
631 (Fatal errors make M4 exit immediately): New test case.
632
633 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
634
635 Implement --print-datadir.
636 * src/getargs.c (usage): Mention.
637 (PRINT_DATADIR_OPTION): New anonymous enum member.
638 (long_options): Add entry for it.
639 (getargs): Add case for it calling compute_pkgdatadir.
640 * src/output.c (output_skeleton): Encapsulate data directory
641 computation from here...
642 (prepare): ... and from here...
643 (compute_pkgdatadir): ... into this new function.
644 * src/output.h (compute_pkgdatadir): Prototype.
645
646 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
647
648 * src/print-xml.c (escape_bufs): New static global variable
649 replacing...
650 (xml_escape_n): ... the static local variable buf here.
651 (print_xml): Free memory for escape_bufs.
652 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
653
654 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
655
656 Replace `%push-parser' and `%push-pull-parser' with
657 `%define push_pull "push"' and `%define push_pull "both"'.
658 `%define push_pull "pull"' is the default.
659 * doc/bison.texinfo (Push Decl, Push Parser Function,
660 Pull Parser Function, Parser Create Function, Parser Delete Function):
661 Update declarations.
662 (Decl Summary, Table of Symbols): Replace %push-parser and
663 %push-pull-parser entries with a %define push_pull entry.
664 * data/bison.m4 (b4_percent_define_check_values): New macro.
665 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
666 definitions...
667 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
668 definitions...
669 * data/push.c: ... to here and compute them from the value of the
670 %define variable push_pull.
671 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
672 parsing requests here...
673 * data/yacc.c: ... hack this to switch to push.c any time
674 b4_use_push_pull_flag or the %define variable push_pull is set. This
675 will go away when we mv push.c yacc.c.
676 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
677 push parsing is not supported since unused %define variables are
678 reported anyway.
679 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
680 * src/muscle_tab.h (muscle_percent_define_check_values): Update
681 comments for consistency with b4_percent_define_check_values.
682 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
683 muscles.
684 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
685 Remove.
686 (prologue_declaration): Remove %push-parser and %push-pull-parser
687 rules.
688 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
689 * tests/calc.at: Update declarations.
690 * tests/input.at (%define enum variables): New test case.
691 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
692 declaration.
693 (Push Parsing: Multiple impure instances): Update declaration.
694 (Push Parsing: Unsupported Skeletons): New test case.
695 * tests/torture.at (Exploding the Stack Size with Alloca): Update
696 declaration.
697 (Exploding the Stack Size with Malloc): Update declaration.
698
699 2007-09-24 Wojciech Polak <polak@gnu.org>
700
701 Add XSLT transformations.
702
703 * data/xslt/xml2dot.xsl: Transform XML into DOT.
704 * data/xslt/xml2text.xsl: Transform XML into plain text.
705 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
706 * data/Makefile.am (xsltdir): New variable.
707 (dist_xslt_DATA): Add xslt/*.xsl files.
708
709 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
710
711 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
712 Problem reported by Wojciech Polak.
713 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
714 (xml_printf): Undo change I made on 21 September; that is,
715 indent 2 spaces, not 1.
716
717 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
718
719 Pacify ./configure --enable-gcc-warnings.
720 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
721 `char const *' instead of `char *'.
722 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
723 local variable `sep'.
724
725 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
726
727 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
728 elsewhere.
729 * src/print-xml.c: Prefer "const" after types; that's more consistent.
730 (xml_printf): Indent just 1 space for level.
731 (e_char, xlate_char): Remove.
732 (xml_escape_string): Rewrite to avoid undefined behavior (used
733 storage that was freed from the stack).
734 (xml_escape_n): Don't bother checking for subscript error.
735
736 2007-09-21 Wojciech Polak <polak@gnu.org>
737
738 Add Bison XML Automaton Report.
739
740 Add support for an -x option to generate an XML report.
741 It is not documented yet.
742 * src/print-xml.c: New file.
743 * src/print-xml.h: Likewise.
744 * lib/timevar.def (TV_XML): New var.
745 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
746 * src/conflicts.c: Include print-xml.h.
747 (solved_conflicts_xml_obstack): New var.
748 (log_resolution, conflicts_solve, conflicts_free):
749 Add support for XML report.
750 (conflicts_output_val): New function.
751 * src/conflicts.h (conflicts_output_val): New decl.
752 * src/files.c (spec_xml_file): New var.
753 (compute_output_file_names, output_file_names_free): Add XML support.
754 * src/files.h (spec_xml_file): New decl.
755 * src/getargs.c (xml_flag): New var.
756 (usage, short_options, long_options, getargs): Add XML support.
757 * src/getargs.h (xml_flag): New decl.
758 * src/gram.c: Include print-xml.h.
759 (rule_lhs_print_xml, rule_rhs_print_xml):
760 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
761 New functions.
762 * src/gram.h: Declare external ones.
763 * src/main.c: Include print-xml.h.
764 (main): Add XML support.
765 * src/reduce.c: Include print-xml.h.
766 (reduce_xml): New function.
767 * src/reduce.h: Declare it.
768 * src/state.c: Include print-xml.h.
769 (state_new): Add XML support.
770 (state_rule_lookahead_tokens_print_xml): New function.
771 * src/state.h: Declare it.
772 (struct state): New member solved_conflicts_xml.
773 * src/symtab.c (symbol_class_get_string): New function.
774 * src/symtab.h: Declare it.
775
776 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
777
778 * GNUmakefile: Switch to coreutils's version.
779 * bootstrap: Likewise.
780 * Makefile.cfg: Adjust to new GNUmakefile.
781 * README-hacking: Likewise.
782
783 Import from gnulib:
784
785 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
786 Bruno Haible <bruno@clisp.org>
787
788 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
789 and is a script that invokes bison. Tighten the code. Add comments.
790
791 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
792
793 Spell "boolean" as "Boolean". Reported by Akim Demaille.
794 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
795 * doc/bison.texinfo (Decl Summary): Fix.
796 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
797 * tests/input.at (Boolean %define variables): Update output.
798 * tests/skeletons.at (%define boolean variables: invalid skeleton
799 defaults): Rename to...
800 (%define Boolean variables: invalid skeleton defaults): ... this and
801 update output.
802
803 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
804
805 In impure push mode, don't allow more than one yypstate to be allocated
806 since multiple impure parsers would corrupt yynerrs.
807 * data/push.c (yypstate_allocated): New static global variable
808 initialized to 0.
809 (yypull_parse): If yypstate_new returns 0, don't report it as memory
810 exhaustion if yypstate_allocated is 1, but still return 2.
811 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
812 already 1. Otherwise, set it to 1.
813 (yypstate_delete): Set it to 0.
814 * tests/push.at (Push Parsing: Multiple impure instances): New test
815 case.
816
817 2007-08-17 Bob Rossi <bob@brasko.net>
818
819 * doc/bison.texinfo (Push Decl): Document the push parser.
820 (Table of Symbols): Ditto.
821 (Pure Decl): Ditto.
822 (Decl Summary): Ditto.
823 (Multiple Parsers, Push Parser Function, Pull Parser Function,
824 Parser Create Function, Parser Delete Function):
825 Add new push parser symbols.
826 (Table of Symbols): Document push-parser, push-pull-parser,
827 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
828
829 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
830
831 Update to GPLv3.
832 * doc/gpl-3.0.texi: New file.
833 * doc/gpl.texi: Remove.
834 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
835 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
836 * README-hacking, TODO, bootstrap, bootstrap.conf:
837 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
838 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
839 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
840 * data/lalr1.cc, data/lalr1.java, data/location.cc:
841 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
842 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
843 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
844 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
845 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
846 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
847 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
848 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
849 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
850 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
851 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
852 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
853 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
854 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
855 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
856 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
857 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
858 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
859 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
860 * src/complain.c, src/complain.h, src/conflicts.c:
861 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
862 * src/files.h, src/flex-scanner.h, src/getargs.c:
863 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
864 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
865 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
866 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
867 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
868 * src/print.c, src/print.h, src/print_graph.c:
869 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
870 * src/reduce.h, src/relation.c, src/relation.h:
871 * src/revision.h, src/scan-code.h, src/scan-code.l:
872 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
873 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
874 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
875 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
876 * tests/Makefile.am, tests/actions.at, tests/c++.at:
877 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
878 * tests/existing.at, tests/glr-regression.at:
879 * tests/headers.at, tests/input.at, tests/java.at:
880 * tests/local.at, tests/output.at, tests/push.at:
881 * tests/reduce.at, tests/regression.at, tests/sets.at:
882 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
883 * tests/torture.at:
884 Update to GPLv3.
885
886 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
887
888 Get rid of broken %no-parser, -n, and --no-parser implementation and
889 documentation.
890 * TODO: Don't mention them.
891 * doc/bison.1: Likewise.
892 * doc/bison.texinfo (Decl Summary): Likewise.
893 (Bison Options): Likewise.
894 (Option Cross Key): Likewise.
895 * src/getargs.c (no_parser_flag): Remove global variable.
896 (usage): Don't print description of -n and --no-parser.
897 (long_options): Remove --no-parser entry here.
898 (getargs): Remove -n case in the switch here.
899 * src/getargs.h (no_parser_flag): Remove extern.
900 * tests/regression.at (Web2c Actions): Remove comment that mentions
901 --no-parser.
902
903 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
904
905 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
906 name user variables starting with `yy'. Just pass NULL instead of a
907 dummy local &yylval to yypush_parse.
908 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
909 starting with `yy'.
910
911 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
912
913 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
914 true since it's then always used regardless of whether yyoverflow is
915 defined. Reported by Christian Burger at
916 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
917 * THANKS: Add Christian Burger.
918
919 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
920 node names: say "Decl Summary" not "Bison Declaration Summary".
921
922 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
923
924 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
925 determine whether this function has already complained about an invalid
926 value for a %define boolean variable, don't check whether Bison has
927 ever examined the value. As written, the check was a tautology.
928 Instead, record and check for this complaint using a separate muscle.
929
930 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
931
932 Fix push parsing memory leak reported by Brandon Lucia at
933 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
934 * THANKS: Add Brandon Lucia.
935 * data/push.c (yypstate_delete): Free the stack if it was reallocated
936 but the parse never completed and thus freed it.
937 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
938 * tests/testsuite.at: Include push.at.
939 * test/push.at: New.
940 (Push Parsing: Memory Leak for Early Deletion): New test case.
941
942 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
943
944 Improve handling of multiple S/R conflicts in the same state and of S/R
945 conflicts involving multiple reductions.
946 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
947 set for a state here or Bison will abort if it is reassigned on a
948 later conflicted reduction in the same state.
949 Similarly, don't finalize and assign the solved conflicts report here
950 or it will be lost if it is reassigned on a later conflicted reduction
951 in the same state.
952 (set_conflicts): Instead, assign them both here after all S/R conflicts
953 in the state have been fully examined.
954 * src/print.c (shift_set): Rename to...
955 (no_reduce_set): ... this.
956 (print_reductions): Update for rename, and add %nonassoc error action
957 tokens to no_reduce_set so that, when printing the first remaining
958 reduction on an error action token, the reduction is enclosed in
959 brackets.
960 (print_results): Update for rename.
961 * tests/conflicts.at (Solved conflicts report for multiple reductions
962 in a state): New test case.
963 (%nonassoc error actions for multiple reductions in a state): New test
964 case.
965
966 * src/main.c (main): Don't depend on C99 features.
967
968 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
969
970 * build-aux/.cvsignore: Add compile.
971 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
972 uniwidth.
973
974 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
975
976 * bootstrap (slurp): Create target directories that don't exist.
977 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
978
979 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
980
981 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
982 than item number.
983 * closure.c (closure): Likewise.
984 * state.h (reductions): Comment sorting of rules.
985 (state): Comment sorting of items.
986
987 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
988
989 Fix C++ test cases after recent Gnulib changes. Discussed starting at
990 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
991 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
992 definition in order to avoid Gnulib headers since we don't use config.h
993 here.
994 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
995 rather than AT_DATA so that config.h is included.
996
997 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
998
999 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1000 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1001 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1002 and so that YYFPRINTF is guaranteed to be defined here.
1003
1004 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1005
1006 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1007 with...
1008 (muscle_percent_define_check_values): ... this more helpful function.
1009 Again, it's not used yet, but it will be.
1010 * src/muscle_tab.h: Likewise.
1011
1012 Improve some comments in parser table construction.
1013 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1014 (generate_states): Don't mention ruleset, which is internal to closure.
1015 * src/closure.c (closure): Explain sorting of core and itemset, which
1016 is required for this function to behave correctly.
1017 * src/closure.h (closure): Mention sorting.
1018
1019 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1020
1021 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1022 move the check for disabled transitions to an aver since conflict
1023 resolution hasn't happened yet.
1024
1025 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1026 labels a state as inconsistent just because it has error transitions.
1027 The original form of this check appeared in revision 1.1 of lalr.c,
1028 which was committed on 1991-12-21. Now (at least), changing the
1029 consistency label on such a state appears to have no useful effect in
1030 any of the places it is examined, which I enumerate below. The key
1031 point to understanding each item in this enumeration is that a state
1032 with an error transition is labelled consistent in the first place only
1033 if it has no rules, so the check cannot matter for states that have
1034 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1035 to try to identify its conflicts, and a state must have *rules* to have
1036 conflicts. (2) Labelling a state as inconsistent will affect how
1037 action_row sets the default *rule* for the state. (3) Labelling a
1038 state as inconsistent will cause build_relations to add lookback edges
1039 to *rules* in that state.
1040 * src/state.h (struct state): Word the comment for member consistent
1041 more carefully.
1042
1043 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1044
1045 Don't depend on C99 features.
1046 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1047 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1048 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1049 * src/state.c (state_mark_reachable_states): Fix for-loop.
1050 (state_remove_unreachable_states): Fix for-loop.
1051
1052 Don't widen struct state with member reachable just to temporarily
1053 record reachability. Instead, use a local bitset.
1054 * src/state.h (struct state): Remove member.
1055 * src/state.c (state_new): Don't initialize it.
1056 (state_mark_reachable_states): Rename to...
1057 (state_record_reachable_states): ... this, and use bitset.
1058 (state_remove_unreachable_states): Use bitset.
1059
1060 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1061
1062 * src/Makefile.am (yacc): Quote target action commands properly so
1063 that the yacc script isn't corrupt. Reported by Hans Aberg at
1064 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1065
1066 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1067 the case of pure parsers. Reported by Frans Englich at
1068 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1069 * THANKS: Add Frans Englich.
1070
1071 * NEWS (2.3a+): In the %code entry, reference section `Bison
1072 Declaration Summary' from the manual now since the %code summary has
1073 moved there.
1074 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1075 in the rules section must be terminated by semicolons.
1076
1077 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1078
1079 Extend the front-end API for %define variables to more completely
1080 mirror the back-end. This will be useful in the future.
1081 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1082 Update comments to mention the new front-end counterparts of these
1083 macros.
1084 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1085 for muscle_string_decode and muscle_location_decode.
1086 (muscle_string_decode): New static function.
1087 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1088 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1089 functions.
1090 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1091 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1092 implementation more closely.
1093 (muscle_percent_define_invalid_value): New function.
1094 * src/muscle_tab.h (muscle_percent_define_get,
1095 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1096 Prototype.
1097
1098 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1099
1100 * NEWS (2.3a+): Mention yesterday's state-removal change.
1101 (2.3a): Remove the %language entry, which was added after 2.3a.
1102 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1103 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1104 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1105 tests/existing.at: Update copyright date.
1106
1107 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1108
1109 If conflict resolution makes states unreachable, remove those states,
1110 report rules that are then unused, and don't report conflicts in those
1111 states.
1112 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1113 New global function.
1114 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1115 function.
1116 * src/main.c (main): After conflict resolution, remove the unreachable
1117 states and update all data structures that reference states by number.
1118 * src/state.c (state_new): Initialize each state's reachable member to
1119 false.
1120 (state_mark_reachable_states): New static function.
1121 (state_remove_unreachable_states): New global function.
1122 * src/state.h (struct state): Add member bool reachable.
1123 (state_remove_unreachable_states): Prototype.
1124 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1125 New test case.
1126 * tests/existing.at (GNU pic Grammar): Update test case output now that
1127 an unused rule is discovered.
1128
1129 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1130
1131 Minor code cleanup in parser table construction.
1132 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1133 (new_itemsets, save_reductions): Update for rename to nitemset.
1134 * src/closure.c (nritemset): Rename to...
1135 (nitemset): ... this since the "r" appears to meaningless and isn't
1136 used in the comments.
1137 (closure): Update for rename.
1138 * src/closure.h (nritemset): Update extern to...
1139 (nitemset): ... this.
1140 * src/lalr.c (LA): Fix a typo in comments.
1141 * src/print.c (print_core): Update for rename to nitemset.
1142 * src/print_graph.c (print_graph): Likewise.
1143 * src/state.h: Fix some typos in header comments.
1144
1145 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1146
1147 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1148 still sticks to ASCII. Sorry!
1149
1150 * README-hacking: New file, taken mostly from coreutils, with changes
1151 for Bison. Contains much of the contents of:
1152 * README-cvs: Remove.
1153 * bootstrap: Sync from gnulib.
1154 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1155 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1156
1157 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1158
1159 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1160 Setzer.
1161 (Java Differences): Fix some typos.
1162 * THANKS: Add Sebastian Setzer.
1163
1164 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
1165
1166 * data/java.m4 (b4_single_class_if): Remove.
1167 (b4_abstract_if): Look at "%define abstract".
1168 (b4_lexer_if): New.
1169 (b4_union_name): Rename...
1170 (b4_yystype): ... to this. Map to "%define stype".
1171 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1172 b4_maybe_throws): Fix quoting.
1173 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1174 * data/lalr1.java (Lexer interface): Always define.
1175 (Lexer interface within parser class): Remove.
1176 (YYLexer class): New, used when "%code lexer" is present.
1177 (constructor): When "%code lexer" is used, pass %lex-param
1178 to the lexer constructor.
1179 (yylex, yyparse): Remove %lex-param from method invocations
1180 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1181
1182 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1183 abstract". Rename "%define union_name" to "%define stype".
1184 Rename method names according to previous patch.
1185 (Java Scanner Interface): Describe "%code lexer" instead of
1186 "%pure-parser" and "%define single_class".
1187 (Java Differences): Mention "%code lexer".
1188
1189 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1190 Include scanner here, using macros from tests/local.at.
1191 (AT_DATA_CALC_Y): Remove final argument.
1192 (_AT_CHECK_JAVA_CALC): Likewise.
1193 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1194 of %locations and %error-verbose.
1195 (main): Test with and without %lex-param.
1196 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1197 (AT_BISON_OPTION_POPDEFS): Pop it.
1198
1199 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1200
1201 DJGPP spefic issue. Inhibit the use of disallowed characters for
1202 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1203 and concern testsuite case 46.
1204 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1205 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1206 * djgpp/config.bat: Inhibit the use of disallowed characters.
1207
1208 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1209
1210 Miscellaneous %define and %code cleanup.
1211 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1212 values are interpreted.
1213 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1214 documentation a little more.
1215 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1216 muscle_percent_define_insert, muscle_percent_code_grow): New
1217 functions/macros.
1218 * src/muscle_tab.h (muscle_percent_define_insert,
1219 muscle_percent_code_grow): Prototype.
1220 * src/parse-gram.y (prologue_declaration): Use
1221 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1222 %define and %code directives.
1223
1224 Make it easy to share %define boolean variables between the front-end
1225 and back-end. Though not used yet, this will be useful in the future.
1226 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1227 Bison uses of names rather than just skeleton uses of names.
1228 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1229 b4_percent_define_skeleton_variables(VARIABLE) to
1230 b4_percent_define_bison_variables(VARIABLE).
1231 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1232 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1233 b4_percent_code_bison_qualifiers(QUALIFIER).
1234 (b4_check_user_names_wrap): Update for renames.
1235 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1236 muscle_percent_define_default): New functions mimicking
1237 b4_percent_define_flag_if and b4_percent_define_default.
1238
1239 For %define variables, report locations for invalid values and
1240 redefinitions.
1241 * data/bison.m4 (b4_percent_define_flag_if): Read
1242 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1243 value for VARIABLE.
1244 (b4_percent_define_default): Save a special location in
1245 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1246 must later be reported as invalid.
1247 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1248 functions.
1249 (muscle_percent_define_insert): Record the location of VARIABLE in
1250 muscle percent_define_loc(VARIABLE), and use it to report the previous
1251 location for a redefinition.
1252 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1253 (muscle_percent_define_default): Update like b4_percent_define_default.
1254 (muscle_grow_user_name_list): Rename to...
1255 (muscle_user_name_list_grow): ... this for consistency and use
1256 muscle_location_grow.
1257 * src/muscle_tab.h (muscle_location_grow): Prototype.
1258 * tests/input.at (%define errors): Update expected output.
1259 * tests/skeletons.at (%define boolean variables: invalid skeleton
1260 defaults): New test case.
1261
1262 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1263
1264 * src/print.c (lookahead_set, state_default_rule): Remove.
1265 (print_reductions): Replace state_default_rule invocation with
1266 equivalent use of yydefact, which was computed in token_actions in
1267 tables.c.
1268 (print_results): Don't allocate lookahead_set.
1269
1270 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
1271
1272 * data/lalr1.java: Prefix all private members with yy.
1273
1274 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1275
1276 Use YYFPRINTF instead of fprintf where appropriate. Reported by
1277 Sebastien Fricker at
1278 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
1279 * THANKS: Add Sebastien Fricker.
1280 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1281 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1282 accept a variable number of arguments.
1283
1284 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1285
1286 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1287
1288 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1289
1290 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1291 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1292 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1293
1294 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1295
1296 Undo my 2007-02-07 change, switching back to the c-strcase module
1297 introduced in the 2007-02-03 change. Bruno Haible reported that
1298 the 2007-02-07 change would be dangerous in Turkish if we add a
1299 language whose name contains "i", since "i" is not lowercase "I"
1300 in Turkish.
1301 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1302 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1303 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1304 * m4/.cvsignore: Remove strcase.m4.
1305 * src/getargs.c: Revert 2007-02-07 change, as follows.
1306 Include c-strcase.h.
1307 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1308
1309 2007-02-11 Bruno Haible <bruno@clisp.org>
1310
1311 Enable the Java related testsuite tests when the only Java compiler
1312 found is a gcj < 4.3. Discussed at
1313 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1314 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1315
1316 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1317
1318 * data/Makefile.am: Update copyright date.
1319 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1320 yypstate_new returns NULL.
1321 (yypstate_new): Return NULL if malloc does.
1322 * src/reader.c (packgram): Move translation of rule actions from the
1323 beginning of packgram to...
1324 (check_and_convert_grammar): ... here right before packgram is invoked
1325 so it's easier to write more complete comments, and remove redundant
1326 code.
1327
1328 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1329
1330 As in semantic actions, make @$ in %initial-action, %destructor, and
1331 %printer imply %locations.
1332 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1333 scanning @$.
1334 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1335 (@$ in %initial-action implies %locations,
1336 @$ in %destructor implies %locations,
1337 @$ in %printer implies %locations): ... these new test cases.
1338
1339 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1340
1341 Undo most of the 2007-02-03 change, switching to the strcase module
1342 now that gnulib strcase has been fixed.
1343 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1344 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1345 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1346 * m4/.cvsignore: Add strcase.m4.
1347 * src/getargs.c: Revert 2007-02-03 change, as follows.
1348 Don't include c-strcase.h.
1349 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1350 strcasecmp has "unspecified behavior" outside the POSIX locale,
1351 but it works fine in practice if at least one argument is ASCII,
1352 as is the case in Bison.
1353
1354 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
1355
1356 * tests/java.at: Skip tests if only one of javac/java is present.
1357 Reported by Joel E. Denny.
1358 * tests/atlocal.in: Adjust copyright years.
1359
1360 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1361
1362 * data/lalr1.java (Stack): Work around old verifiers that disallow
1363 access to the private fields of an inner class, from the outer class.
1364 We can make Stack's fields public because user code doesn't have access
1365 to the instance of Stack used by parse(). Reported by Paul Eggert.
1366
1367 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1368
1369 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1370 the right spot for these files?
1371 * bootstrap.conf (gnulib_modules): Add c-strcase.
1372 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1373 c-strncasecmp.c.
1374 * src/getargs.c: Include c-strcase.h.
1375 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1376 to avoid unspecified behavior.
1377
1378 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1379
1380 * doc/bison.texinfo (Decl Summary): Correct typo.
1381
1382 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
1383
1384 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1385 Complain if the value does not match empty, "true" or "false".
1386 * data/c++.m4: Adjust default definitions of %define variables.
1387 * data/java.m4: Adjust default definitions of %define variables.
1388 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1389 to above behavior.
1390 * tests/input.at (Boolean %define variables): Test new behavior.
1391
1392 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
1393
1394 * NEWS: Mention java.
1395 * TODO: Remove things that are done.
1396 * bootstrap.conf: Add javacomp-script and javaexec-script.
1397 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1398
1399 * data/Makefile.am: Add new files.
1400 * data/java-skel.m4: New.
1401 * data/java.m4: New.
1402 * data/lalr1.java: New.
1403
1404 * doc/bison.texinfo: Put "A Complete C++ Example" under
1405 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1406 under Other Languages.
1407
1408 * src/getargs.c (valid_languages): Add Java.
1409 * src/getargs.h (struct bison_language): Update size of string fields.
1410
1411 * tests/Makefile.am: Add java.at.
1412 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1413 * tests/java.at: New.
1414 * tests/testsuite.at: Include it.
1415
1416 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1417
1418 Clean up.
1419 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1420 at_directive_argv arguments so these no longer have to be global
1421 variables. Also, update the implementation for the following changes.
1422 (fail_for_at_directive_too_many_args,
1423 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1424 (at_directive_name): Remove as at_directive_argv[0] will be used for
1425 this now.
1426 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1427 for the directive name.
1428 (at_directive_argc, at_directive_argv): Make these local within
1429 skel_lex instead of global.
1430 (INITIAL): Update directive start action for above changes.
1431 (SC_AT_DIRECTIVE_ARG): Rename to...
1432 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1433 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1434 (scan_skel): Move yylex_destroy to...
1435 (skel_scanner_free): ... here.
1436 * tests/skeletons.at (installed skeleton file name): Rename to...
1437 (installed skeleton file names): ... this.
1438
1439 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1440
1441 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1442 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1443 Summary" not "Directives".
1444 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1445 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1446 since the former is now the more complete one.
1447 (Prologue Alternatives): Likewise and do the same for %defines.
1448 (Table of Symbols): Add summary of %code, add summary of %define, and
1449 move full %code documentation to...
1450 (Decl Summary): ... here for consistency with other entries in these
1451 sections.
1452 Move %define entry in order to keep this list alphabetized.
1453 Reword %define entry a little to put less emphasis on the skeleton
1454 concept, which most users shouldn't have to think about.
1455
1456 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1457
1458 Adjust to recent gnulib changes.
1459 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1460 Add string.h, string_.h, unistd_.h, wchar_.h.
1461 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1462 * src/system.h: Don't include <stpcpy.h>; this is now done by
1463 <string.h>.
1464
1465 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
1466
1467 Simplify implementation of unqualified %code, implement macros for
1468 uniform treatment of boolean %define flags. Document %define.
1469 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1470 b4_percent_code_ifdef): New.
1471 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1472 * data/c++.m4: Define default value for global_tokens_and_yystype.
1473 * data/glr.cc: Likewise.
1474 * data/location.cc: Use b4_percent_define_flag_if.
1475
1476 * doc/bison.texinfo (Decl Summary): Document %define.
1477
1478 * src/parse-gram.y (Unqualified %code): Change muscle name to
1479 b4_percent_code().
1480 (content.opt): Default to empty.
1481
1482 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1483
1484 Implement support for relative and absolute skeleton file names.
1485 Discussed starting at
1486 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1487 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1488 (Bison Options): Document in --skeleton entry.
1489 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1490 full_skeleton can't necessarily hold all of pkgdatadir.
1491 If the specified skeleton file name contains a `/', don't prepend
1492 pkgdatadir.
1493 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1494 file name contains a `/', prepend the grammar file directory.
1495 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1496 * skeletons.at: New file.
1497 (relative skeleton file names): New test case.
1498 (installed skeleton file names): New test case.
1499 * tests/testsuite.at: Include skeletons.at.
1500
1501 * bootstrap: Update copyright to 2007.
1502
1503 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
1504
1505 * bootstrap: Remove occurrences of .#bootmp from the files.
1506
1507 2007-01-17 Akim Demaille <akim@epita.fr>
1508
1509 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1510 nonterminals.
1511 Use per-type %printer.
1512
1513 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1514
1515 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1516 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1517 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1518 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1519 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1520 tests/glr-regression.at, tests/input.at, tests/local.at,
1521 tests/output.at, tests/torture.at: Update copyright to 2007.
1522
1523 2007-01-16 Akim Demaille <akim@epita.fr>
1524
1525 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1526 error code.
1527 (Calc++ Scanner): Exit with failure if we can't open the input
1528 file.
1529 Accept "-" standing for stdin.
1530 (Calc++ Top Level): Print the result only if the parsing was
1531 successful.
1532
1533 2007-01-16 Akim Demaille <akim@epita.fr>
1534
1535 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1536
1537 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
1538 and Joel E. Denny <jdenny@ces.clemson.edu>
1539
1540 Clean up %define and %code implementation in M4 some. Most
1541 importantly, rename all related macros to be in the b4_percent_define
1542 and b4_percent_code namespaces. Also, complete support for `.' in
1543 %define variable names and %code qualifiers.
1544 * data/bison.m4 (b4_check_user_names): Check for special
1545 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1546 m4_foreach loops.
1547 (b4_get_percent_define, b4_get_percent_code): Rename to...
1548 (b4_percent_define_get, b4_percent_code_get): ... these.
1549 Extend documentation with examples.
1550 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1551 b4_percent_define_skeleton_variables and
1552 b4_percent_code_skeleton_qualifiers.
1553 Expect any value for the %define variable `foo' to be stored in the
1554 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1555 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1556 expect any unqualified %code blocks to be stored in a macro named
1557 `b4_percent_code_unqualified'.
1558 Use m4_indir so that %define variable names and %code qualifiers can
1559 contain `.', which is allowed by the grammar parser.
1560 (b4_percent_define_default): New macro to set a default value for a
1561 %define variable.
1562 (m4_wrap): Update wrapped code, and fix some underquoting.
1563 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1564 Expect grammar uses of %define variables and %code qualifiers to be
1565 defined in b4_percent_define_user_variables and
1566 b4_percent_code_user_qualifiers.
1567 * data/c++.m4: Use b4_percent_define_default rather than
1568 m4_define_default. Fix some underquoting. Skeleton usage of %define
1569 variable define_location_comparison now implies skeleton usage of
1570 %define variable filename_type.
1571 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1572 data/push.c, data/yacc.c: Update macro names.
1573 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1574 muscle names.
1575
1576 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1577
1578 DJGPP specific issues.
1579
1580 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1581 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1582
1583 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1584
1585 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1586 run parsers in all tests so that Valgrind is invoked during
1587 maintainer-check-valgrind.
1588 (Duplicate representation of merged trees): Free all semantic values.
1589 (Duplicated user destructor for lookahead): Likewise.
1590
1591 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1592
1593 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1594 command-line prefix.
1595 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1596 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1597 miss Valgrind messages.
1598 (Exploding the Stack Size with Malloc): Likewise.
1599
1600 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1601
1602 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1603 locals. Reported by Juan Manuel Guerrero at
1604 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1605 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1606 Fix some indentation also.
1607 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1608 explaining this issue.
1609
1610 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
1611 and Joel E. Denny <jdenny@ces.clemson.edu>
1612
1613 Simplify union and prologue handling, and escape union and lex/parse
1614 params with digraphs.
1615 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1616 values to the empty string since these are no longer guaranteed
1617 initialized by the front-end.
1618 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1619 braces around b4_user_stype since this is no longer done by the
1620 front-end.
1621 * src/files.c, src/files.h (pre_prologue_obstack,
1622 post_prologue_obstack): Remove.
1623 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1624 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1625 with digraphs. This fixes lex params and parse params.
1626 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1627 * src/output.c (prepare): Remove muscle insertion of the prologues.
1628 (output): Remove freeing of pre_prologue_obstack and
1629 post_prologue_obstack.
1630 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1631 than prologue_augment for prologue parsing so you don't need prologue
1632 obstacks.
1633 (grammar_declaration): For %union RHS, use `braceless' instead of
1634 "{...}" so that braces are already stripped and code is escaped with
1635 digraphs.
1636 * src/reader.c (prologue_augment): Remove.
1637 (reader): Remove initialization of pre_prologue_obstack and
1638 post_prologue_obstack.
1639 * src/reader.h (prologue_augment): Remove.
1640
1641 * data/c.m4: Remove stray parenthesis.
1642
1643 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1644
1645 Remove quotes from variables names in %define directives and from
1646 qualifiers in %code directives, and restrict the characters that are
1647 allowed in them to M4-friendly ones. For %define, continue to support
1648 the quoted form as a deprecated feature. Discussed starting at
1649 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1650 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1651 %code.
1652 * doc/bison.texinfo (Prologue Alternatives): Update.
1653 (Decl Summary): In %defines entry, update mention of `%code requires'
1654 and `%code provides'.
1655 (C++ Location Values): Update %define uses.
1656 (Calc++ Parser Interface): Likewise.
1657 (Calc++ Parser): Likewise, and update `%code requires' uses.
1658 (Table of Symbols): Update %code documentation.
1659 * src/parse-gram.y (prologue_declaration): For %define variables, use
1660 `variable' instead of `STRING'.
1661 (grammar_declaration): For %code qualifiers, use `ID' instead of
1662 `STRING'.
1663 (variable): New nonterminal that takes an `ID' or a `STRING'.
1664 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1665 and %define uses.
1666 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1667 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1668 (%define errors): Update %define uses.
1669
1670 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1671
1672 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1673 instead of muscle_insert for %define values so that M4-special
1674 characters are replaced with digraphs.
1675 * tests/input.at (%define errors): Extend to check weird values.
1676
1677 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1678
1679 Instead of having skeletons declare all valid %define variables and
1680 %code qualifiers, provide macros that retrieve the associated values
1681 and build these lists automatically. Thus Bison will now warn when a
1682 variable or qualifier is not used by the skeleton in the current
1683 invocation regardless of whether it might sometimes be used by that
1684 skeleton in other invocations. Also, move all %define value macros to
1685 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1686 form, which is replaced by %code.
1687 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1688 (b4_check_user_names): ... this, and change the series of valid name
1689 arguments to a single list argument for names used in the skeleton
1690 similar to the existing list argument for names used in the grammar.
1691 Warn instead of complaining.
1692 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1693 values and %code code, to format %code code properly, and to build
1694 lists of all %define variables and %code qualifiers used in the
1695 skeleton: b4_skeleton_percent_define_variables and
1696 b4_skeleton_percent_code_qualifiers.
1697 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1698 Remove, and...
1699 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1700 the skeleton names lists can finish building first. In place of
1701 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1702 expect the lists b4_user_percent_define_variables and
1703 b4_user_percent_code_qualifiers.
1704 * data/c++.m4: Where setting default values for b4_parser_class_name,
1705 b4_location_type, b4_filename_type, b4_namespace, and
1706 b4_define_location_comparison, update their names to the
1707 b4_percent_define_ namespace.
1708 * data/glr.c: Don't use b4_check_percent_define_variables and
1709 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1710 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1711 (b4_parser_class_name, b4_namespace): Define these using
1712 b4_get_percent_define for parser_class_name and namespace.
1713 * data/location.cc: Use b4_get_percent_define.
1714 * data/push.c: Don't use b4_check_percent_define_variables and
1715 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1716 * data/yacc.c: Likewise, and don't call m4_exit in
1717 b4_use_push_for_pull_if or m4_wrap code will never execute.
1718 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1719 Rename to...
1720 (muscle_grow_user_name_list): ... this for consistency with the
1721 terminology used in bison.m4.
1722 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1723 %define variable names, and rename muscle used_percent_define_variables
1724 to user_percent_define_variables.
1725 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1726 user_percent_code_qualifiers.
1727 (content): Remove.
1728 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1729 {CODE} form is no longer accepted.
1730 * tests/input.at (Reject bad %code qualifiers): Rename to...
1731 (Reject unused %code qualifiers): ... this, and update test output.
1732 (%define error): Update test output.
1733
1734 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1735
1736 Check for unrecognized %define variables similar to checking for
1737 unrecognized %code qualifiers. Check for redefined %define variables.
1738 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1739 generalizes...
1740 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1741 (b4_check_percent_define_variables): New, also wraps it.
1742 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1743 variables using b4_check_percent_define_variables.
1744 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1745 all those exercised in the test suite and all those listed in the
1746 `Default values' section of c++.m4. Are there others?
1747 * data/push.c, data/yacc.c: Declare no valid %define variables.
1748 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1749 similar to muscle_find, but it works even when the muscle stores a
1750 const value.
1751 (muscle_grow_used_name_list): New function for constructing the used
1752 name list muscles that b4_check_for_unrecognized_names requires.
1753 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1754 %define'd more than once. Define the b4_used_percent_define_variables
1755 muscle with muscle_grow_used_name_list.
1756 (grammar_declaration): Abbreviate %code code with
1757 muscle_grow_used_name_list.
1758 * tests/input.at (%define errors): New.
1759
1760 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1761
1762 Provide warn_at, complain_at, and fatal_at function callbacks to the
1763 skeletons, and use this for %code qualifier complaints.
1764 * data/bison.m4 (b4_error_at): New, invoked by...
1765 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1766 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1767 @fatal_at(...@) directives.
1768 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1769 qualifiers in b4_used_percent_code_qualifiers and to use
1770 b4_complain_at.
1771 * src/location.c, src/location.h (boundary_set_from_string): New global
1772 function.
1773 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1774 function.
1775 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1776 to b4_used_percent_code_qualifiers.
1777 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1778 function.
1779 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1780 (lineno): Rename to...
1781 (out_lineno): ... this so I don't misunderstand it again.
1782 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1783 here; these newlines are in the input but not the output file.
1784 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1785 (at_directive_perform): ... this new static function, and add handling
1786 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1787 directives.
1788 * tests/input.at (Reject bad %code qualifiers): Update test output with
1789 locations and extend.
1790
1791 * tests/output.at (Output file name: [, Output file name: ]): Remove
1792 bogus comment about these tests failing.
1793
1794 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1795
1796 Clean up b4_check_percent_code_qualifiers a little.
1797 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1798 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1799 documentation and add examples.
1800 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1801 qualifiers here.
1802
1803 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1804
1805 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1806 unreliable -- especially when they're hidden inside another macro.
1807 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1808 data/c.m4: Remove m4_divert(-1).
1809 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1810 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1811 m4_divert_push(0) and m4_divert_pop(0).
1812 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
1813 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1814 pushed and popped by m4sugar, should be first on the stack.
1815
1816 Provide warn, complain, and fatal function callbacks to the skeletons.
1817 This provides more flexibility than m4_fatal, improves the error
1818 message format, and captures messages for translation. Discussed
1819 starting at
1820 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1821 * data/bison.m4 (b4_error): New, invoked by...
1822 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1823 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1824 directives. Because these M4 macros might be called when the current
1825 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1826 the previous removal of uses of m4_divert, which caused trouble.
1827 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1828 m4_fatal to report unrecognized %code qualifiers.
1829 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1830 push parser requests.
1831 * data/glr.c: Use b4_complain instead of m4_fatal to report
1832 non-deterministic push parser requests.
1833 Update @output usage to @output(...@) form.
1834 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1835 report missing %defines. Update @output usage to @output(...@) form.
1836 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1837 @output(...@) form.
1838 * src/main.c (main): Invoke skel_scanner_free.
1839 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1840 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1841 obstack_for_string from flex-scanner.h.
1842 (YY_DECL): Use to declare skel_lex static.
1843 (decode_at_digraphs): Remove; now handled in the new
1844 SC_AT_DIRECTIVE_ARG start condition.
1845 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1846 functions.
1847 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1848 at_directive_argv): New static globals.
1849 (INITIAL): Use fail_for_invalid_at.
1850 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1851 recognize the start of a generalized `@directive(...@)' form and
1852 start...
1853 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1854 directive args (using the new obstack_for_string), to decode the
1855 contained @ diagraphs, and to perform the directive. It recognizes
1856 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1857 @output(...@).
1858 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1859 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1860 `@,'.
1861 (scan_skel): Initialize obstack_for_string on the first call.
1862 (skel_scanner_free): New function to free obstack_for_string.
1863 * tests/input.at (Reject bad %code qualifiers): Update test output.
1864
1865 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1866
1867 Consolidate the 4 prologue alternative directives (%code, %requires,
1868 %provides, and %code-top) into a single %code directive with an
1869 optional qualifier field. Discussed at
1870 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
1871 * NEWS (2.3a+): Rewrite the existing entry for the prologue
1872 alternatives.
1873 * doc/bison.texinfo (Prologue Alternatives): Update.
1874 (Decl Summary): Update to %code "requires" and %code "provides".
1875 (Calc++ Parser): Update to %code "requires".
1876 (Table of Symbols): Remove entries for %requires, %provides, and
1877 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
1878 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
1879 are replaced by b4_percent_code_provides and b4_percent_code_requires,
1880 which are skeleton-specific.
1881 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
1882 declare what %code qualifiers it supports and to complain if any other
1883 qualifiers were used in the grammar.
1884 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
1885 and b4_user_code([b4_percent_code_provides]) in place of
1886 b4_user_requires and b4_user_provides.
1887 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
1888 Add b4_user_code([b4_percent_code_top]) and
1889 b4_user_code([b4_percent_code]).
1890 Invoke b4_check_percent_code_qualifiers.
1891 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1892 PERCENT_REQUIRES): Remove.
1893 (grammar_declaration): Remove RHS's for %code-top, %provides, and
1894 %requires. Rewrite the %code RHS as the unqualified form defining the
1895 muscle b4_percent_code. Add another RHS for the qualified %code form,
1896 which defines muscles of the form b4_percent_code_QUALIFIER and the
1897 b4_used_percent_code_qualifiers muscle.
1898 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1899 PERCENT_REQUIRES): Remove.
1900 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
1901 %code "requires" and %code "provides".
1902 * tests/input.at (Reject bad %code qualifiers): New.
1903
1904 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1905
1906 Use the new code_props interface for destructors and printers.
1907 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
1908 printer_location members, and change the type of the destructor and
1909 printer members to code_props.
1910 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
1911 symbol_printer_get, semantic_type_destructor_set,
1912 semantic_type_printer_set, default_tagged_destructor_set,
1913 default_tagless_destructor_set, default_tagged_printer_set,
1914 default_tagless_printer_set): Use code_props in arguments and return
1915 types in place of char const * and location.
1916 (symbol_destructor_location_get, symbol_printer_location_get): Remove
1917 since the locations are now contained in the return of
1918 symbol_destructor_get and symbol_printer_get.
1919 * src/output.c (symbol_destructors_output, symbol_printers_output):
1920 Replace with...
1921 (symbol_code_props_output): ... this to eliminate duplicate code.
1922 (output_skeleton): Update to use symbol_code_props_output.
1923 * src/reader.c (symbol_should_be_used): Update use of
1924 symbol_destructor_get.
1925 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1926 Update uses of the various _destructor_set and _printer_set functions.
1927 * src/symtab.c: (default_tagged_destructor_location,
1928 default_tagless_destructor_location, default_tagged_printer_location,
1929 default_tagless_printer_location): Remove since we...
1930 (default_tagged_destructor, default_tagless_destructor,
1931 default_tagged_printer, default_tagless_printer): ... change the type
1932 of these to code_props.
1933 (symbol_new, semantic_type_new, symbol_destructor_set,
1934 semantic_type_destructor_set, symbol_destructor_get,
1935 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
1936 symbol_check_alias_consistency, default_tagged_destructor_set,
1937 default_tagless_destructor_set, default_tagged_printer_set,
1938 default_tagless_printer_set): Update.
1939 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
1940 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
1941 code_props members.
1942 (symbol_print): Use SYMBOL_CODE_PRINT.
1943
1944 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1945
1946 Use the new code_props interface for rule actions.
1947 * src/symlist.h (symbol_list): Replace action, action_location, and
1948 used members with a code_props action_props member.
1949 * src/reader.c (symbol_should_be_used, grammar_rule_check,
1950 grammar_midrule_action, grammar_current_rule_merge_set,
1951 grammar_current_rule_symbol_append, packgram): Update.
1952 * src/scan-code.h (translate_rule_action): Remove, no longer used.
1953 * src/scan-code.l (handle_action_dollar): Update.
1954 (translate_rule_action): Remove, no longer used.
1955 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
1956
1957 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1958
1959 Use the new code_props interface in parse-gram.y.
1960 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
1961 Update all uses of translate_* functions to use the new code_props
1962 interface and to use gram_scanner_last_string_free and
1963 code_scanner_last_string_free where possible.
1964 (grammar_declaration): symbol_list_destructor_set and
1965 symbol_list_printer_set now perform the translation, so don't do it
1966 here. Use gram_scanner_last_string_free where possible.
1967 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
1968 translate_code): Remove, no longer used.
1969 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
1970 symbol_list_printer_set): Perform code translation here rather than
1971 depending on the caller to do so.
1972
1973 * src/symlist.h (struct symbol_list): Correct some documentation typos.
1974 * src/scan-gram.h (gram_last_string): Remove declaration.
1975 * src/scan-gram.l (last_string): Declare it static.
1976
1977 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
1978
1979 Encapsulate code properties and related functionality for the various
1980 destructors, printers, and actions into a code_props structure and
1981 interface. This patch merely implements code_props in scan-code.h and
1982 scan-code.l. Future patches will rewrite other modules to use it.
1983 Discussed starting at
1984 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
1985 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
1986 consistently initialize const structs that have an empty location
1987 field.
1988 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
1989 to ensure consistency.
1990 * src/scan-code.h (code_props): New structure.
1991 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
1992 function, macro, and const global variable for initializing a
1993 code_props with no code.
1994 (code_props_plain_init, code_props_symbol_action_init,
1995 code_props_rule_action_init, code_props_translate_code): The rest of
1996 the new code_props functional interface. Among other things, the init
1997 functions set the code_props kind field so that
1998 code_props_translate_code will know whether to behave like
1999 translate_symbol_action, translate_rule_action, or translate_code.
2000 These old translate functions must remain until all other modules are
2001 updated to use the new code_props interface.
2002 (code_scanner_last_string_free): New function similar to
2003 gram_scanner_last_string_free.
2004 (code_scanner_free): Add documentation.
2005 * src/scan-code.l: Implement the new interface.
2006 (code_lex): Make it static, add a code_props* argument, and remove the
2007 rule argument.
2008 (last_string): New static global similar to the one in scan-gram.l.
2009 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2010 instead of rule.
2011 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2012 code_props since Bison may one day use this information for destructors
2013 and printers.
2014 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2015 (handle_action_dollar): Use symbol_list_n_get and set used flag
2016 directly since symbol_list_n_used_set is removed.
2017 (translate_action): Add a code_props* argument and remove the rule,
2018 action, and location arguments. Pass the code_props* on to code_lex.
2019 (translate_rule_action, translate_symbol_action, translate_code):
2020 Rewrite as wrappers around the new code_props interface.
2021 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2022 it would eventually need to break the encapsulation of code_props.
2023
2024 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2025
2026 * etc/.cvsignore: New.
2027
2028 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2029
2030 Add maintainer-push-check to run maintainer-check using push parsing in
2031 place of pull parsing where available.
2032 * Makefile.am (maintainer-push-check): New.
2033 * data/bison.m4 (b4_use_push_for_pull_if): New.
2034 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2035 appropriately based on their existing values.
2036 (yypush_parse): Don't print push-parser-specific diagnostics if push
2037 parsing is being used in place of pull parsing.
2038 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2039 push.c.
2040 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2041 variable, and insert b4_use_push_for_pull_flag into muscles.
2042 * tests/Makefile.am (maintainer-push-check): New.
2043
2044 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2045
2046 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2047 (whether successful or failed) so that yypush_parse can be invoked
2048 again to start a new parse using the same yypstate.
2049 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2050 check multiple yypull_parse invocations on the same yypstate. For pull
2051 mode, extend to check multiple yyparse invocations.
2052 (Exploding the Stack Size with Alloca): Extend to try with
2053 %push-pull-parser.
2054 (Exploding the Stack Size with Malloc): Likewise.
2055
2056 * tests/calc.at (Simple LALR Calculator): Don't specify
2057 %skeleton "push.c" since %push-pull-parser implies that now.
2058 * tests/headers.at (export YYLTYPE): Don't check for the push
2059 declarations. Otherwise, this test case can't be used to see if push
2060 mode can truly emulate pull mode.
2061 * tests/input.at (Torturing the Scanner): Likewise.
2062 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2063 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2064 AT_YACC_IF, which now includes the case of push mode since %skeleton
2065 need not be used for push mode. This will be more intuitive once
2066 push.c is renamed to yacc.c.
2067
2068 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2069
2070 For push mode, convert yyparse from a macro to a function, invoke yylex
2071 instead of passing a yylexp argument to yypull_parse, and don't
2072 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2073 Discussed starting at
2074 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2075 * data/bison.m4 (b4_pull_if): New.
2076 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2077 * data/push.c: Improve M4 quoting a little.
2078 (b4_generate_macro_args, b4_parenthesize): Remove.
2079 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2080 any time a pull parser is requested.
2081 Don't #define this as a wrapper around yypull_parse. Instead, when
2082 both push and pull are requested, make it a function that does that
2083 same thing.
2084 (yypull_parse): If there's a b4_prefix, #define this to
2085 b4_prefix[pull_parse] when both push and pull are requested.
2086 Don't define this as a function unless both push and pull are
2087 requested.
2088 Remove the yylexp argument and hard-code yylex invocation instead.
2089 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2090 %push-parser.
2091 * src/getargs.c (pull_parser): New global initialized to true.
2092 * getargs.h (pull_parser): extern it.
2093 * src/output.c (prepare): Insert pull_flag muscle.
2094 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2095 (prologue_declaration): Set both push_parser and pull_parser = true for
2096 %push-pull-parser. Set push_parser = true and pull_parser = false for
2097 %push-parser.
2098 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2099 %push-parser since there's no backward-compatibility concern here.
2100 Scan %push-pull-parser.
2101 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2102 instead of %push-parser.
2103 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2104 prototype it in the module that calls yyparse.
2105 * tests/input.at (Torturing the Scanner): Likewise.
2106 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2107
2108 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2109
2110 Update etc/bench.pl. Optimize push mode a little (the yyn change
2111 deserves most of the credit).
2112 * Makefile.am (SUBDIRS): Add etc subdirectory.
2113 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2114 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2115 yytoken, yyval, and yyloc declarations to...
2116 (yyparse or yypush_parse): ... here to improve performance. For
2117 yypush_parse invocations after the first, be sure to assign yyn its old
2118 value again.
2119 (yypstate_new): Don't bother initializing the yyresult field since the
2120 initial value isn't used.
2121 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2122 remove the #define that, in push mode, set it to yyps->NAME.
2123 * etc/Makefile.am: New.
2124 * etc/bench.pl: Remove and build it instead from...
2125 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2126 "tests/bison" from the build directory by default rather than just
2127 invoking "bison" from $PATH.
2128 (calc_grammar): Update push parser code: don't declare yylval globally,
2129 don't define yyparse_wrapper, and don't #define yyparse.
2130 (bench_grammar): Update to check all working combinations of yacc.c,
2131 push.c, impure, pure, pull, and push.
2132
2133 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2134
2135 For push mode, add pull wrappers around yypush_parse.
2136 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2137 (yypull_parse): New function wrapping yypush_parse.
2138 (yyparse): New #define wrapping yypull_parse.
2139 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2140 is declared.
2141 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2142 prototype yylex in the module that calls yyparse, and don't prototype
2143 yyparse there. Otherwise, the yyparse expansion won't compile.
2144 * tests/input.at (Torturing the Scanner): Likewise.
2145
2146 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2147
2148 Enable push parsers to operate in impure mode. Thus, %push-parser no
2149 longer implies %pure-parser. The point of this change is to move
2150 towards being able to test the push parser code by running the entire
2151 test suite as if %push-parser had been declared.
2152 * data/push.c (yypush_parse): For impure mode, remove the
2153 yypushed_char, yypushed_val, and yypushed_loc arguments.
2154 Instead, declare these as local variables initialized to the global
2155 yychar, yylval, and yylloc.
2156 For the first yypush_parse invocation only, restore the initial values
2157 of these global variables when it's time to read a token since they
2158 have been overwritten.
2159 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2160 %push-parser.
2161 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2162 %pure-parser along with %push-parser since this test case was designed
2163 for pure push parsers.
2164 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2165 (AT_YACC_OR_PUSH_IF): New.
2166 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2167 add a note that it's still wrong for some cases (as it has been for a
2168 while).
2169 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2170 %push-parser no longer implies %pure-parser.
2171
2172 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2173
2174 Remove some unnecessary differences between the pull parser code and
2175 the push parser code. This patch enables yynerrs in push mode.
2176 * data/push.c: Reformat M4 a little.
2177 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2178 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2179 because push mode is on. Instead, if pure mode is on, move yynerrs
2180 to...
2181 (b4_declare_parser_state_variables): ... here.
2182 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2183 to yyps->NAME so it can be used in yypush_parse.
2184 (yypush_parse): Don't omit uses of yynerrs in push mode.
2185
2186 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2187
2188 Fix bug such that the first pushed token's value and location are
2189 sometimes overwritten (sometimes by %initial-action) before being used.
2190 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2191 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2192 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2193 more closely mimic the pull parser logic.
2194 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2195 time to read a token, which is after any initialization of yylval and
2196 yylloc.
2197 (gottoken): Rename label to...
2198 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2199 user namespace.
2200
2201 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2202
2203 Rearrange initialization of the parser state variables so that the
2204 skeleton doesn't have to have a copy for pull mode and another for push
2205 mode. This patch also fixes at least a bug such that yylloc was not
2206 initialized (with b4_location_initial_line and
2207 b4_location_initial_column) upon calling yypush_parse. However, that
2208 initialization now overwrites the first token's location;
2209 %initial-action assigning @$ already did the same thing, and both bugs
2210 will be fixed in a later patch.
2211 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2212 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2213 yyss, yyvs, yyls, and yystacksize.
2214 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2215 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2216 yylsp.
2217 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2218 yyps->NAME so it can be used in yypush_parse.
2219 (yyparse or yypush_parse): For yypush_parse, don't print the
2220 "Starting parse" diagnostic for invocations after the first.
2221 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2222 yypush_parse, only do it for the first invocation.
2223 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2224 initialization to occur in yypush_parse but only on the first
2225 invocation.
2226
2227 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2228
2229 * data/push.c: Add CPP guards around push parser declarations in both
2230 the header and the code file.
2231 In the code file, move the push parser declarations to the same place
2232 they appear in the header file.
2233 Clean up the M4 some, especially the inconsistent underquoting in
2234 some b4_c_function_def and b4_c_function_decl uses.
2235
2236 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2237
2238 Encapsulate the push parser state variables into an M4 macro so the
2239 push skeleton doesn't have to list them again for pull mode's yyparse.
2240 For push mode, remove yypush_parse's local equivalents of these
2241 variables to eliminate unnecessary copying between the two sets at
2242 run-time. This patch also fixes at least a bug related to multiple
2243 %initial-action invocations in push mode.
2244 * data/push.c (b4_declare_parser_variables): Rename to...
2245 (b4_declare_scanner_communication_variables): ... this for clarity and
2246 update both uses.
2247 (b4_declare_yyparse_variables): Remove and move its contents to the one
2248 spot where it was invoked.
2249 (b4_declare_parser_state_variables): New macro containing the parser
2250 state variables required by push mode.
2251 (struct yypstate): Replace all fields but yynew with
2252 b4_declare_parser_state_variables.
2253 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2254 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2255 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2256 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2257 parser state variable declarations with
2258 b4_declare_parser_state_variables.
2259 Don't initialize parser state variables when calling yypush_parse since
2260 yypstate_new already does that.
2261 Invoke the user's initial action only upon the first yypush_parse
2262 invocation.
2263 Remove all code that copies between the local parser state variables
2264 and the yypstate.
2265
2266 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2267
2268 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2269 prevent a name collision in a future patch where these names will
2270 sometimes be #define'd.
2271 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2272 since it no longer has the same name as the existing argument.
2273 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2274
2275 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
2276 and Joel E. Denny <jdenny@ces.clemson.edu>
2277
2278 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2279 that the argument is case-insensitive, and there's no `=' here.
2280 For the %skeleton entry, mention that %language is better.
2281 (Bison Options): Likewise for --language and --skeleton. Move the
2282 --skeleton entry so that the `Tuning the parser' section is sorted
2283 alphabetically on long options.
2284 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2285 %language directive in detail here; cross-reference the %language
2286 documentation instead.
2287 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2288 `%require "2.3b"' so that the example is always up-to-date.
2289 (Table of Symbols): Add entries for %language and %skeleton.
2290 * examples/extexi (normalize): Instead of replacing every %require
2291 argument with the current Bison version, just substitute for
2292 `@value{VERSION}'. This guarantees that we're testing what actually
2293 appears in the documentation.
2294 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2295 rather than `@VERSION@'.
2296
2297 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2298
2299 * NEWS: Reword the %language news a bit, and put it earlier.
2300
2301 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2302 Rewrite to simplify the logic.
2303 (language_argmatch): Likewise.
2304 (program_name): We now own this var.
2305 * src/getargs.h (struct bison_language): Use char[] rather than
2306 const char *.
2307
2308 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2309 Java is supported.
2310 * src/complain.c (program_name): Remove decl; no longer needed.
2311 * src/main.c (program_name): Remove; now belongs to getargs.
2312
2313 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
2314
2315 * NEWS: Document %language.
2316
2317 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2318
2319 * data/c-skel.m4, data/c++-skel.m4: New files.
2320 * data/glr.c: Complain on push parsers.
2321
2322 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2323 over %skeleton.
2324 (Decl Summary): Document %language and %skeleton.
2325 (Command line): Document -L.
2326
2327 * examples/extexi: Rewrite %require directive.
2328 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2329
2330 * src/files.c (compute_exts_from_gc): Look in language structure
2331 for .y extension.
2332 (compute_file_name_parts): Check whether .tab should be added.
2333 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2334 (language, skeleton_arg, language_argmatch): New.
2335 (long_options): Add --language.
2336 (getargs): Use skeleton_arg, add -L/--language.
2337 * src/getargs.h: Include location.h.
2338 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2339 * src/output.c (prepare): Pick default skeleton from struct language.
2340 Don't dispatch C skeletons here.
2341 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2342 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2343 * src/scan-gram.l ("%language"): New rule.
2344
2345 * tests/calc.at: Test %skeleton and %language.
2346 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2347 (AT_GLR_IF): Look for %skeleton "glr.cc".
2348 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2349 (AT_YACC_IF): Reject %language.
2350
2351 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2352
2353 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2354 since it wasn't used; only the typedef name 'semantic_type' is needed.
2355 Also, omit trailing white space.
2356
2357 * bootstrap: Sync from coreutils.
2358 (gnulib_extra_files): Add build-aux/announce.gen.
2359 (slurp): Adjust .gitignore files like .cvsignore files.
2360 * build-aux/announce-gen: Remove from CVS, since bootstrap
2361 now creates this.
2362
2363 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2364
2365 Make %push-parser imply %pure-parser. This fixes several bugs; see
2366 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2367 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2368 pure_parser = true.
2369 * data/push.c: Don't bother testing b4_push_if when deciding whether
2370 to expand b4_declare_parser_variables globally.
2371 (yypush_parse): Likewise in here.
2372
2373 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2374 (yy_reduce_print): Reformat M4 for readability.
2375
2376 2006-12-15 Bob Rossi <bob@brasko.net>
2377 and Joel Denny <jdenny@ces.clemson.edu>
2378
2379 * data/push.c (yypstate): Add typedef, and update all uses of
2380 struct yypstate to just yypstate.
2381 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2382
2383 2006-12-14 Bob Rossi <bob@brasko.net>
2384
2385 * data/push.c (yypush_parse): Declare prototype regardless of
2386 %locations option.
2387
2388 2006-12-14 Bob Rossi <bob@brasko.net>
2389
2390 * data/push.c (yyparse): Remove the prototype and the #define when in
2391 push-parser mode.
2392
2393 2006-12-13 Bob Rossi <bob@brasko.net>
2394
2395 * data/push.c (yypstate_init): Rename to...
2396 (yypstate_new): ... this and use b4_c_function_def.
2397 (yypstate_delete): New.
2398 (yypush_parse): Change parameters yynval and yynlloc to be const.
2399 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2400 yypstate_delete functions.
2401
2402 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2403
2404 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2405 strange test case titles. Reported by Bob Rossi.
2406
2407 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2408
2409 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2410 of potential ambiguities in GLR grammers.
2411
2412 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2413
2414 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2415 `bison ', use m4_index instead of m4_substr since chopping up a string
2416 containing M4-special characters causes problems here.
2417
2418 Fix a couple of bugs related to special characters in user-specified
2419 file names, and make it easier for skeletons to compute output file
2420 names with the same file name prefix as Bison-computed output file
2421 names.
2422 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2423 b4_parser_file_name and b4_spec_defines_file instead of
2424 @output_parser_name@ and @output_header_name@, which are now redundant.
2425 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2426 b4_parser_file_name, b4_spec_defines_file, and the new
2427 @basename(FILENAME@) instead of @output_parser_name@ and
2428 @output_header_name@, which inappropriately escaped the file names as
2429 C string literals.
2430 * src/files.c (all_but_ext): Remove static qualifier.
2431 (compute_output_file_names): Move `free (all_but_ext)' to...
2432 (output_file_names_free): ... here since all_but_ext is needed later.
2433 * src/files.h (all_but_ext): Extern.
2434 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2435 exactly what MUSCLE_INSERT_STRING used to do.
2436 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2437 characters are escaped properly.
2438 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2439 all_but_ext.
2440 For pkgdatadir muscle, maintain previous functionality by using
2441 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2442 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2443 digraphs would never be expanded. Hopefully no one has M4-special
2444 characters in his Bison installation path.
2445 * src/scan-skel.l: Don't parse @output_header_name@ and
2446 @output_parser_name@ anymore since they're now redundant.
2447 In @output, use decode_at_digraphs.
2448 Parse a new @basename command that invokes last_component.
2449 (decode_at_digraphs): New.
2450 (BASE_QPUTS): Remove unused.
2451 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2452 (Output file name): New tests.
2453
2454 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2455
2456 Warn about output files that are generated by the skeletons and that
2457 conflict with other output files.
2458 * data/glr.c: Don't generate the header file here when glr.cc does.
2459 * src/files.c (file_names, file_names_count): New static globals.
2460 (compute_output_file_names): Invoke output_file_name_check for files
2461 not generated by the skeletons and remove existing checks.
2462 (output_file_name_check): New function that warns about conflicting
2463 output file names.
2464 (output_file_names_free): Free file_names.
2465 * src/files.h (output_file_name_check): Declare.
2466 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2467 the skeletons.
2468 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2469 (Conflicting output files): New tests.
2470
2471 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2472
2473 * doc/bison.texinfo: Fix a couple of typos.
2474
2475 2006-12-08 Bob Rossi <bob@brasko.net>
2476
2477 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2478 Rename to...
2479 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2480 update all uses.
2481 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2482 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2483 local pv.
2484 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2485 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2486
2487 2006-12-07 Bob Rossi <bob@brasko.net>
2488 and Joel Denny <jdenny@ces.clemson.edu>
2489
2490 * data/push.c (yypvarsinit): Change return type from void* to struct
2491 yypvars*. No longer cast to void* on return.
2492 (struct yypvars): Remove yylen since it need not be remembered between
2493 yypushparse invocations.
2494 (yypushparse): Don't copy between yylen and pv->yylen.
2495
2496 2006-12-05 Bob Rossi <bob@brasko.net>
2497
2498 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2499 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2500 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2501 (struct yypvars): Remove b4_declare_parser_variables.
2502 (yypvarsinit): Remove init code for removed variables.
2503 (global scope): Do not declare b4_declare_parser_variables if
2504 push or pure mode.
2505 (yypushparse): Add b4_declare_parser_variables.
2506 Init new local variables, and remove init code for removed
2507 yypvars variables.
2508 (yyparse): Delete.
2509 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2510 and yyparse for other modes.
2511 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2512 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2513 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2514 (AT_PURE_LEX_IF): True if pure or push parser.
2515
2516 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2517
2518 Document Yacc prologue alternatives and default %destructor's and
2519 %printer's as experimental. Don't mention Java yet. Discussed at
2520 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2521 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2522 (2.3a): Annotate this entry to say the old forms of these features were
2523 also experimental.
2524 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2525 Table of Symbols): Say they're experimental. Comment out any mention
2526 of Java (we'll want this back eventually).
2527
2528 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2529
2530 Support a file name argument to %defines. Deprecate `=' in
2531 %file-prefix, %name-prefix, and %output. Discussed at
2532 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2533 * NEWS (2.3a+): Mention.
2534 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2535 form of %defines, and remove `=' from entries for %file-prefix,
2536 %name-prefix, and %output.
2537 * src/parse-gram.y (prologue_declaration): Implement.
2538 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2539 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2540 all but one occurrence of %name-prefix.
2541 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2542 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2543 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2544 occurrence of each of %file-prefix and %output. Add check for %defines
2545 with argument.
2546 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2547 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2548 Remove the `=' from %output.
2549
2550 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2551
2552 Don't escape $ in test case titles since Autoconf 2.61 now does that
2553 correctly.
2554 * tests/actions.at (Default %printer and %destructor are not for error
2555 or $undefined): Here.
2556 (Default %printer and %destructor are not for $accept): Here.
2557 * tests/input.at (Invalid $n and @n): Here.
2558
2559 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2560
2561 Rename <!> to <>. Discussed starting at
2562 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2563 * NEWS (2.3a+): Update.
2564 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2565 Update.
2566 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2567 * src/scan-gram.l (INITIAL): Implement.
2568 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2569 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2570 comment.
2571 * tests/actions.at (Default tagless %printer and %destructor,
2572 Default tagged and per-type %printer and %destructor,
2573 Default %printer and %destructor are not for error or $undefined,
2574 Default %printer and %destructor are not for $accept,
2575 Default %printer and %destructor for mid-rule values): Update.
2576 * tests/input.at (Default %printer and %destructor redeclared,
2577 Unused values with default %destructor): Update.
2578
2579 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2580
2581 Don't let %prec take a nonterminal.
2582 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2583 token.
2584 * tests/input.at (%prec takes a token): New test checking that %prec
2585 won't take a nonterminal.
2586
2587 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2588
2589 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2590 it was double-quoted.
2591 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2592 grammar is maintained with Bison's highest standards.
2593 * src/getargs.c: Fix some typos in Doxygen comments.
2594
2595 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2596
2597 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2598 later. Reported by Paul Eggert in
2599 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2600 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2601 * src/scan-code.l (translate_action): Don't bother invoking
2602 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2603 (code_scanner_free): Instead of invoking
2604 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2605 which frees more.
2606 * src/scan-gram.l (gram_scanner_free): Likewise.
2607 * src/scan-skel.l (scan_skel): Likewise.
2608
2609 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2610
2611 * src/files.c (tr): Change return type to void.
2612 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2613 has been called previously for the same key.
2614 (muscle_find): Return storage instead of value so that
2615 --enable-gcc-warnings doesn't produce warnings that the return discards
2616 const. aver that the value and storage are the same since storage
2617 could potentially be NULL when value is not.
2618 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2619 same as 0.
2620
2621 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2622
2623 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2624 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2625 us a slightly cleaner distribution, and also works.
2626 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2627 gnulib changes.
2628
2629 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2630 and Paul Eggert <eggert@cs.ucla.edu>
2631
2632 Don't let Bison leak memory except when it complains.
2633 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2634 (spec_defines_file, dir_prefix): Now char *, not const char *,
2635 since they are freed.
2636 * src/files.c: Likewise.
2637 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2638 Likewise.
2639 (tr): Now operates in-place. All uses changed.
2640 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2641 values.
2642 (compute_file_name_parts, compute_output_file_names): Don't store
2643 read-only data in variables that will be freed.
2644 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2645 src_extension, and header_extension.
2646 (output_file_names_free): New public function to free
2647 spec_verbose_file, spec_graph_file, spec_defines_file,
2648 parser_file_name, and dir_prefix.
2649 * src/getargs.c (getargs): Don't store read-only data in variables that
2650 will be freed.
2651 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2652 (which previously existed but was unused), and quotearg_free.
2653 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2654 * src/muscle_tab.c: Likewise.
2655 (muscle_entry): Make the value char const *,
2656 and add a new storage member that is char * and can be freed.
2657 (muscle_entry_free): New private function.
2658 (muscle_init): Use it instead of free.
2659 (muscle_insert, muscle_grow): Update and use new storage member.
2660 (muscle_code_grow): Free the string passed to muscle_grow
2661 since it's not needed anymore.
2662 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2663 add a new `char *code' member.
2664 ("{...}"): Declare semantic type as code.
2665 * src/scan-code.h (translate_rule_action):
2666 (translate_symbol_action, translate_code, translate_action): Return
2667 `char const *' rather than `char *' since external code should not free
2668 these strings.
2669 * src/scan-code.l: Likewise.
2670 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2671 which is "{...}" in the parser.
2672 * tests/Makefile.am (maintainer-check-valgrind): Set
2673 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2674 Valgrind.
2675 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2676 complain.
2677 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2678 expecting a non-zero exit status sets --leak-check=summary and
2679 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2680 this case, and we don't want to hear about it.
2681
2682 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2683
2684 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2685 instead of from the template, to simplify configuration a bit.
2686 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2687 and m4/wint_t.m4, as they are needed with the latest gnulib.
2688
2689 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2690
2691 Disable unset/unused mid-rule value warnings by default, and recognize
2692 --warnings=midrule-values to enable them. Discussed starting at
2693 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2694 * NEWS (2.3a+): Mention.
2695 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2696 warnings): Add entry for midrule-values subargument.
2697 * src/reader.c (symbol_should_be_used): Don't return true just because
2698 the value is a set/used mid-rule value unless
2699 --warnings=midrule-values was specified.
2700 * tests/input.at (Unused values, Unused values before symbol
2701 declarations): Run tests with and without --warnings=midrule-values.
2702
2703 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2704 than LIST_FREE directly.
2705
2706 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2707
2708 Finish implementing --warnings=error, which should not be implied by
2709 --warnings=all (or by its synonyms -W and --warnings without
2710 subarguments).
2711 * src/complain.c (set_warning_issued): New function to report that
2712 warnings are being treated as errors and to record an error if so.
2713 Invoke...
2714 (warn_at, warn): ... here.
2715 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2716 "error - warnings are errors" does not appear above "all - all of the
2717 above".
2718 (getargs): For -W and --warnings without subarguments, don't let
2719 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2720 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2721
2722 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2723
2724 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2725 empty subargument list. For example: `bison --warnings= parser.y'.
2726
2727 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2728
2729 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2730 the parser header file so that gcc doesn't warn.
2731
2732 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2733
2734 Split the default %destructor/%printer into two kinds: <*> and <!>.
2735 Discussed starting at
2736 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2737 * NEWS (2.3a+): Mention.
2738 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2739 previous change today related to mid-rules.
2740 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2741 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2742 (TYPE_TAG_ANY): Add as <*>.
2743 (TYPE_TAG_NONE): Add as <!>.
2744 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2745 for <*> and <!>.
2746 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2747 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2748 * src/symlist.c (symbol_list_default_new): Split into tagged and
2749 tagless versions.
2750 (symbol_list_destructor_set, symbol_list_printer_set): Split
2751 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2752 SYMLIST_DEFAULT_TAGLESS.
2753 * src/symlist.h: Update symbol_list_default*_new prototypes.
2754 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2755 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2756 * src/symtab.c (default_destructor, default_destructor_location,
2757 default_printer, default_printer_location): Split each into tagged and
2758 tagless versions.
2759 (symbol_destructor_get, symbol_destructor_location_get,
2760 symbol_printer_get, symbol_printer_location_get): Implement tagged
2761 default and tagless default cases.
2762 (default_destructor_set, default_printer_set): Split each into tagged
2763 and tagless versions.
2764 * src/symtab.h: Update prototypes.
2765 * tests/actions.at (Default %printer and %destructor): Rename to...
2766 (Default tagless %printer and %destructor): ... this, and extend.
2767 (Per-type %printer and %destructor): Rename to...
2768 (Default tagged and per-type %printer and %destructor): ... this, and
2769 extend.
2770 (Default %printer and %destructor for user-defined end token): Extend.
2771 (Default %printer and %destructor are not for error or $undefined):
2772 Update.
2773 (Default %printer and %destructor are not for $accept): Update.
2774 (Default %printer and %destructor for mid-rule values): Extend.
2775 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2776 (Unused values with default %destructor): Extend.
2777
2778 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2779
2780 Don't apply the default %destructor/%printer to an unreferenced midrule
2781 value. Mentioned at
2782 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2783 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2784 like $@n instead of just @n so that the default %destructor/%printer
2785 logic doesn't see them as user-defined symbols.
2786 (symbol_is_dummy): Check for both forms of the name.
2787 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2788 name for which the midrule value is referenced in any action.
2789 * tests/actions.at (Default %printer and %destructor for mid-rule
2790 values): New test.
2791 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2792 for change to dummy symbol names.
2793
2794 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2795
2796 Warn about unset midrule $$ if the corresponding $n is used.
2797 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2798 $n usage.
2799 (packgram): Before invoking grammar_rule_check on any rule, make sure
2800 all actions have already been scanned in order to set `used' flags.
2801 Otherwise, checking that a midrule's $$ is set will not always work
2802 properly because the midrule check must forward-reference the midrule's
2803 parent rule.
2804 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2805 warning.
2806
2807 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2808
2809 More improvements to the documentation of the prologue alternatives:
2810 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2811 Bison manual.
2812 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2813 some text to clarify the relative importance of the new directives and
2814 to show how these directives may be viewed as code labels.
2815
2816 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2817
2818 Similar to the recently removed %before-header, add %code-top as the
2819 alternative to the pre-prologue. Mentioned at
2820 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2821 Also, let the prologue alternatives appear in the grammar section.
2822 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2823 (prologue_declaration): Move the existing prologue alternatives to...
2824 (grammar_declaration): ... here and add %code-top.
2825 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2826
2827 Clean up and extend documentation for the prologue alternatives.
2828 * NEWS (2.3a+): Describe prologue alternatives.
2829 * doc/bison.texinfo (Prologue): Move discussion of prologue
2830 alternatives to...
2831 (Prologue Alternatives): ... this new section, and extend it to discuss
2832 all 4 directives in detail.
2833 (Table of Symbols): Clean up discussion of prologue alternatives and
2834 add %code-top.
2835
2836 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2837
2838 DJGPP specific issues.
2839
2840 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2841 config.bat accordingly.
2842 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2843 * djgpp/config.site: Likewise.
2844
2845 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
2846
2847 Replace %*-header with %provides, %requires, %code. See discussion at
2848 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2849
2850 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2851 (b4_user_start_header): Remove.
2852 * data/glr.c: Use new macros instead of b4_*start_header
2853 and b4_*end_header.
2854 * data/glr.cc: Likewise.
2855 * data/lalr1.cc: Likewise.
2856 * data/push.c: Likewise.
2857 * data/yacc.c: Likewise.
2858
2859 * doc/bison.texinfo: Remove %before-header, rename
2860 %{start,end,after}-header to %requires, %provides, %code.
2861
2862 * src/parse-gram.y: Likewise (also rename token names accordingly).
2863 * src/scan-gram.l: Likewise.
2864 * tests/actions.at: Likewise.
2865
2866 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2867
2868 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2869 Problem reported by Joel E. Denny.
2870
2871 2006-10-14 Jim Meyering <jim@meyering.net>
2872
2873 (Sync from coreutils.)
2874 Work also when the working directory (with e.g. coreutils sources)
2875 is version controlled with git, rather than CVS.
2876 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2877 rather than CVS.
2878 In messages and comments, say e.g., "checked-out sources",
2879 rather than "CVS sources".
2880 (version_controlled_file): New function. Work for git as well as
2881 for CVS. Don't use grep's -q option.
2882 (slurp): Call it here, in place of CVS-specific code.
2883
2884 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
2885
2886 Fix testsuite for ./configure --enable-gcc-warnings:
2887 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
2888 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
2889 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
2890 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
2891 * test/regression.at (Diagnostic that expects two alternatives):
2892 Likewise.
2893
2894 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2895
2896 * bootstrap.conf (gnulib_modules): Add config-h.
2897 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
2898 worry about HAVE_CONFIG_H.
2899 * lib/abitset.c: Likewise.
2900 * lib/bitset.c: Likewise.
2901 * lib/bitset_stats.c: Likewise.
2902 * lib/bitsetv-print.c: Likewise.
2903 * lib/bitsetv.c: Likewise.
2904 * lib/ebitset.c: Likewise.
2905 * lib/get-errno.c: Likewise.
2906 * lib/lbitset.c: Likewise.
2907 * lib/subpipe.c: Likewise.
2908 * lib/timevar.c: Likewise.
2909 * lib/vbitset.c: Likewise.
2910 * lib/bitset.c: Include "bitset.h" first, to test interface.
2911 * lib/bitset_stats.c: Include "bitset_stats.h" first.
2912 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
2913 * lib/bitsetv.c: Include "bitsetv.h" first.
2914 * lib/get-errno.c: Include "get-errno.h" first.
2915 * m4/.cvsignore: Add config-h.m4.
2916 * tests/actions.at (Default %printer and %destructor for ...):
2917 Adjust expected line numbers in output to reflect removal of #if
2918 HAVE_CONFIG_H lines.
2919 * tests/glr-regression.at (Missed %merge type warnings when ...):
2920 Likewise.
2921 * tests/regression.at (Braced code in declaration in rules section):
2922 Likewise.
2923 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
2924 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
2925 Include <config.h> unconditionally.
2926
2927 * bootstrap: Sync from coreutils, as follows:
2928
2929 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2930
2931 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
2932 variable was sometimes used without being initialized. This
2933 messed up the installation of the INSTALL file in some cases.
2934
2935 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
2936
2937 * bootstrap (usage, main program, symlink_to_gnulib): Add option
2938 --copy. Inspired by a suggestion from Bruno Haible.
2939
2940 2006-10-03 Jim Meyering <jim@meyering.net>
2941
2942 * bootstrap: Undo last change to this file, since now gnulib-tool
2943 sticks with the automake default in generating dependencies.
2944
2945 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2946
2947 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
2948 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
2949
2950 * doc/bison.1: Add copyright notice.
2951
2952 * data/glr.c: Don't include <stdarg.h>; not used.
2953
2954 * NEWS: The -g and --graph options now output graphs in Graphviz
2955 DOT format, not VCG format.
2956 * doc/bison.1: Likewise.
2957 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
2958 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
2959 of this change in
2960 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
2961 * TODO: Remove Graphviz entry.
2962 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
2963 remove vcg.c, vcg.h, vcg_defaults.h.
2964 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
2965 * src/graphviz.c, src/graphviz.h: New files.
2966 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
2967 * src/files.h: Make comment more generic.
2968 * src/main.c (main): Likewise.
2969 * src/print_graph.h: Likewise.
2970 * src/getargs.c (usage): Make usage description more generic.
2971 * src/print_graph.c: Include graphviz.h rather than vcg.h.
2972 (static_graph, fgraph): Remove. All uses changed to pass
2973 arguments instead of sharing a static var.
2974 (print_core, print_actions, print_state, print_graph):
2975 Output graphviz format rather than VCG format.
2976 * tests/.cvsignore: Remove *.vcg; add *.dot.
2977 * tests/output.at: Expect *.dot files, not *.vcg files.
2978
2979 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
2980 accommodates the 2006-10-08 change.
2981
2982 2006-10-11 Bob Rossi <bob@brasko.net>
2983
2984 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
2985 (b4_yyssa, b4_yyerror_range): New macros.
2986 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
2987 (yypvarsinit): Remove init of removed fields.
2988 (yypushparse): Remove use of removed fields; use new macros instead.
2989
2990 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
2991
2992 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
2993 in a push parser. Reindent slightly to match yacc.c better.
2994
2995 2006-10-11 Bob Rossi <bob@brasko.net>
2996
2997 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
2998 yymsg_alloc fields.
2999 (yypvarsinit, yypushparse): Remove init of removed fields.
3000 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
3001
3002 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3003
3004 * THANKS: Add Paolo Bonzini and Bob Rossi.
3005
3006 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
3007
3008 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3009 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3010 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3011 b4_define_user_cde and uses): Remove.
3012 (b4_comment, b4_prefix, b4_sync_start): New.
3013 * data/bison.m4: New file, with most of the content removed from c.m4.
3014 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3015 * src/output.c (output_skeleton): Pass bison.m4.
3016 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3017 only if specified.
3018
3019 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3020
3021 Fix test failure reported by Tom Lane in
3022 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3023 and try to make such failures easier to catch in the future.
3024 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3025 that's now the caller's responsibility.
3026 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3027 Set yychar = YYEOF if it's negative.
3028 * tests/actions.at (yylex): Abort if asked to read past EOF.
3029 * tests/conflicts.at (yylex): Likewise.
3030 * tests/cxx-type.at (yylex): Likewise.
3031 * tests/glr-regression.at (yylex): Likewise.
3032 * tests/input.at (yylex): Likewise.
3033 * tests/regression.at (yylex): Likewise.
3034 * tests/torture.at (yylex): Likewise.
3035
3036 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3037
3038 Fix problems with translating English-language diagnostics.
3039 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3040 respect to bison-runtime pot generation. The YY_ stuff
3041 wasn't being captured.
3042 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3043 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3044 * runtime-po/POTFILES.in: Add data/push.c.
3045
3046 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3047
3048 Merge bootstrap changes from coreutils.
3049
3050 2006-09-28 Jim Meyering <jim@meyering.net>
3051
3052 Automatically generated dependencies are important even
3053 when all of the sources in a directory come from gnulib.
3054 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3055 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3056
3057 2006-09-23 Jim Meyering <jim@meyering.net>
3058
3059 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3060
3061 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3062
3063 * bootstrap: Add support for --force.
3064 (usage): New function. Describe usage less tersely.
3065 (CVS_only_file): New var.
3066
3067 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3068
3069 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3070 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3071 Adjust white space and comments to match GNU style better.
3072
3073 2006-09-20 Bob Rossi <bob@brasko.net>
3074
3075 * data/push.c (yyresult_get): Remove function.
3076 (YYPUSH_MORE): Add #define.
3077 (yypushparse): Modify return value.
3078
3079 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3080
3081 * stamp-h.in: Remove; no longer needed.
3082 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3083 Remove config.h, config.hin, intl (no longer created).
3084 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3085 stamp-h1.
3086
3087 Sync bootstrap from coreutils, as follows:
3088
3089 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3090
3091 * bootstrap (symlink_to_gnulib): New function.
3092 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3093 to copies-of-gnulib.
3094 (cp_mark_as_generated, slurp, gnulib_files):
3095 Avoid making a copy if it's the same as the old version.
3096 (gnulib_files): Add support for this variable (used by Bison).
3097
3098 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3099
3100 * src/getargs.c (usage): Rework to use conventions similar to
3101 coreutils, to make translation a bit easier and the code a bit
3102 smaller. Problem reported by Tim Van Holder.
3103
3104 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3105
3106 Use some of gnulib's new modules, taken from coreutils.
3107
3108 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3109 * bootstrap.conf: New file.
3110 (gnulib_modules): Add configmake, inttypes, unistd.
3111 (XGETTEXT_OPTIONS): Add complain, complain_at,
3112 fatal, fatal_at, warn, warn_at, unexpected_end.
3113 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3114 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3115 (gl_EARLY): Add.
3116 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3117 (gl_INIT): Add
3118 (GNULIB_AUTOCONF_SNIPPET): Remove.
3119 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3120 the pickiest.
3121 * lib/.cvsignore: Add inttypes_.h.
3122 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3123 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3124 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3125 no-longer-necessary initializations.
3126 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3127 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3128 use the unistd module.
3129 * src/system.h: Likewise.
3130 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3131 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3132 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3133 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3134 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3135 * src/system.h: Include inttypes.h unconditionally, now that we
3136 use the inttypes module. Don't bother to include stdint.h, since
3137 inttypes.h now does that for us.
3138 (LOCALEDIR): Remove, now that we use the configmake module.
3139 * src/getargs.c: Include configmake.h.
3140 * src/main.c: Likewise.
3141 * src/output.c: Likewise.
3142 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3143 not from $abs_top_builddir, since config.h moved.
3144
3145
3146 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3147 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3148
3149 * src/parse-gram.y (symbol_declaration): Don't put statements
3150 before declarations; it's not portable to C89.
3151 * src/scan-code.l (handle_action_at): Likewise.
3152
3153 * src/scan-code.l: Always initialize braces_level; the old code
3154 left it uninitialized and therefore had undefined behavior.
3155
3156 Don't attempt to redefine 'assert', since it runs afoul of
3157 systems where standard headers (mistakenly) include <assert.h>.
3158 Instead, define and use our own alternative, called 'aver'.
3159 * src/reader.c: Don't include assert.h, since we no longer
3160 use assert.
3161 * src/scan-code.l: Likewise.
3162 * src/system.h (assert): Remove, replacing with....
3163 (aver): New function, taking a bool arg. All uses changed.
3164 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3165 not merely an integer.
3166
3167 2006-09-15 Bob Rossi <bob@brasko.net>
3168
3169 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3170 * data/c.m4 (YYPUSH): New.
3171 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3172 * src/getargs.c (push_parser): New var.
3173 * src/getargs.h (push_parser): New declaration.
3174 * src/output.c (prepare): Add macro insertion of `push_flag'.
3175 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3176 (prologue_declaration): Parse %push-parser.
3177 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3178 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3179 list of removed lines from the traces observed.
3180 (AT_CHECK_CALC_LALR): Added push parser tests.
3181
3182 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3183
3184 * NEWS: Version 2.3a.
3185 * configure.ac (AC_INIT): Likewise.
3186
3187 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3188 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3189 due to header ordering dependencies. I don't know why the #define
3190 was there.
3191
3192 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3193 runtime cost when YYDEBUG is not defined, and so that some tests
3194 that used to fail now work. Problem and initial suggestion by
3195 Paolo Bonzini.
3196 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3197 * data/glr.cc (b4_parser_class_name):
3198 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3199 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3200 (yydebug_) [YYDEBUG]: New member.
3201 (yycdebug_): Now defined only if YYDEBUG.
3202 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3203 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3204 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3205 if YYYDEBUG.
3206 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3207 Define only if YYDEBUG.
3208 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3209 set_debug_level.
3210 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3211 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3212 AT_CHECK_CALC_GLR_CC that are working now.
3213
3214 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3215
3216 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3217 We don't need them in glr.cc, and glr.c defines them.
3218 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3219 assumes that defining it to anything is the same as defining
3220 it to 1. Problem reported by Paolo Bonzini.
3221
3222 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3223
3224 * data/c.m4 (b4_null, b4_case): Define.
3225 * src/output.c (prepare_symbols): Use b4_null.
3226 (user_actions_output): Use b4_case.
3227
3228 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3229
3230 * data/glr.c (b4_shared_declarations): Put start-header first,
3231 before any #includes that we generate, so that feature-test
3232 macros work. Problem reported by Michael Deutschmann in
3233 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3234 * data/lalr1.cc: Likewise.
3235 * doc/bison.texinfo (Prologue): Document that feature-test macros
3236 should be defined before any Bison declarations.
3237 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3238 that depend on location.hh after, not before, Bison decls, since
3239 we now include location.hh after the first user prologue.
3240
3241 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3242 Sander Brandenburg in
3243 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3244 Also, fix minor white space and comment issues.
3245 (Prologue): Mention that it's better to define feature-test macros
3246 before Bison declarations. Problem reported by Michael Deutschmann.
3247
3248 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3249 by Jim Meyering.
3250 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3251 This adjusts to recent gnulib changes.
3252
3253 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3254
3255 Finish implementation of per-type %destructor/%printer. Discussed
3256 starting at
3257 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3258 and
3259 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3260 * NEWS (2.3+): Add a description of this feature to the default
3261 %destructor/%printer description.
3262 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3263 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3264 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3265 list node contains a semantic type.
3266 * src/symtab.c, src/symtab.h: Extend with a table that associates
3267 semantic types with their %destructor's and %printer's.
3268 (semantic_type_from_uniqstr, semantic_type_get,
3269 semantic_type_destructor_set, semantic_type_printer_set): New functions
3270 composing the public interface of that table.
3271 (symbol_destructor_get, symbol_destructor_location_get,
3272 symbol_printer_get, symbol_printer_location_get): If there's no
3273 per-symbol %destructor/%printer, look up the per-type before trying
3274 the default.
3275 * tests/actions.at (Per-type %printer and %destructor): New test case.
3276 * tests/input.at (Default %printer and %destructor redeclared):
3277 Extend to check that multiple occurrences of %symbol-default in a
3278 single %destructor/%printer declaration is an error.
3279 (Per-type %printer and %destructor redeclared, Unused values with
3280 per-type %destructor): New test cases.
3281
3282 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3283
3284 Require default %destructor/%printer to be declared using
3285 %symbol-default instead of an empty symbol list, and start working on
3286 new per-type %destructor/%printer. Discussed at
3287 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3288 * NEWS (2.3+): Add %symbol-default to example.
3289 * bison.texinfo (Freeing Discarded Symbols): Likewise.
3290 (Table of Symbols): Add entry for %symbol-default.
3291 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3292 (generic_symlist, generic_symlist_item): New nonterminals for creating
3293 a list in which each item is a symbol, semantic type, or
3294 %symbol-default.
3295 (grammar_declaration): Use generic_symlist in %destructor and %printer
3296 declarations instead of symbols.1 or an empty list.
3297 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3298 for changes to symbol_list.
3299 * src/reader.c: Update for changes to symbol_list.
3300 * src/scan-code.l: Likewise.
3301 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3302 * src/symlist.c, src/symlist.h: Extend such that a list node may
3303 represent a semantic type or a %symbol-default in addition to just an
3304 ordinary symbol. Add switched functions for setting %destructor's and
3305 %printer's.
3306 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3307 %destructor/%printer declarations.
3308
3309 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3310
3311 Whether the default %destructor/%printer applies to a particular symbol
3312 isn't a question of whether the user *declares* that symbol (in %token,
3313 for example). It's a question of whether the user by any means
3314 *defines* the symbol at all (by simply using a char token, for
3315 example). $end is defined by Bison whereas any other token with token
3316 number 0 is defined by the user. The error token is always defined by
3317 Bison regardless of whether the user declares it with %token, but we
3318 may one day let the user define error as a nonterminal instead.
3319 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3320 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3321 the meaning of "user-defined".
3322 * tests/actions.at (Default %printer and %destructor for user-declared
3323 end token): Rename to...
3324 (Default %printer and %destructor for user-defined end token): ...
3325 this.
3326
3327 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3328 computation of whether to apply the default, don't maintain a list of
3329 every Bison-defined symbol. Instead, just check for a first character
3330 of '$', which a user symbol cannot have, and check for the error token.
3331
3332 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3333
3334 Don't apply the default %destructor or %printer to the error token,
3335 $undefined, or $accept. This change fits the general rule that the
3336 default %destructor and %printer are only for user-declared symbols,
3337 and it solves several difficulties that are described in the new test
3338 cases listed below.
3339 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3340 * tests/actions.at (Default %printer and %destructor are not for error
3341 or $undefined, Default %printer and %destructor are not for $accept):
3342 New test cases.
3343
3344 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3345
3346 Allow %start after the first rule.
3347 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3348 when parsing the first rule.
3349 (check_and_convert_grammar): Search for it here after all grammar
3350 declarations have been parsed. Skip midrules, which have dummy LHS
3351 nonterminals.
3352 * src/symtab.c (symbol_is_dummy): New function.
3353 * src/symtab.h (symbol_is_dummy): Declare it.
3354 * tests/input.at (%start after first rule): New test.
3355
3356 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3357
3358 Redo some of the previous commit: add back the ability to use
3359 non-aliased/undeclared string literals since it might be useful to
3360 those declaring %token-table.
3361 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3362 commit: don't worry about complaints from symbols_pack.
3363 * src/symtab.c (symbol_new, symbol_class_set,
3364 symbol_check_alias_consistency): Undo changes in previous commit: count
3365 each string literal as a new symbol and token, assign it a symbol
3366 number, and don't complain about non-aliased string literals.
3367 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3368 and token counts but does still set aliased tokens to the same number,
3369 symbol_pack_processor now leaves empty slots in the symbols array.
3370 Remove those slots.
3371 * tests/regression.at (Undeclared string literal): Remove test case
3372 added in previous commit since non-aliased string literals are allowed
3373 again.
3374 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3375 remove unnecessary string literal declarations.
3376 * tests/sets.at (Firsts): Likewise.
3377
3378 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3379
3380 Don't allow an undeclared string literal, but allow a string literal to
3381 be used before its declaration.
3382 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3383 symbols_pack complained.
3384 * src/symtab.c (symbol_new): Don't count a string literal as a new
3385 symbol.
3386 (symbol_class_set): Don't count a string literal as a new token, and
3387 don't assign it a symbol number since symbol_make_alias does that.
3388 (symbol_make_alias): It's not necessary to decrement the symbol and
3389 token counts anymore. Don't assume that an alias declaration occurs
3390 before any uses of the identifier or string, and thus don't assert that
3391 one of them has the highest symbol number so far.
3392 (symbol_check_alias_consistency): Complain if there's a string literal
3393 that wasn't declared as an alias.
3394 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3395 symbol_pack asserts that every token has been assigned a symbol number
3396 although undeclared string literals have not.
3397 * tests/regression.at (String alias declared after use, Undeclared
3398 string literal): New test cases.
3399 (Characters Escapes, Web2c Actions): Declare string literals as
3400 aliases.
3401 * tests/sets.at (Firsts): Likewise.
3402
3403 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3404
3405 In the grammar scanner, STRING_FINISH unclosed constructs and return
3406 them to the parser in order to improve error messages.
3407 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3408 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3409 * tests/input.at (Unclosed constructs): New test case.
3410 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3411 seen.
3412
3413 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3414 unused global.
3415
3416 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3417
3418 Handle string aliases for character tokens correctly.
3419 * src/symtab.c (symbol_user_token_number_set): If the token has an
3420 alias, check and set its alias's user token number instead of its own,
3421 which is set to indicate the alias. Previously, every occurrence of
3422 the character token in the grammar overwrote that alias indicator with
3423 the character code.
3424 * tests/input.at (String aliases for character tokens): New test.
3425
3426 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3427
3428 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3429
3430 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3431
3432 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3433 to prevent failures when building on older platforms.
3434 Check for autopoint failure.
3435 Set XGETTEXT_OPTIONS to values that check for C format strings,
3436 so that translators are warned about them (this also helps
3437 prevent core dumps).
3438
3439 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3440 function, since it simplifies our code a bit.
3441
3442 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3443 rather than -W, so we don't get bogus warnings about sign comparisons.
3444 Add -Wpointer-arith, since that warning is useful (it reports code
3445 that does not conform to C89 and that some compilers reject).
3446 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3447 since it's no longer needed.
3448
3449 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3450
3451 Clean up scanners a bit.
3452 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3453 definitions so gcc won't warn when obstack_for_string is unused.
3454 * src/scan-code.l: config.h and system.h are already #include'd by
3455 scan-code-c.c, so get rid of them here.
3456 * src/scan-gram.l: Likewise.
3457 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3458 definitions rather than duplicating the rest of it.
3459 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3460
3461 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3462
3463 Suppress signed/unsigned comparison warnings for yycheck.
3464 * data/c.m4 (b4_safest_int_type): New macro.
3465 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3466 a signed int type, cast it to b4_safest_int_type first.
3467 * data/yacc.c: Likewise.
3468 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3469 also overwritten.
3470
3471 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3472
3473 * doc/bison.texinfo: Fix some typos.
3474
3475 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3476
3477 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3478 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3479
3480 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3481 the latest gnulib does this a different way.
3482 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3483 translation was patched, so stop omitting it.
3484
3485 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3486
3487 Enable declaration of default %printer/%destructor. Make the parser
3488 use these for all user-declared grammar symbols for which the user does
3489 not declare a specific %printer/%destructor. Thus, the parser uses it
3490 for token 0 if the user declares it but not if Bison generates it as
3491 $end. Discussed starting at
3492 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3493 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3494 and
3495 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3496 * NEWS (2.3+): Mention.
3497 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3498 declare a %destructor for a mid-rule's semantic value. It's just
3499 impossible to declare one specific to it.
3500 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3501 code. Describe default %destructor form.
3502 * src/parse-gram.y (grammar_declaration): Parse default
3503 %printer/%destructor declarations.
3504 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3505 and symbol_destructor_location_get rather than accessing the destructor
3506 and destructor_location members of struct symbol.
3507 (symbol_printers_output): Likewise but for %printer's.
3508 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3509 again.
3510 * src/symtab.c (default_destructor, default_destructor_location,
3511 default_printer, default_printer_location): New static global
3512 variables to record the default %destructor and %printer.
3513 (symbol_destructor_get, symbol_destructor_location_get,
3514 symbol_printer_get, symbol_printer_location_get): New functions to
3515 compute the appropriate %destructor and %printer for a symbol.
3516 (default_destructor_set, default_printer_set): New functions to set the
3517 default %destructor and %printer.
3518 * src/symtab.h: Prototype all those new functions.
3519 * tests/actions.at (Default %printer and %destructor): New test to
3520 check that the right %printer and %destructor are called, that they're
3521 not called for $end, and that $$ and @$ work correctly.
3522 (Default %printer and %destructor for user-declared end token): New
3523 test to check that the default %printer and %destructor are called for
3524 a user-declared end token.
3525 * tests/input.at (Default %printer and %destructor redeclared, Unused
3526 values with default %destructor): New tests to check related grammar
3527 warnings and errors.
3528
3529 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3530
3531 Clean up handling of %destructor for the end token (token 0).
3532 Discussed starting at
3533 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3534 and
3535 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3536
3537 Make the skeletons consistent in how they pop the end token and invoke
3538 its %destructor.
3539 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3540 state, which has token number 0, since this would invoke the
3541 %destructor for the end token.
3542 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3543 until after shifting the end token, or else it won't be popped.
3544 * data/yacc.c (yyparse): Likewise.
3545
3546 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3547 it's the end token. Upon termination, destroy an unshifted lookahead
3548 even when it's the end token.
3549 * data/lalr1.cc (yy::parser::parse): Likewise.
3550 * data/yacc.c (yyparse): Likewise.
3551
3552 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3553 value warnings for the end token when the user gives the end token a
3554 %destructor.
3555
3556 * tests/actions.at (Printers and Destructors): Test all the above.
3557
3558 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3559
3560 Update to latest gnulib and gettext versions.
3561 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3562 Add fopen-safer.
3563 (gnulib_files): Add m4/warning.m4. Don't worry about files
3564 overwritten by autopoint.
3565 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3566 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3567 rejects them.
3568 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3569 so that we can remove the intl files at a better time.
3570 (intl_files_to_remove): Remove aclocal.m4, since it gets
3571 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3572 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3573 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3574 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3575 Remove datarootdir hack; no longer needed.
3576 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3577 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3578 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3579 strdup.h.
3580 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3581 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3582
3583 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3584
3585 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3586 it with --assume-autoconf='latest-stable'.
3587
3588 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3589
3590 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3591 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3592 YYSTYPE' and `{'.
3593 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3594 those from muscle_tab.c since the old ones are misleading.
3595
3596 2006-07-13 Akim Demaille <akim@epita.fr>
3597
3598 Support %define "KEY" {VALUE}.
3599 * src/scan-code.h, src/scan-code.l (translate_action)
3600 (translate_rule_action, translate_symbol_action, translate_code):
3601 Return char *, not const char *.
3602 * src/parse-gram.y (declaration): Rename as...
3603 (prologue_declaration): this.
3604 (string_content): Remove this nonterminal, use STRING.
3605 (braceless, content, content.opt): New nonterminal.
3606 Use them.
3607 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3608 as value.
3609 * src/scan-gram.l (getargs.h): Don't include it.
3610
3611 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3612
3613 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3614 rather than a for-loop that declares a local bool variable. This
3615 should work around a compatibility problem with a Cray x1e C++
3616 compiler reported by Hung Nguyen in
3617 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3618 The for-loop was introduced in the 2004-11-17 change but I don't
3619 know why it was needed.
3620
3621 2006-07-12 Akim Demaille <akim@epita.fr>
3622
3623 * data/c.m4: Comment changes.
3624
3625 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
3626
3627 * src/complain.c (error_message, ERROR_MESSAGE): New.
3628 To factor...
3629 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3630 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3631
3632 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3633
3634 * NEWS: Instead of %union, you can define and use your own union type
3635 YYSTYPE if your grammar contains at least one <type> tag.
3636 Your YYSTYPE need not be a macro; it can be a typedef.
3637 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3638 (Union Decl, Decl Summary): Document this.
3639 * data/glr.c (YYSTYPE): Implement this.
3640 * data/glr.cc (YYSTYPE): Likewise.
3641 * data/lalr1.cc (YYSTYPE): Likewise.
3642 * data/yacc.c (YYSTYPE): Likewise.
3643 * src/output.c (prepare): Output tag_seen_flag.
3644 * src/parse-gram.y (declaration, grammar_declaration):
3645 Use 'union_seen' rather than 'typed' to determine whether
3646 %union has been seen, since grammars can now be typed without
3647 %union.
3648 (symbol_declaration, type.opt, symbol_def):
3649 Keep track of whether a tag has been seen.
3650 * src/reader.c (union_seen, tag_seen): New vars.
3651 (typed): remove.
3652 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3653 * src/scan-code.l (untyped_var_seen): New variable.
3654 (handle_action_dollar): Adjust to above changes.
3655 (handle_action_dollar, handle_action_at):
3656 Improve overflow checking for outlandish numbers.
3657 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3658 avoid new diagnostics generated by above changes.
3659 * tests/regression.at (YYSTYPE typedef): Add test to check
3660 for type tags without %union.
3661
3662 * src/symlist.c (symbol_list_length): Return int, not unsigned
3663 int, since callers expect int. This may need to get revisited
3664 once we have proper integer overflow checking.
3665
3666 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3667 object is now static.
3668
3669 * src/getargs.c (flags_argmatch): Return void, not int,
3670 to pacify ./configure --enable-gcc-warnings.
3671
3672 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3673 since last_string is already defined to FLEX_PREFIX (last_string).
3674
3675 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3676
3677 Implement --warnings/-W.
3678 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3679 replaced by...
3680 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3681 Adjust callers.
3682 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3683 (warnings_args, warnings_types): New.
3684 (getargs, short_options, long_options): Accept -W/--warnings.
3685 Sort the options by alphabetical order, upper case letter right
3686 before its lower case.
3687
3688 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3689
3690 Change %merge result type clash warnings to errors. Discussed at
3691 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3692 * src/reader.c (record_merge_function_type): Use complain_at.
3693 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3694 declared later): Update test case results.
3695
3696 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3697
3698 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3699 to be in alphabetical order.
3700 (trace_args): Spelling fixes.
3701
3702 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3703
3704 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3705 so they don't collide with user-defined macros.
3706 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3707 this was never guaranteed, and now that we're using gnulib stdint,
3708 which defines int_fast16_t to long int, the problem is exposed.
3709
3710 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3711
3712 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3713 need the full POSIX semantics (and weren't implementing them
3714 anyway).
3715
3716 Adjust to Autoconf 2.60 and today's gnulib.
3717 * bootstrap (gnulib_modules): Add stdint.
3718 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3719 no longer copies it.
3720 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3721 since stdint needs the former and wcwidth (which is now required
3722 by mbswidth) needs the latter.
3723 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3724 work around a compatibility glitch between gettext 0.14.6 and
3725 Autoconf 2.60.
3726 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3727 Do not check for uintptr_t, since new stdint module does the right
3728 thing.
3729 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3730 Add stdint.h, stdint_.h, wcwidth.h.
3731 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3732 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3733 stdint.m4, wchar_t.m4, wcwidth.m4.
3734 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3735 usual order for ../lib/*.h files.
3736 (file_name_split): Use last_component, not base_name, to adjust
3737 to gnulib changes.
3738 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3739 for ../lib/*.h files.
3740 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3741 Define unconditionally, since we now assume the stdint module.
3742 * src/scan-skel.l: Include <dirname.h>.
3743 (BASE_QPUTS): Use last_component, not base_name.
3744 * src/system.h: Include <unlocked-io.h> in the usual order
3745 for ../lib/*.h files. Include <stdint.h> unconditionally,
3746 since we now use the stdint module.
3747 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3748 HAVE_UINTPTR_T, since we now use the stdint module.
3749 (base_name): Remove decl, since files now include <dirname.h>
3750 to get the decl.
3751
3752 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3753
3754 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3755 New, default to 1.
3756 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3757 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3758 default.
3759 * tests/calc.at: Adjust.
3760
3761 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3762
3763 * data/c.m4 (b4_basename): New.
3764 (b4_syncline): Also output the location of its invocation (from
3765 the skeleton).
3766 (b4_user_action, b4_define_user_action, b4_user_actions)
3767 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3768 (b4_user_stype): New.
3769 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3770
3771 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3772
3773 In the grammar file, the first column is 1 not 0 on the first line as
3774 on every other line.
3775 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3776 * tests/input.at (Torturing the Scanner): Update output.
3777
3778 * src/scan-gram.l (scanner_cursor): Declare it static.
3779
3780 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3781
3782 In warnings, say "previous declaration" rather than "first
3783 declaration".
3784 * src/symtab.c (redeclaration): Do that here.
3785 * src/reader.c (record_merge_function_type): In the case of a result
3786 type clash, report the previous declaration rather than the very first
3787 one in the grammar file.
3788 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3789 declared later): Add a third declaration to check this behavior.
3790 * tests/input.at (Incompatible Aliases): Update output.
3791
3792 2006-06-27 Akim Demaille <akim@epita.fr>
3793
3794 * doc/Doxyfile.in: New.
3795 * doc/Makefile.am: Use it.
3796 * src/lalr.h, src/symtab.h: Initial doxygenation.
3797
3798 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3799
3800 Don't miss %merge result type warnings just because the LHS types are
3801 declared after the %merge. This continues the effort of the previous
3802 patch.
3803 * src/reader.c (get_merge_function): Don't set the merger type yet.
3804 (record_merge_function_type): New function for setting the merger type
3805 and checking for clashes.
3806 (grammar_current_rule_merge_set): Set the location of the %merge for
3807 the current rule.
3808 (packgram): Invoke record_merge_function_type for each rule now that
3809 all symbol type declarations have been parsed.
3810 * src/reader.h (merger_list.type_declaration_location): New member
3811 storing the location of the first %merge from which the type for this
3812 merging function was derived.
3813 * src/symlist.h (symbol_list.merger_declaration_location): New member
3814 storing the location of a rule's %merge, if any.
3815 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3816 declared later): New test to catch the error fixed by the above patch.
3817
3818 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3819
3820 Get action warnings (grammar_rule_check) right even when symbol
3821 declarations appear after the rules. Discussed at
3822 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3823 and
3824 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3825 Don't mistake the type of $$ in a midrule to be that of its parent
3826 rule's $$.
3827 * src/reader.c (grammar_current_rule_end): Don't invoke
3828 grammar_rule_check yet since not all symbol declarations may have been
3829 parsed yet.
3830 (grammar_midrule_action): Likewise.
3831 Don't record whether the midrule's $$ has been used yet since actions
3832 haven't been translated yet.
3833 Record the midrule's parent rule and its RHS index within the parent
3834 rule.
3835 (grammar_current_rule_action_append): Don't translate the action yet
3836 since not all symbol declarations may have been parsed yet and, thus,
3837 warnings about types for $$, $n, @$, and @n can't be reported yet.
3838 (packgram): Translate the action and invoke grammar_rule_check now that
3839 all symbol declarations have been parsed.
3840 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3841 after parsing the entire grammar file, the symbol list here in the case
3842 of a midrule is actually the midrule's empty RHS, so reference its
3843 parent rule's RHS where necessary.
3844 On the other hand, now that you can already know it's a midrule, you
3845 aren't forced to think $$ has the same type as its parent rule's $$.
3846 (handle_action_at): In the case of a midrule, reference the parent rule
3847 where necessary.
3848 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3849 members.
3850 (symbol_list_length): Now that this is invoked after all rules have
3851 been parsed, a NULL symbol (rather than a NULL symbol list node)
3852 terminates a rule. symbol_list_print already does this correctly.
3853 * src/symlist.h (symbol_list.midrule_parent_rule,
3854 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3855 remember their relationships with their parents.
3856 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3857 fixed by the above patch.
3858 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3859 implementing...
3860 (Unused values): ... this old test case and...
3861 (Unused values before symbol declarations): ... this new test case.
3862 This one is the same as `Unused values' except that all symbol
3863 declarations appear after the rules in order to catch the rest of the
3864 errors fixed by the above patch.
3865
3866 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3867
3868 More cleanup.
3869 * src/reader.c (current_rule): Declare it static since it's no longer
3870 used outside this file.
3871 (grammar_current_rule_action_append): Remove redundant arguments from
3872 translate_rule_action invocation.
3873 * src/reader.h (current_rule): Remove this unused extern.
3874 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
3875 * src/scan-code.l (translate_rule_action): Likewise.
3876
3877 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
3878
3879 Clean up yesterday's patch.
3880 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
3881 to...
3882 * src/reader.c (grammar_current_rule_action_append): ... here for
3883 consistency with grammar_current_rule_symbol_append.
3884 * tests/regression.at (Braced code in declaration in rules section):
3885 Make yyerror and yylex static as usual.
3886
3887 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
3888
3889 Fix bug that mistakes braced code in a declaration in the rules section
3890 to be a rule action. Mentioned at
3891 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
3892 * src/scan-gram.l: Move midrule action detection from the start of the
3893 scanning of any braced code to...
3894 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
3895 action. For readability, use $2 and @2 rather than the equivalent
3896 global variables.
3897 * tests/regression.at (Braced code in declaration in rules section):
3898 New test to catch the error fixed by the above patch.
3899
3900 Work on code readability some.
3901 * src/scan-code.l (current_rule): Get rid of this misleading and
3902 redundant declaration: it's actually extern'ed in reader.h.
3903 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
3904 translate_action): Add a rule argument and use it instead of the global
3905 current_rule.
3906 (translate_rule_action): This already receives current_rule through an
3907 argument, so pass it on to translate_action instead of assigning
3908 current_rule to current_rule.
3909 (translate_symbol_action, translate_code): Pass rule = NULL to
3910 translate_action.
3911
3912 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
3913
3914 Rename %before-definitions to %start-header and %after-definitions to
3915 %end-header. Don't use these declarations to separate pre-prologue
3916 blocks from post-prologue blocks. Add new order-independent
3917 declarations %before-header and %after-header as alternatives to the
3918 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
3919 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
3920 * NEWS (2.3+): Update for these changes.
3921 * data/glr.c (b4_before_definitions): Update to...
3922 (b4_start_header): ... this.
3923 (b4_after_definitions): Update to...
3924 (b4_end_header): ... this.
3925 * data/glr.cc: Likewise.
3926 * data/lalr1.cc: Likewise.
3927 * data/yacc.c: Likewise.
3928 * doc/bison.texinfo (The prologue): Update names, and replace remaining
3929 prologue blocks with %*-header declarations.
3930 (Calc++ Parser): Likewise.
3931 (Decl Summary): Update names.
3932 (Table of Symbols): Update description.
3933 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
3934 (PERCENT_END_HEADER): ... this.
3935 (PERCENT_BEFORE_DEFINITIONS): Update to...
3936 (PERCENT_START_HEADER): ... this.
3937 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3938 (declaration): Update token names and m4 macro names.
3939 When parsing %end-header and %start-header, invoke translate_code
3940 before muscle_code_grow, and no longer set global booleans to remember
3941 whether these declarations have been seen.
3942 Parse new %after-header and %before-header.
3943 * src/reader.c (before_definitions, after_definitions): Remove.
3944 (prologue_augment): Accept a new bool argument to specify whether to
3945 augment the pre-prologue or post-prologue.
3946 * src/reader.h (before_definitions, after_definitions): Remove these
3947 extern's.
3948 (prologue_augment): Add new bool argument.
3949 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
3950 (PERCENT_END_HEADER): ... this.
3951 (PERCENT_BEFORE_DEFINITIONS): Update to...
3952 (PERCENT_START_HEADER): ... this.
3953 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
3954 * tests/actions.at (Printers and Destructors): Update names.
3955
3956 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
3957
3958 Add comparison operators for C++ location classes. Discussed at
3959 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
3960 * data/c++.m4 (b4_define_location_comparison): New boolean %define
3961 declaration indicating whether filename_type has an operator==. If
3962 filename_type is `std::string', it defaults to `1', `0' otherwise.
3963 * data/location.cc: Iff b4_define_location_comparison is `1', add
3964 operator== and operator!= for class position and for class location.
3965
3966 Some minor fixes.
3967 * src/scan-action.l: Remove unused file.
3968 * src/symtab.c (symbol_printer_set): Use printer_location not
3969 destructor_location.
3970 * src/symtab.h (struct symbol): Replace incorrect source comment for
3971 printer members.
3972 * tests/input.at (Incompatible Aliases): Update output with correct
3973 printer location.
3974
3975 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
3976
3977 Don't put the pre-prologue in the header file. For the yacc.c code
3978 file and the glr.c header and code files, move the pre-prologue before
3979 the token definitions. Add new %before-definitions and
3980 %after-definitions to declare code that will go in both the header file
3981 and code file. Discussed at
3982 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
3983 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
3984 and
3985 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
3986 * NEWS (2.3+): Describe these changes.
3987 * data/glr.c (b4_pre_prologue): Move from within to before...
3988 (b4_shared_declarations): ... this.
3989 Add new b4_before_definitions before b4_token_enums.
3990 Add new b4_after_definitions at the end.
3991 * data/glr.cc (b4_pre_prologue): Replace with...
3992 (b4_before_definitions): ... this in the header file.
3993 (b4_after_definitions): New near the end of the header file.
3994 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
3995 code file right before including the header file.
3996 (b4_before_definitions): New in the previous position of
3997 b4_pre_prologue in the header file.
3998 (b4_after_definitions): New near the end of the header file.
3999 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4000 (b4_token_enums_defines): In the code file, move to right before
4001 YYSTYPE for consistency with the header file.
4002 (b4_before_definitions): New right before b4_token_enums_defines in
4003 both the header and code file.
4004 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4005 header and code file.
4006 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4007 of prologues for %union dependencies.
4008 (Decl Summary): In %defines description, mention the effect of
4009 %before-definitions and %after-definitions on the header file.
4010 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4011 than in the pre-prologue so that make check succeeds.
4012 (Table of Symbols): Add entries for %before-definitions and
4013 %after-definitions.
4014 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4015 %before-definitions.
4016 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4017 (declaration): Parse those declarations and append to
4018 b4_before_definitions and b4_after_definitions, respectively.
4019 * src/reader.c (before_definitions, after_definitions): New bools to
4020 track whether those declarations have been seen.
4021 (prologue_augment): Add to the post-prologue if %union,
4022 %before-definitions, or %after-definitions has been seen.
4023 * src/reader.h (before_definitions, after_definitions): New extern's.
4024 * src/scan-gram.l: Scan the new declarations.
4025 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4026 prologue block in a %before-definitions or a %after-definitions based
4027 on whether the %union is declared.
4028 * tests/regression.at (Early token definitions with --yacc, Early token
4029 definitions without --yacc): Move tests for token definitions into the
4030 post-prologue since token names are no longer defined in the
4031 pre-prologue.
4032
4033 2006-06-20 Akim Demaille <akim@epita.fr>
4034
4035 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4036 (symbol_get): Use it.
4037 * src/parse-gram.y: Use it.
4038
4039 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4040
4041 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4042 build succeeds when configured with --enable-gcc-warnings.
4043
4044 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4045
4046 * src/parse-gram.y (char_name): New function.
4047 (CHAR, STRING, string_content): For %printer, properly escape.
4048 (ID): Prefer fputs to fprintf.
4049 (id): Reindent to be consistent with other rules.
4050 Properly quote char.
4051
4052 The Translation Project changed its way of publishing translations
4053 to maintainers. I haven't received any responses to my request
4054 for supporting the old way, or for documenting the new way. I
4055 have modified 'bootstrap' to use screen scraping
4056 (in this case, HTML scraping). This is unreliable and inelegant,
4057 but I don't see any better way. Yuck.
4058 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4059 (get_translations): New function, which uses HTML scraping to
4060 deduce locations of latest translations.
4061 Use this function to grab both bison and bison-runtime .po files.
4062 Don't bother priming the pump for the runtime-po domain any more,
4063 as it's now translated better than bison is.
4064
4065 2006-06-19 Akim Demaille <akim@epita.fr>
4066
4067 * src/scan-gram.l: No longer "parse" things after `%union' until
4068 `{'. Rather, return a single "%union" token.
4069 No longer make symbols: return strings, and leave the conversion
4070 to symbols to the parser.
4071 (SC_PRE_CODE, token_type): Remove.
4072 * src/parse-gram.y (%union): New field `character'.
4073 Sort tokens.
4074 (CHAR): New token.
4075 (ID, ID_COLON): Now that the scanner no longer makes them
4076 identifiers, adjust all uses to invoke symbol_get.
4077 (id_colon): New, wraps the conversion from string to symbol.
4078 (%union): Accept a possible union_name.
4079 (symbol): Now can be a char.
4080 * data/c.m4 (b4_union_name): Leave a default value.
4081 * data/glr.c, data/yacc.c: Use it.
4082
4083 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4084
4085 For associating token numbers with token names for "yacc.c", don't use
4086 #define statements unless `--yacc' is specified; always use enum
4087 yytokentype. Most important discussions start at:
4088 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4089 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4090 and
4091 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4092 * NEWS (2.3+): Mention.
4093 * data/c.m4 (b4_yacc_if): New.
4094 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4095 token #define's.
4096 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4097 on token name definitions.
4098 * src/getargs.c (usage): Capitalize `Yacc' in English.
4099 * src/output.c (prepare): Define b4_yacc_flag.
4100 * tests/regression.at (Early token definitions): Test that tokens names
4101 are defined before the pre-prologue not just before the post-prologue.
4102 Remove this test case and copy to...
4103 (Early token definitions with --yacc): ... this to test #define's.
4104 (Early token definitions without --yacc): ... and this to test enums.
4105
4106 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4107
4108 * NEWS: Reword the post-2.3 change to not be so optimistic about
4109 removing the old "look-ahead" spelling.
4110 Update previous look-ahead/lookahead change reports.
4111 * REFERENCES: look-ahead -> lookahead (since that's
4112 what he actually wrote).
4113 * doc/refcard.tex: look ahead -> lookahead,
4114 look-ahead -> lookahead
4115
4116 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4117
4118 For consistency, use `lookahead' instead of `look-ahead' or
4119 `look_ahead'. Discussed starting at
4120 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4121 and then at
4122 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4123 * NEWS: For the next release, note the change to `--report'.
4124 * TODO, doc/bison.1: Update English.
4125 * doc/bison.texinfo: Update English.
4126 (Understanding Your Parser, Bison Options): Document as
4127 `--report=lookahead' rather than `--report=look-ahead'.
4128 * src/conflicts.c: Update English in comments.
4129 (lookahead_set): Rename from look_ahead_set.
4130 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4131 (resolve_sr_conflict): Rename local look_ahead_tokens to
4132 lookahead_tokens, and update other uses.
4133 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4134 count_rr_conflicts, conflicts_free): Update uses.
4135 * src/getargs.c (report_args): Move "lookahead" before alternate
4136 spellings.
4137 (report_types): Update uses.
4138 (usage): For `--report' usage description, state `lookahead' spelling
4139 rather than `look-ahead'.
4140 * src/getargs.h (report.report_lookahead_tokens): Rename from
4141 report_look_ahead_tokens.
4142 * src/lalr.c: Update English in comments.
4143 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4144 (state_lookahead_tokens_count): Rename from
4145 state_look_ahead_tokens_count.
4146 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4147 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4148 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4149 Update other uses.
4150 Update English in output.
4151 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4152 * src/print.c: Update English in comments.
4153 (lookahead_set): Rename from look_ahead_set.
4154 (print_reduction): Rename argument lookahead_token from
4155 look_ahead_token.
4156 (print_core, state_default_rule, print_reductions, print_results):
4157 Update uses.
4158 * src/print_graph.c: Update English in comments.
4159 (print_core): Update uses.
4160 * src/state.c: Update English in comments.
4161 (reductions_new): Update uses.
4162 (state_rule_lookahead_tokens_print): Rename from
4163 state_rule_look_ahead_tokens_print, and update other uses.
4164 * src/state.h: Update English in comments.
4165 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4166 (state_rule_lookahead_tokens_print): Rename from
4167 state_rule_look_ahead_tokens_print.
4168 * src/tables.c: Update English in comments.
4169 (conflict_row, action_row): Update uses.
4170 * tests/glr-regression.at
4171 (Incorrect lookahead during deterministic GLR,
4172 Incorrect lookahead during nondeterministic GLR): Rename
4173 print_look_ahead to print_lookahead.
4174 * tests/torture.at: Update English in comments.
4175 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4176 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4177 (Many lookahead tokens): Update uses.
4178 * data/glr.c: Update English in comments.
4179 * lalr1.cc: Likewise.
4180 * yacc.c: Likewise.
4181 * src/conflicts.h: Likewise.
4182 * src/lalr.h: Likewise.
4183 * src/main.c: Likewise.
4184 * src/output.c: Likewise.
4185 * src/parse-gram.c: Likewise.
4186 * src/tables.h: Likewise.
4187 * tests/calc.at: Likewise.
4188
4189 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4190
4191 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4192
4193 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4194
4195 * TODO: Add request from Nelson H. F. Beebe to be able to install
4196 Bison without installing the yacc script.
4197
4198 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4199
4200 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4201 and yytext if they're already #define'd.
4202 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4203 * src/scan-code-c.c: ... here.
4204 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4205 <config.h>.
4206
4207 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4208
4209 Get Bison to build again when configured with --enable-gcc-warnings.
4210 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4211 missing #include's.
4212 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4213 loc argument as it shadows a global.
4214 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4215 invocation.
4216
4217 * src/.cvsignore: Add scan-code.c.
4218
4219 2006-06-07 Akim Demaille <akim@epita.fr>
4220
4221 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4222 to...
4223 * src/scan-code.l: here.
4224 * tests/input.at (Torturing the Scanner): Fix another location
4225 error.
4226
4227 2006-06-07 Akim Demaille <akim@epita.fr>
4228
4229 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4230
4231 2006-06-06 Akim Demaille <akim@epita.fr>
4232
4233 Extract the parsing of user actions from the grammar scanner.
4234 As a consequence, the relation between the grammar scanner and
4235 parser is much simpler. We can also split "composite tokens" back
4236 into simple tokens.
4237 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4238 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4239 rename as...
4240 * src/location.h, src/location.c (add_column_width)
4241 (location_compute): these.
4242 Fix the column count: the initial column is 0.
4243 (location_print): Be robust to ending column being 0.
4244 * src/location.h (boundary_set): New.
4245 * src/main.c: Adjust to scanner_free being renamed as
4246 gram_scanner_free.
4247 * src/output.c: Include scan-code.h.
4248 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4249 Use boundary_set.
4250 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4251 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4252 which is now, again, a separate token.
4253 Adjust all dependencies.
4254 Whereever actions with $ and @ are used, use translate_code.
4255 (action): Remove this nonterminal which is now useless.
4256 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4257 (grammar_current_rule_action_append): Use translate_code.
4258 (packgram): Bound check ruleno, itemno, and rule_length.
4259 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4260 (last_string, last_braced_code_loc, max_left_semantic_context)
4261 (scanner_initialize, scanner_free, scanner_last_string_free)
4262 (gram_out, gram_lineno, YY_DECL_): Move to...
4263 * src/scan-gram.h: this new file.
4264 (YY_DECL): Rename as...
4265 (GRAM_DECL): this.
4266 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4267 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4268 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4269 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4270 Move these declarations, and...
4271 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4272 these to...
4273 * src/flex-scanner.h: this new file.
4274 * src/scan-gram.l (rule_length, rule_length_overflow)
4275 (increment_rule_length): Remove.
4276 (last_braced_code_loc): Rename as...
4277 (gram_last_braced_code_loc): this.
4278 Adjust to the changes of the parser.
4279 Move all the handling of $ and @ into...
4280 * src/scan-code.l: here.
4281 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4282 (handle_action_dollar, handle_action_at): Move to...
4283 * src/scan-code.l: here.
4284 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4285 scan-code.h, scan-code-c.c, scan-gram.h.
4286 (EXTRA_bison_SOURCES): Add scan-code.l.
4287 (BUILT_SOURCES): Add scan-code.c.
4288 (yacc): Be robust to white spaces.
4289
4290 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4291 * tests/regression.at: Adjust the column numbers.
4292 * tests/regression.at: Adjust the error message.
4293
4294 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4295
4296 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4297 Use Akim's wording from
4298 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4299
4300 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4301
4302 Between Bison releases, manually append `+' to the previous Bison
4303 release number, and use that as a signal to automatically print the
4304 ChangeLog's CVS Id keyword from --version. Discussed starting at
4305 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4306 * ChangeLog: Add Id header.
4307 * configure.ac (AC_INIT): Append `+' to `2.3'.
4308 * src/.cvsignore: Add revision.c.
4309 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4310 (BUILT_SOURCES): Add revision.c.
4311 (revision.c): New target rule. This file defines a new global variable
4312 named revision. It initializes it with either the Id from ChangeLog
4313 or, if VERSION doesn't contain `+', with the empty string.
4314 * src/getargs.c (version): Print the value of revision.
4315 * src/revision.h: Extern revision.
4316
4317 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4318
4319 * NEWS: Version 2.3.
4320 * configure.ac (AC_INIT): Likewise.
4321
4322 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4323
4324 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4325 with no arguments, not as an object-like macro. This is for
4326 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4327 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4328 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4329 Document this.
4330
4331 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4332
4333 * src/getargs.c (usage): Back out yesterday's modification of the
4334 --help output so that we don't have to wait for translation before
4335 releasing 2.3.
4336
4337 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4338
4339 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4340 Problem reported by Akim Demaille.
4341
4342 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4343
4344 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4345
4346 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4347
4348 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4349 generated source code. Problem reported by Frans Englich in
4350 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4351
4352 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4353
4354 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4355 shell, not within 'make', so that 'make' by an ordinary builder
4356 (using GNU make) does not worry about configuring gzip. This also
4357 works around a bug reported independently by Keith Thompson and by
4358 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4359 stderr rather than stdout, messing up the build logs.
4360
4361 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4362
4363 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4364 to make sure that YYID will never be unused. This fixes a 'make
4365 maintainer-check' failure caused by the recent changes to the 'Trivial
4366 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4367 not used.
4368 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4369
4370 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4371
4372 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4373 state before an empty RHS is always resolved here. Only the location
4374 of that state is guaranteed to be resolved, and that's enough. This
4375 fixes the remaining bug reported by Derek M. Jones in
4376 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4377 * tests/glr-regression.at (Uninitialized location when reporting
4378 ambiguity): Test the above case.
4379 Also, the embedded comments in this test case claim it checks the case
4380 of an empty RHS that has inherited the initial location. However, the
4381 corresponding LHS was already resolved, so yyresolveLocations didn't
4382 actually have reason to modify it. Fix this by forcing
4383 nondeterministic operation at the beginning of the parse.
4384
4385 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4386
4387 * data/c.m4 (b4_yy_symbol_print_generate):
4388 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4389 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4390 of the bugs reported today by Derek M Jones in
4391 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4392 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4393 defined to be a type name without parens or brackets.
4394 (Location Type): Similarly for YYLTYPE.
4395 * tests/regression.at (Trivial grammars): Put in a test for this
4396 bug that will be caught by 'make maintainer-check' (though not,
4397 alas, by 'make check' unless your compiler is picky).
4398
4399 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4400
4401 * NEWS: Version 2.2.
4402 * configure.ac (AC_INIT): Likewise.
4403
4404 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4405
4406 * data/glr.c (yyreportTree): Make room in yystates for the state
4407 preceding the RHS. This fixes the segmentation fault reported by Derek
4408 M. Jones in
4409 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4410 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4411 to the user. Reported for yyreportTree by Derek M. Jones later in the
4412 same thread.
4413 * THANKS: Add Derek M. Jones.
4414 Update my email address.
4415 Fix typo in Steve Murphy's name.
4416
4417 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4418
4419 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4420 checking against YYLAST that caused the parser to miss a potential
4421 alternative in its diagnostic.
4422 Problem reported by Maria Jose Moron Fernandez in
4423 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4424 * data/lalr1.cc (yysyntax_error_): Likewise.
4425 * data/yacc.c (yysyntax_error): Likewise.
4426 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4427 tokens, in case we run into an older C compiler.
4428 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4429 Use them to check for the off-by-one error fixed above.
4430
4431 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4432 YYSIZE_T, not size_t.
4433 * tests/regression.at (Trivial grammars): New test, to catch
4434 the error fixed by the above patch.
4435
4436 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4437
4438 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4439 scheme.
4440 Reported by Steve Murphy.
4441
4442 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4443
4444 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4445 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4446
4447 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4448
4449 Implement --trace=m4.
4450 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4451 * src/output.c (output_skeleton): When set, pass -dV to m4.
4452
4453 Factor the handling of flags in m4.
4454 * src/output.c (prepare): Rename the muscle names debug, defines,
4455 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4456 * data/c.m4: Adjust.
4457 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4458 Use b4_define_flag_if to define other b4_FLAG_if macros.
4459 (b4_location_if): As a consequence, rename as...
4460 (b4_locations_if): this, for consistency.
4461 Adjust all the skeletons.
4462
4463 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4464
4465 * etc/bench.pm: Shorten bench names.
4466
4467 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4468
4469 * src/output.h, src/output.c (error_verbose): Move to...
4470 * src/getargs.h, src/getargs.c: here.
4471 Sort the flags.
4472 Adjust dependencies.
4473
4474 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4475
4476 * data/c.m4 (b4_copyright): Put the special exception for Bison
4477 skeletons here, so we don't have to put it in each skeleton. All
4478 uses changed. Suggested by Akim Demaille. Also, wrap the
4479 copyright notice, in case it is longer than 80 columns. Replace
4480 comma by newline after title.
4481
4482 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4483
4484 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4485 incompatibility, not a bug. Mention that it wasn't fixed as of
4486 flex 2.5.33.
4487
4488 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4489
4490 * examples/extexi: Enforce the precedence of concatenation over
4491 >>.
4492 Reported by Tommy Nordgren.
4493
4494 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4495
4496 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4497 with the member "token".
4498 Reported by Martin Nylin.
4499
4500 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4501
4502 * data/glr.c: Switch to Bison 2.2 special-exception language in
4503 the copyright notice. Use more-regular format for titles and
4504 copyright notices.
4505 * data/glr.cc: Likewise.
4506 * data/location.cc: Likewise.
4507 * data/yacc.cc: Likewise.
4508 * doc/bison.texinfo (Conditions): Document this.
4509 * NEWS: likewise. Upgrade version to 2.2.
4510
4511 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
4512
4513 * data/glr.cc: Remove dead code.
4514
4515 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4516
4517 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4518 that variable and the line breaks the bootstrap. Problem reported
4519 by Juan M. Guerrero.
4520
4521 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4522
4523 * doc/bison.texinfo (Multiple start-symbols): New.
4524
4525 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4526
4527 * etc/README, etc/bench.pl: New.
4528
4529 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
4530
4531 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4532 rule.
4533 Reported by Mickael Labau.
4534 * tests/input.at (Torturing the Scanner): Test it.
4535
4536 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4537
4538 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4539 Problem reported by Bob Rossi.
4540
4541 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4542
4543 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4544 and didn't really work.
4545 For the index, use @ifnotinfo, not @iftex.
4546 Minor cleanups of spacing and terminology.
4547
4548 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4549
4550 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4551 of AT_NAME_PREFIX when %name-prefix is not used.
4552
4553 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4554
4555 Apply --prefix to C++ skeletons too: they change the namespace.
4556 The test suite already exercize these cases.
4557 * data/c++.m4 (b4_namespace): New.
4558 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4559 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4560 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4561 * doc/bison.texinfo: Document it.
4562 (Option Cross Key): Use @multitable in all formats. It looks
4563 nicer, even in TeX outputs.
4564 (Rules): Use the same code whatever the output type is.
4565 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4566 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4567 * tests/calc.at: Use it, instead of hard coding `yy'.
4568
4569 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4570
4571 * TODO: Remove dead items.
4572
4573 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4574
4575 * doc/FAQ: Remove, merged into...
4576 * doc/bison.texinfo (FAQ): this.
4577 * doc/Makefile.am (EXTRA_DIST): Adjust.
4578
4579 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4580
4581 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4582 even if empty.
4583 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4584 * doc/bison.texinfo (Calc++ Scanner): Use it.
4585
4586 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4587
4588 Fix two nits reported by twlevo, plus one more that I discovered.
4589
4590 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4591 this is the usual Bison style.
4592 * src/location.h (location_print): Likewise.
4593
4594 * src/reader.h (token_name): Likewise.
4595
4596 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4597
4598 Fix some nits reported by twlevo.
4599 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4600 and "POSIX". Use more-modern syntax for URLs. Mention C++
4601 and ask for Java. Don't hardwire OS version numbers. Add
4602 copyright notice.
4603 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4604 * src/conflicts.c (solved_conflicts_obstack): Now static.
4605
4606 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4607
4608 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4609 page. Say "you can use it" not "you may use it" as on the web page;
4610 we're describing capabilities not granting permission.
4611
4612 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4613
4614 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4615 shadowing warnings. Use usual patter for iterating through RHS.
4616 * tests/glr-regression.at
4617 (Uninitialized location when reporting ambiguity):
4618 Modify yylex so that it uses its argument, rather than trying
4619 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4620 const char -> char const.
4621
4622 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4623 Don't use tabs inside commands; it messes up 'ps'.
4624 Problem reported by twlevo.
4625
4626 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4627
4628 * tests/glr-regression.at (Uninitialized location when reporting
4629 ambiguity): New test case.
4630 * data/glr.c (yyresolveLocations): New function, which uses
4631 YYLLOC_DEFAULT.
4632 (yyresolveValue): Invoke yyresolveLocations before reporting an
4633 ambiguity.
4634 * doc/bison.texinfo (Default Action for Locations): Note
4635 YYLLOC_DEFAULT's usage for ambiguity locations.
4636 (GLR Semantic Actions): Cross-reference those notes.
4637
4638 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4639
4640 * tests/glr-regression.at (Leaked semantic values when reporting
4641 ambiguity): Remove unnecessary union and type declarations.
4642 (Leaked lookahead after nondeterministic parse syntax error): New test
4643 case.
4644 * data/glr.c (yyparse): Check for zero stacks remaining before
4645 attempting to shift the lookahead so that you don't lose it.
4646
4647 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4648
4649 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4650 * tests/glr-regression.at (Leaked semantic values when reporting
4651 ambiguity): New test case.
4652 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4653 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4654 now unnecessary yystackp parameter.
4655 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4656 destructors can be called.
4657
4658 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4659 in existing testcases.
4660
4661 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4662
4663 Don't leak semantic values for parent RHS when a user action cuts the
4664 parser, and clean up related code a bit.
4665 * tests/glr-regression.at (Leaked merged semantic value if user action
4666 cuts parse): Rename to...
4667 (Leaked semantic values if user action cuts parse): ... this. Add check
4668 for leaked parent RHS values.
4669 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4670 between an unresolved state (non-empty chain of semantic options) and
4671 an incomplete one (signaled by an empty chain).
4672 (yyresolveStates): Document the interface. Move all manipulation of a
4673 successfully or unsuccessfully resolved yyGLRState to...
4674 (yyresolveValue): ... here so that yyresolveValue always leaves a
4675 yyGLRState with consistent data and thus is easier to understand.
4676 Remove the yyvalp and yylocp parameters since they are always just
4677 taken from the yys parameter. When reporting a discarded merged value
4678 in debugging output, note that it is incompletely merged. Document the
4679 interface.
4680 (yyresolveAction): If resolving any of the RHS states fails, destroy
4681 them all rather than leaking them. Thus, as long as user actions are
4682 written to clean up the RHS correctly, yyresolveAction always cleans up
4683 the RHS of a semantic option. Document the interface.
4684
4685 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4686
4687 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4688 led to a segmentation fault in GNU Pascal. Problem reported
4689 by Waldek Hebisch.
4690
4691 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4692
4693 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4694 mid-rule action inside a nonterminal symbol in order to declare a
4695 destructor for its semantic value.
4696
4697 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4698
4699 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4700 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4701 __cplusplus && ! defined _STDLIB_H && !
4702 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4703 defined free))]: Include <stdlib.h> rather than rolling our own
4704 declarations of malloc and free, to avoid problems with
4705 incompatible declarations (using 'throw') C++'s stdlib.h. This
4706 should fix Debian bug 340012
4707 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4708 reported by Guillaume Melquiond.
4709
4710 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4711
4712 * NEWS: Clarify symbols versus types in unused-value warnings.
4713
4714 * configure.ac (AC_INIT): Bump version number.
4715
4716 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4717
4718 * NEWS: Version 2.1a.
4719 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4720 since C99 requires this.
4721
4722 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4723
4724 * m4/c-working.m4: New file.
4725 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4726
4727 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4728
4729 * Makefile.maint: Merge from coreutils.
4730
4731 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4732
4733 More portability fixes for problems summarized by Nelson H. F. Beebe.
4734
4735 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4736 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4737 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4738 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4739 messes up because C++ code is compiled in 32-bit mode but linked
4740 in 64-bit mode.
4741
4742 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4743
4744 More portability fixes for problems summarized by Nelson H. F. Beebe.
4745
4746 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4747 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4748
4749 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4750 nodist_PROGRAMS, since we don't need to actually compile the
4751 example if we're just doing a plain 'make'. This avoids bothering
4752 the installer unnecessarily about problems due to weird C++
4753 compilers.
4754
4755 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4756
4757 More portability fixes for problems summarized by Nelson H. F. Beebe.
4758
4759 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4760 than #include "...", and compile with -I'.'. The old method was
4761 not portable, according to Posix and the C standard, and it does
4762 not work with Sun C 5.7, where previous #line directives affect
4763 the working directory used in later #include "..." directives.
4764
4765 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4766
4767 Various DJGGP specific issues in /djgpp
4768
4769 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4770
4771 More portability fixes for problems summarized by Nelson H. F. Beebe.
4772
4773 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4774 '#include <map>' works and that you can apply ++ to iterators.
4775
4776 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4777
4778 Work around portability problems summarized by Nelson H. F. Beebe in
4779 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4780
4781 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4782 that '#include <string>' works.
4783
4784 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4785 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4786 "warning: sorry: semantics of inline function static data `const
4787 unsigned char translate_table[262]' are wrong (you'll wind up with
4788 multiple copies)".
4789
4790 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4791 or, xor to not_, and_, or_, and xor_, respectively. This works
4792 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4793 random system header somewhere that includes the equivalent of
4794 <iso646.h>.
4795
4796 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4797 -E" works; it apparently doesn't work with PathScale EKO Compiler
4798 Suite Version 2.0.
4799
4800 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4801
4802 During deterministic GLR operation, user actions should be able to
4803 influence the parse by changing yychar. To make this easier to fix and
4804 to make glr.c easier to evolve in general, don't maintain yytoken in
4805 parallel with yychar; just compute yytoken when needed.
4806 * tests/glr-regression.at (Incorrect lookahead during deterministic
4807 GLR): Check that setting yychar in a user action has the intended
4808 effect.
4809 * data/glr.c (yyGLRStack): Remove yytokenp member.
4810 (yyclearin): Don't set *yytokenp.
4811 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4812 yychar rather than *yytokenp to determine the current lookahead.
4813 Compute yytoken locally when needed.
4814 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4815 point to.
4816
4817 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4818 after `--report' documentation.
4819
4820 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4821
4822 * src/parse-gram.y (grammar_declaration): Location of printer
4823 symbol is @1, not list->location. Bug reported by twlevo.
4824 * tests/input.at (Incompatible Aliases): Adjust to above change.
4825
4826 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4827
4828 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4829 all the test at once. This makes the output easier to read in the
4830 normal case.
4831
4832 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4833 got from <http://bro-ids.org/download.html>. The bug is that
4834 when two actions appeared in succession, the second one was
4835 scanned before the first one was added to the grammar rule
4836 as a midrule action. Bison then output the incorrect warning
4837 "parse.y:905.17-906.36: warning: unused value: $3".
4838 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4839 associated with a value.
4840 (rhs): Don't invoke grammar_current_rule_action_append.
4841 (action): Invoke it here instead.
4842 * src/reader.c (grammar_midrule_action): Now extern.
4843 (grammar_current_rule_action_append): Don't invoke
4844 grammar_midrule_action; that is now the scanner's job.
4845 * src/reader.h (last_string, last_braced_code_loc):
4846 (grammar_midrule_action): New decls.
4847 * src/scan-gram.l (last_string): Now extern, sigh.
4848 (last_braced_code_loc): New extern variable.
4849 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4850 rule already has an action.
4851 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4852 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4853 Add some tests to check that the above changes fixed the bug.
4854
4855 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4856
4857 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4858 All used changed. Check whether the symbol has a destructor,
4859 not whether it is typed.
4860 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4861 that the values are still reported as unused. All line numbers
4862 adjusted.
4863
4864 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4865
4866 Work around a bug in bro 0.8, which underparenthesizes its
4867 definition of YYLLOC_DEFAULT.
4868 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4869 their arguments.
4870 * data/lalr1.cc: Likewise.
4871 * data/yacc.cc: Likewise.
4872
4873 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
4874
4875 Work around a bug in Pike 7.0, and give the Pike folks a
4876 better way to override the usual int widths.
4877 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
4878 user can override the types.
4879 (short): #undef, to work around a bug in Pike 7.0.
4880 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
4881 (union yyalloc.yyss): Use yytype_int16 rather than short.
4882 All uses changed.
4883 (yysigned_char): Remove.
4884 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
4885 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
4886 * tests/regression.at (Web2c Actions): Adjust to above changes.
4887
4888 * src/reader.c (check_and_convert_grammar): New function.
4889 (reader): Close the input file even if something went wrong during
4890 parsing. Minor file descriptor leak reported by twlevo.
4891
4892 * src/assoc.c (assoc_to_string): Use a default: abort (); case
4893 to pacify gcc -Wswitch-default.
4894 * src/scan-gram.l (adjust_location): Use a default: break; case
4895 to pacify gcc -Wswitch-default.
4896 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
4897 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4898 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4899 Move these decls to scan-skel.l, since they don't need to be
4900 visible elsewhere.
4901 * src/scan-skel.l: Accept the above decls.
4902 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
4903 is used.
4904
4905 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
4906
4907 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4908 since we don't want to insist on a version number at the start
4909 of the changelog every time.
4910 * Makefile.maint: Sync from coreutils a bit better.
4911 (sc_trailing_blank): Renamed from sc_trailing_space.
4912 All uses changed.
4913 (sc_no_if_have_config_h, sc_require_config_h):
4914 (sc_prohibit_assert_without_use): New rules.
4915 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
4916 (sc_dd_max_sym_length): Fix leading spaces in rule.
4917 (sc_system_h_headers): Prefix with @.
4918 (sc_useless_cpp_parens, m4-check): Output line numbers.
4919 (changelog-check): Allow version only in head.
4920 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
4921 satisfy new Makefile.maint rule.
4922 * data/glr.c: Likewise.
4923 * data/glr.cc: Likewise.
4924 * data/lalr1.cc: Likewise.
4925 * data/yacc.c: Likewise.
4926 * lib/ebitsetv.c: Likewise.
4927 * lib/lbitset.c: Likewise.
4928 * lib/subpipe.c: Likewise.
4929 * lib/timevar.c: Likewise.
4930 * src/system.h: Likewise.
4931 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
4932 * djgpp/Makefile.maint: Add copyright notice.
4933 * djgpp/README.in: Likewise.
4934 * djgpp/config.bat: Likewise.
4935 * djgpp/config.site: Likewise.
4936 * djgpp/config_h.sed: Likewise.
4937 * djgpp/djunpack.bat: Likewise.
4938 * djgpp/config.sed: Fix copyright notice to match standard format.
4939 * djgpp/subpipe.h: Likewise.
4940 * lib/bitsetv-print.c: Likewise.
4941 * lib/bitsetv.c: Likewise.
4942 * lib/subpipe.h: Likewise.
4943 * lib/timevar.c: Likewise.
4944 * lib/timevar.h: Likewise.
4945 * djgpp/subpipe.c: Use standard recipe for config.h.
4946 * lib/abitset.c: Likewise.
4947 * lib/bitset.c: Likewise.
4948 * lib/bitset_stats.c: Likewise.
4949 * lib/bitsetv-print.c: Likewise.
4950 * lib/bitsetv.c: Likewise.
4951 * lib/ebitsetv.c: Likewise.
4952 * lib/get-errno.c: Likewise.
4953 * lib/lbitset.c: Likewise.
4954 * lib/subpipe.c: Likewise.
4955 * lib/timevar.c: Likewise.
4956 * lib/vbitset.c: Likewise.
4957 * tests/local.at: Likewise.
4958 * src/scan-gram.l: Don't include verify.h, since system.h does
4959 that for us.
4960 * .x-sc_require_config_h: New file.
4961 * .x-sc_unmarked_diagnostics: New file.
4962
4963 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
4964
4965 Be a bit more systematic about using 'abort'.
4966 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
4967 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
4968 Put 'default: abort ();' before some other case, to satisfy older
4969 pedantic compilers.
4970 * lib/bitset_stats.c (bitset_stats_init): Likewise.
4971 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
4972 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
4973 * src/conflicts.c (resolve_sr_conflict): Likewise.
4974 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
4975 (get_decision_str, get_orientation_str, get_node_alignment_str):
4976 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
4977 (get_linestyle_str, get_arrowstyle_str): Likewise.
4978 * src/conflicts.c (resolve_sr_conflict):
4979 Use a default case rather than one for the one remaining enum
4980 value, to catch invalid enum values as well.
4981 * src/lalr.c (set_goto_map, map_goto):
4982 Prefer "assert (FOO);" to "if (!FOO) abort ();".
4983 * src/nullable.c (nullable_compute, token_definitions_output):
4984 Likewise.
4985 * src/reader.c (packgram, reader): Likewise.
4986 * src/state.c (transitions_to, state_new, state_reduction_find):
4987 Likewise.
4988 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
4989 (symbol_pack): Likewise.
4990 * src/tables.c (conflict_row, pack_vector): Likewise.
4991 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
4992 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
4993 * src/system.h: Don't include <assert.h>.
4994 (assert): New macro.
4995
4996 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
4997 (Destructor Decl, Parser Function, Pure Calling):
4998 Describe rules for braces inside C code more carefully.
4999
5000 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5001
5002 Fix some porting glitches found by Nelson H. F. Beebe.
5003 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5004 compilers that don't understand that abort () does not return.
5005 * src/state.c (transitions_to): Likewise.
5006 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5007 that '#include <cstdlib>' works.
5008 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5009 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5010 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5011 for the benefit of some pre-C99 compilers.
5012
5013 * bootstrap: Undo changes to gnulib files that autoreconf made.
5014
5015 Minor fixups to get 'make maintainer-check' to work.
5016 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5017 with the new verify.h implementation.
5018 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5019 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5020 * data/yacc.c (YYUSE): Likewise.
5021 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5022 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5023 * src/parse-gram.y (declaration): Don't pass a string constant
5024 to a function that expects char *, since GCC might complain
5025 about the constant value.
5026 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5027 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5028 before #defining them.
5029 * tests/glr-regression.at
5030 (Incorrectly initialized location for empty right-hand side in GLR):
5031 In yyerror, use the msg arg.
5032 (Corrupted semantic options if user action cuts parse):
5033 (Incorrect lookahead during deterministic GLR):
5034 (Incorrect lookahead during nondeterministic GLR):
5035 Don't name a local var 'index'; it shadows string.h's 'index'.
5036
5037 2006-01-19 Akim Demaille <akim@epita.fr>
5038
5039 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5040 location, not just parts of it.
5041
5042 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5043
5044 * NEWS: Document the fact that multiple %unions are now allowed.
5045 * doc/bison.texinfo (Union Decl): Likewise.
5046 * TODO: This feature is now implemented, so remove it from
5047 the wishlist.
5048
5049 * Makefile.maint: Merge with coreutils Makefile.maint.
5050 (CVS_LIST): Use build-aux version if available.
5051 (VERSION_REGEXP): New macro.
5052 (syntax-check-rules): Add sc_no_if_have_config_h,
5053 sc_prohibit_assert_without_use, sc_require_config_h,
5054 sc_useless_cpp_parens.
5055 (sc_obsolete_symbols): Check for O_NDELAY.
5056 (sc_dd_max_sym_length): Track coreutils.
5057 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5058 (sc_useless_cpp_parens): New rule.
5059 (news-date-check): Look for version or today's date.
5060 (changelog-check): Don't require version number near head.
5061 (copyright-check): Use current year instead of hardwiring 2005.
5062 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5063 (announcement): Add --gpg-key-ID.
5064
5065 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5066 with "file system".
5067
5068 Avoid undefined behavior that addressed just before the start of an
5069 array. Problem reported by twlevo.
5070 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5071 * src/lalr.c (build_relations): Rely on new sentinel.
5072 * src/gram.c (gram_free): Adjust to new sentinel.
5073
5074 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5075
5076 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5077 yylookaheadNeeds. All uses updated.
5078 (yysplitStack): Rename local yynewLookaheadStatuses to
5079 yynewLookaheadNeeds.
5080 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5081 GLR): In comments, change `lookahead status' to `lookahead need'.
5082
5083 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5084
5085 * data/glr.c (yysplitStack): A little stylistic rewrite.
5086
5087 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5088
5089 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5090
5091 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5092
5093 * doc/bison.texinfo: Fix some typos.
5094 (GLR Semantic Actions): New subsection discussing special
5095 considerations because GLR semantic actions might be deferred.
5096 (Actions): Mention look-ahead usage of yylval.
5097 (Actions and Locations): Mention look-ahead usage of yylloc.
5098 (Special Features for Use in Actions): Add YYEOF entry and mention it
5099 in the yychar entry.
5100 In the yychar entry, remove mention of the local yychar case (pure
5101 parser) since this is irrelevant information when writing semantic
5102 actions and since it's already discussed in `Table of Symbols' where
5103 yychar is otherwise described as an external variable.
5104 In the yychar entry, don't call it the `current' look-ahead since it
5105 isn't when semantic actions are deferred.
5106 In the yychar and yyclearin entries, add note about deferred semantic
5107 actions.
5108 Add yylloc and yylval entries discussing look-ahead usage.
5109 (Look-Ahead Tokens): When discussing yychar, don't call it the
5110 `current' look-ahead, and do mention yylval and yylloc.
5111 (Error Recovery): Cross-reference `Action Features' when mentioning
5112 yyclearin.
5113 (Table of Symbols): In the yychar entry, don't call it the `current'
5114 look-ahead.
5115 In the yylloc and yylval entries, mention look-ahead usage.
5116
5117 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5118
5119 * tests/glr-regression.at: Update copyright year to 2006.
5120
5121 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5122
5123 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5124 use during nondeterministic operation to track which stacks have
5125 actually needed the current lookahead.
5126 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5127 Allocate, deallocate, resize, and otherwise shuffle space for
5128 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5129 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5130 appropriately during nondeterministic operation.
5131 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5132 members to store the current lookahead to be used by the deferred
5133 user action.
5134 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5135 from which the RHS is taken. Set the lookahead members of the new
5136 yySemanticOption according to the lookahead status for stack yyk.
5137 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5138 yyaddDeferredAction.
5139 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5140 members of yySemanticOption before invoking yyuserAction, and then set
5141 them back to their current values afterward.
5142 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5143 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5144 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5145 titles for consistency.
5146 (Leaked merged semantic value if user action cuts parse): In order to
5147 suppress lint warnings, use arguments in merge function, and assign
5148 char value < 128 in main.
5149 (Incorrect lookahead during deterministic GLR): New test case.
5150 (Incorrect lookahead during nondeterministic GLR): New test case.
5151
5152 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5153
5154 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
5155 !yyvaluep as signal that no semantic value is available to print.
5156 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5157 to print a semantic value.
5158
5159 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5160
5161 * tests/glr-regression.at: For consistency with my newer test cases,
5162 don't thank myself.
5163
5164 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5165
5166 * data/glr.c (yyresolveValue): When merging semantic options, if at
5167 least one user action succeeds but a later one cuts the parse, then
5168 destroy the semantic value before returning rather than leaking it.
5169 (yyresolveStates): If a user action cuts the parse and thus
5170 yyresolveValue fails, ignore the (unset) semantic value rather than
5171 corrupting the yyGLRState, and empty the semantic options list since
5172 the user actions should have called all necessary destructors.
5173 Simplify code with YYCHK.
5174 * tests/glr-regression.at (Corrupted semantic options if user action
5175 cuts parse): New test case.
5176 (Undesirable destructors if user action cuts parse): New test case.
5177 Before applying any of this patch, this test case never actually failed
5178 for me... but only because the corrupted semantic options usually
5179 masked this bug.
5180 (Leaked merged semantic value if user action cuts parse): New test
5181 case.
5182
5183 2006-01-05 Akim Demaille <akim@epita.fr>
5184
5185 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5186
5187 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5188
5189 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5190 _MSC_VER. Problem reported by Cenzato Marco.
5191 (b4_c_function_def): Use it.
5192 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5193 b4_c_modern.
5194 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5195 than rolling our own.
5196
5197 2006-01-04 Akim Demaille <akim@epita.fr>
5198
5199 Also warn about non-used mid-rule values.
5200 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5201 member.
5202 (symbol_list_new): Adjust.
5203 * src/reader.c (symbol_typed_p): New.
5204 (grammar_rule_check): Use it.
5205 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5206 Check its rule.
5207 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5208 Use it.
5209 * tests/actions.at (Exotic Dollars): Adjust.
5210
5211 2006-01-04 Akim Demaille <akim@epita.fr>
5212
5213 * src/reader.c (grammar_midrule_action): If $$ is set in a
5214 mid-rule, move the `used' bit to its lhs.
5215 * tests/input.at (Unused values): New.
5216 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5217
5218 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5219
5220 * doc/bison.texinfo (Bison Options): Say more accurately what
5221 --yacc does.
5222 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5223 about declarations in the grammar when in Yacc mode, as POSIX does
5224 not require a diagnostic when the grammar uses extensions.
5225
5226 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5227
5228 Warn about dubious constructions like "%token T T".
5229 Reported by twlevo.
5230 * src/symtab.h (struct symbol.declared): New member.
5231 * src/symtab.c (symbol_new): Initialize it to false.
5232 (symbol_class_set): New arg DECLARING, specifying whether
5233 this is a declaration that we want to warn about, if there
5234 is more than one of them. All uses changed.
5235
5236 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5237 Allow multiple %union directives, whose contents concatenate.
5238 * src/parse-gram.y (grammar_declaration): Likewise.
5239 Use muscle_code_grow, so that we don't need stype_line any more.
5240 All uses changed.
5241
5242 * src/muscle_tab.c (muscle_grow): Fix comment.
5243
5244 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5245 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5246 Update copyright year to 2006.
5247
5248 2006-01-03 Akim Demaille <akim@epita.fr>
5249
5250 Have glr.cc pass (some of) the calc.at tests.
5251 * data/glr.cc (b4_parse_param_orig): New.
5252 (b4_parse_param): Improve its definition, and bound it more
5253 clearly in the skeleton.
5254 (b4_epilogue): Append, instead of prepending, in order to keep
5255 #line consistency.
5256 Simplify the generation of auxiliary functions: locations and
5257 purity are mandated.
5258 (b4_global_tokens_and_yystype): Honor it.
5259 * data/location.cc (c++.m4): Don't include it.
5260 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5261 and AT_SKEL_CC_IF.
5262 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5263 AT_LALR1_CC_IF.
5264 Be sure to initialize the first position's filename.
5265 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5266 mandated anyway.
5267 (AT_CHECK_CALC_GLR_CC): New.
5268 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5269
5270 2006-01-02 Akim Demaille <akim@epita.fr>
5271
5272 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5273 c.m4.
5274 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
5275 * data/glr.cc: Do not include stack.hh.
5276
5277 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5278
5279 * data/glr.c: Reformat whitespace with tabs.
5280 (b4_lpure_formals): Remove this unused m4 macro.
5281 * tests/cxx-type.at: Reformat whitespace with tabs.
5282 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5283 since it's a member. Rename type to isNterm for clarity.
5284
5285 2005-12-29 Akim <akim@sulaco.local>
5286
5287 Let glr.cc catch up with symbol_value_print.
5288 * data/glr.cc (b4_yysymprint_generate): Replace by...
5289 (b4_yy_symbol_print_generate): this.
5290 (yy_symbol_print, yy_symbol_value_print): Declare them.
5291
5292 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5293
5294 * src/location.h (boundary): Note that a line or column equal
5295 to INT_MAX indicates an overflow.
5296 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5297 (rule_length_overflow, increment_rule_length, add_column_width):
5298 New functions.
5299 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5300 (<SC_BRACED_CODE>"}"):
5301 Use increment_rule_length rather than incrementing it by hand.
5302 (adjust_location, handle_syncline): Diagnose overflow.
5303 (handle_action_dollar, handle_action_at):
5304 Fix bug with monstrosities like $-2147483648.
5305 Remove now-unnecessary checks.
5306 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5307 (convert_ucn_to_byte): Verify assumptions.
5308 (handle_syncline): New arg LOC. All callers changed.
5309 Don't store through a value derived from char const * pointer.
5310
5311 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5312 GCC warnings.
5313
5314 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5315
5316 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5317 Remove unnecessary forward static decls.
5318
5319 2005-12-27 Akim Demaille <akim@epita.fr>
5320
5321 * src/reader.c (grammar_current_rule_check): Also check that $$
5322 is used.
5323 Take the rule to check as argument, hence rename as...
5324 (grammar_rule_check): this.
5325 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5326 Rename as...
5327 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5328 (grammar_midrule_action, grammar_symbol_append): Now static.
5329 * tests/torture.at (input): Don't rely on the default action
5330 being always performed.
5331 * tests/calc.at: "Set" $$ even when the action is "cut" with
5332 YYERROR or other.
5333 * tests/actions.at (Exotic Dollars): Instead of using unused
5334 values, check that the warning is issued.
5335
5336 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5337
5338 * NEWS: Improve wording for unused-value warnings.
5339
5340 2005-12-22 Akim Demaille <akim@epita.fr>
5341
5342 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5343 (b4_yysymprint_generate): Rename as...
5344 (b4_yy_symbol_print_generate): this.
5345 Generate yy_symbol_print instead of yysymprint.
5346 Generate also yy_symbol_value_print, and use it.
5347
5348 2005-12-22 Akim Demaille <akim@epita.fr>
5349
5350 * NEWS: Warn about unused values.
5351 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5352 a `used' member.
5353 (symbol_list_n_get, symbol_list_n_used_set): New.
5354 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5355 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5356 * src/reader.c (grammar_current_rule_check): Check that values are
5357 used.
5358 * src/symtab.c (symbol_print): Accept 0.
5359 * tests/existing.at: Remove the type information.
5360 Empty the actions.
5361 Remove useless actions (beware of mid-rule actions: perl -000
5362 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5363 * tests/actions.at (Exotic Dollars): Use unused values.
5364 * tests/calc.at: Likewise.
5365 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5366 Likewise.
5367
5368 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5369 rule_useful_p.
5370
5371 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5372
5373 Undo 2005-12-01 tentative license wording change. The wording is
5374 still being reviewed by the lawyers, and we don't want to wait for
5375 them before publishing a test release. For now, revert to the
5376 previous wording.
5377 * NEWS: Undo 2005-12-01 change.
5378 * data/glr.c: Revert to previous license wording.
5379 * data/glr.cc: Likewise.
5380 * data/lalr1.cc: Likewise.
5381 * data/location.cc: Likewise.
5382 * data/yacc.c: Likewise.
5383
5384 * NEWS: Reword %destructor vs YYABORT etc.
5385 * data/glr.c: Use American spacing, for consistency.
5386 * data/glr.cc: Likewise.
5387 * data/lalr1.cc: Likewise.
5388 * data/yacc.c: Likewise.
5389 * data/yacc.c: Reformat comments slightly.
5390 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5391 for consistency. Fix some spelling errors and reword recently-included
5392 text slightly.
5393 * tests/cxx-type.at: Cast results of malloc, for C++.
5394
5395 2005-12-21 Joel E. Denny <address@hidden>
5396
5397 * tests/cxx-type.at: Construct a tree, count the parents of shared
5398 nodes, and free each node once and only once. Previously, the memory
5399 for semantic values was leaked instead.
5400
5401 2005-12-21 Joel E. Denny <address@hidden>
5402
5403 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5404 (yylval, yylloc): If pure, #define to yystackp->yyval and
5405 yystackp->yyloc similar to yychar and yynerrs.
5406 (yyparse): If pure, remove local yylval and yylloc. Add local
5407 yystackp to accommodate pure definitions of yylval and yylloc.
5408 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5409 yylvalp and yyllocp to &yylval and &yylloc.
5410 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5411 namespace. Previously, nerrs and char were missing, but lval and lloc
5412 weren't necessary.
5413 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5414 yylvalp and yyllocp parameters since, if pure, these are now always
5415 accessible through yystackp. If not pure, they are still accessible
5416 globally.
5417 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5418 `if (YYID (N))' to pacify lint.
5419
5420 2005-12-21 Akim Demaille <akim@epita.fr>
5421
5422 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5423 destroy the RHS symbols of a rule.
5424 * data/yacc.c (yylen): Initialize to 0.
5425 Keep its value to the number of items to possibly shift.
5426 In particular, a regular successful parse that ends on YYFINAL by
5427 a (internal) YYACCEPT must not have yylen != 0.
5428 (yyerrorlab, yyreturn): Pop the RHS.
5429 Reorder a bit to emphasize the `shifting' bits of code.
5430 (YYPOPSTACK): Now accept a number of items to pop.
5431 * data/lalr1.cc: Likewise.
5432 * data/glr.c: Formatting changes.
5433 Use goto instead of fall through.
5434 * doc/bison.texinfo (Destructor Decl): Complete.
5435
5436 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5437
5438 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5439 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5440 * djgpp/config.bat: Replace every occurence of the file name
5441 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5442 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5443 * djgpp/config.sed: Replace every occurence of the file name
5444 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5445 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5446 * djgpp/djunpack.bat: DJGPP specific file.
5447 * djgpp/fnchange.lst: DJGPP specific file.
5448 * djgpp/README.in: Add new information about how to unpack the bison
5449 source on MSDOS and other systems which have 8.3 file name restrictions
5450 using djunpack.bat and fnchange.lst.
5451
5452 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5453
5454 * bootstrap (build_cvs_prefix): Remove; unused.
5455 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5456 when getting gnulib.
5457
5458 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5459
5460 * data/glr.c: Reorder typedef declarations for structs to match order
5461 of struct declarations.
5462 Rename yystack everywhere to yystackp except in yyparse where it's not
5463 a pointer.
5464 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5465 consistency.
5466 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5467 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5468 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5469 lint.
5470
5471 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5472
5473 * tests/sets.at (Accept): Fix typos in regular expression used to
5474 sed out the final state number.
5475
5476 Work around portability problem on Solaris 10: flex-generated
5477 files include <stdio.h> before <config.h>, which messes up
5478 because the latter defines __EXTENSIONS__. Address the problem
5479 by creating two new little files that include <config.h> first,
5480 then include the flex-generated files. Rewrite everyone else
5481 to include <config.h> first, as well.
5482 * lib/timevar.c: Always include "config.h".
5483 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5484 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5485 (EXTRA_bison_SOURCES): New macro.
5486 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5487 * src/system.h: Don't include config.h.
5488 * src/LR0.c: Include <config.h> first.
5489 * src/assoc.c: Likewise.
5490 * src/closure.c: Likewise.
5491 * src/complain.c: Likewise.
5492 * src/conflicts.c: Likewise.
5493 * src/derives.c: Likewise.
5494 * src/files.c: Likewise.
5495 * src/getargs.c: Likewise.
5496 * src/gram.c: Likewise.
5497 * src/lalr.c: Likewise.
5498 * src/location.c: Likewise.
5499 * src/main.c: Likewise.
5500 * src/muscle_tab.c: Likewise.
5501 * src/nullable.c: Likewise.
5502 * src/output.c: Likewise.
5503 * src/parse-gram.y: Likewise.
5504 * src/print.c: Likewise.
5505 * src/print_graph.c: Likewise.
5506 * src/reader.c: Likewise.
5507 * src/reduce.c: Likewise.
5508 * src/relation.c: Likewise.
5509 * src/state.c: Likewise.
5510 * src/symlist.c: Likewise.
5511 * src/symtab.c: Likewise.
5512 * src/tables.c: Likewise.
5513 * src/uniqstr.c: Likewise.
5514 * src/vcg.c: Likewise.
5515
5516 * src/parse-gram.y: Fix minor problems uncovered by lint.
5517 (current_lhs, current_lhs_location): Now static.
5518 (current_assoc): Remove unused variable.
5519
5520 Cleanups so that Bison-generated parsers have less lint.
5521 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5522 Prepend /*ARGSUSED*/, for lint's sake.
5523 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5524 definition if 'lint' is defined.
5525 (YYID): New macro (or function, if lint).
5526 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5527 * data/yacc.c: Likewise.
5528 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5529 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5530 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5531 is C++ only.
5532 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5533 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5534 Use YYID(0) rather than 0, for lint.
5535 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5536 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5537
5538 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5539
5540 * tests/glr-regression.at
5541 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5542 Close memory leak reported by twlevo.
5543
5544 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5545
5546 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5547 all stacks.
5548 (yyparse): Iterate another stack in order to call user destructors.
5549 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5550 New test case.
5551 (Duplicated user destructor for lookahead): This test now is expected
5552 to succeed.
5553
5554 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5555
5556 * NEWS: Document the following change.
5557 * data/yacc.c: Say "parser skeleton" rather than "file", since
5558 it's no longer just a file.
5559 * data/glr.c: Grant a special exception for C GLR parsers, that
5560 reads like the already-existing exception for C LALR(1) parsers.
5561 * data/glr.cc: Likewise.
5562 * data/lalr1.cc: Likewise.
5563 * data/location.cc: Likewise.
5564 * data/yacc.c: Reword the "written by" statement to clarify that
5565 it was the parser skeleton, not the entire output file.
5566 * data/glr.c: Written by Paul Hilfinger.
5567 * data/glr.cc: Written by Akim Demaille.
5568 * data/lalr1.cc: Likewise.
5569
5570 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5571
5572 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5573 Fix typos in previous change that broke 'make check'.
5574 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5575 supported in C.
5576 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5577 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5578 We can revert this once things settle down.
5579
5580 * src/conflicts.c (conflicts_print): Don't print file name twice
5581 when %expect fails because there were no conflicts.
5582 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5583 change.
5584 * tests/conflicts.at (%expect not enough, %expect too much):
5585 (%expect with reduce conflicts): Adjust to new behavior.
5586
5587 2005-11-18 Akim Demaille <akim@epita.fr>
5588
5589 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5590 errors.
5591 * NEWS: Document this.
5592 * doc/bison.texinfo (Expect Decl): Likewise.
5593
5594 2005-11-16 Akim Demaille <akim@epita.fr>
5595
5596 Generalize the display of semantic values and locations in traces.
5597 * data/glr.c (yy_reduce_print): Fix indices (again).
5598 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5599 literal integers.
5600 * data/lalr1.cc (yyreduce_print): Rename as...
5601 (yy_reduce_print): this.
5602 Display values and locations.
5603 * data/yacc.c (yy_reduce_print): Likewise.
5604 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5605 (yysymprint): Move higher to be visible from yy_reduce_print).
5606 (yyparse): Adjust.
5607 * tests/calc.at: Adjust the expected length of the traces.
5608
5609 2005-11-14 Akim Demaille <akim@epita.fr>
5610
5611 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5612 from 1 to N, while values and location start at 0.
5613 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5614
5615 2005-11-14 Akim Demaille <akim@epita.fr>
5616
5617 * data/glr.c (yy_reduce_print): Fix the $ number.
5618
5619 2005-11-14 Akim Demaille <akim@epita.fr>
5620
5621 "Use" parse parameters.
5622 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5623 * data/glr.c, data/glr.cc: Use them.
5624 * data/glr.c (YYUSE): Have a C++ definition that supports
5625 non-pointer types.
5626
5627 2005-11-14 Akim Demaille <akim@epita.fr>
5628
5629 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5630
5631 2005-11-14 Akim Demaille <akim@epita.fr>
5632
5633 * data/glr.cc: New.
5634 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5635
5636 2005-11-12 Akim Demaille <akim@epita.fr>
5637
5638 Let position and location be PODs.
5639 * data/location.cc (position::initialize, location::initialize): New.
5640 (position::position, location::location): Define only if
5641 b4_location_constructors is defined.
5642 * data/lalr1.cc (b4_location_constructors): Define it for backward
5643 compatibility.
5644 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5645
5646 2005-11-12 Akim Demaille <akim@epita.fr>
5647
5648 * data/lalr1.cc: Move the body of the ctor and dtor into the
5649 parser file (instead of the header).
5650 Wrap the implementations in a "namespace yy".
5651
5652 2005-11-12 Akim Demaille <akim@epita.fr>
5653
5654 Have glr.c include its header file when created.
5655 * data/glr.c (b4_shared_declarations): New.
5656 Output them verbatim in the parser if !%defines, otherwise
5657 output then in the header file, and include it instead.
5658
5659 2005-11-11 Akim Demaille <akim@epita.fr>
5660
5661 * data/glr.c: Comment changes.
5662
5663 2005-11-11 Akim Demaille <akim@epita.fr>
5664
5665 When yydebug, report semantic and location values for reductions.
5666 * data/glr.c (yy_reduce_print): Report the semantic values and the
5667 locations.
5668 (YY_REDUCE_PRINT): Adjust.
5669 (yyglrReduce): Use them.
5670 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5671 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5672 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5673 traces.
5674
5675 2005-11-10 Akim Demaille <akim@epita.fr>
5676
5677 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5678 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5679 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5680
5681 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5682
5683 * m4/cxx.m4, examples/Makefile.am: Don't build
5684 examples/calc++ if no C++ compiler is available. (trivial change)
5685
5686 2005-11-09 Akim Demaille <akim@epita.fr>
5687
5688 * src/scan-skel.l: Use a couple of asserts.
5689
5690 2005-11-03 Akim Demaille <akim@epita.fr>
5691
5692 In some (weird) cases, the final state number is incorrect.
5693 Reported by Alexandre Duret-Lutz.
5694 * src/LR0.c (state_list_append): Remove the computation of
5695 final_state.
5696 (save_reductions): Do it here.
5697 (get_state): Alpha conversion.
5698 (generate_states): Use a for loop.
5699 * src/gram.h (item_number_is_rule_number)
5700 (item_number_is_symbol_number): New.
5701 * src/state.c: Use assert.
5702 * src/system.h: Include assert.h.
5703 * tests/sets.at (Accept): New.
5704
5705 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5706
5707 * data/glr.c (yyfill): Adjust comment.
5708 (yyresolveAction): Initialize default location properly
5709 for empty right-hand sides.
5710 (yydoAction): Ditto.
5711 Add comment explaining apparently dead code.
5712 * tests/glr-regression.at
5713 (Incorrectly initialized location for empty right-hand side in GLR):
5714 New test.
5715
5716 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5717
5718 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5719 gnulib when interrupted. This fixes some race conditions and
5720 works around some portability problems (one noted by Paul
5721 Hilfinger).
5722
5723 2005-10-22 Akim <akim@epita.fr>
5724
5725 * Makefile.cfg: Adjust to config -> build-aux.
5726 Reported by twledo.
5727
5728 2005-10-21 Akim Demaille <akim@epita.fr>
5729
5730 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5731 the %parse-params.
5732 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5733 * data/yacc.c (b4_Pure_if): Rename as...
5734 (b4_yacc_pure_if): this.
5735 (YY_SYMBOL_PRINT, yyparse): Adjust.
5736 * doc/bison.texinfo: Formatting changes.
5737
5738 2005-10-21 Akim Demaille <akim@epita.fr>
5739
5740 Finish the transition config -> build-aux.
5741 * configure.ac, Makefile.am: Use build-aux.
5742 * config/prev-version, config/announce-gen, config/Makefile.am:
5743 Move to...
5744 * build-aux/prev-version, build-aux/announce-gen,
5745 * build-aux/Makefile.am: here.
5746
5747 2005-10-14 Akim Demaille <akim@epita.fr>
5748
5749 * examples/calc++/test: Use set -x only when VERBOSE.
5750
5751 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5752
5753 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5754 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5755
5756 2005-10-13 Akim Demaille <akim@epita.fr>
5757
5758 * src/scan-skel.l: Output the base name parts of the parser and
5759 header file names.
5760 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5761 additional checks.
5762 Use this to exercise C++ outputs in subdirs.
5763 Reported by Oleg Smolsky.
5764
5765 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5766
5767 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5768 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5769 Problem reported by John P. Hartmann.
5770 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5771 already defined it.
5772
5773 2005-10-12 Akim Demaille <akim@epita.fr>
5774
5775 * src/parse-gram.y (version_check): Exit 63 to please missing
5776 (stands for "version mismatch).
5777 * tests/input.at, doc/bison.texinfo: Adjust.
5778
5779 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5780
5781 Work around portability problems with Visual Age C compiler
5782 (xlc and xlC_r) reported by John P. Hartmann.
5783 * data/location.cc (initial_column, initial_line): Remove.
5784 All uses replaced by 0 and 1.
5785 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5786 that xlc complains about.
5787 * src/scan-skel.l (skel_wrap): Likewise.
5788 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5789 as __STDC__.
5790 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5791 __STDC_VERSION__. Use it everywhere instead of looking at
5792 __STDC__ and __cplusplus.
5793
5794 2005-10-10 Akim Demaille <akim@epita.fr>
5795
5796 * examples/calc++/test: Be quiet unless VERBOSE.
5797
5798 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5799
5800 * data/c.m4 (yydestruct, yysymprint):
5801 Use YYUSE instead of casting to void.
5802 * data/glr.c (YYUSE): New macro.
5803 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5804 Use it instead of rolling our own.
5805 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5806 (YYCHK1):
5807 Use /*CONSTCOND*/ to suppress lint warnings.
5808 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5809 (YY_STACK_PRINT): Use 'false' not '0'.
5810 (YYUSE): New macro.
5811 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5812 * data/yacc.c (YYUSE): New macro.
5813 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5814 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5815 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5816
5817
5818 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5819 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5820
5821 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5822
5823 Undo the parts of the unlocked-I/O change that substituted
5824 putc or puts for printf. This might hurt performance a bit,
5825 but some people prefer the printf style.
5826 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5827 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5828 All uses replaced by YYFPRINTF and YYDPRINTF.
5829 * data/yacc.c: Likewise.
5830 * lib/bitset.c (bitset_print): Likewise.
5831 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5832 putc and puts.
5833 * lib/lbitset.c (debug_lbitset): Likewise.
5834 * src/closure.c (print_firsts, print_fderives): Likewise.
5835 * src/gram.c (grammar_dump): Likewise.
5836 * src/lalr.c (look_ahead_tokens_print): Likewise.
5837 * src/output.c (escaped_output): Likewise.
5838 (user_actions_output): Break apart two printfs.
5839 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5840 * src/reduce.c (reduce_print): Likewise.
5841 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5842 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5843
5844 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5845 Use assignments rather than casts-to-void to suppress
5846 unused-variable warnings. This pacifies 'lint'.
5847 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5848 unused-variable warnings.
5849
5850 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5851
5852 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5853
5854 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5855
5856 Use unlocked I/O for a minor performance improvement on hosts like
5857 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5858 is to use the gnlib unlocked-io module, and to prefer putc and
5859 puts to printf when either will work (since the latter doesn't
5860 come in an unlocked flavor).
5861 * bootstrap (gnulib_modules): Add unlocked-io.
5862 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5863 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5864 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5865 and similarly for puts and putc and printf.
5866 * data/yacc.c: Likewise.
5867 * lib/bitset.c (bitset_print): Likewise.
5868 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5869 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5870 to printf.
5871 * lib/lbitset.c (debug_lbitset): Likewise.
5872 * src/closure.c (print_firsts, print_fderives): Likewise.
5873 * src/gram.c (grammar_dump): Likewise.
5874 * src/lalr.c (look_ahead_tokens_print): Likewise.
5875 * src/output.c (escaped_output): Likewise.
5876 (user_actions_output): Coalesce two printfs.
5877 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
5878 * src/reduce.c (reduce_print): Likewise.
5879 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5880 * src/system.h: Include unlocked-io.h rather than stdio.h.
5881
5882 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
5883 this confuses xgettext.
5884
5885 2005-10-02 Akim Demaille <akim@epita.fr>
5886
5887 * bootstrap (gnulib_modules): Add strverscmp.
5888 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
5889 * m4/.cvsignore: Add strverscmp.m4.
5890 * src/parse-gram.y (%require): New token, new rule.
5891 (version_check): New.
5892 * src/scan-gram.l (%require): Adjust.
5893 * tests/input.at (AT_REQUIRE): New.
5894 Use it.
5895 * doc/bison.texinfo (Require Decl): New.
5896 (Calc++ Parser): Use %require.
5897
5898 2005-10-02 Akim Demaille <akim@epita.fr>
5899
5900 * data/location.cc: New.
5901
5902 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
5903 Akim Demaille <akim@epita.fr>
5904
5905 Make sure -odir/foo.cc creates dir/location.hh etc.
5906 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
5907 (spec_file_prefix, spec_verbose_file, spec_graph_file)
5908 (spec_defines_file): Now const.
5909 (dir_prefix): New.
5910 (short_base_name): Remove.
5911 * src/files.c: Adjust.
5912 (dirname.h): Include.
5913 (base_name): Don't prototype it.
5914 (finput): Remove, duplicates gram_in.
5915 (full_base_name, short_base_name): Replace by...
5916 (all_but_ext, all_but_tab_ext): these.
5917 (compute_base_names): Rename as...
5918 (compute_file_name_parts): this.
5919 Update to compute the new variables, including dir_prefix.
5920 Adjust dependencies.
5921 * src/output.c (prepare): Output them.
5922 * src/reader.c: Adjust to use gram_in, not finput.
5923 * src/scan-skel.l (@dir_prefix@): New.
5924
5925 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5926
5927 * lib/subpipe.c: New function end_of_output_subpipe() added
5928 to allow support for non-posix systems. This is a no-op function
5929 for posix systems.
5930
5931 * lib/subpipe.h: New function end_of_output_subpipe() added
5932 to allow support for non-posix systems. This is a no-op function
5933 for posix systems.
5934
5935 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
5936 handle the lack of pipe/fork functionality on non-posix systems.
5937
5938 * djgpp/Makefile.maint: DJGPP specific file.
5939
5940 * djgpp/README.in: DJGPP specific file.
5941
5942 * djgpp/config.bat: DJGPP specific configuration file.
5943
5944 * djgpp/config.sed: DJGPP specific configuration file.
5945
5946 * djgpp/config.site: DJGPP specific configuration file.
5947
5948 * djgpp/config_h.sed: DJGPP specific configuration file.
5949
5950 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
5951
5952 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
5953
5954 2005-10-02 Akim Demaille <akim@epita.fr>
5955
5956 * data/location.cc: New, extract from...
5957 * data/lalr1.cc: here.
5958 (location.hh): Include it after the user prologue, in case the
5959 filename type is defined by the user.
5960 Forward declation location and position before the pre-prologue.
5961 (yyresult_): Rename as...
5962 (yyresult): this, it's a local variable, not an attribute.
5963 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
5964
5965 2005-10-01 Akim Demaille <akim@epita.fr>
5966
5967 * examples/extexi: Restore the #line generation.
5968
5969 2005-09-30 Akim Demaille <akim@epita.fr>,
5970 Alexandre Duret-Lutz <adl@gnu.org>
5971
5972 Move the token type and YYSTYPE in the parser class.
5973 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
5974 (parser::token): New, from the moved free definition of tokens.
5975 (parser::semantic_value): Now a full definition instead of an
5976 indirection to YYSTYPE.
5977 (b4_post_prologue): No longer included in the header file, but
5978 in the implementation file.
5979 * doc/bison.texi (C+ Language Interface): Update.
5980 * src/parse-gram.y: Support unary %define.
5981 * tests/actions.at: Define global_tokens_and_yystype for backward
5982 compatibility until we update the tests.
5983 * tests/calc.at: Idem.
5984 (first_line, first_column, last_line, last_column): Define for lalr1.cc
5985 to simplify the code.
5986
5987 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
5988
5989 Port to SunOS 4.1.4, which lacks strtoul and strerror.
5990 Ah, the good old days! Problem reported by Peter Klein.
5991 * bootstrap (gnulib_modules): Add strerror, strtoul.
5992 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
5993 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
5994
5995 2005-09-29 Akim Demaille <akim@epita.fr>
5996
5997 * data/c.m4 (b4_error_verbose_if): New.
5998 * data/lalr1.cc: Use it.
5999 (YYERROR_VERBOSE_IF): Remove.
6000 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6001 parser members, replaced by...
6002 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6003 local variables.
6004 (yysyntax_error_): Takes the state number as argument.
6005 (yyreduce_print_): Use the argument yyrule, not the former
6006 attribute yyn_.
6007
6008 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6009
6010 * bootstrap (gnulib_modules): Add verify.
6011 * lib/.cvsignore: Add verify.h.
6012 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6013 * src/system.h (verify): Remove.
6014 Include verify.h instead.
6015 * src/tables.c (tables_generate): Use new API for 'verify'.
6016
6017 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6018
6019 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6020 local variables whose names begin with 'yy'.
6021 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6022 Trivial changes from Joel E. Denny.
6023
6024 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6025 it itself.
6026 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6027 don't use alloca any more.
6028
6029 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6030 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
6031 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
6032 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6033 to match yacc.c, to test more hosts.
6034
6035 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6036
6037 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6038 doesn't affect behavior.
6039 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6040 Solaris, AIX, MSC.
6041 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6042 This works a bit better with glibc, if user code has already included
6043 stdlib.h.
6044 * doc/bison.texinfo (Bison Parser): Document that users can't
6045 arbitrarily use malloc and free for other purposes. Document
6046 that <alloca.h> and <malloc.h> might be included.
6047 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6048 user must declare alloca.
6049
6050 * HACKING (release): Forwarn the Translation Project about
6051 stable releses.
6052
6053 2005-09-20 Akim Demaille <akim@epita.fr>
6054
6055 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6056
6057 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6058
6059 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6060 (YYSTACK_ALLOC_MAXIMUM): Use it.
6061 (yysyntax_error): New function.
6062 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6063 multiple syntax errors are reported, and alloca is being used.
6064 Instead, reallocate buffers twice as big each time, so that
6065 we waste at most half the allocated memory. Start with a small
6066 (128-byte) buffer that will suffice in most cases anyway.
6067 Use yysyntax_error to do most of the work.
6068
6069 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6070 yynerrs is the number of errors reported, not the number of
6071 errors encountered.
6072
6073 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6074 Mark it as expected to fail.
6075 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6076 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6077 Don't start user-code symbols with "yy", to avoid name space problems.
6078
6079 2005-09-19 Akim Demaille <akim@epita.fr>
6080
6081 Remove the traits, failed experiment.
6082 It never proved useful, and anyway because of the current
6083 definition, it was not possible to have several specialization of
6084 this traits, making it useless.
6085 * data/lalr1.cc (yy:traits): Remove.
6086 Inline its definitions in the parser class.
6087
6088 2005-09-19 Akim Demaille <akim@epita.fr>
6089
6090 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6091 least Mac OSX with a /usr/local install of gettext.
6092
6093 2005-09-19 Akim Demaille <akim@epita.fr>
6094
6095 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6096 and yytoken for similarity with the other skeletons.
6097
6098 2005-09-19 Akim Demaille <akim@epita.fr>
6099
6100 * NEWS, configure.ac: update version number to 2.1a.
6101
6102 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6103
6104 * NEWS: Version 2.1.
6105
6106 * NEWS: Remove notice of yytname change, since it was never in an
6107 official release.
6108 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6109 diagnostic.
6110 * src/output.c (prepare): Likewise.
6111 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6112 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6113 is not defined. This is an awful hack, but it's enough for now.
6114 All callers changed.
6115 * tests/glr-regression-at (make_value): Args are const pointers now,
6116 to avoid GCC warning.
6117 (Duplicated user destructor for lookahead): New test. Currently
6118 skipped. It fails on my host but I'm not sure it'll always fail.
6119
6120 2005-09-16 Akim Demaille <akim@epita.fr>
6121
6122 * src/symtab.h (struct symbol): Declare the printer and destructor
6123 as const, to avoid accidental calls to free.
6124 (symbol_destructor_set, symbol_printer_set): Adjust.
6125 * src/symtab.c: Adjust.
6126
6127 2005-09-16 Akim Demaille <akim@epita.fr>
6128
6129 * data/c.m4 (b4_token_enums): New.
6130 (b4_token_defines): Rename as...
6131 (b4_token_enums_defines): this.
6132 (b4_token_defines): New, output only the #defines.
6133 * data/yacc.c, data/glr.c: Adjust.
6134 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6135 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6136 as default values.
6137
6138 2005-09-16 Akim Demaille <akim@epita.fr>
6139
6140 * data/lalr1.cc (yylex_): Remove, inline its code.
6141 (yyreport_syntax_error_): Remove, replaced by...
6142 (yysyntax_error_): this which returns a string and leaves to the
6143 caller the call to the users' error function.
6144 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6145 Move from members of the parser object...
6146 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6147 to local variables of the parse function.
6148
6149 2005-09-16 Akim Demaille <akim@epita.fr>
6150
6151 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6152 since it's in Bison's name space.
6153
6154 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6155
6156 * data/glr.c (yyresolveValue): Add default case to pacify
6157 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6158
6159 * NEWS: Document when yyparse started to return 2.
6160 * doc/bison.texinfo (Parser Function): Document when yyparse
6161 returns 2.
6162
6163 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6164 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6165 changed.
6166 (class position): file_name -> filename (reverting). All uses changed.
6167
6168 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6169
6170 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6171 do anything if $@ exists. This reverts part of the 2005-07-07
6172 patch.
6173
6174 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6175
6176 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6177 contains obsolete information and isn't worth distributing as a
6178 separate file anyway.
6179 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6180 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6181 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6182 (yyparse): Abort if user code uses longjmp to throw an unexpected
6183 value.
6184
6185 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6186
6187 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6188 Suggested by twlevo@xs4all.nl.
6189
6190 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6191 This avoids a diagnostic from gcc -Wswitch-enum.
6192 Problem reported by twlevo@xs4all.nl.
6193
6194 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6195 standards. Use "file name" or "file" or "name", depending on
6196 the context.
6197 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6198 not to hack/foo.tab.c.
6199 (Calc++ Top Level): 2nd arg of main is not const.
6200 * data/glr.c: b4_filename -> b4_file_name.
6201 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6202 All uses changed.
6203 (class position): filename -> file_name. All uses changed.
6204 * data/yacc.c: b4_filename -> b4_file_name.
6205 * lib/bitset.h: filename -> file_name in local vars.
6206 * lib/bitset_stats.c: Likewise.
6207 * src/files.c: Likewise.
6208 * src/scan-skel.l ("@output ".*\n): Likewise.
6209 * src/files.c (file_name_split): Renamed from filename_split.
6210 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6211
6212 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6213
6214 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6215 to accommodate latest gnulib.
6216
6217 * tests/glr-regression.at (Duplicate representation of merged trees):
6218 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6219
6220 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6221 needed.
6222
6223 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6224
6225 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6226 All uses changed. Invoke user destructor after an error during a
6227 split parse (trivial change from Joel E. Denny).
6228
6229 * tests/glr-regression.at
6230 (User destructor after an error during a split parse): New test case.
6231 Problem reported by Joel E. Denny in:
6232 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6233
6234 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6235
6236 * README-cvs: Give URLs for recommended tools.
6237 Mention Gzip version problem, and bootstrapping issues.
6238 Remove troubleshooting section, as it's somewhat obsolete.
6239
6240 * bootstrap (no_cache): New var, to accommodate different wget
6241 variants. Use it instead of '-C off'. Problem reported by
6242 twlevo@xs4all.nl.
6243
6244 * data/glr.c (yydestroyStackItem): New function.
6245 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6246 debugging information. Problem reported by Joel E. Denny.
6247
6248 2005-08-25 Akim Demaille <akim@epita.fr>
6249
6250 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6251
6252 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6253
6254 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6255 Don't invoke destructor on unresolved entries.
6256 * tests/glr-regression.at
6257 (User destructor for unresolved GLR semantic value): New test case.
6258 Problem reported by Joel E. Denny in:
6259 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6260
6261 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6262
6263 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6264 Add strnlen.c.
6265 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6266 lib-prefix.m4, po.m4.
6267
6268 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6269 in yydestruct diagnostic, since it might not be an error.
6270 Problem reported by Joel Denny near end of
6271 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6272 * data/lalr1.cc (yyerturn): Likewise.
6273 * data/yacc.c (yyreturn): Likewise.
6274 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6275
6276 * src/files.c: Remove obsolete FIXME comment.
6277
6278 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6279 with the other templates, and to fix bogus run-on messages such
6280 as the one reported at the end of
6281 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6282 All callers changed to avoid the newline.
6283 (yyprocessOneStack): Output two lines rather than one, to accommodate
6284 the above change. This changes the debug output format slightly.
6285
6286 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6287 reported by Joel E. Denny in
6288 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6289 (trivial change).
6290 * tests/glr-regression.at (Duplicate representation of merged trees):
6291 New test, from Joel E. Denny in:
6292 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6293 * THANKS: Add Joel E. Denny.
6294
6295 * configure.ac (AC_INIT): Bump to 2.0c.
6296
6297 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6298
6299 * NEWS: Version 2.0b.
6300
6301 * Makefile.am (SUBDIRS): Put examples before tests, so that
6302 "make check" doesn't finish with "All 1 tests passed".
6303
6304 * tests/regression.at (Token definitions): Don't rely on
6305 AT_PARSER_CHECK for data that contains backslashes. It currently
6306 uses 'echo', and 'echo' isn't portable if its argument contains
6307 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6308 that the byte '\0xff' is not printable in the C locale; it is,
6309 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6310 not printable, so use '\0x81' to test.
6311
6312 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6313 version of GCC, since the macro is used with non-GCC compilers.
6314
6315 Fix core dump reported by Pablo De Napoli in
6316 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6317 * tests/regression.at (Invalid inputs with {}): New test.
6318 * src/parse-gram.y (token_name): Translate type before using
6319 it as an index.
6320
6321 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6322 the user's name space. All uses changed to __attribute__
6323 ((__unused__)).
6324 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6325 Add __attribute__ ((__noreturn__)).
6326
6327 * etc/clcommit: Remove. We weren't using it, and it failed
6328 "make maintainer-distcheck".
6329 * Makefile.maint: Merge from coreutils.
6330 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6331 (syntax-check-rules): Change list of rules as described below.
6332 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6333 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6334 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6335 (sc_trailing_space): New rules.
6336 (sc_xalloc_h_in_src): Remove.
6337 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6338 (sc_space_tab, sc_error_exit_success, sc_changelog):
6339 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6340 (makefile-check, po-check, author_mark_check):
6341 (makefile_path_separator_check, copyright-check):
6342 Use grep -n, to make it easier to find violations.
6343 Use CVS_LIST and CVS_LIST_EXCEPT.
6344 (header_regexp, h_re): Remove.
6345 (dd_c): New macro.
6346 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6347 (my-distcheck): Use more-modern GCC flags.
6348 (signatures, %.asc): Remove.
6349 (rel-files, announcement): Remove signatures.
6350 Restore old updating code, even though we don't use it, so
6351 that we're the same as coreutils.
6352 (alpha, beta, major): Depend on news-date-check.
6353 Make the upload commands.
6354
6355 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6356 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6357 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6358 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6359 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6360 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6361 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6362 * tests/sets.at: Likewise.
6363
6364 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6365 we comment out the Autoconf version number.
6366 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6367 it's error-prone and "make maintainer-distcheck" rejects it.
6368
6369 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6370 Indent calls to "error" to pacify "make maintainer-distcheck",
6371 when the calls are not intended to be translated.
6372 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6373
6374 * src/Makefile.am (DEFS): Use +=, to pacify
6375 "make maintainer-distcheck".
6376 (bison_SOURCES): Add scan-skel.h.
6377 (sc_tight_scope): New rule, from coreutils.
6378
6379 * src/files.c (src_extension, header_extension):
6380 Now static, not extern.
6381 * src/getargs.c (short_options): Likewise.
6382 * src/muscle_tab.c (muscle_table): Likewise.
6383 * src/parse-gram.y (current_class, current_type, current_prec):
6384 Likewise.
6385 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6386 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6387 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6388 void, to avoid warning when NLS is disabled.
6389 * src/output.c: Include scan-skel.h.
6390 (scan_skel): Remove decl, since scan-skel.h does this.
6391 (output_skeleton):
6392 Indent calls to "error" to pacify "make maintainer-distcheck".
6393 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6394 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6395 "make maintainer-distcheck".
6396 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6397 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6398 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6399 (skel_lex_destroy, scan_skel): Move these decls to...
6400 * src/scan-skel.h: New file.
6401 * src/uniqstr.c (uniqstr_assert):
6402 Indent calls to "error" to pacify "make maintainer-distcheck".
6403
6404 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6405 not @VAR@.
6406
6407 * tests/torture.at: Revamp to avoid misuse of atoi that
6408 "make maintainer-distcheck" complained about.
6409
6410 * examples/extexi (message): Don't print a message more than once,
6411 and omit line-number decoration that makes Emacs compile think
6412 that informative messages are worth worrying about.
6413
6414 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6415
6416 * configure.ac: Update version number.
6417
6418 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6419 accidentally.
6420 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6421 autogenerated by the maintainer.
6422 * examples/calc++/.cvsignore: Add *.yy.
6423
6424 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6425 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6426 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6427
6428 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6429
6430 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6431 from maintainer-distcheck about casting the argument of 'free'.
6432
6433 * NEWS: Mention recent yytname changes.
6434 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6435
6436 * bootstrap: For translations that have not yet been upgraded to
6437 the new runtime-po domain, prime the pump by extracting the
6438 relevant strings from the obsolete translations. This code can be
6439 removed once the bison-runtime domain has been translated by each
6440 team.
6441
6442 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6443 now that token names are already quoted.
6444
6445 Fix problem reported by Anthony Heading.
6446 * data/glr.c (YYTOKEN_TABLE): New macro.
6447 (yytname): Define if YYTOKEN_TABLE.
6448 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6449 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6450 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6451 * src/output.c (prepare_symbols): Output token_table_flag.
6452
6453 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6454
6455 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6456 again if the first call fails.
6457
6458 * data/glr.c (yytnamerr): New function.
6459 (yyreportSyntaxError): Use it to dequote most string literals.
6460 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6461 with other skeletons. All uses changed.
6462 (yytnameerr_): New function.
6463 (yyreport_syntax_error): Use it to dequote most string literals.
6464 * data/yacc.c (yytnamerr): New function.
6465 (yyerrlab): Use it to decode most string literals.
6466 * doc/bison.texinfo (Decl Summary, Calling Convention):
6467 Clarify quoting convention of yytname.
6468 * src/output.c (prepare_symbols): Quote all names. This undoes
6469 the 2005-04-17 change, which is now accomplished (mostly) via
6470 changes in the parsers as described above.
6471 * tests/regression.at (Token definitions, Web2c Actions):
6472 Undo most 2005-04-17 change here, too.
6473
6474 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6475
6476 Fix more problems reported by twlevo@xs4all.nl.
6477 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6478 remove trailing spaces. This loses the exit status of ./types,
6479 and isn't needed since ./types shouldn't be emitting trailing
6480 spaces.
6481 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6482 as the stack isn't valid in that case.
6483
6484 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6485 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6486 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6487 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6488 is used.
6489 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6490 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6491 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6492 Likewise.
6493
6494 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6495 overly-picky compilers that reject 'char *foo = "bar";'.
6496
6497 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6498 to FILE * parameter, not to stderr. This fixes a typo introduced
6499 in the 2005-07-12 change.
6500
6501 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6502 warnings from GCC 4.
6503
6504 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6505 (yyglrShiftDefer, yysplitStack):
6506 Remove unused parameters b4_pure_formals. All uses changed.
6507 (yyglrShift): Remove unused parameters b4_user_formals.
6508 All uses changed.
6509 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6510
6511 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6512
6513 Destructor cleanups and regularization among the three skeletons.
6514 * NEWS: Document the behavior changes.
6515 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6516 stack before failing, as the cleanup code will do it for us now.
6517 * data/lalr1.cc (yyerrlab): Likewise.
6518 * data/glr.c (yyparse): Pop everything off the stack before
6519 freeing it, so that destructors get called properly.
6520 * data/lalr1.cc (yyreturn): Likewise.
6521 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6522 This is more consistent.
6523 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6524 why destructors might be called. 1.875 -> 2.1.
6525 (Destructor Decl, Decl Summary, Table of Symbols):
6526 Some English-language cleanups for %destructor.
6527 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6528 Add output line for destructor of start symbol.
6529 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6530 because of that same extra output line.
6531
6532 * NEWS: Document minor wording changes in diagnostics of
6533 Bison-generated parsers.
6534 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6535 Remove unused formals. All uses changed.
6536 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6537 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6538 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6539 Rename yyoverflowab to yyexhaustedlab.
6540 When memory exhaustion occurs during syntax-error reporting,
6541 report it separately rather than in a single diagnostic; this
6542 eases translation.
6543 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6544 (Memory Exhausted): Renamed from Parser Stack Overflow.
6545 Revamp wording slightly to prefer "memory exhaustion".
6546 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6547
6548 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6549
6550 Add i18n support to the GLR skeleton. Partially fix the C++
6551 skeleton; a C++ expert needs to finish this. Remove debugging
6552 msgids; there's little point to having them translated, since they
6553 can be understood only by someone who can read the
6554 (English-language) source code.
6555
6556 Generate runtime-po/bison-runtime.pot automatically, so that we
6557 don't have to worry about garbage getting in that file. We'll
6558 make sure after the next official release that old msgids don't
6559 get lost. See
6560 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6561
6562 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6563 Now auto-generated.
6564 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6565 Fix typos in explanations of the runtime file.
6566 * bootstrap: Change gettext keyword from YYI18N to YY_.
6567 Use standard Makefile.in.in in runtime-po, since we'll arrange
6568 for backward-compatible bison-runtime.po files in a different way.
6569 * data/glr.c (YY_): New macro, from yacc.c.
6570 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6571 Translate messages intended for users.
6572 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6573 the wording in the other skeletons. We don't know that the memory
6574 is virtual.
6575 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6576 Use same method that yacc.c uses.
6577 Don't translate debugging messages.
6578 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6579 it doesn't work (yet), and requires C++ expertise to fix.
6580 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6581 Move defn to a more logical place, to be consistent with other
6582 skeletons.
6583 Don't translate debugging messages.
6584 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6585 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6586 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6587 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6588
6589 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6590 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6591 void, not int.
6592 * tests/glr-regression.at (Badly Collapsed GLR States):
6593 Likewise.
6594 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6595 yylex should return 0 at EOF rather than aborting.
6596
6597 Improve tests for stack overflow in GLR parser.
6598 Problem reported by twlevo@xs4all.nl.
6599 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6600 All uses removed.
6601 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6602 can handle the problem.
6603 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6604 (yyparse): New local variable yyresult to record the result.
6605 Use result of setjmp to set it, rather than storing itinto
6606 struct.
6607 (yyDone): Remove label.
6608 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6609 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6610 if YYABORT is used).
6611 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6612 yyparse status; put status > 1 into diagnostic.
6613 Check that status==2 works.
6614 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6615 Use exit status 3 for failure to open (which shouldn't happen).
6616
6617 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6618
6619 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6620 1 on syntax error; just let yyparse do its thing.
6621 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6622 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6623 (Exploding the Stack Size with Alloca):
6624 (Exploding the Stack Size with Malloc):
6625 Expect exit status 2, not 1, since the parser is supposed to blow
6626 its stack. Problem reported by twlevo@xs4all.nl.
6627
6628 * data/glr.c (yyparse): Don't assume that the initial calls
6629 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6630 Print a stack-overflow message and fail instead.
6631 Initialize the line-number information before creating the stack,
6632 so that the stack-overflow message can report line zero safely.
6633
6634 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6635
6636 Fix problems reported by twlevo@xs4all.nl.
6637 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6638 (yyuserMerge): Provide a default case if b4_mergers is empty.
6639 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6640 * tests/glr-regression.at
6641 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6642 Add casts to pacify C++ compilers.
6643 * tests/glr-regression.at (Improper merging of GLR delayed action
6644 sets): Declare yylex before using it.
6645 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6646 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6647 test for valgrind; valgrind is independent of g++.
6648 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6649 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6650 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6651 Use a destructor, so that we can expand the stack. Change
6652 YYSTYPE to char * so that we can free it. Cast result of malloc.
6653
6654 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6655
6656 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6657 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6658
6659 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6660
6661 * PACKAGING: New file, suggested by Bruno Haible and taken from
6662 similar wording in gettext's PACKAGING file.
6663 * NEWS: Mention PACKAGING.
6664 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6665
6666 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6667
6668 * NEWS: Document recent i18n improvements.
6669 * bootstrap: Get runtime translations into runtime-po.
6670 Create runtime-po files automatically, if possible.
6671 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6672 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6673 does not infringe on the user's name space.
6674 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6675 * doc/bison.texinfo (Internationalization): Revamp the English
6676 and Texinfo syntax a bit, to try to make it clearer.
6677 (Bison Options, Option Cross Key): Mention --print-localedir.
6678 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6679 YYENABLE_NLS. Quote a bit more.
6680 * runtime-po/.cvsignore: New file.
6681 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6682 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6683 * runtime-po/quot.sed: Likewise.
6684 * runtime-po/boldquot.sed: Likewise.
6685 * runtime-po/en@quot.header: Likewise.
6686 * runtime-po/en@boldquot.header: Likewise.
6687 * runtime-po/insert-header.sin: Likewise.
6688 * runtime-po/remove-potcdate.sin: Likewise.
6689 * runtime-po/Makevars: Likewise.
6690 * runtime-po/LINGUAS: Likewise.
6691 * runtime-po/de.po: Likewise; we will rely on the translation project
6692 to maintain this, so "bootstrap" should get it.
6693 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6694 its value.
6695 * src/main.c (main): Bind the bison-runtime domain, too.
6696
6697 2005-07-12 Bruno Haible <bruno@clisp.org>
6698
6699 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6700 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6701 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6702 * runtime-po: New directory.
6703 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6704 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6705 * runtime-po/Rules-quot: New file, copied from po/.
6706 * runtime-po/quot.sed: Likewise.
6707 * runtime-po/boldquot.sed: Likewise.
6708 * runtime-po/en@quot.header: Likewise.
6709 * runtime-po/en@boldquot.header: Likewise.
6710 * runtime-po/insert-header.sin: Likewise.
6711 * runtime-po/remove-potcdate.sin: Likewise.
6712 * runtime-po/Makevars: New file.
6713 * runtime-po/POTFILES.in: New file.
6714 * runtime-po/LINGUAS: New file.
6715 * runtime-po/bison-runtime.pot: New file.
6716 * runtime-po/de.po: New file.
6717 * m4/bison.m4: New file.
6718 * Makefile.am (SUBDIRS): Add runtime-po.
6719 (aclocaldir, aclocal_DATA): New variables.
6720 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6721 Define aclocaldir.
6722 * src/getargs.c (usage): Document --print-localedir option.
6723 (PRINT_LOCALEDIR_OPTION): New enum item.
6724 (long_options): Add --print-localedir option.
6725 (getargs): Handle --print-localedir option.
6726 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6727 (Internationalization): New section.
6728
6729 2005-07-12 Akim Demaille <akim@epita.fr>
6730
6731 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6732 for consistency with the rest of the code.
6733 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6734 Add separators.
6735
6736 2005-07-12 Akim Demaille <akim@epita.fr>
6737
6738 * src/parse-gram.y: Use %printer instead of YYPRINT.
6739
6740 2005-07-12 Akim Demaille <akim@epita.fr>
6741
6742 * src/symtab.h, src/symtab.c (symbol_print): New.
6743 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6744 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6745
6746 2005-07-12 Akim Demaille <akim@epita.fr>
6747
6748 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6749 b4_at_dollar and b4_dollar_dollar.
6750
6751 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6752
6753 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6754 and Pennello's paper.
6755
6756 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6757
6758 * data/yacc.c (yyparse): Undo previous patch. Instead,
6759 set yylsp[0] and yyvsp[0] only if the initial action
6760 sets yylloc and yylval, respectively.
6761
6762 * data/yacc.c (yyparse): In the initial action, set
6763 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6764 This avoids the use of undefined variables if the initial
6765 action does not set yylloc and/or yylval.
6766
6767 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6768
6769 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6770 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6771 Remove from CVS. These files are automatically generated.
6772 * examples/extexi: Clarify that this file is now part of Bison,
6773 not GNU M4, and that it works with any POSIX-compatible Awk.
6774 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6775 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6776 so that we also get calc++-parser.yy. Geneate it.
6777 Use $(AWK), not gawk, since any conforming Awk will do.
6778 Put comment before action, since older 'make' can't handle comment
6779 in action.
6780 $(BUILT_SOURCES): List all built sources, not just some of them.
6781 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6782 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6783 $($(calc_sources_generated)): Remove unnecessary test for existence
6784 of target. (This had a shell syntax error anyway; a stray "x".)
6785 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6786 calc++-parser.yy.
6787 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6788
6789 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6790 implied by the other modules.
6791
6792 2005-07-06 Akim Demaille <akim@epita.fr>
6793
6794 Bind examples/calc++ to the package.
6795 * examples/calc++/Makefile: Remove, replaced by...
6796 * examples/calc++/Makefile.am: ... this new file.
6797 * examples/calc++/test: Remove input.
6798 * examples/calc++/compile: Remove.
6799 * examples/Makefile.am: New.
6800 * configure.ac, Makefile.am: Adjust.
6801 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6802
6803 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6804
6805 * data/glr.c (yyFail): Drastically simplify; since the format argument
6806 never had any % directives, we can simply pass it to yyerror.
6807 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6808 be modified later, as that is the usual style in glr.c.
6809 Problems reported by Paul Hilfinger.
6810
6811 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6812 and size overflow errors.
6813 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6814 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6815 (YYSIZEMAX): New macro.
6816 (yystpcpy): New function, taken from yacc.c.
6817 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6818 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6819 so that we don't have to maintain their signatures.
6820 (yyFail): Check for buffer overflow, by using vsnprintf rather
6821 than vsprintf. Allocate a bigger buffer if possible.
6822 Report an error if buffer allocation fails.
6823 (yyStackOverflow): New function.
6824 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6825 the initialization was successful. It might fail if storage was
6826 exhausted.
6827 (yyexpandGLRStack): Add more checks for storage allocation failure.
6828 Use yyStackOverflow to report failures.
6829 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6830 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6831 Don't assume stack number fits in int.
6832 (yysplitStack): Check for storage allocation failure.
6833 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6834 can print diagnostics on storage allocation failure. All callers
6835 changed.
6836 (yyresolveValue): Use yybool for boolean.
6837 (yyreportSyntaxError): Check for size-calculation overflow.
6838 This code is taken from yacc.c.
6839 (yyparse): Check for storage allocation errors when allocating
6840 the initial stack.
6841
6842 2005-07-05 Akim Demaille <akim@epita.fr>
6843
6844 Extract calc++ from the documentation.
6845 * doc/bison.texinfo (Calc++): Add the extraction marks.
6846 * examples/extexi: New, from the aborted GNU Programming 2E.
6847 Separate the different paragraph of a file with empty lines.
6848 * examples/Makefile: Use it to extract the whole calc++ example.
6849
6850 2005-06-24 Akim Demaille <akim@epita.fr>
6851
6852 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6853 class typedefs.
6854
6855 2005-06-22 Akim Demaille <akim@epita.fr>
6856
6857 * doc/bison.texinfo (C++ Language Interface): First stab.
6858 (C++ Parsers): Remove.
6859
6860 2005-06-22 Akim Demaille <akim@epita.fr>
6861
6862 * data/lalr1.cc (yylex_): Honor %lex-param.
6863
6864 2005-06-22 Akim Demaille <akim@epita.fr>
6865
6866 Start a set of simple examples.
6867 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6868 * examples/calc++/calc++-driver.hh,
6869 * examples/calc++/calc++-parser.yy,
6870 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
6871 * examples/calc++/compile, examples/calc++/test: New.
6872
6873 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
6874
6875 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
6876 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
6877 which stems from the 2005-05-27 patch.
6878
6879 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6880
6881 * data/glr.c: Modify treatment of unused parameters to permit use
6882 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
6883
6884 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
6885
6886 Fix infringement on user name space reported by Janos Zoltan Szabo.
6887 * data/yacc.c (yyparse): strlen -> yystrlen.
6888
6889 2005-05-30 Akim Demaille <akim@epita.fr>
6890
6891 * data/lalr1.cc (_): New.
6892 Translate the various messages.
6893
6894 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
6895
6896 Fix infringement on user name space reported by Bruno Haible.
6897 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
6898 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
6899 the user's name space.
6900 (alloca): Include <stdlib.h> to get it, if it's not built in.
6901 (YYMALLOC, YYFREE): Define only if needed.
6902 (malloc, free): Declare, but only if needed, as this infringes on
6903 the user name space.
6904
6905 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
6906
6907 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
6908 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
6909 with %d format.
6910 * lib/ebitset.c (min, max): Undef before defining.
6911 * lib/vbitset.c (min, max): Likewise.
6912 * lib/subpipe.c (create_subpipe): Save local variables in case
6913 vfork clobbers them.
6914
6915 2005-05-24 Bruno Haible <bruno@clisp.org>
6916
6917 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
6918 error message syntax used by gcc-4.0.
6919
6920 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
6921
6922 * README: Mention m4 1.4.3. Remove obsolete advice about
6923 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
6924
6925 * bootstrap: Remove workaround for problem I encountered with
6926 gettext 0.14.1; it seems to be fixed now.
6927
6928 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 * NEWS: Version 2.0a.
6931
6932 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
6933 the previous change.
6934
6935 Various maintainer cleanups.
6936 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
6937 conftest*, for benefit of CVS commands run at the same time as
6938 "configure". Add build-aux, since "bootstrap" now creates it and
6939 its subfiles.
6940 * Makefile.cfg (move_if_change): Remove.
6941 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
6942 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
6943 (po_repo, do-po-update, po-update, wget_files, get-targets):
6944 (config.guess-url_prefix, config.sub-url_prefix):
6945 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
6946 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
6947 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
6948 Remove.
6949 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
6950 this is now the recommended name.
6951 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
6952 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
6953 ylwrap. These files now go into build-aux.
6954 * config/move-if-change: Remove.
6955 * config/prev-version.txt: Bump from 1.75 to 2.0.
6956
6957 * bootstrap: Add stdio-safer, unistd-safer modules.
6958 Remove m4/glibc2.m4 (introduced by latest gnulib, but
6959 we don't need it).
6960 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
6961 fopen-safer.c, stdio-safer.h, unistd-safer.h.
6962 * lib/subpipe.c: Include "unistd-safer.h".
6963 (create_subpipe): Make sure all the newly-created
6964 file descriptors are > 2, so that diagnostics don't
6965 get sent down them (which might cause Bison to hang, in theory).
6966 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
6967 * src/files.c (xfopen): Use fopen_safer, not fopen.
6968
6969 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
6970 yesterday's yacc.c fix.
6971
6972 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
6973
6974 * data/glr.c, data/lalr1.cc: Update copyright date.
6975
6976 Fix a destructor bug reported by Wolfgang Spraul in
6977 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
6978 * data/yacc.c (yyabortlab): Don't call destructor, and
6979 don't set yychar to EMPTY.
6980 (yyoverflowlab): Don't call destructor.
6981 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
6982 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
6983 since we no longer output the message "discarding lookahead token
6984 end of input ()".
6985
6986 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6987
6988 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
6989 fix a small glitch in debugging output.
6990 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
6991 after YY_SYMBOL_PRINT where needed.
6992
6993 (struct yyGLRState): Add some comments.
6994 (struct yySemanticOption): Add some comments.
6995 (union yyGLRStackItem): Add comment.
6996
6997 (yymergeOptionSets): Correct this to properly perform the union,
6998 avoiding infinite reported by Michael Rosien.
6999 Update comment.
7000
7001 * tests/glr-regression.at: Add test for GLR merging error reported
7002 by M. Rosien.
7003
7004 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7005
7006 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7007 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7008 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7009 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7010 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7011 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7012 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7013 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7014 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7015 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7016 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7017 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7018 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7019 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7020 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7021 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7022 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7023 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7024 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7025 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7026 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7027 src/output.h, src/parse-gram.c, src/parse-gram.h,
7028 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7029 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7030 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7031 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7032 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7033 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7034 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7035 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7036 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7037 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7038 tests/reduce.at, tests/regression.at, tests/sets.at,
7039 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7040 Update FSF postal mail address.
7041
7042 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7043
7044 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7045 Problem reported by Ralf Menzel.
7046
7047 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7048
7049 * tests/actions.at: Test that stack overflow invokes destructors.
7050 From Marcus Holland-Moritz.
7051 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7052 from here....
7053 (yyreturn): to here. That way, destructors are called properly
7054 even if the stack overflows, or the user calls YYACCEPT or
7055 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7056 (yyoverflowlab): Destroy the lookahead.
7057
7058 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7059
7060 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7061
7062 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7063
7064 * NEWS: Bison-generated C parsers no longer quote literal strings
7065 associated with tokens.
7066 * src/output.c (prepare_symbols): Don't escape strings,
7067 since users don't want to see C escapes.
7068 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7069 in diagnostics.
7070 * tests/input.at (Torturing the Scanner): Likewise.
7071 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7072
7073 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7074
7075 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7076 the data size is known to be too small and we can't increase it.
7077 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7078
7079 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7080
7081 * src/parse-gram.y: Include quotearg.h.
7082 (string_as_id): Quote $1 before using it as a key, since the
7083 lexer no longer quotes it for us.
7084 (string_content): Don't strip quotes, since lexer no longer
7085 quotes it for us.
7086 * src/scan-gram.l: Include quotearg.h.
7087 ("\""): Omit quote.
7088 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7089 a key, since the rest of the lexer doesn't quote it.
7090 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7091 * tests/regression.at (Token definitions): Check for backslashes
7092 in token strings.
7093
7094 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7095 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7096 (yyparse): Revamp code to generate long syntax error message, to
7097 make it easier to translate, and to avoid problems with arithmetic
7098 overflow. Change "virtual memory" to "memory" in diagnostic, since
7099 we don't know whether the memory is virtual.
7100
7101 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7102
7103 * NEWS: Bison-generated C parsers now use the _ macro to
7104 translate strings.
7105 * data/yacc.c (_) [!defined _]: New macro.
7106 All English strings wrapped inside this macro.
7107 * doc/bison.texinfo (Bison Parser): Document _.
7108 * po/POTFILES.in: Include src/parse-gram.c, since it now
7109 includes translateable strings that parse-gram.y doesn't.
7110
7111 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7112
7113 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7114 reverting the 2004-10-11 change to this function.
7115 (symbol_check_alias_consistency): Don't call symbol_type_set
7116 if the type name is already correct.
7117 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7118
7119 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7120
7121 * tests/regression.at (Token definitions): Don't use a token named
7122 c, as that generates a "#define c ..." that runs afoul of buggy
7123 stdlib.h that uses the identifier c as a member of struct
7124 drand48_data. Problem reported by Horst Wente.
7125
7126 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7127
7128 * bootstrap: Change translation URL from
7129 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7130 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7131 redirection glitches. Problem reported by twlevo@xs4all.nl.
7132
7133 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7134
7135 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7136 after operands; POSIX says this isn't portable for the c99 command.
7137
7138 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7139
7140 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7141 immediately if a data overrun has occurred; this may help us track
7142 down what may be a spurious failure on MacOS.
7143
7144 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7145
7146 Respond to problems reported by twlevo@xs4all.nl.
7147
7148 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7149
7150 * src/vcg.h: Comment fix.
7151 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7152 (G_CMAX): Change to -1 instead of INT_MAX.
7153
7154 * data/yacc.c (yyparse): Omit spaces before #line.
7155
7156 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7157
7158 * src/tables.c (state_number_to_vector_number): Put it inside an
7159 "#if 0", since it's not currently used. Problem reported by
7160 Roland McGrath.
7161
7162 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7163
7164 * src/output.c (escaped_output): Renamed from
7165 escaped_file_name_output, since we now use it for symbol tags as
7166 well. All uses changed.
7167 (symbol_destructors_output, symbol_printers_output):
7168 Escape symbol tags too.
7169 Problem reported by Matyas Forstner in
7170 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7171
7172 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7173 not needed.
7174 * src/output.c (user_actions_output, token_definitions_output,
7175 symbol_destructors_output, symbol_printers_output): Likewise.
7176 * src/reader.c (prologue_augment): Likewise.
7177 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7178
7179 * src/vcg.c (output_edge): Don't quote linestyle arg.
7180 Problem reported by twlevo@xs4all.nl.
7181
7182 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7183
7184 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7185 example, reported by Derek M Jones. Also, make the example even
7186 more outrageous, to better illustrate how bad the problem is.
7187
7188 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7189
7190 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7191 putsym. Typo reported by Sebastian Piping.
7192
7193 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7194
7195 * doc/bison.texinfo (Language and Grammar): some -> same
7196 (Epilogue): int he -> in the
7197 Typos reported by Sebastian Piping via Justin Pence.
7198
7199 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7200
7201 * tests/glr-regression.at (Improper handling of embedded actions
7202 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7203 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7204 with dollar signs in test names.
7205 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7206 for a similar reason.
7207
7208 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7209
7210 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7211 wants to redefine G_VIEW.
7212
7213 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7214
7215 * src/vcg.c (get_view_str): Remove case for normal_view.
7216 Problem reported by twlevo@xs4all.nl.
7217
7218 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7219
7220 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7221 Problem reported by twlevo@xs4all.nl.
7222
7223 * doc/bison.texinfo: Change @dircategory from "GNU programming
7224 tools" to "Software development". Requested by Richard Stallman
7225 via Karl Berry.
7226
7227 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7228
7229 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7230 Problem reported by twlevo@xs4all.nl.
7231
7232 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7233
7234 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7235 keyword; it's not needed with modern compilers, and it doesn't
7236 affect correctness with older compilers. Suggested by
7237 twlevo@xs4all.nl.
7238
7239 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7240
7241 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7242 gcc -Wswitch-default.
7243 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7244 * data/yacc.c (yyparse): Likewise.
7245
7246 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7247
7248 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7249 already. Let config.h define any nonstandard values.
7250
7251 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7252
7253 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7254 for the benefit of slower hosts. Problem reported by
7255 Nelson H. F. Beebe.
7256
7257 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7258
7259 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7260 being defined and not used.
7261 * data/lalr1.cc (yyparse): Likewise.
7262 Use "if (false)" rather than "if (0)".
7263
7264 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7265
7266 * TODO: Mention that we should allow NUL bytes in tokens.
7267
7268 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7269
7270 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7271 Problem reported by Hans Aberg.
7272
7273 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7274
7275 * src/getargs.c (version): Happy new year; update overall
7276 program copyright date from 2004 to 2005.
7277
7278 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7279 Problem reported by Hans Aberg.
7280 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7281 (Output file names.): Add a test for the case when standard output
7282 is closed.
7283
7284 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7285
7286 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7287 to fix an oversight in the Bison 2.0 manual.
7288
7289 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7290
7291 * NEWS: Version 2.0. Reformat the existing news items since
7292 1.875, so that related items are grouped together.
7293 * configure.ac (AC_INIT): Bump version to 2.0.
7294 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7295
7296 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7297 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7298 otherwise, we're not testing alloca. Unfortunately there's no
7299 simple way to consult HAVE_ALLOCA here.
7300
7301 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7302 for yymsg, too.
7303
7304 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7305 hand. This avoids a warning about comparing int to size_t when
7306 GCC warnings are enabled.
7307
7308 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7309
7310 * NEWS: Bison-generated parsers no longer default to using the
7311 alloca function (when available) to extend the parser stack, due
7312 to widespread problems in unchecked stack-overflow detection.
7313 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7314 responsibility to set it to a positive value. This lets the user
7315 specify a value that is not a preprocessor constant.
7316 * data/yacc.c (YYMAXDEPTH): Likewise.
7317 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7318 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7319 to be a compile-time constant. However, explain the constraints on it.
7320 Also, explain the constraints on YYINITDEPTH.
7321 (Table of Symbols): Explain that alloca is no longer the default.
7322 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7323 to 1.
7324
7325 * doc/bison.texinfo (Location Default Action): Mention that n must
7326 be zero when k is zero. Suggested by Frank Heckenbach.
7327
7328 2004-12-22 Akim Demaille <akim@epita.fr>
7329
7330 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7331 (parser::state_type, parser::semantic_type, parser::location_type):
7332 Private, not public.
7333 (parser::parse): Return ints, not bool.
7334 Returning a bool introduces a problem: 0 corresponds to false, and
7335 it seems weird to return false on success. Returning true changes
7336 the conventions for yyparse.
7337 Alternatively we could return void and send an exception.
7338 There is no clear consensus (yet?).
7339 (state_stack, semantic_stack, location_stack): Rename as...
7340 (state_stack_type, semantic_stack_type, location_stack_type): these.
7341 Private, not public.
7342 * tests/c++.at: New.
7343 * tests/testsuite.at, tests/Makefile.am: Adjust.
7344
7345 2004-12-21 Akim Demaille <akim@epita.fr>
7346
7347 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7348
7349 2004-12-21 Akim Demaille <akim@epita.fr>
7350
7351 Don't impose std::string for filenames.
7352
7353 * data/lalr1.cc (b4_filename_type): New.
7354 (position::filename): Use it.
7355 (parser.hh): Move the inclusion of stack.hh and location.hh below
7356 the user code, so that needed headers for the filename type can be
7357 included first.
7358 Forward declare them before the user code.
7359 * tests/Makefile.am (check-local, installcheck-local): Pass
7360 TESTSUITEFLAGS to the TESTSUITE.
7361
7362 2004-12-20 Akim Demaille <akim@epita.fr>
7363
7364 Use more STL like names: my_class instead of MyClass.
7365
7366 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7367 (SemanticStack, SemanticType, StateStack, StateType)
7368 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7369 (Parser::value): Rename as...
7370 (location_stack, location_type, rhs_number_type, semantic_stack)
7371 (semantic_type, state_stack, state_type, token_number_type, stack)
7372 (slice, traits, parser::yylloc, parser::yylval): these.
7373
7374 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7375
7376 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7377
7378 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7379 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7380
7381 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7382
7383 Remove uses of 'short int' and 'unsigned short int'. This raises
7384 some arbitrary limits. It uses more memory but nowadays that's
7385 not much of an issue.
7386
7387 This change does not affect the generated parsers; that's a different
7388 task, as some users will want to conserve memory there.
7389
7390 Ideally we should use size_t to represent all object counts, and
7391 something like ptrdiff_t to represent signed differences of object
7392 counts; but that will require more code-cleanup than I have the
7393 time to do right now.
7394
7395 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7396 Use size_t, not int or short int, to count objects.
7397 * src/closure.c (nritemset, closure): Likewise.
7398 * src/closure.h (nritemset, closure): Likewise.
7399 * src/nullable.c (nullable_compute): Likewise.
7400 * src/print.c (print_core): Likewise.
7401 * src/print_graph.c (print_core): Likewise.
7402 * src/state.c (state_compare, state_hash): Likewise.
7403 * src/state.h (struct state): Likewise.
7404 * src/tables.c (default_goto, goto_actions): Likewise.
7405
7406 * src/gram.h (rule_number, rule): Use int, not short int.
7407 * src/output.c (prepare_rules): Likewise.
7408 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7409 errs, reductions): Likewise.
7410 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7411 Likewise.
7412 * src/tables.c (vector_number, tally, action_number,
7413 ACTION_NUMBER_MINIMUM): Likewise.
7414 * src/output.c (muscle_insert_short_int_table): Remove.
7415
7416 2004-12-17 Akim Demaille <akim@epita.fr>
7417
7418 * data/lalr1.cc: Extensive Doxygenation.
7419 (error_): Rename as...
7420 (error): this, since it is visible to the user.
7421 Adjust callers.
7422 (Parser::message): Now an automatic variable from...
7423 (Parser::yyreport_syntax_error_): here.
7424 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7425 Parser::error.
7426 * tests/input.at: Escape $.
7427
7428 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7429
7430 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7431 Parenthesize rhs to avoid obscure problems with mistakes like
7432 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7433 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7434 b4_rhs_location): Likewise.
7435 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7436 b4_rhs_location): Likewise.
7437
7438 2004-12-16 Akim Demaille <akim@epita.fr>
7439
7440 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7441 yacc.c: be sure to stay within yycheck_.
7442 * tests/actions.at: Re-enable C++ tests.
7443
7444 2004-12-16 Akim Demaille <akim@epita.fr>
7445
7446 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7447 real.
7448
7449 2004-12-16 Akim Demaille <akim@epita.fr>
7450
7451 Use #define to handle the %name-prefix.
7452
7453 * data/glr.c, data/yacc.c: Comment changes.
7454 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7455 so that one can refer to yylex in the parser file, and have it
7456 renamed, as is the case with other skeletons.
7457
7458 2004-12-16 Akim Demaille <akim@epita.fr>
7459
7460 Move lalr1.cc internals into yy*.
7461
7462 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7463 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7464 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7465 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7466 (empty_, final_, terror_, errcode_, ntokens_)
7467 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7468 (looka_, ilooka_, error_range_, nerrs_):
7469 Rename as...
7470 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7471 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7472 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7473 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7474 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7475 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7476 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7477 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7478 these.
7479
7480 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7481
7482 Fix some problems reported by twlevo at xs4all.
7483 * src/symtab.c (symbol_new): Report an error if the input grammar
7484 contains too many symbols. This is better than calling abort() later.
7485 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7486 (struct node, struct graph):
7487 Rename member expand to stretch. All uses changed.
7488 (struct graph): Remove member layoutalgorithm. All uses removed.
7489 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7490 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7491 All uses changed.
7492 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7493
7494 2004-12-15 Akim Demaille <akim@epita.fr>
7495
7496 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7497 Add more Doxygen comments.
7498 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7499 (report_syntax_error_, translate_): Rename as...
7500 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7501 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7502
7503 2004-12-15 Akim Demaille <akim@epita.fr>
7504
7505 * data/lalr1.cc (lex_): Rename as...
7506 (yylex_): this.
7507 Move the trace here.
7508 Take the %name-prefix into account.
7509 Reported by Alexandre Duret-Lutz.
7510
7511 2004-12-15 Akim Demaille <akim@epita.fr>
7512
7513 Simplify the C++ parser constructor.
7514
7515 * data/lalr1.cc (debug_): Rename as...
7516 (yydebug_): so that the parser's internals are always in the yy*
7517 pseudo namespace.
7518 Adjust uses.
7519 (b4_parse_param_decl): Remove the leading comma as it is now only
7520 called as unique argument list.
7521 (Parser::Parser): Remove the constructor accepting a location and
7522 an initial debugging level.
7523 Remove from the other ctor the argument for the debugging level.
7524 (debug_level_type, debug_level, set_debug_level): New.
7525
7526 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7527 constructor calls.
7528
7529 2004-12-15 Akim Demaille <akim@epita.fr>
7530
7531 Remove b4_root related material: failure experiment
7532 (which goal was to allow to derive from a class).
7533
7534 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7535 definitions and uses.
7536
7537 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7538
7539 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7540 not 2, since it's not portable to subtract 1 from the start of an
7541 array. The new item 0 is never set or used. All uses changed.
7542
7543 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7544 the default definition of YYLLOC_DEFAULT. Problem reported
7545 by Frank Heckenbach.
7546
7547 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7548
7549 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7550 the normal case and one for the error case. Just use the
7551 first one uniformly. Problem reported by Frank Heckenbach.
7552 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7553 use exactly the same macro in both places.
7554 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7555 so that the normal-case YYRHSLOC works for the error case too.
7556 All uses changed.
7557 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7558 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7559 * doc/bison.texinfo (Location Default Action): Don't claim that
7560 we have an array of locations. Use the same macro for both glr
7561 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7562 the index is 0.
7563
7564 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7565
7566 * HACKING: Update email addresses to send announcements to.
7567
7568 * configure.ac (AC_INIT): Bump version to 1.875f.
7569
7570 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7571
7572 * NEWS: Version 1.875e.
7573 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7574
7575 * src/scan-skel.l: Include "complain.h", for "fatal".
7576
7577 * src/relation.h (relation_print, relation_digraph):
7578 Relation sizes are of type relation_node, not size_t (this is
7579 merely a doc fix, since the two types are equivalent).
7580 (relation_transpose): Relation sizes are of type relation_node,
7581 not int.
7582 * src/relation.c: Likewise.
7583 (top, infinity): Now of type relation_node, not int.
7584 (traverse, relation_transpose): Use relation_node, not int.
7585
7586 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7587 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7588 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7589
7590 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7591 specifying whether the test should be skipped. Use it tp
7592 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7593 fail on some hosts, and should be skipped.
7594
7595 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7596
7597 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7598 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7599 unless otherwise specified below.
7600
7601 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7602 to allocate kernel_base, kernel_items, kernel_size, since
7603 they needn't be initialized to 0.
7604 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7605 * src/closure.c (new_closure): Likewise, for itemset.
7606 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7607 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7608 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7609 (build_relations): Likewise for edge, states1, includes.
7610 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7611 * src/reader.c (packgram): Likewise, for ritem, rules.
7612 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7613 * src/relation.c (relation_digraph): Likewise for VERTICES.
7614 (relation_transpose): Likewise for new_R, end_R.
7615 * src/symtab.c (symbols_token_translations_init): Likewise for
7616 token_translations.
7617 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7618 (token_actions): Likewise for yydefact, actrow, conflrow,
7619 conflict_list.
7620 (save_column): Likewise for froms[symno], tos[symno].
7621 (goto_actions): Likewise for state_count.
7622 (pack_table): Likewise for base, pos, check.
7623 (tables_generate): Likewise for width.
7624
7625 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7626 for initial core. Just have a separate core, so we needn't worry
7627 about whether kernel_size and kernel_base are initialized.
7628
7629 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7630 kernel_size, kernel_items): Remove unnecessary initialization.
7631 * src/conflicts.c (conflicts): Likewise.
7632 * src/derives.c (derives): Likewise.
7633 * src/muscle_tablc (muscle_insert): Likewise.
7634 * src/relation.c (relation_digraph): Likewise.
7635 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7636 conflrow, conflict_table, conflict_list, table, check):
7637 Likewise.
7638
7639 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7640 This is because all callers pass unsigned int.
7641 * src/closure.h (new_closure): Likewise.
7642
7643 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7644 (build_relations): Initialize includes[i] in all cases.
7645 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7646 and rules[ruleno].precsym. Initialize members in order.
7647 * src/relation.c (relation_transpose): Always initialize new_R[i]
7648 and end_R[i].
7649 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7650
7651 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7652 conflict_list[0] was always 0, but now it isn't initialized.
7653
7654 * src/table.c (table_grow): When conflict_table grew, the grown
7655 area wasn't cleared. Fix this.
7656
7657 * lib/.cvsignore: Add strdup.c, strdup.h.
7658 * m4/.cvsignore: Add strdup.m4.
7659
7660 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7661
7662 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7663 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7664 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7665 ngotos + 1 without checking for overflow.
7666 (build_relations): Use END_NODE, not -1, to denote end of edges.
7667 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7668 build_relations): Use goto_number, not int, for goto numbers.
7669 * src/tables.c (save_column, default_goto): Likewise.
7670
7671 2004-11-23 Akim Demaille <akim@epita.fr>
7672
7673 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7674 of #defining from yystype.
7675 Don't typedef yystype, C++ does not need it.
7676 This lets it possible to forward declare it as union.
7677
7678 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7679
7680 * bootstrap (gnulib_modules): Add extensions.
7681 Problem reported by Jim Meyering.
7682
7683 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7684
7685 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7686 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7687 src/system.h, src/tables.c: XFREE -> free, to accommodate
7688 recent change to gnulib xalloc.h.
7689 Problem reported by Jim Meyering.
7690
7691 2004-11-17 Akim Demaille <akim@epita.fr>
7692
7693 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7694
7695 2004-11-17 Akim Demaille <akim@epita.fr>,
7696 Alexandre Duret-Lutz <adl@gnu.org>
7697
7698 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7699 changes.
7700 (YYCDEBUG): Adjust.
7701 Use it instead of cdebug_.
7702 (Parser::debug_stream, Parser::set_debug_stream): New.
7703 (Parser::symprint_): Define cdebug_ for temporary backward
7704 compatibility.
7705 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7706 debug_stream ().
7707
7708 2004-11-17 Akim Demaille <akim@epita.fr>
7709
7710 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7711 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7712 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7713 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7714
7715 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7716
7717 * data/glr.c (yyloc_default): Remove; not used.
7718 Problem reported by Frank Heckenbach.
7719
7720 2004-10-25 Akim Demaille <akim@epita.fr>
7721
7722 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7723 Introduce another definition to address simple location arrays.
7724 (yyGLRStack): New member: yyerror_range.
7725 (yyrecoverSyntaxError, yyparse): Update it.
7726 (yyrecoverSyntaxError): Use it when shifting the error token to
7727 have an accurate range, equivalent to the one computed by both
7728 yacc.c and lalr1.cc.
7729 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7730 that column numbers start at column 0, as per GNU Coding
7731 Standards, the others tests, and the doc.
7732 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7733 Adjust to the above change (first column is 0).
7734 And adjust the location of the "<error>", now covering the whole
7735 line.
7736
7737 2004-10-22 Akim Demaille <akim@epita.fr>
7738 and Paul Eggert <eggert@cs.ucla.edu>
7739
7740 Remove some arbitrary limits on goto numbers and relations.
7741 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7742 initial values, since they're never used.
7743 (set_goto_map): ngotos is now unsigned, so test for overflow
7744 by seeing whether it wraps around to zero.
7745 * src/lalr.h (goto_number): Now size_t, not short int.
7746 (GOTO_NUMBER_MAXIMUM): Remove.
7747 * src/relation.c (relation_print, traverse, relation_transpose):
7748 Check for END_NODE rather than looking at sign.
7749 * src/relation.h (END_NODE): New macro.
7750 (relation_node): Now size_t, not short int.
7751
7752 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7753
7754 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7755 keyword, not an identifier. Problem reported by Baron Schwartz in
7756 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7757
7758 2004-10-11 Akim Demaille <akim@epita.fr>
7759
7760 * src/symtab.c (symbol_check_alias_consistency): Also check
7761 type names, destructors, and printers.
7762 Reported by Alexandre Duret-Lutz.
7763 Recode the handling of associativity and precedence in terms
7764 of symbol_precedence_set.
7765 Accept no redeclaration at all, not even equal to the previous
7766 value.
7767 (redeclaration): New.
7768 Use it to factor redeclaration complaints.
7769 (symbol_make_alias): Don't set the type of the alias, let
7770 symbol_check_alias_consistency do it as for other features.
7771 * src/symtab.h (symbol): Add new member prec_location, and
7772 type_location.
7773 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7774 * tests/input.at (Incompatible Aliases): New.
7775
7776 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7777
7778 .cvsignore fixes to accommodate gnulib changes,
7779 and the practice of naming build directories "_build".
7780 * .cvsignore: Add "_*". Sort.
7781 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7782 * m4/.cvsignore: Add "*_gl.m4".
7783
7784 2004-10-06 Akim Demaille <akim@epita.fr>
7785
7786 * src/parse-gram.y (add_param): Fix the truncation of trailing
7787 spaces.
7788
7789 2004-10-05 Akim Demaille <akim@epita.fr>
7790
7791 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7792 whether the reducion was empty or not. This leaves room to
7793 improve the use of YYLLOC_DEFAULT in such a case.
7794 lalr1.cc is still experimental, so changing this is acceptable.
7795 And finally, there are probably not many users who changed the
7796 handling of locations in GLR, so changing is admissible too.
7797
7798 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7799 empty reduction, set @$ to an empty location ending the previously
7800 stacked symbol.
7801 Adjust uses to make sure the code is triggered on empty
7802 reductions.
7803 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7804 expected output: empty reductions have empty locations.
7805
7806 2004-09-29 Akim Demaille <akim@epita.fr>
7807
7808 * data/lalr1.cc: Move towards a more standard C++ coding style
7809 for templates: Class < T > -> Class<T>.
7810
7811 2004-09-29 Akim Demaille <akim@epita.fr>
7812
7813 * data/lalr1.cc: Reinstall the former ctor, for sake of
7814 compatibility, but warn it will be removed.
7815 Move towards a more standard C++ coding style (i.e., type *var ->
7816 type* var).
7817
7818 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7819
7820 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7821 since it's less likely to work if NULs are involved in the future.
7822
7823 2004-09-27 Akim Demaille <akim@epita.fr>
7824
7825 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7826
7827 2004-09-27 Akim Demaille <akim@epita.fr>
7828
7829 * data/lalr1.cc (b4_parse_param_decl_1): New.
7830 (b4_parse_param_decl): Use it to have different names between attribute
7831 and argument names.
7832 (b4_cc_constructor_call): Likewise.
7833
7834 2004-09-24 Akim Demaille <akim@epita.fr>
7835
7836 * src/parse-gram.y (add_param): Strip the leading and trailing
7837 blanks from a formal argument declaration.
7838 (YY_LOCATION_PRINT): New.
7839
7840 2004-09-24 Akim Demaille <akim@epita.fr>
7841
7842 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7843 after the location.
7844
7845 2004-09-24 Akim Demaille <akim@epita.fr>
7846
7847 * doc/bison.texinfo (Table of Symbols): Sort.
7848
7849 2004-09-21 Akim Demaille <akim@epita.fr>
7850
7851 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7852 the useless parentheses.
7853 Suggested by Paul Eggert.
7854
7855 2004-09-20 Akim Demaille <akim@epita.fr>
7856
7857 Let the initial-action act on the look-ahead, and use it for the
7858 "initial push" (corresponding to an hypothetical beginning-of-file).
7859 And let lalr1.cc honor %initial-action.
7860
7861 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7862 example.
7863 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7864 (Parser::Parser): Remove the ctor that used to initialize it.
7865 (Parser::parse): Like in the other skeletons, issue the "starting
7866 parse" message before any action.
7867 Honor %initial-action.
7868 Initialize the stacks with the lookahead.
7869 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7870 look-ahead.
7871 Push them in the stacks.
7872 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
7873
7874 2004-09-20 Akim Demaille <akim@epita.fr>
7875
7876 * doc/bison.texinfo (Initial Action Decl): New.
7877
7878 2004-09-20 Akim Demaille <akim@epita.fr>
7879
7880 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
7881 clearer criterion to define it.
7882 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
7883 When reducing on an empty RHS, use the latest stacked location as
7884 location.
7885 yylloc is not always available.
7886 * data/glr.c: Likewise.
7887 Also, honor initial-actions.
7888
7889 2004-09-20 Akim Demaille <akim@epita.fr>
7890
7891 * data/yacc.c (YY_LOCATION_PRINT): New.
7892 Define when we know YYLTYPE's structure, i.e., when the default
7893 YYLLOC_DEFAULT is used.
7894 * data/c.m4 (b4_yysymprint_generate): Use it.
7895 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
7896 value of the result.
7897 (error_start_): Replace with...
7898 (error_range_): this location array.
7899 This allows to replace code relying on the implementation of
7900 locations by portable code.
7901 * data/yacc.c (yylerrsp): Replace with...
7902 (yyerror_range): this.
7903 Every time a token is popped, update yyerror_range[0], to have an
7904 accurate location for the error token.
7905 * data/glr.c (YY_LOCATION_PRINT): New.
7906 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
7907 deference a pointer.
7908 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
7909 report the location in %printers.
7910
7911 * src/scan-skel.l: Instead of abort, report error messages to ease
7912 understanding skeleton scanning failures.
7913
7914 2004-09-16 Akim Demaille <akim@epita.fr>
7915
7916 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
7917 (iterator, const_iterator): these, to be more in the C++ spirit.
7918 Also, return reverse iterators so that when displaying the stack
7919 we display its bottom first.
7920 (Parser::stack_print_, Parser::reduce_print_): Match the messages
7921 from yacc.c.
7922 We should probably use vector here though.
7923
7924 2004-09-16 Akim Demaille <akim@epita.fr>
7925
7926 Have more complete shift traces.
7927
7928 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
7929 to report Shifts instead of ad hoc YYDPRINTF invocations,
7930 including for the error token.
7931 * data/lalr1.cc (symprint_): Output the location.
7932 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
7933 output the location within the %printer.
7934 Activate GLR tests, at least to make sure they compile properly.
7935 They still don't pass though.
7936 * tests/calc.at: Adjust expect verbose output, since now "Entering
7937 state..." is on a different line than the "Shifting" message.
7938
7939 2004-09-08 Akim Demaille <akim@epita.fr>
7940
7941 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
7942 Bison directive from the Bison file to the invocation of this
7943 macro, so that these directives are passed to
7944 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
7945 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
7946 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
7947 the extra Bison directives instead of the whole series.
7948 Change the grammar so that there are recoverable errors, and
7949 unrecoverable errors. Now we can have the parser give up before
7950 consuming the whole input. As a result we now can observe that
7951 the lookahead is freed when needed.
7952 Change the parser source to parse argv[1] instead of a hard coded
7953 string.
7954 Simplify yylex, and give a value and location to EOF.
7955 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
7956 passed directives already coded in the file.
7957 Add some tests to check the location of "error".
7958 For some tests, the C++ parser is correct, and not yacc.c.
7959 For other tests, they provide different, but unsatisfying, values,
7960 so keep the C++ value so that at least one parser is "correct"
7961 according to the test suite.
7962 (Actions after errors): Remove, this is subsumed by the
7963 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
7964
7965 2004-09-06 Akim Demaille <akim@epita.fr>
7966
7967 * data/lalr1.cc: Adjust the indentation of the labels.
7968 (Parser::pop): New.
7969 Use it.
7970
7971 2004-09-06 Akim Demaille <akim@epita.fr>
7972
7973 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
7974 argument, an informative message.
7975 Call YY_SYMBOL_PRINT.
7976 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
7977 * data/lalr1.cc (destruct_): Likewise.
7978 In addition, no longer depend on b4_yysymprint_generate and
7979 b4_yydestruct_generate to generate these functions, do it "by
7980 hand".
7981
7982 2004-09-03 Akim Demaille <akim@epita.fr>
7983
7984 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
7985 invoked, yydestruct the lookahead.
7986 * tests/calc.at (Calculator $1): Update the expected lengths of
7987 traces: there is an added line for the discarded lookahead.
7988 * doc/bison.texinfo (Destructor Decl): Some rewording.
7989 Define "discarded" symbols.
7990
7991 2004-09-02 Akim Demaille <akim@epita.fr>
7992
7993 * data/lalr1.cc (translate_, destruct_): No reason to be static.
7994
7995 2004-09-02 Akim Demaille <akim@epita.fr>
7996
7997 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
7998 (YYDSYMPRINTF): Rename as...
7999 (YY_SYMBOL_PRINT): this.
8000 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8001 two.
8002 Use it instead of direct symprint_ calls.
8003 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8004 one.
8005
8006 2004-09-02 Akim Demaille <akim@epita.fr>
8007
8008 * data/lalr1.cc (b4_yysymprint_generate): New.
8009 (symprint_): New member function, defined when YYDEBUG.
8010 Use it consistently instead of token/nterm debugging output by
8011 hand.
8012 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8013 %printer calls to use cdebug_ when using lalr1.cc.
8014
8015 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8016
8017 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8018 with #ifdef YYDEBUG.
8019
8020 2004-08-26 Akim Demaille <akim@epita.fr>
8021
8022 * doc/bison.texinfo (Implementing Loops): Rename as...
8023 (Implementing Gotos/Loops): this.
8024
8025 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8026
8027 Adjust to latest gnulib.
8028 * bootstrap (gnulib_modules): Add xalloc-die.
8029 Set LC_ALL=C so that file names sort consistently.
8030 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8031 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8032 uintmax_t.m4, ulonglong.m4.
8033 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8034 po.m4 since we are now using _gl.m4 instead.
8035
8036 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8037
8038 * src/scan-action.l: Remove. Scanning of semantic actions is
8039 handled in scan-gram.l.
8040
8041 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8042
8043 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8044
8045 * src/location.h (struct): The file member is a uniqstr.
8046 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8047
8048 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8049
8050 Fix bug with non-%union parsers that have printers or destructors,
8051 which led to a Bison core dump. Reported by Peter Fales in
8052 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
8053
8054 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8055 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8056 not to our own type.
8057 * src/output.c (symbol_destructors_output, symbol_printers_output):
8058 Don't assume %union.
8059 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8060 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8061 UNION-FLAG. All callers changed.
8062 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8063 Use type char, not unsigned int, when declaring an array of char;
8064 this lets us remove a cast.
8065 (Printers and Destructors): Add non-%union test cases.
8066
8067 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8068
8069 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8070 GLR writeups. E.g., avoid frenchspacing and the future tense,
8071 change "lookahead" to "look-ahead", and change "wrt" to "with
8072 respect to".
8073
8074 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8075
8076 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8077 New sections, split off from the GLR Parsers section. Put the new
8078 Simple GLR Parser near the start of the GLR section, for clarity.
8079 Rewrite connective text.
8080
8081 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
8082
8083 * doc/bison.texinfo (Simple GLR Parsers): New section.
8084
8085 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8086
8087 * NEWS, TODO, doc/bison.texinfo:
8088 Use "look-ahead" instead of "lookahead", to be consistent.
8089 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8090 while we're fixing "look-ahead".
8091 * src/conflicts.c (shift_set): Renamed from shiftset.
8092 (look_ahead_set): Renamed from lookaheadset.
8093 * src/print.c: Likewise.
8094 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8095 name for "lookahead".
8096 (report_types, usage): Likewise.
8097 * src/getargs.h (report_look_ahead_tokens): Renamed from
8098 report_lookaheads.
8099 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8100 compute_lookaheads.
8101 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8102 (look_ahead_tokens_print): Renamed from lookaheads_print.
8103 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8104 state_rule_lookaheads_print.
8105 * src/state.h: Likewise.
8106 (reductions.look_ahead_tokens): Renamed from lookaheads.
8107 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8108 AT_DATA_LOOKAHEADS_GRAMMAR.
8109
8110 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8111
8112 * README: Update location of patched M4 distribution.
8113
8114 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8115
8116 Don't assume the C++ compiler takes the same arguments as the C compiler
8117 (trivial change).
8118 * configure.ac (O0CXXFLAGS): New var.
8119 * tests/atlocal.in (CXXFLAGS): Use it.
8120
8121 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8122
8123 Fix some "make check" problems with C++ reported by
8124 Albert Chin-A-Young for Tru64 C++ in this thread:
8125 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8126
8127 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8128 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8129 Output to a .cc file for C++, not to a .c file.
8130 * tests/calc.at (AT_CHECK_CALC): Likewise.
8131 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8132 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8133
8134 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8135
8136 * tests/calc.at, tests/actions.at: Workaround for SGI
8137 C++ compiler. (trivial change)
8138
8139 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8140
8141 Spent a few hours checking out which prerequisite versions the
8142 current sources actually require. I went all the way back to
8143 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8144 a seemingly endless set of combinations of versions more recent
8145 than that. The bottom line is that the current sources require
8146 fairly recent versions of the build tools, and it'll be some work
8147 to change this.
8148 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8149 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8150 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8151 Add comments explaining why those particular versions are
8152 currently needed.
8153
8154 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8155 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
8156 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
8157
8158 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8159 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8160
8161 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8162
8163 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8164 0.11.5. Suggested by Bruno Haible.
8165 * bootstrap: Remove gettext version checking.
8166
8167 * doc/bison.texinfo (Decl Summary): Also mention that %union
8168 can depend on prerequisite types. Problem reported by Tim
8169 Van Holder.
8170
8171 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8172
8173 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8174 * README-alpha: Don't tell people not to package this.
8175
8176 * bootstrap: Don't assume $(...) works; use `...` instead.
8177 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8178 gettext better.
8179
8180 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8181 put into the -d output file, and mention what to do if YYSTYPE is
8182 defined as a macro.
8183
8184 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8185
8186 Undo change made earlier today: it caused autopoint to not bring
8187 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8188 autopoint's.
8189
8190 * bootstrap: Check that gettext version matches what's in
8191 configure.ac. Warn users to ignore robots.txt ERROR 404.
8192 * bootstrap: Undo today's earlier change (logged below).
8193 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8194
8195 The gettext version checking is causing more trouble than it's
8196 curing; remove it. Problem reported by Paul Hilfinger.
8197
8198 * bootstrap: Issue a warning that one can expect a message
8199 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8200 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8201
8202 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8203
8204 Ensure that the C++ compiler used for testing actually works on a
8205 simple test program; if not, skip the C++-related tests. Problem
8206 reported by Vin Shelton in:
8207 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8208
8209 * m4/cxx.m4: New file.
8210 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8211 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8212 * tests/local.at (AT_COMPILE_CXX): Use it.
8213
8214 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8215
8216 * data/glr.c (yylloc): Output this macro even if locations are not
8217 being generated, as the GLR parser needs it even in that case.
8218 Problem reported by Troy A. Johnson
8219 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8220
8221 * configure.ac (AC_INIT): Update to 1.875e.
8222
8223 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8224
8225 * NEWS: Version 1.875d.
8226 * configure.ac (AC_INIT): Likewise.
8227 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8228
8229 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8230 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8231 lalr1.cc runs afoul of the first, and the last two are no longer
8232 supported by GCC 3.4.0.
8233 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8234 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8235
8236 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8237
8238 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8239 unsigned int, for compatibility with latest gnulib hash module.
8240 * src/state.c (state_hash, state_hasher): Likewise.
8241 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8242 * src/uniqstr.c (hash_uniqstr): Likewise.
8243
8244 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8245
8246 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8247
8248 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8249 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8250 character and string literals.
8251 (unexpected_end): New function.
8252 (unexpected_eof): Use it.
8253 (unexpected_newline): New function.
8254 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8255 actions.
8256
8257 * NEWS: Document %expect-rr.
8258
8259 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8260 Fix typo by replacing $1 with $option.
8261 Remove more 'intl'-related files.
8262 Don't DEFUN AM_INTL_SUBDIR twice.
8263
8264 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8265 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8266 strtoul.c.
8267 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8268 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8269 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8270 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8271 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8272 * src/.cvsignore: Add *.output.
8273
8274 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8275 gets copied to the output file.
8276
8277 2004-04-28 Paul Eggert <eggert@twinsun.com>
8278
8279 Get files from the gnulib and po repositories, instead of relying
8280 on them being in our CVS. Upgrade to latest versions of gnulib
8281 and Automake.
8282
8283 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8284 * bootstrap: Bootstrap from gnulib and po repositories.
8285 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8286 * README-cvs: Document these changes. Remove version numbers from
8287 mentions of build tools, since they change so often. Mention Flex.
8288
8289 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8290 (gl_USE_SYSTEM_EXTENSIONS): Add.
8291 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8292 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
8293 does this for us.
8294 (AC_ISC_POSIX): Remove; we no longer support this
8295 ancient OS, as it gets in the way of latest Autoconf & gnulib.
8296 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8297 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8298 Do not check for C89 headers, except for locale.h which is used
8299 by the Yacc library and must port to K&R hosts.
8300 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8301 Do not check for C89 functions, except for setlocale which is
8302 used by the Yacc library.
8303 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8304 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8305 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8306 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8307 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8308 AM_GNU_GETTEXT): Remove; now done by:
8309 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8310 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8311 for us.
8312
8313 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8314 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8315 Define to empty, as gnulib.mk will do the rest for us.
8316 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8317 for us.
8318 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8319 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8320
8321 * src/files.c: Include gnulib's xstrndup.h.
8322
8323 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8324 (REALLOC): Use xnrealloc, for likewise.
8325 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8326 (strnlen, memrchr): Remove decls; functions no longer used.
8327 Include <stpcpy.h>.
8328
8329 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8330 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8331 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8332 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8333 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8334 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8335 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8336 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8337 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8338 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8339 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8340 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8341 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8342 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8343 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8344 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8345 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8346 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8347 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8348 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8349 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8350 Remove, as these files are now generated automatically
8351 by bootstrap or automake.
8352
8353 * po/ChangeLog: Remove: all but one entry was a duplicate
8354 of this file, and I moved that 2000-11-02 entry here.
8355
8356 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8357 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8358 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8359 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8360 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8361 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8362 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8363 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8364 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8365 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8366 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8367 xstrndup.h.
8368 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8369 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8370 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8371 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8372 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8373 * src/.cvsignore: Remove *_.c.
8374
8375
8376 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8377 support it. (The latest stable gzip doesn't.)
8378
8379 2004-04-27 Paul Eggert <eggert@twinsun.com>
8380
8381 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8382 case, as stos_ is now used by destructors due to the 2004-02-09
8383 change.
8384
8385 Remove more K&R C support.
8386 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8387 * lib/subpipe.c (errno): Remove decl.
8388 Include <stdlib.h> unconditionally.
8389 (EXIT_FAILURE): Remove macro.
8390 * src/complain.c (vfprintf, strerror): Remove.
8391 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8392 unconditionally.
8393 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8394 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8395 (strchr, strspn, memchr): Remove decls.
8396 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8397 unconditionally. Do not declare perror.
8398 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8399 unconditionally.
8400
8401 * src/complain.c (_): Remove useless defn, as system.h defines this.
8402
8403 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8404 with latest obstack.h.
8405 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8406 to procedure types, as obstack.h now does that for us.
8407 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8408
8409 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8410 so that this include file can stand alone.
8411 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8412 does this now. Include subpipe.h first after config.h, to
8413 test whether it can stand alone.
8414
8415 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8416 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8417 unused declaration.
8418
8419 * tests/synclines.at (%union synch line): Put a dummy member in
8420 the union, because empty unions aren't allowed in C. Caught
8421 by GCC 3.4.0.
8422
8423 2004-04-13 Jim Meyering <jim@meyering.net>
8424
8425 * src/conflicts.c (conflicts_print): Correct format string typo:
8426 use `%%' to produce literal `%'. (trivial change)
8427
8428 2004-03-30 Paul Eggert <eggert@twinsun.com>
8429
8430 * src/getargs.c (version): Update copyright year to 2004.
8431
8432 * data/c.m4 (b4_int_type): Use 'short int' rather than
8433 'short', and similarly for 'long', 'unsigned', etc.
8434 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8435 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8436 yy_yypstack, yydumpstack): Likewise.
8437 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8438 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8439 Likewise.
8440 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8441 yy_stack_print, yyparse): Likewise.
8442 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8443 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8444 * lib/bitset.c (bitset_print): Likewise.
8445 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8446 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8447 * lib/bitsetv.c (bitsetv_dump): Likewise.
8448 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8449 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8450 Likewise.
8451 * src/LR0.c (allocate_itemsets): Likewise.
8452 * src/gram.h (rule_number, rule): Likewise.
8453 * src/lalr.h (goto_number): Likewise.
8454 * src/nullable.c (nullable_compute): Likewise.
8455 * src/output.c (prepare_rules): Likewise.
8456 * src/relation.c (relation_print, relation_digraph): Likewise.
8457 * src/relation.h (relation_node): Likewise.
8458 * src/state.h (state_number, transitions, errs, reductions,
8459 struct state): Likewise.
8460 * src/symtab.h (symbol_number, struct symbol): Likewise.
8461 * src/tables.c (vector_number, tally, action_number,
8462 default_goto, goto_actions): Likewise.
8463 * tests/existing.at (GNU Cim Grammar): Likewise.
8464 * tests/regression.at (Web2c Actions): Likewise.
8465
8466 * src/output.c (muscle_insert_short_int_table): Renamed from
8467 muscle_insert_short_table. All uses changed.
8468
8469 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8470
8471 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8472 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8473 Add %expect-rr rule.
8474
8475 * src/scan-gram.l: Recognize %expect-rr.
8476
8477 * src/conflicts.h (expected_sr_conflicts): Rename from
8478 expected_conflicts.
8479 (expected_rr_conflicts): Declare.
8480
8481 * src/conflicts.c (expected_sr_conflicts): Rename from
8482 expected_conflicts.
8483 (expected_rr_conflicts): Define.
8484 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8485 for GLR parsers.
8486 Use expected_sr_conflicts in place of expected_conflicts.
8487 Warn if expected_rr_conflicts used in non-GLR parser.
8488
8489 * doc/bison.texinfo: Add documentation for %expect-rr.
8490
8491 2004-03-08 Paul Eggert <eggert@gnu.org>
8492
8493 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8494 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8495
8496 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8497 in lalr1.cc.
8498 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8499 * src/scan-gram.l (scan_integer): New function.
8500 ({int}): Use it.
8501 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8502 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8503 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8504 Say "long int", not "long", for uniformity with GNU style.
8505
8506 2004-02-25 Paul Eggert <eggert@twinsun.com>
8507
8508 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8509 compilers. This fixes a problem with Intel's C++ compiler being
8510 chatty, reported by Guido Trentalancia in
8511 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8512
8513 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8514
8515 Support %destructor and merge error locations in lalr1.cc.
8516
8517 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8518 (Parser::stos_): Define unconditionally.
8519 (Parser::destruct_): New method. Generate its body with
8520 b4_yydestruct_generate.
8521 (Parser::error_start_): New attribute.
8522 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8523 token which are discarded.
8524 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8525 error_start_ when erroneous token are discarded.
8526 (Parser::parse) <yyerrlab1>: Compute the location of the error
8527 token so that it covers all the discarded tokens.
8528 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8529 it can be called with `%skeleton "lalr1.cc"', and do that.
8530
8531 2004-02-02 Paul Eggert <eggert@twinsun.com>
8532
8533 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8534 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8535 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8536 There's no need to mention top_builddir since Automake does that
8537 for us.
8538 (INCLUDES): Remove, as Automake says it's obsolescent.
8539 Contents migrated into AM_CPPFLAGS as described above.
8540 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8541
8542 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8543
8544 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8545 (yyreportSyntaxError): Handle case where lookahead token is
8546 YYEMPTY.
8547
8548 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8549
8550 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8551 resulting parsers are compilable with C++.
8552
8553 2003-12-23 Paul Eggert <eggert@twinsun.com>
8554
8555 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8556 * src/output.c (output_skeleton): Rename local var.
8557 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8558 Bison tokens, as this runs afoul of the 2003-10-07 change that
8559 disallowed NUL bytes in character constants or string literals.
8560
8561 * tests/local.at: Require Autoconf 2.59's Autotest.
8562 * tests/testsuite.at: Don't include local.at, since we now assume
8563 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8564 including it.
8565 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8566 multiple inclusion warnings.
8567
8568 2003-12-02 Akim Demaille <akim@epita.fr>
8569
8570 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8571 conditions.
8572 From Bruno Haible.
8573
8574 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8575
8576 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8577
8578 2003-10-07 Paul Eggert <eggert@twinsun.com>
8579
8580 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8581 if testsuite doesn't exist.
8582
8583 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8584 literals, unfortunately.
8585 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8586 Complain about NUL bytes in character constants or string literals.
8587
8588 2003-10-05 Paul Eggert <eggert@twinsun.com>
8589
8590 * NEWS: Don't document %no-default-prec, as it's still
8591 too experimental.
8592 * doc/bison.texinfo: Document %no-default-prec only if
8593 the defaultprec flag is set. Normally it's not.
8594
8595 2003-10-04 Paul Eggert <eggert@twinsun.com>
8596
8597 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8598 non-modifiable lvalue, instead of a modifiable one.
8599 * doc/bison.texinfo (Actions): Document that $$ can
8600 be assigned to. Do not claim that $$ and $N are
8601 array element references: user code should not rely on this.
8602
8603 2003-10-01 Paul Eggert <eggert@twinsun.com>
8604
8605 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8606 (grammar_declaration): Use it.
8607 * src/scan-gram.l: New token %no-default-prec.
8608 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8609 * NEWS, doc/bison.texinfo: Document the above.
8610
8611 2003-10-01 Akim Demaille <akim@epita.fr>
8612
8613 VCG no longer supports long_straight_phase.
8614
8615 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8616 * src/print_graph.c (print_graph): Adjust.
8617
8618 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
8619 and Paul Eggert <eggert@twinsun.com>
8620
8621 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8622 Table of Symbols): Document %default-prec.
8623 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8624 (grammar_declaration): Set default_prec on %default-prec.
8625 * src/scan-gram.l (%default-prec): New token.
8626 * src/reader.h (default_prec): New flag.
8627 * src/reader.c: Likewise.
8628 (packgram): Handle it.
8629 * tests/conflicts.at (%default-prec without %prec,
8630 %default-prec with %prec, %default-prec 1): New tests.
8631
8632 2003-09-30 Paul Eggert <eggert@twinsun.com>
8633
8634 * tests/testsuite.at: Include local.at, not input.at, fixing
8635 a typo in the 2003-08-25 patch.
8636
8637 2003-08-27 Akim Demaille <akim@epita.fr>
8638
8639 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8640 GCC warnings.
8641
8642 2003-08-26 Akim Demaille <akim@epita.fr>
8643
8644 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8645 "<\#" to avoid magic from Gnus when posting parts of this script.
8646
8647 2003-08-26 Akim Demaille <akim@epita.fr>
8648
8649 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8650 (Parser::parse): here.
8651 Adjust: nerrs and errstatus is now replaced by...
8652 (Parser::nerrs_, Parser::errstatus_): New.
8653
8654 2003-08-25 Akim Demaille <akim@epita.fr>
8655
8656 * config/announce-gen, Makefile.cfg: New.
8657 * Makefile.am: Adjust.
8658 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8659 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8660
8661 2003-08-25 Akim Demaille <akim@epita.fr>
8662
8663 When reducing initial empty rules, Bison parser read an initial
8664 location that is not defined. This results in garbage, and that
8665 affects Bison's own parser. Therefore we need (i) to extend Bison
8666 to support a means to initialize this location, and (ii) to use
8667 this CVS Bison to fix CVS Bison's parser.
8668
8669 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8670 with...
8671 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8672 * src/parse-gram.y: Adjust.
8673 (%initial-action): New.
8674 (%error-verbose): Since we require CVS Bison, there is no reason
8675 not to use it.
8676 * src/scan-gram.l: Adjust.
8677 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8678 * data/yacc.c (yyparse): Use b4_initial_action.
8679
8680 2003-08-25 Akim Demaille <akim@epita.fr>
8681
8682 * doc/bison.texinfo: Don't promote stdout for error messages.
8683
8684 2003-08-25 Akim Demaille <akim@epita.fr>
8685
8686 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8687 From Alexandre Duret-Lutz.
8688
8689 2003-08-25 Akim Demaille <akim@epita.fr>
8690
8691 Version 1.875c.
8692
8693 2003-08-25 Akim Demaille <akim@epita.fr>
8694
8695 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8696 Use them.
8697
8698 2003-08-25 Akim Demaille <akim@epita.fr>
8699
8700 * data/lalr1.cc (Parser::reduce_print_): New.
8701 Use it.
8702
8703 2003-08-25 Akim Demaille <akim@epita.fr>
8704
8705 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8706 error recovery loops. This patch is based on
8707 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8708 Also, augment the similarity between lalr1.cc and yacc.c.
8709 Note: the locations of error recovery rules are not correct yet.
8710
8711 * data/lalr1.cc: Comment changes to augment the similarity between
8712 lalr1.cc and yacc.c.
8713 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8714 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8715 yyerrlab), when hitting EOF, pop the whole stack here instead of
8716 merely falling thru the default error handling mechanism.
8717 (yyerrorlab): New label, with the old contents of YYERROR,
8718 plus the following change: pop the stack of rhs corresponding
8719 to the production that invoked YYERROR. That is how Yacc
8720 behaves (required by POSIX).
8721 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8722 fail.
8723
8724 2003-08-25 Akim Demaille <akim@epita.fr>
8725
8726 Tune local.at so that people can "autom4te -l autotest calc.at -o
8727 calc" for instance, to extract a sub test suite.
8728
8729 * tests/testsuite.at: Move the initialization, Autotest version
8730 requirement, and AT_TESTED invocation into...
8731 * tests/local.at: here.
8732 * tests/testsuite.at: Include it for compatibility with Autoconf
8733 2.57.
8734 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8735 be ignore.
8736
8737 2003-08-04 Paul Eggert <eggert@twinsun.com>
8738
8739 Rework code slightly to avoid gcc -Wtraditional warnings.
8740 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8741 The returned value is now stored in *YY0. All callers changed.
8742 * src/output.c (merge_output): Adjust to the above change.
8743
8744 2003-07-26 Paul Eggert <eggert@twinsun.com>
8745
8746 * data/glr.c (YYASSERT): New macro.
8747 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8748 yyresolveStates, yyprocessOneStack):
8749 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8750 Derived from a suggestion by Frank Heckenbach.
8751
8752 2003-07-25 Paul Eggert <eggert@twinsun.com>
8753
8754 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8755 for portability to K&R C (after ansi2knr, presumably). See
8756 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8757 by Frank Heckenbach, though I have omitted the structure-initialization
8758 part of his glr-knr.diff patch since I recall that the Portable
8759 C Compiler didn't require that change.
8760
8761 Let the user specify how to allocate and free memory.
8762 Derived from a suggestion by Frank Heckenbach in
8763 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8764 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8765 All uses of free, malloc, realloc changed to use these macros,
8766 and unnecessary casts removed.
8767 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8768
8769 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8770
8771 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8772 use s.empty() rather than s == "" to test for empty string; see
8773 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8774 (trivial change)
8775
8776 2003-06-25 Akim Demaille <akim@epita.fr>
8777
8778 * config/depcomp, config/install-sh: Update from masters.
8779
8780 2003-06-20 Paul Eggert <eggert@twinsun.com>
8781
8782 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8783 and return properly parenthesized result.
8784 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8785 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8786 Remove unnecessary parentheses from uses.
8787 * doc/bison.texinfo (Location Default Action): Describe the
8788 conventions for parentheses.
8789
8790 2003-06-19 Paul Eggert <eggert@twinsun.com>
8791
8792 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8793 yyreportTree): Do not assume that size_t is the same width as int,
8794 when printing sizes. Print sizes using an unsigned format.
8795 Problem reported by Frank Heckenbach in
8796 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8797
8798 Port to Forte Developer 7 C compiler.
8799 * data/glr.c (struct YYLTYPE): If locations are not being used,
8800 declare a single dummy member, as empty structs do not conform
8801 to the C standard.
8802 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8803 the Forte Developer 7 C compiler complains that end-of-loop
8804 code is not reached.
8805
8806 2003-06-17 Paul Eggert <eggert@twinsun.com>
8807
8808 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8809 avoid warnings from picky compilers about redefinition of PARAMS.
8810
8811 2003-06-17 Paul Eggert <eggert@twinsun.com>
8812
8813 Version 1.875b.
8814
8815 * NEWS: Document 1.875b.
8816
8817 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8818 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8819 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8820 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8821 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8822 per recent gettext manual's suggestion.
8823 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8824 Use prototypes, not old-style definitions.
8825 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8826 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8827 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8828 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8829 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8830 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8831 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8832 vbitset_or_and_cmp, vbitset_copy): Likewise.
8833
8834 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8835 Do not include <stdlib.h>.
8836 (PARAMS): Define unconditionally for C89.
8837 (ATTRIBUTE_NORETURN): Remove.
8838 (ATTRIBUTE_UNUSED): Define unconditionally.
8839
8840 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
8841 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8842 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8843 * lib/vbitset.c, lib/vbitset.h: New files.
8844 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8845 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8846 from libbitset.
8847
8848 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8849 `How Can I Reset @code{yyparse}', since texinfo does not allow
8850 arbitrary @ in node names.
8851
8852 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8853 shouldn't be needed according to the gettext 0.12.1 documentation
8854 but which seem to be needed anyway: codeset.m4 glibc21.m4
8855 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8856 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
8857 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
8858
8859 * lib/.cvsignore: Add stdbool.h.
8860 * m4/.cvsignore: Add nls.m4, po.m4.
8861
8862 Upgrade to CVS gnulib.
8863 * stdbool_.h: File renamed from stdbool.h.in.
8864 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8865 AC_HEADER_STDBOOL.
8866 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8867 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8868 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8869 (MOSTLYCLEANFILES): New var.
8870 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
8871 (stdbool.h): New rule.
8872 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
8873 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
8874 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
8875 m4/quote.m4: Upgrade to today's gnulib.
8876
8877 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
8878 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
8879 the tests right now.
8880 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
8881 yyerror are declared before use; C99 requires this.
8882
8883 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8884
8885 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
8886 first.
8887 (yyrecoverSyntaxError): Correct the logic for setting and testing
8888 yyerrState.
8889 Correct comment on handling EOF.
8890 Allow states with only a default reduction, rather than failing
8891 (I can't quite reconstruct why these were not allowed before).
8892
8893 Fixes to avoid problem that $-N rules in GLR parsers can cause
8894 buffer overruns, corrupting state.
8895
8896 * src/output.c (prepare_rules): Output max_left_semantic_context
8897 definition.
8898 * src/reader.h (max_left_semantic_context): New variable declaration.
8899 * src/scan-gram.l (max_left_semantic_context): Define.
8900 (handle_action_dollar): Update max_left_semantic_context.
8901 * data/glr.c (YYMAXLEFT): New definition.
8902 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
8903 (yyresolveAction): Ditto.
8904
8905 Fixes to problems with location handling in GLR parsers reported by
8906 Frank Heckenbach (2003/06/05).
8907
8908 * data/glr.c (YYLTYPE): Make trivial if locations not used.
8909 (YYRHSLOC): Add parentheses, and define only if locations used.
8910 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
8911 locations not used.
8912 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
8913 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8914
8915 * tests/cxx-type.at: Exercise location information; update tests
8916 to differentiate output with and without locations.
8917 Remove forward declarations of yylex and yyerror---caused errors
8918 because default YYLTYPE not yet defined.
8919 Change semantic actions to compute strings, rather than printing
8920 them directly (to test proper passing of semantics values). Change
8921 output to prefix notation and update test data and expected results.
8922 (yylex): Track locations.
8923 (stmtMerge): Return value rather than printing, and include arguments
8924 in value.
8925
8926 2003-06-03 Paul Eggert <eggert@twinsun.com>
8927
8928 Avoid warnings generated by GCC 2.95.4 when Bison is
8929 configured with --enable-gcc-warnings.
8930 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
8931 yy::]b4_parser_class_name[::translate_,
8932 yy::Stack::operator[] (unsigned),
8933 yy::Stack::operator[] (unsigned) const,
8934 yy::Slice::operator[] (unsigned),
8935 yy::Slice::operator[] (unsigned) const):
8936 Rename local vars to avoid warnings.
8937 * tests/glr-regression.at (Improper handling of embedded actions
8938 and $-N in GLR parsers): Remove unused local variable from yylex.
8939 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
8940 (void) as arg when not pure, since we now assume C89 when building
8941 Bison. Pacify GCC by using parameter.
8942
8943 2003-06-02 Paul Eggert <eggert@twinsun.com>
8944
8945 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
8946 yy::Location::lines, yy::Location::columns): Rename arguments
8947 to avoid shadowing; this removes a warning generated by GCC 3.3.
8948
8949 2003-06-01 Paul Eggert <eggert@twinsun.com>
8950
8951 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
8952 to g++, as GCC 3.3 complains if you do it.
8953 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
8954 everything that WARNING_CFLAGS has, except omit warnings
8955 not suitable for C++.
8956 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
8957 * tests/atlocal.in (CXXFLAGS): New var.
8958 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
8959
8960 Fix a GLR parser bug I reported in February; see
8961 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
8962 The problem was that GLR parsers did not conform to the C standard,
8963 because actions like { $1 = $2 + $3; } expanded to expressions
8964 that invoked YYFILL in separate subexpressions, and YYFILL assigned
8965 to a local variable. The C standard says that expressions
8966 like (var = f ()) + (var = f ()) have undefined behavior.
8967 Another problem was that GCC sometimes issues warnings that
8968 yyfill and its parameters are unused.
8969
8970 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
8971 as possibly unused.
8972 (yyfill): New function.
8973 (YYFILL): Use it.
8974 (yyuserAction): Change type of yynormal to bool, so that it matches
8975 the new yyfill signature. Mark it as possibly unused.
8976
8977
8978 Follow up on a bug I reported in February, where a Bison-generated
8979 parser can loop. Provide a test case and a fix for yacc.c. I
8980 don't have a fix for lalr1.cc or for glr.c, unfortunately.
8981 The original bug report is in:
8982 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
8983
8984 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
8985 macro's size was becoming unwieldy.
8986 (yyerrlab): Do not discard an empty lookahead symbol, as this
8987 might destroy garbage.
8988 (yyerrorlab): New label, with the old contents of YYERROR,
8989 plus the following change: pop the stack of rhs corresponding
8990 to the production that invoked YYERROR. That is how Yacc
8991 behaves, and POSIX requires this behavior.
8992 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
8993 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
8994 Define 'alarm' to do nothing if unistd.h is not available.
8995 Add a new rule "exp: '-' error;" to test the above change to
8996 data/yacc.c. Use 'alarm' to abort any test taking longer than
8997 10 seconds, as it's probably looping.
8998 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
8999 Also, the new yacc.c generates two fewer diagnostics for an
9000 existing test.
9001
9002 2003-05-24 Paul Eggert <eggert@twinsun.com>
9003
9004 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9005 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9006 This fixes a problem reported by John Bowman when the Compaq/HP
9007 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9008 -ansi -Wall -gall).
9009 * data/yacc.c (union yyalloc): Likewise.
9010 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
9011
9012 Switch from 'int' to 'bool' where that makes sense.
9013
9014 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9015 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9016 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9017 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9018 Return or accept bool, not int. All callers changed.
9019 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9020 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9021 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9022 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9023 bitset_or_and_cmp_): Likewise.
9024 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9025 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9026 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9027 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9028 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9029 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9030 bitset_stats_or_and_cmp): Likewise.
9031 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9032 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9033 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9034 ebitset_xor_cmp): Likewise.
9035 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9036 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9037 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9038 lbitset_xor_cmp): Likewise.
9039 * lib/bbitset.h: Include <stdbool.h>.
9040 (struct bitset_vtable): The following members now return bool, not
9041 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9042 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9043 or_and_cmp).
9044 * src/conflicts.c (count_rr_conflicts): Likewise.
9045 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9046 All uses changed.
9047 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9048 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9049 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9050 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9051 graph_flag): Likewise.
9052 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9053 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9054 graph_flag): Likewise.
9055 * src/output.c (error_verbose): Likewise.
9056 * src/output.h (error_verbose): Likewise.
9057 * src/reader.c (start_flag, typed): Likewise.
9058 * src/reader.h (typed): Likewise.
9059 * src/getargs.c (LOCATIONS_OPTION): New constant.
9060 (long_options, getargs): Use it.
9061 * src/lalr.c (build_relations): Use bool, not int.
9062 * src/nullable.c (nullable_compute): Likewise.
9063 * src/print.c (print_reductions): Likewise.
9064 * src/tables.c (action_row, pack_vector): Likewise.
9065 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9066 * src/output.c (prepare): Use it.
9067 * src/output.c (token_definitions_output,
9068 symbol_destructors_output, symbol_destructors_output): Use string,
9069 not boolean integer, to keep track of whether to output separator.
9070 * src/print_graph.c (print_core): Likewise.
9071 * src/state.c (state_rule_lookaheads_print): Likewise.
9072
9073 * config/install-sh: Sync from automake 1.7.5.
9074
9075 2003-05-14 Paul Eggert <eggert@twinsun.com>
9076
9077 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9078 semicolon after a grammar declaration, in the interest of possible
9079 future changes to the Bison input language.
9080 Do not allow a stray semicolon at the start of the grammar.
9081 (rhses.1): Allow one or more semicolons after any rule, including
9082 just before "|" as required by POSIX.
9083 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9084 grammar.
9085
9086 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9087
9088 %parse-param support for lalr1.cc.
9089
9090 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9091 b4_cc_constructor_calls, b4_cc_constructor_call,
9092 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9093 definitions.
9094 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9095 parse-param arguments.
9096 (yy::b4_parser_class_name): Declare instance variables to
9097 hold parse-param arguments.
9098 * tests/calc.at: s/value/semantic_value/ because value clashes
9099 with a member of yy::b4_parser_class_name. Adjust C++ code
9100 to handle %parse-param. Enable %parse-param test in C++.
9101
9102 2003-05-12 Paul Eggert <eggert@twinsun.com>
9103
9104 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9105 English a bit. Fix fclose typo. Change "const char" to "char
9106 const", and use ANSI C rather than K&R for "main". Suggest
9107 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9108 and suggest yy_switch_to_buffer.
9109
9110 2003-05-05 Paul Eggert <eggert@twinsun.com>
9111
9112 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9113 C89. This avoids a diagnostic on compilers that define __STDC__
9114 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
9115 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9116
9117 2003-05-03 Paul Eggert <eggert@twinsun.com>
9118
9119 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9120 Do not overrun array bounds.
9121 This should fix a bug reported today by Olatunji Oluwabukunmi in
9122 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
9123
9124 2003-04-29 Akim Demaille <akim@epita.fr>
9125
9126 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9127 * src/getargs.c, src/getargs.h: here, as bool, not int.
9128 (nondeterministic_parser): New.
9129 * src/parse-gram.y, src/scan-gram.l: Support
9130 %nondeterministic-parser.
9131 * src/output.c (prepare): Use nondeterministic_parser instead
9132 of glr_parser where appropriate.
9133 * src/tables.c (conflict_row, action_row, save_row)
9134 (token_actions, token_actions, pack_vector): Ditto.
9135
9136 2003-04-29 Akim Demaille <akim@epita.fr>
9137
9138 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9139
9140 2003-04-29 Akim Demaille <akim@epita.fr>
9141
9142 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9143 with %pure-parser and %locations to exercise the patch from Yakov
9144 Markovitch below.
9145
9146 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9147
9148 * data/yacc.c: (b4_lex_param): Corrected for the case where
9149 %lex-param is provided and %pure-parser isn't.
9150
9151 2003-04-27 Paul Eggert <eggert@twinsun.com>
9152
9153 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
9154 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
9155 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9156 if it is not defined.
9157 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9158
9159 2003-04-26 Paul Eggert <eggert@twinsun.com>
9160
9161 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9162 Declare to be of type suitable for the ninf value itself, not of
9163 type suitable for the corresponding table, since the latter might
9164 be unsigned but the ninf value might be negative. This fixes a
9165 bug reported by Alexandre Duret-Lutz in
9166 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
9167
9168 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9169 invokes it. We shouldn't invoke it twice because it will attempt
9170 to put error.o in the archive twice. This fixes a glitch reported
9171 by Martin Mokrejs in
9172 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9173
9174 2003-04-21 Paul Eggert <eggert@twinsun.com>
9175
9176 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9177 to gnulib.
9178
9179 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9180
9181 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9182 Fix obvious typo that results in uncompilable GLR parsers
9183 when both %pure-parser and %locations are used. (trivial change)
9184
9185 2003-04-17 Paul Eggert <eggert@twinsun.com>
9186
9187 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9188 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9189 Do not insert the expected token via unput, as this runs afoul
9190 of a POSIX-compatibility bug in flex 2.5.31.
9191 All uses changed to BEGIN the parent state,
9192 since we no longer insert the expected token via unput.
9193 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9194 that is no longer emitted after the above change.
9195
9196 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9197 the first one. This change is from Paul Hilfinger, and it fixes
9198 regression reported by Werner Lemberg in
9199 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9200
9201 (resolve_sr_conflict): Don't invoke state_errs_set
9202 unless one or more tokens have been explicitly made errors.
9203 Otherwise, the above change causes Bison to abort.
9204
9205 * tests/existing.at (GNU pic Grammar): New test case, taken from
9206 Lemberg's email.
9207
9208 2003-03-31 Akim Demaille <akim@epita.fr>
9209
9210 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9211
9212 2003-03-31 Akim Demaille <akim@epita.fr>
9213
9214 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9215 output.
9216
9217 2003-03-31 Akim Demaille <akim@epita.fr>
9218
9219 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9220 From Paul Hilfinger.
9221
9222 2003-03-29 Akim Demaille <akim@epita.fr>
9223
9224 * m4/error.m4: Do not put under dynamic conditions some code which
9225 expansion is under static control.
9226
9227 2003-03-29 Akim Demaille <akim@epita.fr>
9228
9229 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9230
9231 2003-03-29 Akim Demaille <akim@epita.fr>
9232
9233 * doc/bison.texinfo (Strings are Destroyed): New.
9234
9235 2003-03-13 Paul Eggert <eggert@twinsun.com>
9236
9237 * .cvsignore: Add configure.lineno.
9238 * src/.cvsignore: Add yacc.
9239 * tests/.cvsignore: Add testsuite.log.
9240 * doc/fdl.texi: Sync with latest FSF version.
9241
9242 2003-03-12 Paul Eggert <eggert@twinsun.com>
9243
9244 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9245 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9246 cursor, instead of leaving it undefined. This fixes a bug
9247 reported by Tim Van Holder in
9248 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9249 * tests/input.at (Torturing the Scanner): Test the scanner on
9250 an empty input file, which was Tim Van Holder's test case.
9251
9252 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9253 <sys/resource.h> can be included, include sys/time.h and
9254 sys/times.h first, if available. This works around the SunOS
9255 4.1.4 porting bug reported by Bruce Becker in
9256 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
9257
9258 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9259 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9260 AC_HEADER_SYS_WAIT.
9261
9262 Merge changes from gnulib. This was prompted because the CVS
9263 snapshot didn't build on Solaris 7 due to strnlen problems.
9264
9265 These changes need to be merged back into gnulib:
9266 * lib/hash.c: Include <stdbool.h> unconditionally.
9267 * m4/onceonly.m4 (m4_quote): New macro.
9268 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9269 Quote AC_FOREACH variable-expansions properly.
9270 The 2003-01-03 obstack.h change also needs merging.
9271 {end of changes requiring merging}
9272
9273 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9274 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9275 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9276 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9277 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9278 New files, imported from gnulib.
9279 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9280 above.
9281
9282 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9283 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9284 gnulib sources.
9285
9286 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9287 Add.
9288 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9289 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9290 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9291 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9292 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9293 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9294 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9295 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9296 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9297 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9298 (jm_PREREQ_ARGMATCH): Remove.
9299 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9300 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9301
9302 * src/system.h: Include <stdbool.h> unconditionally.
9303
9304 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9305 assuming at least C89 in the bitset code for some time now.
9306
9307 2003-03-03 Akim Demaille <akim@epita.fr>
9308
9309 * ro.po: New.
9310
9311 2003-03-02 Akim Demaille <akim@epita.fr>
9312
9313 * doc/bison.texinfo (Table of Symbols): Reactivate the
9314 documentation for %lex-param, and %parse-param.
9315
9316 2003-03-02 Akim Demaille <akim@epita.fr>
9317
9318 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9319 generate verbose error messages.
9320 Use the number of tokens as an upper bound in yytname, as it
9321 cannot be a non terminal.
9322
9323 2003-03-02 Akim Demaille <akim@epita.fr>
9324
9325 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9326 message.
9327
9328 2003-03-02 Akim Demaille <akim@epita.fr>
9329
9330 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9331 Use them to exercise yycheck overrun.
9332 Based on Andrew Suffield's grammar.
9333
9334 2003-03-02 Akim Demaille <akim@epita.fr>
9335
9336 Create tests/local.at for Bison generic testing macros.
9337
9338 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9339 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9340 This new file.
9341 * tests/calc.at (AT_CHECK_CALC): Adjust.
9342 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9343 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9344 * tests/local.at: here.
9345 (AT_COMPILE_CXX): Tags the tests using it as c++.
9346 Ignore the test if CXX is not functional.
9347
9348 2003-03-01 Paul Eggert <eggert@twinsun.com>
9349
9350 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9351 not loc->end, since loc->end might contain garbage and this leads
9352 to undefined behavior on some platforms.
9353 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9354 depend on *loc, so that the reader doesn't give the the false
9355 impression that *loc is initialized.
9356 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9357 does not survive the return.
9358
9359 2003-03-01 Akim Demaille <akim@epita.fr>
9360
9361 * src/scan-gram.l (code_start): Always initialize it when entering
9362 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9363 yylex invocation. An alternative would be making it static, but
9364 then it starts with the second %%'s beginning, instead of its end.
9365
9366 2003-02-28 Paul Eggert <eggert@twinsun.com>
9367
9368 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9369 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9370 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9371
9372 2003-02-26 Paul Eggert <eggert@twinsun.com>
9373
9374 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9375 Remove Sequent/Pyramid discussion (nobody uses them any more).
9376 Merge VMS and MS-DOS discussion; these ports may well be dead
9377 but let's keep mentioning them for now. Put <> around email
9378 addresses. Add copyright notice.
9379
9380 2003-02-24 Paul Eggert <eggert@twinsun.com>
9381
9382 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9383 to avoid collision with flex use of yylineno.
9384 Problem reported by Bruce Lilly in
9385 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9386 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9387 * data/yacc.c (yy_reduce_print): Likewise.
9388
9389 * config/depcomp: Sync with Automake 1.7.3.
9390
9391 2003-02-21 Akim Demaille <akim@epita.fr>
9392
9393 * data/lalr1.cc: Use temporary variables instead of casts to
9394 change integer types.
9395 Suggested by Paul Eggert.
9396
9397 2003-02-21 Akim Demaille <akim@epita.fr>
9398
9399 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9400 to avoid confusions with lalr1.cc's notion of Position.
9401 Suggested by Paul Eggert.
9402
9403 2003-02-20 Akim Demaille <akim@epita.fr>
9404
9405 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9406 before initial_columns.
9407 (location.hh): Use consistent variable names when defining the
9408 operator<<.
9409 Use "last" so that we subtract from Positions, not from unsigned.
9410
9411 2003-02-20 Akim Demaille <akim@epita.fr>
9412
9413 * data/lalr1.cc (position.hh): New subfile, including the extended
9414 and Doxygen'ed documentation of class Position.
9415 (location.hh): Use it.
9416 Document a` la Doxygen.
9417 With the help of Benoit Perrot.
9418
9419 2003-02-20 Akim Demaille <akim@epita.fr>
9420
9421 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9422 AT_YACC_IF.
9423 Redefine AT_YYERROR_SEES_LOC_IF using it.
9424 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9425 not defined.
9426 Don't use the location in yy::Parser::error_ and
9427 yy::Parser::print_ when not %locations.
9428 Activate more lalr1.cc tests.
9429
9430 2003-02-19 Akim Demaille <akim@epita.fr>
9431
9432 * data/lalr1.cc: When displaying a line number, be sure to make it
9433 an int.
9434
9435 2003-02-19 Akim Demaille <akim@epita.fr>
9436
9437 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9438 Remove, useless.
9439 (YYABORT, YYACCEPT, YYERROR): New.
9440 * tests/calc.at: Renable the lalr1.cc test.
9441
9442 2003-02-19 Akim Demaille <akim@epita.fr>
9443
9444 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9445 error recovery, mixing with/without pops and discarding of the
9446 lookahead.
9447 Exercise YYERROR.
9448 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9449
9450 2003-02-17 Paul Eggert <eggert@twinsun.com>
9451
9452 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9453 * tests/testsuite.at (AT_COMPILE): Use them.
9454 This fixes the testsuite problem reported by Robert Lentz in
9455 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9456
9457 2003-02-12 Paul Eggert <eggert@twinsun.com>
9458
9459 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9460 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9461 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9462 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9463 Check for malloc failure, for consistency with yacc.c.
9464 (yytname_size): Remove, for consistency with yacc.c.
9465
9466 The bug still remains in data/lalr1.cc, as I didn't have time
9467 to fix it there.
9468
9469 2003-02-06 Akim Demaille <akim@epita.fr>
9470
9471 * configure.ac (GXX): Rename as...
9472 (CXX): this, to keep the original Autoconf semantics.
9473 Require 2.57.
9474 * data/lalr1.cc: Fix b4_copyright invocations.
9475 If YYDEBUG is not defined, don't depend upon name_ being defined.
9476 (location.hh): Include string and iostream.
9477 (Position::filename): New member.
9478 (Position::Position ()): New.
9479 (operator<< (Position)): New.
9480 (operator- (Position, int)): New.
9481 (Location::first, Location::last): Rename as...
9482 (Location::begin, Location::end): these, to mock the conventional
9483 iterator names.
9484 (operator<< (Location)): New.
9485 * tests/atlocal.in (CXX): New.
9486 * tests/testsuite.at (AT_COMPILE_CXX): New.
9487 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9488 locations in a more synthetic way.
9489 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9490 lalr1.cc is used.
9491 Adjust the C locations to match those from Emacs: first column is
9492 column 0.
9493 Change all the expected results.
9494 Conform to the GCS: simplify the locations when applicable.
9495 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9496 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9497 these CPP macros with the m4 macros new defined by...
9498 (AT_CHECK_PUSHDEFS): this, i.e.:
9499 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9500 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9501 New macros.
9502 (AT_CHECK_POPDEFS): Undefine them.
9503 (AT_CHECK_CALC_LALR1_CC): New.
9504 Use it for the first lalr1.cc test.
9505
9506 2003-02-04 Akim Demaille <akim@epita.fr>
9507
9508 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9509 Location as is defined.
9510
9511 2003-02-04 Akim Demaille <akim@epita.fr>
9512
9513 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9514 name_ being defined.
9515
9516 2003-02-03 Paul Eggert <eggert@twinsun.com>
9517
9518 * src/gram.h (start_symbol): Remove unused decl.
9519
9520 Use more-consistent naming conventions for local vars.
9521
9522 * src/derives.c (derives_compute): Change type of local var from
9523 int to rule_number.
9524 * src/gram.c (grammar_rules_partial_print): Likewise.
9525 * src/print.c (print_core): Likewise.
9526 * src/reduce.c (reduce_grammar_tables): Likewise.
9527
9528 * src/gram.c (grammar_dump): Change name of item_number *
9529 local var from r to rp.
9530 * src/nullable.c (nullable_compute): Likewise.
9531
9532 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9533
9534 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9535 for symbol or symbol_number var.
9536 * src/reader.c (grammar_start_symbol_set): Likewise.
9537 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9538 Likewise.
9539 * src/state.c (transitions_to): Likewise.
9540 * src/state.h: Likewise.
9541 * src/tables.c (symbol_number_to_vector_number): Likewise.
9542
9543 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9544 char * var.
9545
9546 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9547 var.
9548
9549 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9550 var.
9551
9552 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9553 Use str, not s, for char * var. Use ch, not c, for character var.
9554 Use size for size var.
9555
9556 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9557 char * var.
9558 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9559 uniqstr var.
9560 * src/uniqstr.h: Likewise.
9561
9562 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9563 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9564 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9565 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9566 param to have same name as that of enum, so that we don't use
9567 "s" to stand for a non-state.
9568
9569 2003-02-02 Akim Demaille <akim@epita.fr>
9570
9571 * src/scan-skel.l: Scan more than one inert character per yylex
9572 invocation.
9573
9574 2003-02-01 Paul Eggert <eggert@twinsun.com>
9575
9576 Version 1.875a.
9577
9578 * po/LINGUAS: Add ms.
9579
9580 2003-01-30 Akim Demaille <akim@epita.fr>
9581
9582 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9583
9584 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9585
9586 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9587 of $1.
9588
9589 Changes in response to error report by S. Eken: GLR mode does not
9590 handle negative $ indices or $ indices in embedded rules correctly.
9591 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9592
9593 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9594 (b4_rhs_location): Ditto.
9595 (yyfill): New function to copy from stack tree into array
9596 incrementally.
9597 (yyuserAction): Modify to allow incremental move of semantic values
9598 to rhs array when in GLR mode.
9599 Define YYFILL to use in user-defined actions to fill semantic array
9600 as needed.
9601 Remove dummy use of yystack, as there is now a guaranteed use.
9602 (yydoAction): Modify to allow incremental move of semantic values
9603 to rhs array when in GLR mode.
9604 (yyresolveAction): Ditto.
9605 (yyglrShiftDefer): Update comment.
9606 (yyresolveStates): Use X == NULL for pointers, not !X.
9607 (yyglrReduce): Ditto.
9608 (yydoAction): Ditto
9609
9610 * tests/glr-regr1.at: Rename to ...
9611 * tests/glr-regression.at: Add new regression test for the problems
9612 described above (adapted from S. Eken).
9613 Update copyright notice.
9614 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9615 * tests/Makefile.am: Ditto.
9616
9617 2003-01-28 Paul Eggert <eggert@twinsun.com>
9618
9619 * data/lalr1.cc: Do not use @output_header_name@ unless
9620 b4_defines_flag is set. This fixes two bugs reported by
9621 Tim Van Holder in
9622 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9623 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9624
9625 2003-01-21 Paul Eggert <eggert@twinsun.com>
9626
9627 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9628 we don't need to worry about yyerrlab1 being reported as an
9629 "unused label" by non-GCC C compilers. The downside is that if
9630 locations are used then a couple of statements are duplicated each
9631 time YYERROR is invoked, but the upside is that the warnings
9632 should vanish.
9633 (yyerrlab1): Move code to YERROR.
9634 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9635 This reverts some of the 2002-12-27 change.
9636
9637 2003-01-17 Paul Eggert <eggert@twinsun.com>
9638
9639 * src/output.c (symbol_printers_output): Fix typo that led
9640 to core dump. Problem reported by Antonio Rus in
9641 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9642
9643 2003-01-13 Akim Demaille <akim@epita.fr>,
9644 Quoc Peyrot <chojin@lrde.epita.fr>,
9645 Robert Anisko <anisko_r@lrde.epita.fr>
9646
9647 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9648 when the stacks contain one element, as the loop would otherwise
9649 free the last state, and then use the top state (the one we just
9650 popped). This means that the initial elements will not be freed
9651 explicitly, as is the case in yacc.c; it is not a problem, as
9652 these elements have fake values.
9653
9654 2003-01-11 Paul Eggert <eggert@twinsun.com>
9655
9656 * NEWS: %expect-violations are now just warnings, reverting
9657 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9658 bootstrapping problem reported by Matthias Klose; see
9659 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9660 * src/conflicts.c (conflicts_print): Likewise.
9661 * tests/conflicts.at (%expect not enough, %expect too much,
9662 %expect with reduce conflicts): Likewise.
9663 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9664 that the warning is enabled if the number of conflicts changes
9665 (not necessarily increases).
9666
9667 * src/getargs.c (version): Update copyright year.
9668
9669 2003-01-09 Akim Demaille <akim@epita.fr>
9670
9671 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9672
9673 2003-01-08 Paul Eggert <eggert@twinsun.com>
9674
9675 * Makefile.maint (WGETFLAGS):
9676 New macro, containing "-C off" to disable proxy caches.
9677 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9678 (rel-check): Use $(WGET) instead of wget.
9679
9680 2003-01-06 Paul Eggert <eggert@twinsun.com>
9681
9682 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9683 the GLR paper of Scott, Johnstone and Hussain.
9684
9685 2003-01-04 Paul Eggert <eggert@twinsun.com>
9686
9687 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9688 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9689 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9690 (EXTRA_LIBRARIES): New var, for liby.a.
9691 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9692 (EXTRA_SCRIPTS): New var, for yacc.
9693
9694 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9695 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9696 Problem reported by Nelson H. F. Beebe.
9697
9698 2003-01-03 Paul Eggert <eggert@twinsun.com>
9699
9700 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9701 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9702 when compiling Bison 1.875's `bitset bset = obstack_alloc
9703 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9704
9705 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9706 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9707 grow to a huge size with typical invocation.
9708
9709 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9710 Use the pattern recommended by Autoconf 2.57, except also protect
9711 against double-definition.
9712 * src/system.h: Likewise.
9713 Portability issues reported by Nelson H. F. Beebe.
9714
9715 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9716 All uses changed. Provide a definition in both C and C++.
9717 (yytrue, yyfalse): Define even if defined (__cplusplus).
9718
9719 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9720 Reported by Nelson H. F. Beebe.
9721
9722 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9723
9724 2003-01-02 Paul Eggert <eggert@twinsun.com>
9725
9726 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9727 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9728 Bug reported by Nelson H. F. Beebe.
9729
9730 2003-01-01 Paul Eggert <eggert@twinsun.com>
9731
9732 * Version 1.875.
9733
9734 2002-12-30 Paul Eggert <eggert@twinsun.com>
9735
9736 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9737 Moved here from...
9738 (<INITIAL>","): Here. This causes stray "," to be treated
9739 more uniformly.
9740
9741 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9742 last brace in braced code when not in Yacc mode, for compatibility
9743 with Bison 1.35. This resurrects the 2001-12-15 patch to
9744 src/reader.c.
9745
9746 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9747 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9748
9749 2002-12-28 Paul Eggert <eggert@twinsun.com>
9750
9751 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9752 that of SYM's type. This fixes Debian bug 168069, reported by
9753 Thomas Olsson.
9754
9755 2002-12-28 Paul Eggert <eggert@twinsun.com>
9756
9757 Version 1.75f.
9758
9759 Switch back to the Yacc style of conflict reports, undoing some
9760 of the 2002-07-30 change.
9761 * doc/bison.texinfo (Understanding): Use Yacc style for
9762 conflict reports. Also, use new way of locating rules.
9763 * src/conflicts.c (conflict_report):
9764 Renamed from conflict_report_yacc, removing the old
9765 'conflict_report'. Translate the entire conflict report at once,
9766 so that we don't assume that "," has the same interpretation in
9767 all languages.
9768 (conflicts_output): Use Yacc-style conflict report for each state,
9769 instead of our more-complicated style.
9770 (conflicts_print): Use Yacc-style conflict report, except print
9771 the input file name when not emulating Yacc.
9772 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9773 Conflicted Reduction, %expect not enough, %expect too much,
9774 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9775 * tests/existing.at (GNU Cim Grammar): Likewise.
9776 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9777
9778 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9779 fatal): Don't invoke fflush; it's not needed and it might even be
9780 harmful for stdout, as stdout might not be open.
9781 * src/reduce.c (reduce_print): Likewise.
9782
9783 2002-12-27 Paul Eggert <eggert@twinsun.com>
9784
9785 Fix a bug where error locations were not being recorded correctly.
9786 This problem was originally reported by Paul Hilfinger in
9787 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9788
9789 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9790 top of the location stack's error locations.
9791 (yyerrlab): Set it. When discarding a token, push its location
9792 onto yylerrsp so that we don't lose track of the error's end.
9793 (yyerrlab1): Now is only the target of YYERROR, so that we can
9794 properly record the location of the action that failed. For GCC
9795 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9796 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9797 (yyerrlab2): New label, which yyerrlab now falls through to.
9798 Compute the error's location by applying YYLLOC_DEFAULT to
9799 the locations of all the symbols that went into the error.
9800 * doc/bison.texinfo (Location Default Action): Mention that
9801 YYLLOC_DEFAULT is also invoked for syntax errors.
9802 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9803 Error locations include the locations of all the tokens that were
9804 discarded, not just the last token.
9805
9806 2002-12-26 Paul Eggert <eggert@twinsun.com>
9807
9808 * src/files.c: Include quote.h.
9809 (compute_output_file_names): Warn if we detect conflicting
9810 outputs to the same file. This should catch the misunderstanding
9811 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9812
9813 * src/conflicts.c (conflicts_print): If the user specifies
9814 "%expect N", report an error if there are any reduce/reduce
9815 conflicts. This is what the manual says should happen.
9816 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9817 * tests/conflicts.at (%expect with reduce conflicts): New test.
9818
9819 Don't use m4_include on relative file names, as it doesn't work as
9820 desired if there happens to be a file with that name under ".".
9821
9822 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9823 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9824 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9825 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9826 * src/output.c (output_skeleton): Use full path names when
9827 specifying a file to include; don't rely on include path, as
9828 it's unreliable when the working file contains a file with
9829 that name.
9830
9831 2002-12-25 Paul Eggert <eggert@twinsun.com>
9832
9833 Remove obsolete references to bison.simple and bison.hairy.
9834 Problem mentioned by Aubin Mahe in
9835 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
9836 * data/glr.c: Comment fix.
9837 * doc/bison.1: Remove references. Also, mention "yacc".
9838
9839 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9840 with -g option.
9841
9842 * src/parse-gram.y (declaration): Use enum "report_states" rather
9843 than its numeric value 1.
9844
9845 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9846 opening a new one. This fixes Debian bug 165349, reported by
9847 Bruce Stephens.
9848
9849 2002-12-24 Paul Eggert <eggert@twinsun.com>
9850
9851 Version 1.75e.
9852
9853 * Makefile.maint (cvs-update): Don't assume that the shell
9854 supports $(...), as Solaris sh doesn't.
9855
9856 * src/parse-gram.y (lloc_default): Remove test for empty
9857 nonterminals at the end, since it didn't change the result.
9858
9859 2002-12-24 Paul Eggert <eggert@twinsun.com>
9860
9861 If the user does not define YYSTYPE as a macro, Bison now declares it
9862 using typedef instead of defining it as a macro. POSIX requires this.
9863 For consistency, YYLTYPE is also declared instead of defined.
9864
9865 %union directives can now have a tag before the `{', e.g., the
9866 directive `%union foo {...}' now generates the C code
9867 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9868 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9869 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9870 instead of `yyltype'.
9871
9872 `yystype' and `yyltype' are now obsolescent macros instead of being
9873 typedefs or tags; they are no longer documented and will be
9874 withdrawn in a future release.
9875
9876 * data/glr.c (b4_location_type): Remove.
9877 (YYSTYPE): Renamed from yystype.
9878 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
9879 (struct YYLTYPE): Renamed from struct yyltype.
9880 (YYLTYPE): Renamed from yyltype.
9881 (yyltype, yystype): New (and obsolescent) macros,
9882 for backward compatibility.
9883 * data/yacc.c: Likewise.
9884
9885 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
9886 does not specify a union tag. This is for compatibility with
9887 Solaris 9 yacc.
9888
9889 * src/parse-gram.y (add_param): 2nd arg is now char * not char
9890 const *, since it is now modified by stripping surrounding { }.
9891 (current_braced_code): Remove.
9892 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
9893 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
9894 trailing " {...}". Now of type <chars>.
9895 (grammar_declaration): Adjust to bundled tokens.
9896 (code_content): Remove; stripping is now done by add_param.
9897 (print_token_value): Print contents of bundled tokens.
9898 (token_name): New function.
9899
9900 * src/reader.h (braced_code, current_braced_code): Remove.
9901 (token_name): New decl.
9902
9903 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
9904 token_type, not braced_code code_kind. All uses changed.
9905 (SC_PRE_CODE): New state, for scanning after a keyword that
9906 has (or usually has) an immediately-following braced code.
9907 (token_type): New local var, to keep track of which token type
9908 to return when scanning braced code.
9909 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
9910 <INITIAL>"%parse-param", <INITIAL>"%printer",
9911 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
9912 instead of returning a token type immediately.
9913 (<INITIAL>"{"): Set token type.
9914 (<SC_BRACED_CODE>"}"): Use it.
9915 (handle_action_dollar, handle_action_at): Now returns bool
9916 indicating success. Fail if ! current_rule; this prevents a core dump.
9917 (handle_symbol_code_dollar, handle_symbol_code_at):
9918 Remove; merge body into caller.
9919 (handle_dollar, handle_at): Complain in invalid contexts.
9920
9921 * NEWS, doc/bison.texinfo: Document the above.
9922 * NEWS: Fix years and program names in copyright notice.
9923
9924 2002-12-17 Paul Eggert <eggert@twinsun.com>
9925
9926 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
9927 Reporting, Table of Symbols): Omit mentions of %lex-param and
9928 %parse-param from the documentation for now.
9929
9930 2002-12-15 Paul Eggert <eggert@twinsun.com>
9931
9932 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
9933 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
9934 lookahead symbol, and which sets yychar in parser actions) and it
9935 disagreed with the Bison documentation. Bug
9936 reported by Andrew Walrond.
9937
9938 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
9939 as the caller now does that.
9940 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
9941 (YYEMPTY): Parenthesize right hand side, since others use it.
9942 (yyparse): Don't assume that our generated code is the only code
9943 that sets yychar.
9944
9945 2002-12-13 Paul Eggert <eggert@twinsun.com>
9946
9947 Version 1.75d.
9948
9949 POSIX requires a "yacc" command.
9950 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
9951 (MOSTLYCLEANFILES): Add yacc.
9952 (yacc): New rule.
9953 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
9954 as an alias for bison y.
9955
9956 * po/LINGUAS: Add da.
9957
9958 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
9959 problem with latest <getopt.h>.
9960 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
9961
9962 * doc/fdl.texi: Upgrade to 1.2.
9963 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
9964 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
9965 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
9966 gnulib.
9967 * config/install-sh: Sync with autotools.
9968
9969 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
9970 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9971 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
9972 locations are requested.
9973 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
9974 locations are requested.
9975
9976 2002-12-12 Paul Eggert <eggert@twinsun.com>
9977
9978 Remove unportable casts and storage allocation tricks.
9979 While we're at it, remove almost all casts, since they
9980 usually aren't needed and are a sign of trouble.
9981
9982 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
9983
9984 * src/derives.c (derives_compute): Do not subtract NTOKENS from
9985 the pointer DSET returned by malloc; this isn't portable.
9986 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
9987 Similarly for DERIVES.
9988 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
9989 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
9990 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
9991
9992 * src/derives.c (derives_compute): Do not bother invoking
9993 int_of_rule_number, since rule numbers are integers.
9994
9995 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
9996 rather than XMALLOC (char, N).
9997
9998 * src/files.c (filename_split): Rewrite to avoid cast.
9999
10000 * src/gram.h (symbol_number_as_item_number,
10001 item_number_as_symbol_number, rule_number_as_item_number,
10002 item_number_as_rule_number):
10003 Now inline functions rather than macros, to avoid casts.
10004 * src/state.h (state_number_as_int): Likewise.
10005 * src/tables.c (state_number_to_vector_number,
10006 symbol_number_to_vector_number): Likewise.
10007
10008 * src/gram.h (int_of_rule_number): Remove; no longer used.
10009
10010 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10011 since the resulting storage is always stored into.
10012
10013 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10014 where it's needed.
10015
10016 * src/muscle_tab.c (muscle_m4_output):
10017 Now inline. Return bool, not int.
10018 * src/state.c (state_compare): Likewise.
10019 * src/symtab.c (symbol_check_defined,
10020 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10021 hash_compare_symbol, hash_symbol):
10022 Likewise.
10023 * src/uniqstr.c (uniqstr_print): Likewise.
10024 * src/muscle_tab.c (muscle_m4_output_processor):
10025 New function, to avoid casts.
10026 * src/state.c (state_comparator, stage_hasher): Likewise.
10027 * src/symtab.c (symbol_check_defined_processor,
10028 symbol_check_alias_consistency_processor, symbol_pack_processor,
10029 symbol_translation_processor, hash_symbol_comparator,
10030 hash_symbol_hasher): Likewise.
10031 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10032 * src/muscle_tab.c (muscles_m4_output):
10033 Use new functions instead of casting old functions unportably.
10034 * src/state.c (state_hash_new): Likewise.
10035 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10036 symbols_token_translations_init):
10037 Likewise.
10038 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10039
10040 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10041 var instead of casting to long, to avoid casts.
10042 (prepare_states): Use MALLOC rather than alloca, so that we don't
10043 have to worry about alloca.
10044 * src/state.c (state_hash_lookup): Likewise.
10045
10046 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10047 local var instead of casting to unsigned char, to avoid casts.
10048
10049 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10050 STATE_ALLOC): Remove.
10051 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10052 rather than calloc, and use offsetof to avoid allocating slightly
10053 too much storage.
10054 (state_new): Initialize all members.
10055
10056 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10057
10058 * src/symtab.c (symbol_free): Remove; unused.
10059 (symbol_get): Remove cast in lhs of assignment.
10060 (symbols_do): Now static. Accept generic arguments, not
10061 hashing-related ones.
10062
10063 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10064 (symbol_processor): Remove.
10065 (symbols_do): Remove decl; now static.
10066
10067 * src/system.h (alloca): Remove; decl no longer needed.
10068 (<stddef.h>): Include, for offsetof.
10069 (<inttypes.>, <stdint.h>): Include if available.
10070 (uintptr_t): New type, if system lacks it.
10071 (CALLOC, MALLOC, REALLOC): New macros.
10072 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10073 new macros.
10074
10075 * src/tables.c (table_size): Now int, to pacify GCC.
10076 (table_grow, table_ninf_remap): Use signed table size.
10077 (save_row): Don't bother initializing locals when not needed.
10078 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10079 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10080
10081 * src/vcg.h: Correct misspellings.
10082
10083 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10084
10085
10086 * src/getargs.c (getargs): Don't assume EOF == -1.
10087
10088 2002-12-09 Paul Eggert <eggert@twinsun.com>
10089
10090 Change identifier spellings to avoid collisions with names
10091 that are reserved by POSIX.
10092
10093 Don't use names ending in _t, since POSIX reserves them.
10094 For consistency, remove _e and _s endings -- they're weren't
10095 needed to remove ambiguity. All uses changed.
10096 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10097 turn was just renamed from struniq_t.
10098 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10099 which in turn was just renamed from struniq_processor_t.
10100 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10101 in turn was renamed from hash_compare_struniq_t.
10102 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10103 (state_list): Renamed from state_list_t.
10104 * src/assoc.h (assoc): Renamed from assoc_t.
10105 * src/conflicts.c (enum conflict_resolution): Renamed from
10106 enum conflict_resolution_e.
10107 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10108 (rule_list): Renamed from rule_list_t.
10109 * src/getargs.h (enum trace): Renamed from enum trace_e.
10110 (enum report): Renamed from enum report_e.
10111 * src/gram.h (item_number): Renamed from item_number_t.
10112 (rule_number): Renamed from rule_number_t.
10113 (struct rule_s): Remove the "rule_s" part; not used.
10114 (rule): Renamed from rule_t.
10115 (rule_filter): Renamed from rule_filter_t.
10116 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10117 (goto_list): Renamed from goto_list_t.
10118 * src/lalr.h (goto_number): Renamed from goto_number_t.
10119 * src/location.h (location): Renamed from location_t.
10120 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10121 and moved here from:
10122 * src/muscle_tab.h (muscle_entry_t): here.
10123 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10124 (rule_list): Renamed from rule_list_t.
10125 * src/print_graph.c (static_graph): Renamed from graph.
10126 * src/reader.h (braced_code): Renamed from braced_code_t.
10127 Remove brace_code_e tag.
10128 * src/relation.h (relation_node): Renamed from relation_node_t.
10129 (relation_nodes): Renamed from relation_nodes_t.
10130 (relation): Renamed from relation_t.
10131 * src/state.h (state_number): Renamed from state_number_t.
10132 (struct state): Renamed from struct state_s.
10133 (state): Renamed from state_t.
10134 (transitions): Renamed from transitions_t. Unused (and
10135 misspelled) transtion_s tag removed.
10136 (errs): Renamed from errs_t. Unused errs_s tag removed.
10137 (reductions): Renamed from reductions_t. Unused tag
10138 reductions_s removed.
10139 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10140 (struct symbol_list): Renamed from struct symbol_list_s.
10141 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10142 (struct symbol): Renamed from struct symbol_s.
10143 (symbol): Renamed from symbol_t.
10144 * src/tables.c (vector_number): Renamed from vector_number_t.
10145 (action_number): Renamed from action_t.
10146 * src/tables.h (base_number): Renamed from base_t.
10147 * src/vcg.h (enum color): Renamed from enum color_e.
10148 (enum textmode): Renamed from enum textmode_e.
10149 (enum shape): Renamed from enum shape_e.
10150 (struct colorentry): Renamed from struct colorentry_s.
10151 (struct classname): Renamed from struct classname_s.
10152 (struct infoname): Renamed from struct infoname_s.
10153 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10154 (enum decision): Renamed from enum decision_e.
10155 (enum orientation): Renamed from enum orientation_e.
10156 (enum alignment): Renamed from enum alignment_e.
10157 (enum arrow_mode): Renamed from enum arrow_mode_e.
10158 (enum crossing_type): Renamed from enum crossing_type_e.
10159 (enum view): Renamed from enum view_e.
10160 (struct node): Renamed from struct node_s.
10161 (node): Renamed from node_t.
10162 (enum linestyle): Renamed from enum linestyle_e.
10163 (enum arrowstyle): Renamed from enum arrowstyle_e.
10164 (struct edge): Renamed from struct edge.
10165 (edge): Renamed from edge_t.
10166 (struct graph): Renamed from struct graph_s.
10167 (graph): Renamed from graph_t.
10168 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10169 Rename value_t -> value.
10170 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10171 value_t_as_yystype -> value_as_yystype.
10172
10173 Don't include <errno.h> in the mainstream code, since it
10174 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10175 * lib/get-errno.c, lib/get-errno.h: New files.
10176 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10177 get-errno.c.
10178 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10179 * src/output.c (output_skeleton): Likewise.
10180 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10181 instead of errno.
10182 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10183 Likewise.
10184 (handle_action_dollar, handle_action_at): Likewise.
10185 * src/system.h: Do not include <errno.h>.
10186 (TAB_EXT): Renamed from EXT_TAB.
10187 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10188
10189 Avoid str[a-z]*, since <string.h> reserves that name space.
10190 Change all instances of "struniq" in names to "uniqstr", and
10191 likewise for "STRUNIQ" and "UNIQSTR".
10192 * src/uniqstr.c: Renamed from src/struniq.c.
10193 * src/uniqstr.h: Renamed from src/struniq.h.
10194 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10195 * src/files.c (strsuffix): Remove; unused.
10196 (concat2): Renamed from stringappend. Now static.
10197 * src/files.h (strsuffix, stringappend): Remove; unused.
10198 * src/parse-gram.y (<chars>): Renamed from <string>.
10199 (<uniqstr>): Renamed from <struniq>.
10200 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10201 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10202 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10203 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10204 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10205 (N_EXPAND): Renamed from N_STRETCH.
10206
10207 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10208 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10209 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10210 Remove; unused.
10211 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10212 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10213 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10214 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10215 (BASE_MAXIMUM): Renamed from BASE_MAX.
10216 (BASE_MINIMUM): Renamed from BASE_MIN.
10217 (ACTION_MAX): Remove; unused.
10218 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10219 Unnecessary casts removed from above defines.
10220
10221
10222 Fix misspelling in names.
10223 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10224 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10225 G_NODE_ALIGNEMENT.
10226
10227
10228 * lib/timevar.c (timevar_report): Renamed from time_report,
10229 for consistency with other names.
10230 * lib/timevar.h (timevar_report): New decl.
10231 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10232
10233
10234 Sort include-file uses.
10235
10236 Reorder all include files under src to be in the order "system.h".
10237 then the ../lib include files in angle brackets (alphabetized),
10238 then the . include files in double-quotes (alphabetized). Fix
10239 dependency breakages encountered in this process, as follows:
10240 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10241 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10242 * src/state.h: Include "symtab.h".
10243
10244 2002-12-08 Paul Eggert <eggert@twinsun.com>
10245
10246 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10247 since this causes problems when __file__ contains character
10248 sequences like "@" that are treated specially by src/scan-skel.l.
10249 Instead, just use the file's basename. This fixes the bug
10250 reported by Martin Mokrejs in
10251 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10252
10253 2002-12-06 Paul Eggert <eggert@twinsun.com>
10254
10255 Add support for rules that do not have trailing semicolons, as
10256 POSIX requires. Improve the quality of locations in Bison
10257 diagnostics.
10258
10259 * src/location.c: Include <quotearg.h>.
10260 (empty_location): Now const.
10261 (location_print): New function. Follow the recommendation of the
10262 GNU Coding Standards for locations that span file boundaries.
10263 * src/location.h: Do not include <quotearg.h>; no longer needed.
10264 (boundary): New type.
10265 (location_t): Use it. This allows locations to span file boundaries.
10266 All member uses changed: file -> start.file or end.file (as needed),
10267 first_line -> start.line, first_column -> start.column,
10268 last_line -> end.line, last_column -> end.column.
10269 (equal_boundaries): New function.
10270 (LOCATION_RESET, LOCATION_STEP): Remove.
10271 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10272 (empty_location): Now const.
10273 (location_print): New decl.
10274 * src/parse-gram.y (lloc_default): New function, which handles
10275 empty locations more accurately.
10276 (YYLLOC_DEFAULT): Use it.
10277 (%token COLON): Remove.
10278 (%token ID_COLON): New token.
10279 (rules): Use it.
10280 (declarations, rules): Remove trailing semicolon.
10281 (declaration, rules_or_grammar_declaration):
10282 Allow empty (";") declaration.
10283 (symbol_def): Remove empty actions; no longer needed.
10284 (rules_or_grammar_declaration): Remove trailing semicolon.
10285 (semi_colon.opt): Remove.
10286 * src/reader.h: Include location.h.
10287 (scanner_cursor): New decl.
10288 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10289 rolling our own.
10290 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10291 of *loc.
10292 (STEP): Remove. No longer needed, now that adjust_location does
10293 the work. All uses removed.
10294 (scanner_cursor): New var.
10295 (adjust_location): Renamed from extend_location. It now sets
10296 *loc and adjusts the scanner cursor. All uses changed.
10297 Don't bother testing for CR.
10298 (handle_syncline): Remove location arg; now updates scanner cursor.
10299 All callers changed.
10300 (unexpected_end_of_file): Now accepts start boundary of token or
10301 comment, not location. All callers changed. Update scanner cursor,
10302 not the location.
10303 (SC_AFTER_IDENTIFIER): New state.
10304 (context_state): Renamed from c_context. All uses changed.
10305 (id_loc, code_start, token_start): New local vars.
10306 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10307 processing of Yacc white space and equivalents here.
10308 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10309 instead of returning ID immediately, since we need to search for
10310 a subsequent colon.
10311 (<INITIAL>"'", "\""): Save token_start.
10312 (<INITIAL>"%{", "{", "%%"): Save code_start.
10313 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10314 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10315 BEGIN context_state at end, not INITIAL.
10316 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10317 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10318 Return correct token start.
10319 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10320 the start of a character, string or multiline comment is found.
10321 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10322 Reduction): Adjust reported locations to match the more-precise
10323 results now expected.
10324 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10325 * tests/reduce.at (Useless Rules, Reduced Automaton,
10326 Underivable Rules): Likewise.
10327 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10328 or "|"' now that so many other tokens are allowed by the new grammar.
10329
10330 * src/complain.h (current_file): Remove duplicate decl;
10331 current_file is now owned by files.h.
10332 * src/complain.c, src/scan-gram.l: Include files.h.
10333
10334 2002-12-06 Paul Eggert <eggert@twinsun.com>
10335
10336 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10337 promotes to int; it might be unsigned int.
10338 * data/yacc.c (yy_reduce_print): Likewise.
10339
10340 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10341 be #defined in the prologue, not in the Bison declarations.
10342 This fixes Debian Bug 102878, reported by Shaul Karl.
10343
10344 2002-12-02 Paul Eggert <eggert@twinsun.com>
10345
10346 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10347 * lib/strtoul.c: New file, from gnulib.
10348 This fixes a porting bug reported by Peter Klein in
10349 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10350
10351 2002-11-30 Paul Eggert <eggert@twinsun.com>
10352
10353 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10354 and put only a forward declaration in the prologue. This is for
10355 consistency with the other scanner helper functions.
10356
10357 Type clashes now generate warnings, not errors, since it
10358 appears that POSIX may allow some grammars with type clashes.
10359 * src/reader.c (grammar_current_rule_check): Warn about
10360 type clashes instead of complaining.
10361 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10362
10363 Add Yacc library, since POSIX requires it.
10364 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10365 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10366 * lib/main.c, lib/yyerror.c: New files.
10367
10368 gram_error can be static; it need not be extern.
10369 * src/reader.h (gram_error): Remove decl.
10370 * src/parse-gram.y (gram_error): Now static. Add static decl.
10371 (print_token_value): Omit parameter names from forward decl,
10372 for consistency.
10373
10374 2002-11-29 Paul Eggert <eggert@twinsun.com>
10375
10376 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10377 be declared before being used. E.g., one should typically
10378 declare them in the prologue. Use GNU coding style in examples.
10379 Put "const" consistently after the type it modifies. Mention
10380 that C99 supports "inline". Mention that yyerror traditionally
10381 returns "int".
10382
10383 %parse-param and %lex-param now take just one argument, the
10384 declaration; the argument name is deduced from the declaration.
10385
10386 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10387 Reporting, Table of Symbols): Document this.
10388 * src/parse-gram.y (add_param): New function.
10389 (COMMA): Remove.
10390 (declaration): Implement new rule for %parse-param and %lex-param.
10391 * src/scan-gram.l: "," now elicits a warning, rather than being
10392 a token; this is more compatible with byacc.
10393 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10394
10395 2002-11-27 Paul Eggert <eggert@twinsun.com>
10396
10397 Rename identifiers to avoid real and potential collisions.
10398
10399 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10400 to avoid collision with lex macro described by Bruce Lilly in
10401 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10402 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10403 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10404 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10405 All uses changed.
10406 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10407 The name "yycontrol" violates the name space rules, and this stuff
10408 wasn't being used anyway.
10409 (input): Remove action; this stuff wasn't being used.
10410 (gram_error): Rename local variable yylloc -> loc.
10411 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10412 (YY_DECL): Don't use "yy" at start of local variables.
10413 All uses changed, e.g., yylloc -> loc.
10414 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10415 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10416 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10417 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10418
10419 * src/parse-gram.y (gram_error): loc is now const *.
10420 * src/reader.h (gram_error): Likewise.
10421
10422 2002-11-24 Paul Eggert <eggert@twinsun.com>
10423
10424 Version 1.75c.
10425
10426 * tests/actions.at (Actions after errors): Use an output format
10427 more similar to that of the Printers and Destructors test.
10428 Test the position of the ';' token too.
10429 (Printers and Destructors): Likewise.
10430 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10431 unnecessarily alarming people when the test fails.
10432
10433 * data/yacc.c (yyerrlab1): Move this label down, so that the
10434 parser does not discard the lookahead token if the user code
10435 invokes YYERROR. This change is required for POSIX conformance.
10436
10437 * lib/error.c: Sync with gnulib.
10438
10439 2002-11-22 Paul Eggert <eggert@twinsun.com>
10440
10441 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10442 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10443 * lib/xmalloc.c: Likewise.
10444
10445 2002-11-20 Paul Eggert <eggert@twinsun.com>
10446
10447 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10448
10449 2002-11-20 Paul Eggert <eggert@twinsun.com>
10450
10451 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10452 should use `if (! x) abort ();' rather than `assert (x);', and
10453 anyway it's one less thing to worry about configuring.
10454
10455 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10456 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10457 and replace all instances of assert with abort.
10458 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10459 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10460
10461 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10462 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10463 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10464 hash_find_entry, hash_rehash, hash_insert): Likewise.
10465 * src/conflicts.c (resolve_sr_conflict): Likewise.
10466 * src/lalr.c (set_goto_map, map_goto): Likewise.
10467 * src/nullable.c (nullable_compute): Likewise.
10468 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10469 * src/reader.c (packgram, reader): Likewise.
10470 * src/state.c (state_new, state_free, state_transitions_set,
10471 state_reduction_find): Likewise.
10472 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10473 symbol_pack): Likewise.
10474 * src/tables.c (conflict_row, pack_vector): Likewise.
10475 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10476 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10477 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10478 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10479
10480 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10481 (ARGMATCH_CONSTRAINT): New macro.
10482 (ARGMATCH_ASSERT): Use it.
10483
10484 * src/system.h (verify): New macro.
10485 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10486 rather than assert.
10487 * src/tables.c (tables_generate): Likewise.
10488
10489 * src/struniq.c (struniq_assert): Now returns void, and aborts
10490 if the assertion is false.
10491 (struniq_assert_p): Remove.
10492 * src/struniq.h: Likewise.
10493
10494 2002-11-18 Paul Eggert <eggert@twinsun.com>
10495
10496 * data/glr.c (yygetLRActions): Replace `yyindex' with
10497 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10498 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10499 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10500
10501 2002-11-18 Akim Demaille <akim@epita.fr>
10502
10503 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10504 space.
10505 From Tim Van Holder.
10506
10507 2002-11-17 Paul Eggert <eggert@twinsun.com>
10508
10509 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10510 to "SyntaxError" for consistency with my 2002-11-15 change.
10511
10512 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10513 not define to {}, since this breaks the common use of `YYDPRINTF
10514 ((...));' if a single statement is desired (e.g. before `else').
10515 Work around GCC warnings by surrounding corresponding calls with
10516 {} if needed.
10517 (yyhasResolvedValue): Remove unused function.
10518 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10519 loop body.
10520 (yyreportSyntaxError): Renamed from yyreportParseError.
10521 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10522 All uses changed.
10523 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10524 extern when possible. Remove unused initializations.
10525
10526 2002-11-16 Akim Demaille <akim@epita.fr>
10527
10528 Augment the similarity between GLR and LALR traces.
10529
10530 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10531 (YY_REDUCE_PRINT): New.
10532 (yyparse): Use them.
10533 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10534 YYDPRINT here.
10535 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10536 state reached after the reduction/recovery, since...
10537 (yyparse, yyprocessOneStack): Report the state we are entering in.
10538
10539 2002-11-16 Akim Demaille <akim@epita.fr>
10540
10541 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10542 Add support for --trace=skeleton.
10543 * src/scan-skel.l: %option debug.
10544 Scan strings of non-@ or \n instead of character by character.
10545 (scan_skel): Handle trace_skeleton.
10546 (QPUTS): New.
10547 (@output_parser_name@, @output_header_name@): ``Restore'' their
10548 support (used to be M4 macros).
10549 * data/yacc.c: Quote larger chunks, a la glr.c.
10550 * data/lalr1.cc: Likewise.
10551 The header guards are no longer available, so use some other
10552 string than `YYLSP_NEEDED'.
10553
10554 2002-11-16 Akim Demaille <akim@epita.fr>
10555
10556 Make the ``Printers and Destructors'' test more verbose, taking
10557 `yacc.c''s behavior as (possibly wrong) reference.
10558
10559 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10560 instead of fprint on stdout.
10561 Set and report the last_line of the symbols.
10562 Consistently display values and locations.
10563
10564 2002-11-16 Paul Eggert <eggert@twinsun.com>
10565
10566 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10567
10568 2002-11-15 Paul Eggert <eggert@twinsun.com>
10569
10570 * tests/actions.at (Actions after errors): New test case.
10571
10572 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10573 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10574 tests/action.at, tests/calc.at, tests/conflicts.at,
10575 tests/cxx-type.at, tests/regression.at:
10576 "parse error" -> "syntax error" for POSIX compatibility.
10577 "parsing stack overflow..." -> "parser stack overflow" so
10578 that code matches Bison documentation.
10579
10580 2002-11-15 Akim Demaille <akim@epita.fr>
10581
10582 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10583 take two BRACED_CODE, not two string_content.
10584 Free the scanner's obstack when we are done.
10585 (code_content): New.
10586 * tests/calc.at: Adjust.
10587 * doc/bison.texinfo: Adjust.
10588 Also, make sure to include the `,' for these declarations.
10589
10590 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10591
10592 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10593 definition; avoids potential autoreconf problems.
10594
10595 2002-11-15 Akim Demaille <akim@epita.fr>
10596
10597 Always check the value returned by yyparse.
10598
10599 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10600 returned by yyparse.
10601 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10602 Adjust calls.
10603 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10604 returned by yyparse.
10605
10606 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10607
10608 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10609 on input.at test.
10610
10611 2002-11-14 Paul Eggert <eggert@twinsun.com>
10612
10613 * src/output.c (output_skeleton): Call xfopen instead of
10614 duplicating xfopen's body.
10615
10616 Fix bugs reported by Nelson H. F. Beebe in
10617 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10618
10619 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10620 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10621 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10622 file twice in the grammar, as an extra check.
10623
10624 * tests/input.at (Torturing the Scanner): Surround the
10625 backslash-newline tests with "#if 0", to make it less likely that
10626 we'll run into compiler bugs. Bring back solitary \ inside
10627 comment, but add a closing comment to work around HP C bug. Don't
10628 test backslash-newline in C character constant.
10629
10630 2002-11-14 Akim Demaille <akim@epita.fr>
10631
10632 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10633 status of the compiler.
10634 Calling `exit 1' is no longer needed.
10635 Reported by Nelson H. F. Beebe.
10636
10637 2002-11-14 Akim Demaille <akim@epita.fr>
10638
10639 * tests/atlocal.in (CPPFLAGS): We have config.h.
10640 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10641 New.
10642 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10643 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10644 * tests/regression.at, tests/torture.at: Use them for all the
10645 grammars that are to be compiled.
10646 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10647 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10648 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10649
10650 2002-11-14 Akim Demaille <akim@epita.fr>
10651
10652 * doc/bison.texinfo: Various formatting changes (alignments in
10653 samples, additional @group/@end group, GCS in samples.
10654 Use @deffn instead of simple @table to define the directives,
10655 macros, variables etc.
10656
10657 2002-11-13 Paul Eggert <eggert@twinsun.com>
10658
10659 Fix some bugs reported by Albert Chin-A-Young in
10660 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10661
10662 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10663 -o c"; the HP C compiler chatters during compilation.
10664 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10665 * tests/headers.at (export YYLTYPE): Likewise.
10666
10667 * tests/input.at (Torturing the Scanner): Remove lines containing
10668 solitary backslashes, as they tickle a bug in the HP C compiler.
10669
10670 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10671 comments, since they're not portable. Use GNU coding style.
10672
10673 2002-11-13 Akim Demaille <akim@epita.fr>
10674
10675 * data/yacc.c: Leave bigger chunks of quoted text.
10676 (YYDSYMPRINTF): New.
10677 Use it to report symbol activities.
10678 * data/glr.c (YYDSYMPRINTF): New.
10679 Use it.
10680
10681 2002-11-12 Paul Eggert <eggert@twinsun.com>
10682
10683 Version 1.75b.
10684
10685 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10686 (yyglrReduce): Return yyok, not 0.
10687 This should avoid the enumerated-type warnings reported
10688 by Nelson H. F. Beebe in
10689 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10690
10691 * lib/bbitset.h (BITSET_INLINE): Remove.
10692 * lib/bitset.h [! BITSET_INLINE]: Remove.
10693 (bitset_set, bitset_reset, bitset_test): Rename local vars
10694 to avoid shadowing warnings by GCC.
10695
10696 * data/glr.c (inline): Remove #define. It's the user's
10697 responsibility to #define it away, just like 'const'.
10698 This fixes one of the bugs reported by Nelson H. F. Beebe in
10699 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10700
10701 * Makefile.maint (po-check): Scan .l and .y files instead of the
10702 .c and the .h files that they generate. This fixes the bug
10703 reported by Tim Van Holder in:
10704 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10705 Look for N_ as well as for _. Try to avoid matching #define for
10706 N_ and _.
10707 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10708 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10709 * src/scan-gram.l: Revamp regular expressions so that " and '
10710 do not confuse xgettext.
10711
10712 * src/struniq.h (struniq_new): Do not declare the return type
10713 to be 'const'; this violates the C standard.
10714 * src/struniq.c (struniq_new): Likewise.
10715
10716 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10717
10718 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10719 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10720 linker.
10721
10722 2002-11-12 Akim Demaille <akim@epita.fr>
10723
10724 * Makefile.maint: Sync with Autoconf:
10725 (local_updates): New.
10726
10727 2002-11-12 Akim Demaille <akim@epita.fr>
10728
10729 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10730
10731 2002-11-12 Akim Demaille <akim@epita.fr>
10732
10733 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10734 locations.
10735
10736 2002-11-12 Akim Demaille <akim@epita.fr>
10737
10738 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10739 not yyvalue.
10740
10741 2002-11-12 Akim Demaille <akim@epita.fr>
10742
10743 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10744 Use it to test the GLR parser.
10745
10746 2002-11-12 Akim Demaille <akim@epita.fr>
10747
10748 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10749 defines it.
10750 * data/glr.c (yystos): New.
10751 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10752 (YYDSYMPRINT): New.
10753 (yyval): Don't define it, it is handled via M4.
10754 (yyrecoverParseError): Free verbosely the discarded symbols.
10755 * data/yacc.c (yysymprint): Remove, rather...
10756 (b4_yysymprint_generate): invoke.
10757 * data/c.m4 (b4_yysymprint_generate): New.
10758 Accept pointers as arguments, as opposed to the version from
10759 yacc.c.
10760 (b4_yydestruct_generate): Likewise.
10761 * tests/cations.at (Printers and Destructors): Use Bison directives
10762 instead of CPP macros.
10763 Don't rely on internal details.
10764
10765 2002-11-12 Akim Demaille <akim@epita.fr>
10766
10767 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10768 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10769 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10770 it against YYEMPTY and so forth), work on yytoken (i.e., set
10771 it to YYEMPTY etc.).
10772 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10773 (b4_symbol_actions): Remove.
10774 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10775 for 0, end-of-input.
10776
10777 2002-11-12 Akim Demaille <akim@epita.fr>
10778
10779 * doc/bison.texinfo (Destructor Decl): New.
10780
10781 2002-11-12 Akim Demaille <akim@epita.fr>
10782
10783 * src/tables.c (tables_generate): Use free for pointers that
10784 cannot be NULL, not XFREE.
10785 (pack_vector): Use assert, not fatal, for bound violations.
10786 * src/state.c (state_new): Likewise.
10787 * src/reader.c (reader): Likewise.
10788 * src/lalr.c (set_goto_map): Likewise.
10789 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10790 the file name.
10791
10792 2002-11-12 Akim Demaille <akim@epita.fr>
10793
10794 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10795 Restore.
10796 * src/scan-gram.l (last_string): Is global to the file, not to
10797 yylex.
10798 * src/parse-gram.y (input): Don't append the epilogue here,
10799 (epilogue.opt): do it here, and free the scanner's obstack.
10800 * src/reader.c (epilogue_set): Rename as...
10801 (epilogue_augment): this.
10802 * data/c.m4 (b4_epilogue): Defaults to empty.
10803
10804 2002-11-12 Akim Demaille <akim@epita.fr>
10805
10806 * src/getargs.c (long_options): Remove duplicates.
10807 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10808 Remove.
10809 * doc/bison.rnh: Remove.
10810 * doc/bison.texinfo (VMS Invocation): Remove.
10811
10812 2002-11-12 Akim Demaille <akim@epita.fr>
10813
10814 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10815 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10816
10817 Use struniq for symbols.
10818
10819 * src/symtab.h (symbol_t): The tag member is a struniq.
10820 (symbol_type_set): Adjust.
10821 * src/symtab.c (symbol_new): Takes a struniq.
10822 (symbol_free): Don't free the tag member.
10823 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10824 (hash_compare_symbol, hash_symbol): these.
10825 Use the fact that tags as struniqs.
10826 (symbol_get): Use struniq_new.
10827 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10828 Returns a strniq.
10829 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10830 and type members are struniqs.
10831 * src/reader.c (get_merge_function)
10832 (grammar_current_rule_merge_set): Adjust.
10833 (TYPE, current_type): Are struniq.
10834
10835 Use struniq for file names.
10836
10837 * src/files.h, src/files.c (infile): Split into...
10838 (grammar_file, current_file): these.
10839 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10840 * src/reduce.c (reduce_print): Likewise.
10841 * src/getargs.c (getargs): Likewise.
10842 * src/complain.h, src/complain.c: Likewise.
10843 * src/main.c (main): Call struniqs_new early enough to use it for
10844 file names.
10845 Don't free the input file name.
10846
10847 2002-11-12 Akim Demaille <akim@epita.fr>
10848
10849 * src/symtab.c (symbol_free): Remove dead deactivated code:
10850 type_name are properly removed.
10851 Don't use XFREE to free items that cannot be NULL.
10852 * src/struniq.h, src/struniq.c: New.
10853 * src/main.c (main): Initialize/free struniqs.
10854 * src/parse-gram.y (%union): Add astruniq member.
10855 (yyprint): Adjust.
10856 * src/scan-gram.l (<{tag}>): Return a struniq.
10857 Free the obstack bit that used to store it.
10858 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10859
10860 2002-11-11 Paul Eggert <eggert@twinsun.com>
10861
10862 Revamp to fix many (but not all) of the C- and M4-related quoting
10863 problems. Among other things, this fixes the Bison bug reported
10864 by Jan Hubicka when processing the Bash grammar; see:
10865 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
10866
10867 Use new @ escapes consistently. Represent brackets with @{ and @}
10868 rather than @<:@ and @:>@, since this works a bit better with dumb
10869 editors like vi. Represent @ with @@, since @ is now consistently
10870 an escape. Use @oline@ and @ofile@ rather than __oline__ and
10871 __ofile__, to avoid unexpected expansions. Similarly, use @output
10872 rather than #output.
10873
10874 * data/c.m4 (b4_copyright): Omit file name from comment, since
10875 the file name could contain "*/".
10876 (b4_synclines_flag): Don't quote the 2nd argument; it should already
10877 be quoted. All uses changed.
10878
10879 * data/glr.c: Use new @ escapes consistently.
10880 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
10881 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
10882 Remove, since they couldn't handle arbitrary characters in file
10883 names.
10884 * data/lalr1.cc: Likewise.
10885 * data/yacc.c: Likewise.
10886
10887 * src/files.c (output_infix): Remove; all uses removed.
10888 * src/files.h: Likewise.
10889
10890 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
10891 mishandled funny characters in file names, and anyway it isn't
10892 needed any more.
10893 * data/yacc.c: Likewise.
10894 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
10895
10896 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
10897 * data/yacc.c: Likewise.
10898
10899 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
10900 strings now.
10901 (muscle_init): Quote filename as a C string.
10902 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
10903 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
10904 * src/output.c (escaped_file_name_output): New function.
10905 (prepare_symbols): Quote tokens for M4.
10906 (prepare): Don't insert output_infix, output_prefix,
10907 output_parser_name, output_header_name; this is now down by scan-skel.
10908 Insert skeleton as a C string.
10909
10910 * src/output.c (user_actions_output, symbol_destructors_output,
10911 symbol_printers_output): Quote filenames for C and M4.
10912 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10913
10914 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
10915 escapes other than \\ and \'; this simplifies the code.
10916 (<SC_STRING>): Likewise, for \\ and \".
10917 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
10918 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
10919 Use new escapes @{ and @} for [ and ].
10920
10921 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
10922 them with auto vars.
10923 Switch to new escape scheme, where @ is the escape character uniformly.
10924 Abort if a stray escape character is found. Avoid unbounded input
10925 buffer when parsing non-escaped text.
10926
10927 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
10928 __oline__, #output, $@, and @{ do not have unintended meanings.
10929
10930 2002-11-09 Paul Eggert <eggert@twinsun.com>
10931
10932 Fix the test failure due to GCC warnings described in
10933 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
10934 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
10935 evaluate to 0 if it's impossible for NINF to be in the respective
10936 table.
10937 (yygetLRActions, yyrecoverParseError): Use them.
10938
10939 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
10940 counted in the token inserted at end of file. Now takes
10941 location_t *, not location_t, so that the location can be
10942 adjusted. All uses changed.
10943
10944 * tests/regression.at (Invalid inputs): Adjust wording in
10945 diagnostic to match the new behavior.
10946
10947 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
10948 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
10949 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
10950 abort ();'. This reduces the runtime of the "Many lookaheads"
10951 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
10952 GCC 3.2.
10953
10954 2002-11-07 Paul Eggert <eggert@twinsun.com>
10955
10956 * src/parse-gram.y (CHARACTER): Remove unused token.
10957 All uses removed.
10958
10959 * src/scan-gram.l: Remove stack option. We no longer use the
10960 stack, since the stack was never deeper than 1; instead, use the
10961 new auto var c_context to record the stacked value.
10962
10963 Remove nounput option. At an unexpected end of file, we now unput
10964 the minimal input necessary to end cleanly; this simplifies the
10965 code.
10966
10967 Avoid unbounded token sizes where this is easy.
10968
10969 (unexpected_end_of_file): New function.
10970 Use it to systematize the error message on unexpected EOF.
10971 (last-string): Now auto, not static.
10972 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
10973 (scanner_last_string_free): Remove; not used.
10974 (percent_percent_count): Move decl to just before use.
10975 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
10976 not the (never otherwised-used) CHARACTER.
10977
10978 2002-11-07 Akim Demaille <akim@epita.fr>
10979
10980 Let yyerror always receive the msg as last argument, so that
10981 yyerror can be variadic.
10982
10983 * data/yacc.c (b4_yyerror_args): New.
10984 Use it when calling yyerror.
10985 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
10986 Use it when calling yyerror.
10987 * doc/bison.texinfo (Error Reporting): Adjust.
10988 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
10989 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
10990
10991 2002-11-06 Akim Demaille <akim@epita.fr>
10992
10993 #line should have quoted strings.
10994 Ideally, this should be done by m4_quotearg.
10995
10996 * src/scan-skel.l: Include quotearg.h.
10997 Quote __ofile__.
10998 * src/output.c (symbol_printers_output)
10999 (symbol_destructors_output): Quote the file name.
11000
11001 2002-11-06 Akim Demaille <akim@epita.fr>
11002
11003 * tests/regression.at (Invalid inputs): Adjust to the recent
11004 messages.
11005
11006 2002-11-06 Akim Demaille <akim@epita.fr>
11007
11008 Restore --no-lines.
11009 Reported by Jim Kent.
11010
11011 * data/c.m4 (b4_syncline): New.
11012 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11013 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11014 * src/output.c (user_actions_output): Likewise.
11015 (prepare): Define 'b4_synclines_flag'.
11016 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
11017
11018 2002-11-06 Akim Demaille <akim@epita.fr>
11019
11020 * src/main.c (main): Free `infile'.
11021 * src/scan-gram.l (handle_syncline): New.
11022 Recognize `#line'.
11023 * src/output.c (user_actions_output, symbol_destructors_output)
11024 (symbol_printers_output): Use the location's file name, not
11025 infile.
11026 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11027
11028 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11029
11030 * src/tables.c (matching_state): Don't allow states to match if
11031 either has GLR conflict entries.
11032
11033 2002-11-05 Paul Eggert <eggert@twinsun.com>
11034
11035 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11036 "integer out of range" rather than "invalid value".
11037 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11038 accordingly.
11039
11040 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11041 Also, remove one static variable in the scanner.
11042
11043 * src/scan-gram.l (braces_level): Now auto, not static.
11044 Initialize to zero if the compiler is being picky.
11045 (INITIAL): Clear braces_level instead of incrementing it.
11046 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11047 as POSIX 1003.1-2001 requires.
11048 * src/system.h (IF_LINT): New macro, taken from coreutils.
11049 * configure.ac: Define "lint" if --enable-gcc-warnings.
11050
11051 2002-11-05 Akim Demaille <akim@epita.fr>
11052
11053 * src/scan-gram.l: When it starts with `%', complain about the
11054 whole directive, not just that `invalid character: %'.
11055
11056 2002-11-04 Akim Demaille <akim@epita.fr>
11057
11058 * Makefile.maint: Update from Autoconf.
11059 (update, cvs-update, po-update, do-po-update): New.
11060
11061 2002-11-04 Akim Demaille <akim@epita.fr>
11062
11063 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11064 and yyerror.
11065 Have yyerror `use' its arguments.
11066 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11067 returns true when location & yacc & pure & parse-param.
11068 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11069
11070 2002-11-04 Akim Demaille <akim@epita.fr>
11071
11072 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11073 clashes.
11074 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11075 font-lock-mode.
11076 Use complain_at.
11077 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11078 slot 0.
11079
11080 2002-11-03 Paul Eggert <eggert@twinsun.com>
11081
11082 * src/reader.c (get_merge_function, grammar_current_rule_check):
11083 Use consistent diagnostics for reporting type name clashes.
11084 Quote the types with <>, for consistency with Yacc.
11085 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11086
11087 2002-11-03 Akim Demaille <akim@epita.fr>
11088
11089 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11090 New.
11091 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11092 (b4_parse_param): Remove.
11093 Use b4_identification.
11094 Propagate b4_pure_args where needed to pass them to yyerror.
11095 * data/glr.m4 (b4_parse_param): Remove.
11096 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11097 (b4_lpure_formals): New.
11098 Use b4_identification.
11099 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11100 b4_user_formals and b4_user_args.
11101 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11102 (yyreportAmbiguity): When using a pure parser, also need
11103 the location, and the parse-params.
11104 Adjust callers.
11105 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11106 When using a pure parser, also need the parse-params.
11107 Adjust callers.
11108 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11109 (%pure-parser + %parse-param) LALR and GLR parsers.
11110 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11111 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11112 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11113 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11114 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11115 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11116 * doc/bison.texinfo: Untabify the whole file.
11117 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11118 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11119 (Error Reporting): Adjust to these new directives.
11120 Document %error-verbose, deprecate YYERROR_VERBOSE.
11121
11122 2002-11-03 Akim Demaille <akim@epita.fr>
11123
11124 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11125 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11126 command line options.
11127 * tests/cxx-type.at: Formatting changes.
11128
11129 2002-11-03 Paul Eggert <eggert@twinsun.com>
11130
11131 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11132 to count columns correctly, and to check for invalid inputs.
11133
11134 Use mbsnwidth to count columns correctly. Account for tabs, too.
11135 Include mbswidth.h.
11136 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11137 (extend_location): New function.
11138 (YY_LINES): Remove.
11139
11140 Handle CRLF in C code rather than in Lex code.
11141 (YY_INPUT): New macro.
11142 (no_cr_read): New function.
11143
11144 Scan UCNs, even though we don't fully handle them yet.
11145 (convert_ucn_to_byte): New function.
11146
11147 Handle backslash-newline correctly in C code.
11148 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11149 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11150 all uses changed.
11151 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11152 Use {splice} wherever C allows backslash-newline.
11153 YY_STEP after space, newline, vertical-tab.
11154 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
11155
11156 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11157
11158 ({int}, handle_action_dollar, handle_action_at): Check for integer
11159 overflow.
11160
11161 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11162
11163 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11164 as well as \000. Check for UCHAR_MAX, not 255.
11165 Allow \x with an arbitrary positive number of digits, as in C.
11166 Check for overflow here.
11167 Allow \? and UCNs, for compatibility with C.
11168
11169 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11170 with quote slot used by complain_at.
11171
11172 * tests/input.at: Add tests for backslash-newline, m4 quotes
11173 in symbols, long literals, and funny escapes in strings.
11174
11175 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11176 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11177 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11178 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11179 * m4/mbswidth.m4: New file, from GNU coreutils.
11180
11181 * doc/bison.texinfo (Grammar Outline): Document // comments.
11182 (Symbols): Document that trigraphs have no special meaning in Bison,
11183 nor is backslash-newline allowed.
11184 (Actions): Document that trigraphs have no special meaning.
11185
11186 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11187 no longer used.
11188
11189 2002-11-02 Paul Eggert <eggert@twinsun.com>
11190
11191 * src/reader.c: Don't include quote.h; not needed.
11192 (get_merge_function): Reword warning to be consistent with
11193 type clash diagnostic in grammar_current_rule_check.
11194
11195 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11196 bug in trigraph handling.
11197
11198 * src/output.c (prepare_symbols): When printing token names,
11199 escape "[" as "@<:@" and likewise for "]".
11200
11201 * src/system.h (errno): Remove declaration, as we are now
11202 assuming C89 or better, and C89 guarantees errno.
11203
11204 2002-10-30 Paul Eggert <eggert@twinsun.com>
11205
11206 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11207 Check for close failures.
11208 * src/files.h (xfclose): Return void, not int, since it always
11209 returned zero.
11210 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11211 indicates one.
11212 * src/output.c (output_skeleton): Use xfclose rather than fclose
11213 and ferror. xfclose now checks ferror.
11214
11215 * data/glr.c (YYLEFTMOST_STATE): Remove.
11216 (yyreportTree): Use a stack-based leftmost state. This avoids
11217 our continuing battles with bogus warnings about initializers.
11218
11219 2002-10-30 Akim Demaille <akim@epita.fr>
11220
11221 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11222 #if.
11223
11224 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11225
11226 * tests/glr-regr1.at: New test for reported regressions.
11227 * tests/testsuite.at: Add glr-regr1.at test.
11228 * tests/Makefile.am: Add glr-regr1.at test.
11229
11230 2002-10-24 Paul Eggert <eggert@twinsun.com>
11231
11232 Version 1.75a.
11233
11234 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11235 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11236 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11237 Don't assume strdup exists; POSIX says its an XSI extension.
11238 Check for buffer overflow on input.
11239
11240 2002-10-24 Akim Demaille <akim@epita.fr>
11241
11242 * src/output.c (output_skeleton): Don't disable M4sugar comments
11243 too soon: it results in comments being expanded.
11244 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11245 first output.
11246
11247 2002-10-24 Akim Demaille <akim@epita.fr>
11248
11249 * data/yacc.c (m4_int_type): New.
11250 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11251 char' as only yacc.c wants K&R portability.
11252 * data/glr.c (yysigned_char): Remove.
11253 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11254 Reported by Quoc Peyrot.
11255
11256 2002-10-23 Paul Eggert <eggert@twinsun.com>
11257
11258 * src/main.c (main): With --trace=time, report times even if a
11259 non-fatal error occurs. Formerly, the times were reported in some
11260 such cases but not in others.
11261 * src/reader.c (reader): Just return if a complaint has been issued,
11262 instead of exiting, so that 'main' can report times.
11263
11264 2002-10-22 Akim Demaille <akim@epita.fr>
11265
11266 * src/system.h: Include sys/types.
11267 Reported by Bert Deknuydt.
11268
11269 2002-10-23 Paul Eggert <eggert@twinsun.com>
11270
11271 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11272 Suggested by Art Haas.
11273
11274 2002-10-22 Paul Eggert <eggert@twinsun.com>
11275
11276 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11277 decl; not needed any more.
11278 * src/main.c (main): Use return to exit, undoing yesterday's change.
11279 The last OS that we could find where this wouldn't work is
11280 SunOS 3.5, and that's too old to worry about now.
11281
11282 * data/glr.c (struct yyltype): Define members even when not
11283 doing locations. This is more consistent with yacc.c, and it
11284 works around the following bug reports:
11285 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11286 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
11287
11288 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11289 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11290 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11291
11292 2002-10-22 Akim Demaille <akim@epita.fr>
11293
11294 * data/README: New.
11295
11296 2002-10-21 Paul Eggert <eggert@twinsun.com>
11297
11298 Be consistent about 'bool'; the old code used an enum in one
11299 module and an int in another, and this violates the C standard.
11300 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11301 * configure.ac (AC_HEADER_STDBOOL): Add.
11302 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11303 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11304 * src/symtab.c (hash_compare_symbol_t): Likewise.
11305 * src/system.h (bool, false, true): Use a definition consistent
11306 with ../lib/hash.c. All uses changed.
11307
11308 * src/complain.c (warning_issued): Renamed from warn_message_count,
11309 so that we needn't worry about integer overflow (!).
11310 Now of type bool. All uses changed.
11311 (complaint_issued): Renamed from complain_message_count; likewise.
11312
11313 * src/main.c (main): Use exit to exit with failure.
11314
11315 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11316 rather than 1 and 0.
11317 * src/main.c (main): Likewise.
11318 * src/getargs.c (getargs): Likewise.
11319 * src/reader.c (reader): Likewise.
11320
11321 * src/getarg.c (getargs): Remove duplicate code for
11322 "Try `bison --help'".
11323
11324 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11325 What was that "2" for?
11326
11327 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11328 * src/getargs.c (usage): Likewise.
11329
11330 * src/getargs.c (getargs): When there are too few operands, report
11331 the last one. When there are too many, report the first extra
11332 one. This is how diffutils does it.
11333
11334 2002-10-20 Paul Eggert <eggert@twinsun.com>
11335
11336 Remove K&R vestiges.
11337 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11338 * src/complain.c (VA_START): Remove. Assume prototypes.
11339 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11340 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11341 fatal): Assume prototypes.
11342 * src/complain.h: Assume prototypes.
11343 * src/system.h (PARAMS): Remove.
11344 Include <limits.h> unconditionally, since it's guaranteeed even
11345 for a freestanding C89 compiler.
11346 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11347 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11348
11349 2002-10-20 Akim Demaille <akim@epita.fr>
11350
11351 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11352 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11353 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11354 (yyresolveStates, yyresolveAction, yyresolveStack)
11355 (yyprocessOneStack): Use them.
11356 (yy_reduce_print): New.
11357 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11358
11359 2002-10-20 Akim Demaille <akim@epita.fr>
11360
11361 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11362 arguments and output `void'.
11363 (b4_c_function): Rename as...
11364 (b4_c_function_def): this.
11365 (b4_c_function_decl, b4_c_ansi_function_def)
11366 (b4_c_ansi_function_decl): New.
11367 Change the interpretation of the arguments: before `int, foo', now
11368 `int foo, foo'.
11369 * data/yacc.c (yyparse): Prototype and define thanks to these.
11370 Adjust b4_c_function_def uses.
11371 * data/glr.c (yyparse): Likewise, but ANSI only.
11372
11373 2002-10-20 Akim Demaille <akim@epita.fr>
11374
11375 * src/output.c (prepare): Move the definition of `tokens_number',
11376 `nterms_number', `undef_token_number', `user_token_number_max'
11377 to...
11378 (prepare_tokens): Here.
11379 (prepare_tokens): Rename as...
11380 (prepare_symbols): this.
11381 (prepare): Move the definition of `rules_number' to...
11382 (prepare_rules): here.
11383 (prepare): Move the definition of `last', `final_state_number',
11384 `states_number' to...
11385 (prepare_states): here.
11386 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11387
11388 2002-10-20 Akim Demaille <akim@epita.fr>
11389
11390 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11391
11392 2002-10-20 Akim Demaille <akim@epita.fr>
11393
11394 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11395 * data/c.m4: here.
11396
11397 2002-10-20 Akim Demaille <akim@epita.fr>
11398
11399 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11400 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11401 `pair'.
11402 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11403 `name' to...
11404 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11405 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11406 These.
11407
11408 2002-10-19 Paul Eggert <eggert@twinsun.com>
11409
11410 Do not create a temporary file, as that involves security and
11411 cleanup headaches. Instead, use a pair of pipes.
11412 Derived from a suggestion by Florian Krohm.
11413 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11414 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11415 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11416 (BISON_PREREQ_SUBPIPE): Add.
11417 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11418 Add subpipe.h, subpipe.c.
11419 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11420 * po/POTFILES.in: Add lib/subpipe.c.
11421 * src/output.c: Include "subpipe.h".
11422 (m4_invoke): Remove decl.
11423 (scan_skel): New decl.
11424 (output_skeleton): Use pipe rather than temporary file for m4 input.
11425 Check that m4sugar.m4 is readable, to avoid deadlock.
11426 Check for pipe I/O error.
11427 * src/scan-skel.l (readpipe): Remove decl.
11428 (scan_skel): New function, to be used in place of m4_invoke.
11429 Read from stream rather than file.
11430
11431 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11432 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11433 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11434 this generates a more-accurate value anyway.
11435
11436 * lib/timevar.c (timervar_accumulate): Rename locals to
11437 avoid confusion with similarly-named more-global.
11438 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11439
11440 * src/output.c (prepare): Use xstrdup to convert char const *
11441 to char *, to avoid GCC warning.
11442
11443 2002-10-19 Akim Demaille <akim@epita.fr>
11444
11445 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11446 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11447 Use them to have `calc.y' ready for %pure-parser.
11448 * data/yacc.c (YYLEX): Pass a yylex return type to
11449 b4_c_function_call.
11450
11451 2002-10-19 Akim Demaille <akim@epita.fr>
11452
11453 Prototype support of %lex-param and %parse-param.
11454
11455 * src/parse-gram.y: Add the definition of the %lex-param and
11456 %parse-param tokens, plus their rules.
11457 Drop the `_' version of %glr-parser.
11458 Add the "," token.
11459 * src/scan-gram.l (INITIAL): Scan them.
11460 * src/muscle_tab.c: Comment changes.
11461 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11462 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11463 (muscle_entry_s): The `value' member is no longer const.
11464 Adjust all dependencies.
11465 * src/muscle_tab.c (muscle_init): Adjust: use
11466 MUSCLE_INSERT_STRING.
11467 Initialize the obstack earlier.
11468 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11469 (muscle_pair_list_grow): New.
11470 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11471 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11472 * tests/calc.at: Use %locations, not --locations.
11473 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11474
11475 2002-10-19 Akim Demaille <akim@epita.fr>
11476
11477 * src/getargs.c (usage): Take status as argument and exit
11478 accordingly.
11479 Report the traditional `Try ... --help' message when status != 0.
11480 (usage, version): Don't take a FILE * as arg, it is pointless.
11481 (getargs): When there is an incorrect number of arguments, make it
11482 an error, and report it GNUlically thanks to `usage ()'.
11483
11484 2002-10-18 Paul Eggert <eggert@twinsun.com>
11485
11486 * data/glr.c (yyreportParseError): Don't assume that sprintf
11487 yields the length of the printed string, as this is not true
11488 on SunOS 4.1.4. Reported by Peter Klein.
11489
11490 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11491 * tests/conflicts.at (%nonassoc and eof): Likewise.
11492 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11493
11494 2002-10-17 Akim Demaille <akim@epita.fr>
11495
11496 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11497 * src/getargs.c (trace_types, trace_args): Adjust.
11498 * src/reader.c (grammar_current_rule_prec_set)
11499 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11500 Standardize error messages.
11501 And s/@prec/%prec/!
11502 (reader): Use trace_flag to enable scanner/parser debugging,
11503 instead of an adhoc scheme.
11504 * src/scan-gram.l: Remove trailing debugging code.
11505
11506 2002-10-16 Paul Eggert <eggert@twinsun.com>
11507
11508 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11509 MUSCLE_TAB_H.
11510
11511 * NEWS: Officially drop support for building Bison with K&R C,
11512 since it didn't work anyway and it's not worth worrying about.
11513 * Makefile.maint (wget_files): Remove ansi2knr.c.
11514 (ansi2knr.c-url_prefix): Remove.
11515 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11516 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11517 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11518
11519 2002-10-15 Paul Eggert <eggert@twinsun.com>
11520
11521 Stop using the "enum_" trick for K&R-style function definitions;
11522 it confused me, and I was the author! Instead, assume that people
11523 who want to use K&R C compilers (when using these modules in GCC,
11524 perhaps?) will run ansi2knr.
11525
11526 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11527 All uses of "enum_" changed to "enum ".
11528 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11529 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11530
11531 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11532 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11533 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11534 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11535 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11536 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11537 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11538 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11539 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11540 Use function prototypes; this removes the need for declaring
11541 static functions simply to provide their prototypes.
11542 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11543 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11544 bitset_count_, bitset_create, bitset_dump, bitset_first,
11545 bitset_free, bitset_init, bitset_last, bitset_next,
11546 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11547 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11548 bitset_print, bitset_release_memory, bitset_toggle_,
11549 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11550 debug_bitset): Likewise.
11551 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11552 * lib/bitset_stats.c (bitset_log_histogram_print,
11553 bitset_percent_histogram_print, bitset_stats_and,
11554 bitset_stats_and_cmp, bitset_stats_and_or,
11555 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11556 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11557 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11558 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11559 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11560 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11561 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11562 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11563 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11564 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11565 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11566 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11567 bitset_stats_zero): Likewise.
11568 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11569 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11570 bitsetv_dump, debug_bitsetv): Likewise.
11571 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11572 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11573 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11574 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11575 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11576 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11577 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11578 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11579 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11580 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11581 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11582 Likewise.
11583 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11584 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11585 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11586 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11587 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11588 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11589 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11590 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11591 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11592 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11593 lbitset_xor_cmp, lbitset_zero): Likewise.
11594
11595 2002-10-14 Akim Demaille <akim@epita.fr>
11596
11597 Version 1.75.
11598
11599 2002-10-14 Akim Demaille <akim@epita.fr>
11600
11601 * tests/Makefile.am (maintainer-check-posix): New.
11602
11603 2002-10-14 Akim Demaille <akim@epita.fr>
11604
11605 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11606 member.
11607
11608 2002-10-14 Akim Demaille <akim@epita.fr>
11609
11610 * src/tables.c (table_ninf_remap): base -> tab.
11611 Reported by Matt Rosing.
11612
11613 2002-10-14 Paul Eggert <eggert@twinsun.com>
11614
11615 * tests/action.at, tests/calc.at, tests/conflicts.at,
11616 tests/cxx-type.at, tests/headers.at, tests/input.at,
11617 tests/regression.at, tests/synclines.at, tests/torture.at:
11618 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11619 so that the tests still work even if POSIXLY_CORRECT is set.
11620 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11621
11622 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11623 for portability to K&R hosts. Fix typo: signed char is guaranteed
11624 only to 127, not to 128.
11625 * data/glr.c (yysigned_char): New type.
11626 * data/yacc.c (yysigned_char): Likewise.
11627 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11628
11629 2002-10-13 Paul Eggert <eggert@twinsun.com>
11630
11631 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11632 true due to limited range of data type" warning from GCC.
11633
11634 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11635 by wrapping enum yytokentype's definition inside #ifndef
11636 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11637
11638 2002-10-13 Akim Demaille <akim@epita.fr>
11639
11640 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11641 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11642
11643 2002-10-13 Akim Demaille <akim@epita.fr>
11644
11645 * Makefile.maint: Update from Autoconf 2.54.
11646 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11647
11648 2002-10-13 Akim Demaille <akim@epita.fr>
11649
11650 * src/print.c (print_state): Separate the list of solved conflicts
11651 from the other items.
11652 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11653
11654 2002-10-13 Akim Demaille <akim@epita.fr>
11655
11656 Let nondeterministic skeletons be usable with deterministic
11657 tables.
11658
11659 With the patch, GAWK compiled by GCC without -O2 passes its test
11660 suite using a GLR parser driven by LALR tables. It fails with -O2
11661 because `struct stat' gives two different answers on my machine:
11662 88 (definition of an auto var) and later 96 (memset on this var).
11663 Hence the stack is badly corrumpted. The headers inclusion is to
11664 blame: if I move the awk.h inclusion before GLR's system header
11665 inclusion, the two struct stat have the same size.
11666
11667 * src/tables.c (pack_table): Always create conflict_table.
11668 (token_actions): Always create conflict_list.
11669 * data/glr.c (YYFLAG): Remove, unused.
11670
11671 2002-10-13 Akim Demaille <akim@epita.fr>
11672
11673 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11674 (O0FLAGS): New.
11675 (VALGRIND, GXX): New.
11676 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11677 * tests/bison.in: Run $PREBISON a pre-command.
11678 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11679 (maintainer-check-g++): New.
11680 * Makefile.am (maintainer-check): New.
11681
11682 2002-10-13 Akim Demaille <akim@epita.fr>
11683
11684 * data/glr.c: Formatting changes.
11685 Tweak some trace messages to match yacc.c's.
11686
11687 2002-10-13 Akim Demaille <akim@epita.fr>
11688
11689 GLR parsers sometimes raise parse errors instead of performing the
11690 default reduction.
11691 Reported by Charles-Henry de Boysson.
11692
11693 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11694 check the length of the traces when %glr.
11695 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11696 GLR's traces.
11697 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11698 Test GLR parsers.
11699 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11700 (yyltype): Remove the yy prefix from the member names.
11701 (yytable): Complete its comment.
11702 (yygetLRActions): Map error action number from YYTABLE from
11703 YYTABLE_NINF to 0.
11704 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11705 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11706 not satisfying as we could compare an YYACTION computed from
11707 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11708 only value for error actions.
11709 (yyreportParseError): In verbose parse error messages, don't issue
11710 `error' in the list of expected tokens.
11711 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11712 next action to perform to match glr.c's decoding.
11713 (yytable): Complete its comment.
11714
11715 2002-10-13 Paul Eggert <eggert@twinsun.com>
11716
11717 Fix problem reported by Henrik Grubbstroem in
11718 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11719 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11720 because the Bison parser reads the second action before reducing
11721 the first one.
11722 * src/scan-gram.l (rule_length): New static var.
11723 Use it to keep track of the rule length in the scanner, since
11724 we can't expect the parser to be in lock-step sync with the scanner.
11725 (handle_action_dollar, handle_action_at): Use this var.
11726 * tests/actions.at (Exotic Dollars): Test for the problem.
11727
11728 2002-10-12 Paul Eggert <eggert@twinsun.com>
11729
11730 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11731 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11732 Include <sys/time.h> when checking for clock_t and struct tms.
11733 Use same include order as source.
11734 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11735 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11736
11737 * lib/timevar.c: Update copyright date and clarify comments.
11738 (get_time) [IN_GCC]: Keep the GCC version for reference.
11739
11740 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11741 GCC version as of today, then merge Bison's changes.
11742 Change "GCC" to "Bison" in copyright notice. timevar.def's
11743 author is Akim, so change that too.
11744
11745 * src/reader.c (grammar_current_rule_check):
11746 Don't worry about the default action if $$ is untyped.
11747 Prevents bogus warnings reported by Jim Gifford in
11748 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11749
11750 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11751 * data/glr.c, data/lalr1.cc, data/yacc.c:
11752 Output token definitions before the first part of user declarations.
11753 Fixes compatibility problem reported by Jim Gifford for kbd in
11754 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11755
11756 2002-10-11 Paul Eggert <eggert@twinsun.com>
11757
11758 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11759 (yyparse): here. This undoes some of the 2002-07-25 change.
11760 Compatibility problem reported by Ralf S. Engelschall with
11761 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11762
11763 2002-10-11 Akim Demaille <akim@epita.fr>
11764
11765 * tests/regression.at Characters Escapes): New.
11766 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11767 characters.
11768 Reported by Jan Nieuwenhuizen.
11769
11770 2002-10-11 Akim Demaille <akim@epita.fr>
11771
11772 * po/id.po: New.
11773
11774 2002-10-10 Paul Eggert <eggert@twinsun.com>
11775
11776 Portability fixes for bitsets; this also avoids several GCC
11777 warnings.
11778
11779 * lib/abitset.c: Include <stddef.h>, for offsetof.
11780 * lib/lbitset.c: Likewise.
11781
11782 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11783 properly for vectors of objects. Do not assume that adding a
11784 header size to a multiple of a word size yields a value that is
11785 properly aligned for the whole union.
11786 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11787
11788 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11789 unique names for structures.
11790 * lib/ebitset.c (ebitset_bytes): Likewise.
11791 * lib/lbitset.c (lbitset_bytes): Likewise.
11792
11793 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11794 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11795 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11796 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11797 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11798 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11799 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11800 to improve the type-checking that GCC can do.
11801 * lib/bitset.c (bitset_op4_cmp): Likewise.
11802 * lib/bitset_stats.c (bitset_stats_count,
11803 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11804 bitset_stats_copy, bitset_stats_disjoint_p,
11805 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11806 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11807 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11808 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11809 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11810 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11811 bitset_stats_or_and_cmp): Likewise.
11812 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11813 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11814 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11815 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11816
11817 * lib/abitset.h: Include bitset.h, not bbitset.h.
11818 * lib/ebitset.h: Likewise.
11819 * lib/lbitset.h: Likewise.
11820
11821 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11822 All instances of parameters of type enum bitset_opts are now of
11823 type enum_bitset_opts, to conform to the C Standard, and similarly
11824 for enum_bitset_type.
11825 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11826 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11827
11828 Do not use "struct bitset_struct" to mean different things in
11829 different modules. Not only is this confusing, it violates
11830 the C Standard, which requires that structure types in different
11831 modules must be compatible if one is to be passed to the other.
11832 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11833 All instances of "struct bitset_struct *" replaced with "bitset".
11834 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11835 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11836 struct lbitset_struct, struct bitset_stats_struct): New types.
11837 All uses of struct bitset_struct changed to union bitset_union,
11838 etc.
11839 * lib/abitset.c (struct abitset_struct, abitset,
11840 struct bitset_struct): Remove.
11841 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11842 struct bitset_struct): Remove.
11843 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11844 bitset_struct): Remove.
11845 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11846 Likewise.
11847
11848 Do not call a function of type T using a call that assumes the
11849 function is of a different type U. Standard C requires that a
11850 function must be called with a type that is compatible with its
11851 definition.
11852 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11853 New decls.
11854 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11855 New functions.
11856 * lib/ebitset.c (PFV): Remove.
11857 * lib/lbitset.c (PFV): Likewise.
11858 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11859 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11860 decls.
11861 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11862 (ebitset_vtable): Use them.
11863 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11864 lbitset_xor): New functions.
11865 (lbitset_vtable): Use them.
11866
11867 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11868 Declare.
11869
11870 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
11871 GCC warning.
11872 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
11873 Use offsetof, for simplicity.
11874
11875 2002-10-06 Paul Eggert <eggert@twinsun.com>
11876
11877 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
11878 the same width as int. This reapplies a hunk of the 2002-08-12 patch
11879 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
11880 which was inadvertently undone by the 2002-09-30 patch.
11881 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
11882 the same width as int.
11883
11884 2002-10-04 Paul Eggert <eggert@twinsun.com>
11885
11886 Version 1.50.
11887
11888 * configure.ac (AC_INIT), NEWS: Increment version number.
11889
11890 * doc/bison.texinfo: Minor spelling, grammar, and white space
11891 fixes.
11892 (Symbols): Mention that any negative value returned from yylex
11893 signifies end-of-input. Warn about negative chars. Mention
11894 the portable Standard C character set.
11895
11896 The GNU coding standard says CFLAGS and YFLAGS are reserved
11897 for the installer to set.
11898 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
11899 * src/Makefile.am (AM_CFLAGS): Likewise.
11900 (AM_YFLAGS): Renamed from YFLAGS.
11901
11902 Fix some MAX and MIN problems.
11903 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
11904 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
11905 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
11906 * src/reader.c (reader): Use it.
11907
11908 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
11909 POSIX 1003.1-2001 has removed fgrep.
11910
11911 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
11912
11913 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
11914 interpreted as signed.
11915 * lib/ebitset.c (ebitset_list): Fix bug.
11916
11917 2002-10-01 Paul Eggert <eggert@twinsun.com>
11918
11919 More fixes for 64-bit hosts and large bitsets.
11920
11921 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
11922 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
11923 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
11924 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
11925 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
11926 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
11927 bitset_count_): Likewise.
11928 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
11929 bitset_first, bitset_last): Likewise.
11930 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
11931 bitset_stats_list_reverse, bitset_stats_size,
11932 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
11933 Likewise.
11934 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11935 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11936 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11937 bitsetv_reflexive_transitive_closure): Likewise.
11938 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
11939 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
11940 Likewise.
11941 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
11942 Likewise.
11943
11944 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
11945 Use size_t, not unsigned int, to count bytes.
11946 * lib/abitset.h (abitset_bytes): Likewise.
11947 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
11948 Likewise.
11949 * lib/bitset.h (bitset_bytes): Likewise.
11950 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
11951 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
11952 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11953 * lib/ebitset.c (ebitset_bytes): Likewise.
11954 * lib/ebitset.h (ebitset_bytes): Likewise.
11955 * lib/lbitset.c (lbitset_bytes): Likewise.
11956 * lib/lbitset.h (lbitset_bytes): Likewise.
11957
11958 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
11959 abitset_subset_p, abitset_disjoint_p, abitset_and,
11960 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
11961 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
11962 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
11963 abitset_or_and, abitset_or_and_cmp):
11964 Use bitset_windex instead of unsigned int.
11965 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11966 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
11967 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
11968 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
11969 Likewise.
11970 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
11971
11972 * lib/bitset.c (bitset_print):
11973 Use proper printf formats for widths of integer types.
11974 * lib/bitset_stats.c (bitset_percent_histogram_print,
11975 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
11976 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11977 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
11978 * lib/lbitset.c (lbitset_bytes): Likewise.
11979
11980 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
11981 BITSET_SIZE_MAX): New macros.
11982 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
11983 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
11984 to BITSET_WINDEX_MAX.
11985
11986 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
11987 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
11988 since we now return the bitset_bindex type (not int).
11989
11990 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
11991 when computing sizes.
11992 * lib/ebitset.c (ebitset_elts_grow): Likewise.
11993
11994 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
11995 and avoid cast to unsigned.
11996
11997 2002-09-30 Akim Demaille <akim@epita.fr>
11998
11999 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12000 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12001 Updates from Michael Hayes.
12002
12003 2002-09-30 Art Haas <ahaas@neosoft.com>
12004
12005 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12006 invocations.
12007 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12008 defined.
12009
12010 2002-09-27 Akim Demaille <akim@epita.fr>
12011
12012 Version 1.49c.
12013
12014 2002-09-27 Akim Demaille <akim@epita.fr>
12015
12016 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12017 (Because of AC_LIBSOURCE).
12018
12019 2002-09-27 Akim Demaille <akim@epita.fr>
12020
12021 Playing with Autoscan.
12022
12023 * configure.ac: Remove the old LIBOBJ tweaks.
12024 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12025 * lib/strrchr.c: New.
12026 * lib/strtol.c: New, from the Coreutils 4.5.1.
12027
12028 2002-09-27 Akim Demaille <akim@epita.fr>
12029
12030 Playing with Autoscan.
12031
12032 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12033 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12034 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12035 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12036 Coreutils 4.5.1.
12037
12038 2002-09-24 Akim Demaille <akim@epita.fr>
12039
12040 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12041 (Frequently Asked Questions, Parser Stack Overflow): New.
12042
12043 2002-09-13 Akim Demaille <akim@epita.fr>
12044
12045 Playing with autoscan.
12046
12047 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12048 * src/files.c (skeleton_find): Remove, unused.
12049 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12050 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12051
12052 2002-09-13 Akim Demaille <akim@epita.fr>
12053
12054 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12055 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12056
12057 2002-09-13 Akim Demaille <akim@epita.fr>
12058
12059 * configure.ac: Require 2.54.
12060 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12061 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12062 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12063 Remove, provided by Autoconf macros.
12064
12065 2002-09-12 Akim Demaille <akim@epita.fr>
12066
12067 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12068
12069 2002-09-12 Akim Demaille <akim@epita.fr>
12070
12071 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12072 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12073 Reported by Martin Mokrejs.
12074
12075 2002-09-10 Akim Demaille <akim@epita.fr>
12076
12077 * src/parse-gram.y: Associate a human readable string to each
12078 token type.
12079 * tests/regression.at (Invalid inputs): Adjust.
12080
12081 2002-09-10 Gary V. Vaughan <gary@gnu.org>
12082
12083 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12084 with an Autoconf-2.5x style configure.ac.
12085
12086 2002-09-06 Paul Eggert <eggert@twinsun.com>
12087
12088 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12089 exception applies only to yacc.c. This is a modification of a
12090 patch originally suggested by Akim Demaille.
12091
12092 2002-09-06 Akim Demaille <akim@epita.fr>
12093
12094 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12095 here to...
12096 * data/yacc.c: here.
12097
12098 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12099 LocationType.
12100 (b4_ltype): Default to yy::Location from location.hh.
12101
12102 2002-09-04 Jim Meyering <jim@meyering.net>
12103
12104 * data/yacc.c: Guard the declaration of yytoknum also with
12105 `#ifdef YYPRINT', so it is declared only when used.
12106
12107 2002-09-04 Akim Demaille <akim@epita.fr>
12108
12109 * configure.in: Rename as...
12110 * configure.ac: this.
12111 Bump to 1.49c.
12112
12113 2002-09-04 Akim Demaille <akim@epita.fr>
12114
12115 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12116 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12117 translate maintainer only messages.
12118
12119 2002-08-12 Paul Eggert <eggert@twinsun.com>
12120
12121 Version 1.49b.
12122
12123 * Makefile.am (SUBDIRS): Remove intl.
12124 (DISTCLEANFILES): Remove.
12125 * NEWS: Mention that GNU M4 is now required. Clarify what is
12126 meant by "larger grammars". Mention the pt_BR translation.
12127 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12128 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12129 Bump version from 0.11.2 to 0.11.5.
12130 (BISON_PREREQ_STAGE): Remove.
12131 (AM_GNU_GETTEXT): Use external gettext.
12132 (AC_OUTPUT): Remove intl/Makefile.
12133
12134 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12135
12136 * data/glr.c: Include string.h, for strlen.
12137 (yyreportParseError): Use size_t for yysize.
12138 (yy_yypstack): No longer nested inside yypstates, as nested
12139 functions are not portable. Do not assume size_t is the
12140 same width as int.
12141 (yypstates): Do not assume that ptrdiff_t is the same width
12142 as int, and similarly for yyposn and YYINDEX.
12143
12144 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12145
12146 * lib/Makefile.am (INCLUDES): Do not include from the intl
12147 directory, which has been removed.
12148 * src/Makefile.am (INCLUDES): Likewise.
12149
12150 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12151 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12152 New vars.
12153
12154 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12155 * tests/Makefile.am (EXTRA_DIST): Likewise.
12156
12157 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12158 Do not assume that bitset_windex is the same width as unsigned.
12159
12160 * lib/abitset.c (abitset_unused_clear): Do not assume that
12161 bitset_word is the same width as int.
12162 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12163 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12164 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12165 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12166 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12167
12168 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12169 portability to one's complement hosts!).
12170 * lib/ebitset.c (ebitset_op1): Likewise.
12171 * lib/lbitset.c (lbitset_op1): Likewise.
12172
12173 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12174 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12175 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12176 Sync with fileutils.
12177 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12178 lib/gettext.h: Sync with diffutils.
12179
12180 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12181 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12182
12183 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12184 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12185 check for void *.
12186
12187 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12188 size_t; the old version tried to do this but casted improperly.
12189 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12190 (bitset_test): Now returns int, not unsigned long.
12191
12192 * lib/bitset_stats.c: Include "gettext.h".
12193 (_): New macro.
12194 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12195 name locals "index", as it generates unnecessary warnings on some
12196 hosts that have an "index" function.
12197
12198 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12199 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12200 they need translation.
12201 * src/LR0.c (state_list_append, new_itemsets, get_state,
12202 append_states, generate_states): Likewise.
12203 * src/assoc.c (assoc_to_string): Likewise.
12204 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12205 * src/gram.c (grammar_dump): Likewise.
12206 * src/injections.c (injections_compute): Likewise.
12207 * src/lalr.c (lookaheads_print): Likewise.
12208 * src/relation.c (relation_transpose): Likewise.
12209 * src/scan-gram.l: Likewise.
12210 * src/tables.c (table_grow, pack_vector): Likewise.
12211
12212 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12213 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12214 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12215 * m4/mbstate_t.m4: Sync with fileutils.
12216 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12217
12218 * po/LINGUAS: Add pt_BR.
12219 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12220 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12221 lib/timevar.c.
12222 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12223 manual recommends.
12224 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12225
12226 * src/complain.c (strerror_r): Remove decl; not needed.
12227 (strerror): Use same pattern as ../lib/error.c.
12228
12229 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12230
12231 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12232
12233 * src/main.c (main): Cast result of bindtextdomain and textdomain
12234 to void, to avoid a GCC warning when --disable-nls is in effect.
12235
12236 * src/scan-gram.l: Use strings rather than escapes when possible,
12237 to minimize the number of warnings from xgettext.
12238 (handle_action_dollar, handle_action_at): Don't use isdigit,
12239 as it mishandles negative chars and it may not work as expected
12240 outside the C locale.
12241
12242 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12243 this is a GCC extension and is not portable to other compilers.
12244
12245 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12246 Do not include <ctype.h>; no longer needed.
12247 Do not include <malloc.h>; no longer needed (and generates
12248 warnings on OpenBSD 3.0).
12249
12250 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12251 it's not portable.
12252
12253 * tests/regression.at: Do not use 'cc -c input.c -o input';
12254 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12255
12256 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12257 exit status as failure, not just exit status 1. Sun C exits
12258 with status 2 sometimes.
12259
12260 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12261 Use it for the two large tests.
12262
12263 2002-08-02 Akim Demaille <akim@epita.fr>
12264
12265 * src/conflicts.c (conflicts_output): Don't output rules never
12266 reduced here, since anyway that computation doesn't work.
12267 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12268 (rule_useless_p, rule_never_reduced_p): New.
12269 (grammar_rules_partial_print): Use a filter instead of a range.
12270 Display the title only if needed.
12271 (grammar_rules_print): Adjust.
12272 (grammar_rules_never_reduced_report): New.
12273 * src/tables.c (action_row): Move the computation of rules never
12274 reduced to...
12275 (token_actions): here.
12276 * src/main.c (main): Make the parser before making the report, so
12277 that rules never reduced are computed.
12278 Call grammar_rules_never_reduced_report.
12279 * src/print.c (print_results): Report rules never reduced.
12280 * tests/conflicts.at, tests/reduce.at: Adjust.
12281
12282 2002-08-01 Akim Demaille <akim@epita.fr>
12283
12284 Instead of attaching lookaheads and duplicating the rules being
12285 reduced by a state, attach the lookaheads to the reductions.
12286
12287 * src/state.h (state_t): Remove the `lookaheads',
12288 `lookaheads_rule' member.
12289 (reductions_t): Add a `lookaheads' member.
12290 Use a regular array for the `rules'.
12291 * src/state.c (reductions_new): Initialize the lookaheads member
12292 to 0.
12293 (state_rule_lookaheads_print): Adjust.
12294 * src/state.h, src/state.c (state_reductions_find): New.
12295 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12296 (count_rr_conflicts): Adjust.
12297 * src/lalr.c (LArule): Remove.
12298 (add_lookback_edge): Adjust.
12299 (state_lookaheads_count): New.
12300 (states_lookaheads_initialize): Merge into...
12301 (initialize_LA): this.
12302 (lalr_free): Adjust.
12303 * src/main.c (main): Don't free nullable and derives too early: it
12304 is used by --verbose.
12305 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12306
12307 2002-08-01 Akim Demaille <akim@epita.fr>
12308
12309 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12310 `rule_number_t**'.
12311 (set_derives, free_derives): Rename as...
12312 (derives_compute, derives_free): this.
12313 Adjust all dependencies.
12314 * src/nullable.c (set_nullable, free_nullable): Rename as...
12315 (nullable_compute, nullable_free): these.
12316 (rule_list_t): Store rule_t *, not rule_number_t.
12317 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12318 pointers, instead of their numbers.
12319 * src/main.c (main): Call nullable_free, and derives_free earlier,
12320 as they were lo longer used.
12321
12322 2002-08-01 Akim Demaille <akim@epita.fr>
12323
12324 * lib/timevar.c (get_time): Include children time.
12325 * src/lalr.h (LA, LArule): Don't export them: used with the
12326 state_t.
12327 * src/lalr.c (LA, LArule): Static.
12328 * src/lalr.h, src/lalr.c (lalr_free): New.
12329 * src/main.c (main): Call it.
12330 * src/tables.c (pack_vector): Check whether loc is >= to the
12331 table_size, not >.
12332 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12333 (tables_generate): do it, since that's also it which allocates
12334 them.
12335 Don't free LA and LArule, main does.
12336
12337 2002-07-31 Akim Demaille <akim@epita.fr>
12338
12339 Separate parser tables computation and output.
12340
12341 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12342 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12343 (yydefgoto, yydefact, high): Move to...
12344 * src/tables.h, src/tables.c: here.
12345 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12346 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12347 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12348 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12349 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12350 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12351 (action_row, save_row, token_actions, save_column, default_goto)
12352 (goto_actions, sort_actions, matching_state, pack_vector)
12353 (table_ninf_remap, pack_table, prepare_actions): Move to...
12354 * src/tables.c: here.
12355 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12356 * src/output.c (token_actions, output_base, output_conflicts)
12357 (output_check): Merge into...
12358 (prepare_actions): this.
12359 (actions_output): Rename as...
12360 (user_actions_output): this.
12361 * src/main.c (main): Call tables_generate and tables_free.
12362
12363 2002-07-31 Akim Demaille <akim@epita.fr>
12364
12365 Steal GCC's --time-report support.
12366
12367 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12368 stolen/adjusted from GCC.
12369 * m4/stage.m4: Remove time related checks.
12370 * m4/timevar.m4: New.
12371 * configure.in: Adjust.
12372 * src/system.h: Adjust to using timevar.h.
12373 * src/getargs.h, src/getargs.c: Support trace_time for
12374 --trace=time.
12375 * src/main.c (stage): Remove.
12376 (main): Replace `stage' invocations with timevar calls.
12377 * src/output.c: Insert pertinent timevar calls.
12378
12379 2002-07-31 Akim Demaille <akim@epita.fr>
12380
12381 Let --trace have arguments.
12382
12383 * src/getargs.h (enum trace_e): New.
12384 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12385 (long_options, short_options): --trace/-T takes an optional
12386 argument.
12387 Change all the uses of trace_flag to reflect the new flags.
12388 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12389
12390 Strengthen `stage' portability.
12391
12392 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12393 * configure.in: Use it.
12394 Don't check for malloc.h and sys/times.h.
12395 * src/system.h: Include them when appropriate.
12396 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12397 times and struct tms are available.
12398
12399 2002-07-30 Akim Demaille <akim@epita.fr>
12400
12401 In verbose parse error message, don't report `error' as an
12402 expected token.
12403 * tests/actions.at (Printers and Destructors): Adjust.
12404 * tests/calc.at (Calculator $1): Adjust.
12405 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12406 error message, do not report the parser accepts the error token in
12407 that state.
12408
12409 2002-07-30 Akim Demaille <akim@epita.fr>
12410
12411 Normalize conflict related messages.
12412
12413 * src/complain.h, src/complain.c (warn, complain): New.
12414 * src/conflicts.c (conflicts_print): Use them.
12415 (conflict_report_yacc): New, extracted from...
12416 (conflicts_print): here.
12417 * tests/conflicts.at, tests/existing.at: Adjust.
12418
12419 2002-07-30 Akim Demaille <akim@epita.fr>
12420
12421 Report rules which are never reduced by the parser: those hidden
12422 by conflicts.
12423
12424 * src/LR0.c (save_reductions): Don't make the final state too
12425 different: save its reduction (accept) instead of having a state
12426 without any action (no shift or goto, no reduce).
12427 Note: the final state is now a ``regular'' state, i.e., the
12428 parsers now contain `reduce 0' as default reduction.
12429 Nevertheless, since they decide to `accept' when yystate =
12430 final_state, they still will not reduce rule 0.
12431 * src/print.c (print_actions, print_reduction): Adjust.
12432 * src/output.c (action_row): Track reduced rules.
12433 (token_actions): Report rules never reduced.
12434 * tests/conflicts.at, tests/regression.at: Adjust.
12435
12436 2002-07-30 Akim Demaille <akim@epita.fr>
12437
12438 `stage' was accidently included in a previous patch.
12439 Initiate its autoconfiscation.
12440
12441 * configure.in: Look for malloc.h and sys/times.h.
12442 * src/main.c (stage): Adjust.
12443 Report only when trace_flag.
12444
12445 2002-07-29 Akim Demaille <akim@epita.fr>
12446
12447 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12448 state_number_t.
12449 (errs_t): symbol_t*, not symbol_number_t.
12450 (reductions_t): rule_t*, not rule_number_t.
12451 (FOR_EACH_SHIFT): New.
12452 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12453 * src/print.c, src/print_graph.c: Adjust.
12454
12455 2002-07-29 Akim Demaille <akim@epita.fr>
12456
12457 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12458
12459 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12460 (endtoken, accept): these.
12461 * src/reader.c (reader): Set endtoken's default tag to "$end".
12462 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12463 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12464 Adjust.
12465
12466 2002-07-29 Akim Demaille <akim@epita.fr>
12467
12468 * src/reduce.c (reduce_grammar): When the language is empty,
12469 complain about the start symbol, not the axiom.
12470 Use its location.
12471 * tests/reduce.at (Empty Language): New.
12472
12473 2002-07-26 Akim Demaille <akim@epita.fr>
12474
12475 * src/reader.h, src/reader.c (gram_error): ... can't get
12476 yycontrol without making too strong assumptions on the parser
12477 itself.
12478 * src/output.c (prepare_tokens): Use the real 0th value of
12479 token_translations instead of `0'.
12480 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12481 visible here.
12482 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12483 for the time being: %locations ought to provide it to yyerror.
12484
12485 2002-07-25 Akim Demaille <akim@epita.fr>
12486
12487 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12488 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12489 * tests/regression.at (Web2c Actions): Adjust.
12490
12491 2002-07-25 Akim Demaille <akim@epita.fr>
12492
12493 Stop storing rules from 1 to nrules + 1.
12494
12495 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12496 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12497 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12498 Iterate from 0 to nrules.
12499 Use rule_number_as_item_number and item_number_as_rule_number.
12500 Adjust to `derive' now containing possibly 0.
12501 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12502 Handle the `- 1' part in rule numbers from/to item numbers.
12503 * src/conflicts.c (log_resolution): Fix the message which reversed
12504 shift and reduce.
12505 * src/output.c (action_row): Initialize default_rule to -1.
12506 (token_actions): Adjust.
12507 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12508 expected output.
12509 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12510
12511 2002-07-25 Akim Demaille <akim@epita.fr>
12512
12513 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12514 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12515 (b4_c_knr_arg_decl): New.
12516 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12517 yyreport_parse_error.
12518
12519 2002-07-25 Akim Demaille <akim@epita.fr>
12520
12521 * data/yacc.c (yyreport_parse_error): New, extracted from...
12522 (yyparse): here.
12523 (yydestruct, yysymprint): Move above yyparse.
12524 Be K&R compliant.
12525
12526 2002-07-25 Akim Demaille <akim@epita.fr>
12527
12528 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12529 replace...
12530 (b4_sint_type, b4_uint_type): these.
12531 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12532 * tests/regression.at (Web2c Actions): Adjust.
12533
12534 2002-07-25 Akim Demaille <akim@epita.fr>
12535
12536 * src/gram.h (TIEM_NUMBER_MAX): New.
12537 (item_number_of_rule_number, rule_number_of_item_number): Rename
12538 as...
12539 (rule_number_as_item_number, item_number_as_rule_number): these.
12540 Adjust dependencies.
12541 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12542 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12543 (symbol_number_to_vector_number): New.
12544 (order): Of vector_number_t* type.
12545 (base_t, BASE_MAX, BASE_MIN): New.
12546 (froms, tos, width, pos, check): Of base_t type.
12547 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12548 (actrow): Of action_number_t type.
12549 (conflrow): Of unsigned int type.
12550 (table_ninf, base_ninf): New.
12551 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12552 (muscle_insert_int_table, muscle_insert_base_table)
12553 (muscle_insert_rule_number_table): New.
12554 (prepare_tokens): Output `toknum' as int_table.
12555 (action_row): Returns a rule_number_t.
12556 Use ACTION_MIN, not SHRT_MIN.
12557 (token_actions): yydefact is rule_number_t*.
12558 (table_ninf_remap): New.
12559 (pack_table): Use it for `base' and `table'.
12560 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12561 replaced with...
12562 (YYPACT_NINF, YYTABLE_NINF): these.
12563 (yypact, yytable): Compute their types instead of hard-coded
12564 `short'.
12565 * tests/regression.at (Web2c Actions): Adjust.
12566
12567 2002-07-19 Akim Demaille <akim@epita.fr>
12568
12569 * src/scan-gram.l (id): Can start with an underscore.
12570
12571 2002-07-16 Akim Demaille <akim@epita.fr>
12572
12573 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12574 Adjust all former `associativity' dependencies.
12575 * src/symtab.c (symbol_new): Default associativity is `undef', not
12576 `right'.
12577 (symbol_check_alias_consistence): Adjust.
12578
12579 2002-07-09 Akim Demaille <akim@epita.fr>
12580
12581 * doc/bison.texinfo: Properly set the ``header'' part.
12582 Use @dircategory ``GNU programming tools'' as per Texinfo's
12583 documentation.
12584 Use @copying.
12585
12586 2002-07-09 Akim Demaille <akim@epita.fr>
12587
12588 * lib/quotearg.h: Protect against multiple inclusions.
12589 * src/location.h (location_t): Add a `file' member.
12590 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12591 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12592 `error_one_per_line' support.
12593
12594 2002-07-09 Akim Demaille <akim@epita.fr>
12595
12596 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12597 * src/reader.c (lineno): Remove.
12598 Adjust all dependencies.
12599 (get_merge_function): Take a location and use complain_at.
12600 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12601 * tests/regression.at (Invalid inputs, Mixing %token styles):
12602 Adjust.
12603
12604 2002-07-09 Akim Demaille <akim@epita.fr>
12605
12606 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12607 recovery rule, and forbid extensions when --yacc.
12608 (gram_error): Use complain_at.
12609 * src/reader.c (reader): Exit if there were parse errors.
12610
12611 2002-07-09 Akim Demaille <akim@epita.fr>
12612
12613 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12614 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12615 Reported by R Blake <blakers@mac.com>.
12616
12617 2002-07-09 Akim Demaille <akim@epita.fr>
12618
12619 * data/yacc.c: Output the copyright notive in the header.
12620
12621 2002-07-03 Akim Demaille <akim@epita.fr>
12622
12623 * src/output.c (froms, tos): Are state_number_t.
12624 (save_column): sp, sp1, and sp2 are state_number_t.
12625 (prepare): Rename `final' as `final_state_number', `nnts' as
12626 `nterms_number', `nrules' as `rules_number', `nstates' as
12627 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12628 unused.
12629 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12630 * data/lalr1.cc (nsym_): Remove, unused.
12631
12632 2002-07-03 Akim Demaille <akim@epita.fr>
12633
12634 * src/lalr.h, src/lalr.c (goto_number_t): New.
12635 * src/lalr.c (goto_list_t): New.
12636 Propagate them.
12637 * src/nullable.c (rule_list_t): New.
12638 Propagate.
12639 * src/types.h: Remove.
12640
12641 2002-07-03 Akim Demaille <akim@epita.fr>
12642
12643 * src/closure.c (print_fderives): Use rule_rhs_print.
12644 * src/derives.c (print_derives): Use rule_rhs_print.
12645 (rule_list_t): New, replaces `shorts'.
12646 (set_derives): Add comments.
12647 * tests/sets.at (Nullable, Firsts): Adjust.
12648
12649 2002-07-03 Akim Demaille <akim@epita.fr>
12650
12651 * src/output.c (prepare_actions): Free `tally' and `width'.
12652 (prepare_actions): Allocate and free `order'.
12653 * src/symtab.c (symbols_free): Free `symbols'.
12654 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12655 * src/output.c (m4_invoke): Move to...
12656 * src/scan-skel.l: here.
12657 (<<EOF>>): Close yyout, and free its name.
12658
12659 2002-07-03 Akim Demaille <akim@epita.fr>
12660
12661 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12662
12663 * src/LR0.c (new_state): Merge into...
12664 (state_list_append): this.
12665 (new_states): Merge into...
12666 (generate_states): here.
12667 (set_states): Don't ensure a proper `errs' state member here, do it...
12668 * src/conflicts.c (conflicts_solve): here.
12669 * src/state.h, src/state.c: Comment changes.
12670 (state_t): Rename member `shifts' as `transitions'.
12671 Adjust all dependencies.
12672 (errs_new): For consistency, also take the values as argument.
12673 (errs_dup): Remove.
12674 (state_errs_set): New.
12675 (state_reductions_set, state_transitions_set): Assert that no
12676 previous value was assigned.
12677 (state_free): New.
12678 (states_free): Use it.
12679 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12680 temporary storage: use `errs' and `nerrs' as elsewhere.
12681 (set_conflicts): Allocate and free this `errs'.
12682
12683 2002-07-02 Akim Demaille <akim@epita.fr>
12684
12685 * lib/libiberty.h: New.
12686 * lib: Update the bitset implementation from upstream.
12687 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12688 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12689 * src/main.c: Adjust bitset stats calls.
12690
12691 2002-07-01 Paul Eggert <eggert@twinsun.com>
12692
12693 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12694 char, so that negative chars don't collide with $.
12695
12696 2002-06-30 Akim Demaille <akim@epita.fr>
12697
12698 Have the GLR tests be `warning' checked, and fix the warnings.
12699
12700 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12701 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12702 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12703 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12704 (yyaddDeferredAction): static.
12705 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12706 (yyreportParseError): yyprefix is const.
12707 yytokenp is used only when verbose.
12708 (yy__GNUC__): Replace with __GNUC__.
12709 (yypdumpstack): yyi is size_t.
12710 (yypreference): Un-yy local variables and arguments, to avoid
12711 clashes with `yyr1'. Anyway, we are not in the user name space.
12712 (yytname_size): be an int, as is compared with ints.
12713 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12714 Use them.
12715 * tests/cxx-gram.at: Use quotation to protect $1.
12716 Use AT_COMPILE to enable warnings hunts.
12717 Prototype yylex and yyerror.
12718 `Use' argc.
12719 Include `string.h', not `strings.h'.
12720 Produce and prototype stmtMerge only when used.
12721 yylex takes a location.
12722
12723 2002-06-30 Akim Demaille <akim@epita.fr>
12724
12725 We spend a lot of time in quotearg, in particular when --verbose.
12726
12727 * src/symtab.c (symbol_get): Store a quoted version of the key.
12728 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12729 Adjust all callers.
12730
12731 2002-06-30 Akim Demaille <akim@epita.fr>
12732
12733 * src/state.h (reductions_t): Rename member `nreds' as num.
12734 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12735 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12736
12737 2002-06-30 Akim Demaille <akim@epita.fr>
12738
12739 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12740 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12741 (shifts_to): Rename as...
12742 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12743 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12744 (TRANSITION_IS_DISABLED, transitions_to): these.
12745
12746 2002-06-30 Akim Demaille <akim@epita.fr>
12747
12748 * src/print.c (print_shifts, print_gotos): Merge into...
12749 (print_transitions): this.
12750 (print_transitions, print_errs, print_reductions): Align the
12751 lookaheads columns.
12752 (print_core, print_transitions, print_errs, print_state,
12753 print_grammar): Output empty lines separator before, not after.
12754 (state_default_rule_compute): Rename as...
12755 (state_default_rule): this.
12756 * tests/conflicts.at (Defaulted Conflicted Reduction),
12757 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12758 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12759
12760 2002-06-30 Akim Demaille <akim@epita.fr>
12761
12762 Display items as we display rules.
12763
12764 * src/gram.h, src/gram.c (rule_lhs_print): New.
12765 * src/gram.c (grammar_rules_partial_print): Use it.
12766 * src/print.c (print_core): Likewise.
12767 * tests/conflicts.at (Defaulted Conflicted Reduction),
12768 (Unresolved SR Conflicts): Adjust.
12769 (Unresolved SR Conflicts): Adjust and rename as...
12770 (Resolved SR Conflicts): this, as was meant.
12771 * tests/regression.at (Web2c Report): Adjust.
12772
12773 2002-06-30 Akim Demaille <akim@epita.fr>
12774
12775 * src/print.c (state_default_rule_compute): New, extracted from...
12776 (print_reductions): here.
12777 Pessimize, but clarify the code.
12778 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12779
12780 2002-06-30 Akim Demaille <akim@epita.fr>
12781
12782 * src/output.c (action_row): Let default_rule be always a rule
12783 number.
12784
12785 2002-06-30 Akim Demaille <akim@epita.fr>
12786
12787 * src/closure.c (print_firsts, print_fderives, closure):
12788 Use BITSET_EXECUTE.
12789 * src/lalr.c (lookaheads_print): Likewise.
12790 * src/state.c (state_rule_lookaheads_print): Likewise.
12791 * src/print_graph.c (print_core): Likewise.
12792 * src/print.c (print_reductions): Likewise.
12793 * src/output.c (action_row): Likewise.
12794 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12795
12796 2002-06-30 Akim Demaille <akim@epita.fr>
12797
12798 * src/print_graph.c: Use report_flag.
12799
12800 2002-06-30 Akim Demaille <akim@epita.fr>
12801
12802 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12803 to...
12804 * src/relation.h, src/relation.c (traverse, relation_digraph)
12805 (relation_print, relation_transpose): New.
12806
12807 2002-06-30 Akim Demaille <akim@epita.fr>
12808
12809 * src/state.h, src/state.c (shifts_to): New.
12810 * src/lalr.c (build_relations): Use it.
12811
12812 2002-06-30 Akim Demaille <akim@epita.fr>
12813
12814 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12815 (item_number_of_rule_number, rule_number_of_item_number): New.
12816 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12817 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12818 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12819 Propagate their use.
12820 Much remains to be done, in particular wrt `shorts' from types.h.
12821
12822 2002-06-30 Akim Demaille <akim@epita.fr>
12823
12824 * src/symtab.c (symbol_new): Initialize the `printer' member.
12825
12826 2002-06-30 Akim Demaille <akim@epita.fr>
12827
12828 * src/LR0.c (save_reductions): Remove, replaced by...
12829 * src/state.h, src/state.c (state_reductions_set): New.
12830 (reductions, errs): Rename as...
12831 (reductions_t, errs_t): these.
12832 Adjust all dependencies.
12833
12834 2002-06-30 Akim Demaille <akim@epita.fr>
12835
12836 * src/LR0.c (state_list_t, state_list_append): New.
12837 (first_state, last_state): Now symbol_list_t.
12838 (this_state): Remove.
12839 (new_itemsets, append_states, save_reductions): Take a state_t as
12840 argument.
12841 (set_states, generate_states): Adjust.
12842 (save_shifts): Remove, replaced by...
12843 * src/state.h, src/state.c (state_shifts_set): New.
12844 (shifts): Rename as...
12845 (shifts_t): this.
12846 Adjust all dependencies.
12847 * src/state.h (state_t): Remove the `next' member.
12848
12849 2002-06-30 Akim Demaille <akim@epita.fr>
12850
12851 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12852 escaped in slot 0.
12853
12854 2002-06-30 Akim Demaille <akim@epita.fr>
12855
12856 Use hash.h for the state hash table.
12857
12858 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12859 (allocate_storage): Use state_hash_new.
12860 (free_storage): Use state_hash_free.
12861 (new_state, get_state): Adjust.
12862 * src/lalr.h, src/lalr.c (states): Move to...
12863 * src/states.h (state_t): Remove the `link' member, no longer
12864 used.
12865 * src/states.h, src/states.c: here.
12866 (state_hash_new, state_hash_free, state_hash_lookup)
12867 (state_hash_insert, states_free): New.
12868 * src/states.c (state_table, state_compare, state_hash): New.
12869 * src/output.c (output_actions): Do not free states now, since we
12870 still need to know the final_state number in `prepare', called
12871 afterwards. Do it...
12872 * src/main.c (main): here: call states_free after `output'.
12873
12874 2002-06-30 Akim Demaille <akim@epita.fr>
12875
12876 * src/state.h, src/state.c (state_new): New, extracted from...
12877 * src/LR0.c (new_state): here.
12878 * src/state.h (STATE_ALLOC): Move to...
12879 * src/state.c: here.
12880 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
12881 * src/state.h, src/state.c: here.
12882
12883 2002-06-30 Akim Demaille <akim@epita.fr>
12884
12885 * src/reader.c (gensym): Rename as...
12886 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
12887 (getsym): Rename as...
12888 (symbol_get): this.
12889
12890 2002-06-30 Akim Demaille <akim@epita.fr>
12891
12892 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
12893 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
12894 * src/output.c, src/print.c, src/print_graph.c: Propagate.
12895 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
12896
12897 2002-06-30 Akim Demaille <akim@epita.fr>
12898
12899 Make the test suite pass with warnings checked.
12900
12901 * tests/actions.at (Printers and Destructors): Improve.
12902 Avoid unsigned vs. signed issues.
12903 * tests/calc.at: Don't exercise the scanner here, do it...
12904 * tests/input.at (Torturing the Scanner): here.
12905
12906 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12907
12908 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
12909 reorganize first lines parallel to yacc.c.
12910
12911 2002-06-28 Akim Demaille <akim@epita.fr>
12912
12913 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
12914 (b4_token_enum, b4_token_defines): New, factored from...
12915 * data/lalr1.cc, data/yacc.c, glr.c: here.
12916
12917 2002-06-28 Akim Demaille <akim@epita.fr>
12918
12919 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
12920 unused variables.
12921 * src/output.c (merger_output): static.
12922
12923 2002-06-28 Akim Demaille <akim@epita.fr>
12924
12925 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
12926 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
12927 pacify GCC.
12928 * src/output.c (save_row): Initialize all the variables to pacify GCC.
12929
12930 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12931
12932 Accumulated changelog for new GLR parsing features.
12933
12934 * src/conflicts.c (count_total_conflicts): Change name to
12935 conflicts_total_count.
12936 * src/conflicts.h: Ditto.
12937 * src/output.c (token_actions): Use the new name.
12938 (output_conflicts): Change conflp => conflict_list_heads, and
12939 confl => conflict_list for better readability.
12940 * data/glr.c: Use the new names.
12941 * NEWS: Add self to GLR announcement.
12942
12943 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
12944
12945 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
12946 Akim Demaille.
12947
12948 * data/bison.glr: Change name to glr.c
12949 * data/glr.c: Renamed from bison.glr.
12950 * data/Makefile.am: Add glr.c
12951
12952 * src/getargs.c:
12953
12954 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
12955 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
12956
12957 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12958
12959 * data/bison.glr: Be sure to restore the
12960 current #line when returning to the skeleton contents after having
12961 exposed the input file's #line.
12962
12963 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12964
12965 * data/bison.glr: Bring up to date with changes to bison.simple.
12966
12967 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12968
12969 * data/bison.glr: Correct definitions that use b4_prefix.
12970 Various reformatting.
12971 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
12972 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
12973 yytokenp argument; now part of stack.
12974 (yychar): Define to behave as documented.
12975 (yyclearin): Ditto.
12976
12977 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12978
12979 * src/reader.h: Add declaration for free_merger_functions.
12980
12981 * src/reader.c (merge_functions): New variable.
12982 (get_merge_function): New function.
12983 (free_merger_functions): New function.
12984 (readgram): Check for %prec that is not followed by a symbol.
12985 Handle %dprec and %merge declarations.
12986 (packgram): Initialize dprec and merger fields in rules array.
12987
12988 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
12989 conflict_list_cnt, conflict_list_free): New variables.
12990 (table_grow): Also grow conflict_table.
12991 (prepare_rules): Output dprec and merger tables.
12992 (conflict_row): New function.
12993 (action_row): Output conflict lists for GLR parser. Don't use
12994 default reduction in conflicted states for GLR parser so that there
12995 are spaces for the conflict lists.
12996 (save_row): Also save conflict information.
12997 (token_actions): Allocate conflict list.
12998 (merger_output): New function.
12999 (pack_vector): Pack conflict table, too.
13000 (output_conflicts): New function to output yyconflp and yyconfl.
13001 (output_check): Allocate conflict_tos.
13002 (output_actions): Output conflict tables, also.
13003 (output_skeleton): Output b4_mergers definition.
13004 (prepare): Output b4_max_rhs_length definition.
13005 Use 'bison.glr' as default skeleton for GLR parsers.
13006
13007 * src/gram.c (glr_parser): New flag.
13008 (grammar_free): Call free_merger_functions.
13009
13010 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13011 all pairs of conflicting reductions, rather than just all tokens
13012 causing conflicts. Needed to size conflict tables.
13013 (conflicts_output): Modify call to count_rr_conflicts for new
13014 interface.
13015 (conflicts_print): Ditto.
13016 (count_total_conflicts): New function.
13017
13018 * src/reader.h (merger_list): New type.
13019 (merge_functions): New variable.
13020
13021 * src/lex.h (tok_dprec, tok_merge): New token types.
13022
13023 * src/gram.h (rule_s): Add dprec and merger fields.
13024 (glr_parser): New flag.
13025
13026 * src/conflicts.h (count_total_conflicts): New function.
13027
13028 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13029
13030 * doc/bison.texinfo (Generalized LR Parsing): New section.
13031 (GLR Parsers): New section.
13032 (Language and Grammar): Mention GLR parsing.
13033 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13034 Correct typo ("tge" -> "the").
13035
13036 * data/bison.glr: New skeleton for GLR parsing.
13037
13038 * tests/cxx-gram.at: New tests for GLR parsing.
13039
13040 * tests/testsuite.at: Include cxx-gram.at.
13041
13042 * tests/Makefile.am: Add cxx-gram.at.
13043
13044 * src/parse-gram.y:
13045
13046 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13047
13048 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
13049
13050 2002-06-27 Akim Demaille <akim@epita.fr>
13051
13052 * src/options.h, src/options.c: Remove.
13053 * src/getargs.c (short_options, long_options): New.
13054
13055 2002-06-27 Akim Demaille <akim@epita.fr>
13056
13057 * data/bison.simple, data/bison.c++: Rename as...
13058 * data/yacc.c, data/lalr1.cc: these.
13059 * doc/bison.texinfo (Environment Variables): Remove.
13060
13061 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13062
13063 * src/getargs.c (report_argmatch): Initialize strtok().
13064
13065 2002-06-20 Akim Demaille <akim@epita.fr>
13066
13067 * data/bison.simple (b4_symbol_actions): New, replaces...
13068 (b4_symbol_destructor, b4_symbol_printer): these.
13069 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13070 user token numbers.
13071
13072 2002-06-20 Akim Demaille <akim@epita.fr>
13073
13074 * data/bison.simple (yydestructor): Rename as...
13075 (yydestruct): this.
13076
13077 2002-06-20 Akim Demaille <akim@epita.fr>
13078
13079 * src/symtab.h, src/symtab.c (symbol_type_set)
13080 (symbol_destructor_set, symbol_precedence_set): The location is
13081 the last argument.
13082 Adjust all callers.
13083
13084 2002-06-20 Akim Demaille <akim@epita.fr>
13085
13086 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13087 internals.
13088 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13089 Takes a location.
13090 * src/symtab.h, src/symtab.c (symbol_class_set)
13091 (symbol_user_token_number_set): Likewise.
13092 Adjust all callers.
13093 Promote complain_at.
13094 * tests/input.at (Type Clashes): Adjust.
13095
13096 2002-06-20 Akim Demaille <akim@epita.fr>
13097
13098 * data/bison.simple (YYLEX): Fix the declaration when
13099 %pure-parser.
13100
13101 2002-06-20 Akim Demaille <akim@epita.fr>
13102
13103 * data/bison.simple (yysymprint): Don't print the token number,
13104 just its name.
13105 * tests/actions.at (Destructors): Rename as...
13106 (Printers and Destructors): this.
13107 Also exercise %printer.
13108
13109 2002-06-20 Akim Demaille <akim@epita.fr>
13110
13111 * data/bison.simple (YYDSYMPRINT): New.
13112 Use it to remove many of the #if YYDEBUG/if (yydebug).
13113
13114 2002-06-20 Akim Demaille <akim@epita.fr>
13115
13116 * src/symtab.h, src/symtab.c (symbol_t): printer and
13117 printer_location are new members.
13118 (symbol_printer_set): New.
13119 * src/parse-gram.y (PERCENT_PRINTER): New token.
13120 Handle its associated rule.
13121 * src/scan-gram.l: Adjust.
13122 (handle_destructor_at, handle_destructor_dollar): Rename as...
13123 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13124 * src/output.c (symbol_printers_output): New.
13125 (output_skeleton): Call it.
13126 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13127 since there are already many grammar files with a user `yyprint'.
13128 Replace the calls to YYPRINT to calls to yysymprint.
13129 * tests/calc.at: Adjust.
13130 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13131 taking advantage of parser very internal details (stack size!).
13132
13133 2002-06-20 Akim Demaille <akim@epita.fr>
13134
13135 * src/scan-gram.l: Complete the scanner with the missing patterns
13136 to pacify Flex.
13137 Use `quote' and `symbol_tag_get' where appropriate.
13138
13139 2002-06-19 Akim Demaille <akim@epita.fr>
13140
13141 * tests/actions.at (Destructors): Augment to test locations.
13142 * data/bison.simple (yydestructor): Pass it the current location
13143 if locations are enabled.
13144 Prototype only when __STDC__ or C++.
13145 Change the argument names to move into the yy name space: there is
13146 user code here.
13147
13148 2002-06-19 Akim Demaille <akim@epita.fr>
13149
13150 * data/bison.simple (b4_pure_if): New.
13151 Use it instead of #ifdef YYPURE.
13152
13153 2002-06-19 Akim Demaille <akim@epita.fr>
13154
13155 * data/bison.simple (b4_location_if): New.
13156 Use it instead of #ifdef YYLSP_NEEDED.
13157
13158 2002-06-19 Akim Demaille <akim@epita.fr>
13159
13160 Prepare @$ in %destructor, but currently don't bind it in the
13161 skeleton, as %location use is not cleaned up yet.
13162
13163 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13164 (handle_action_at): New.
13165 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13166 a braced_code_t and a location as additional arguments.
13167 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13168 unquote one when outputting `b4_dollar_dollar'.
13169 Adjust callers.
13170 * data/bison.simple (b4_eval): Remove.
13171 (b4_symbol_destructor): Adjust.
13172 * tests/input.at (Invalid @n): Adjust.
13173
13174 2002-06-19 Zack Weinberg <zack@codesourcery.com>
13175
13176 * doc/bison.texinfo: Document ability to have multiple
13177 prologue sections.
13178
13179 2002-06-18 Akim Demaille <akim@epita.fr>
13180
13181 * src/files.c (compute_base_names): When computing the output file
13182 names from the input file name, strip the directory part.
13183
13184 2002-06-18 Akim Demaille <akim@epita.fr>
13185
13186 * data/bison.simple.new: Comment changes.
13187 Reported by Andreas Schwab.
13188
13189 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13190
13191 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13192 there are no `label `yyoverflowlab' defined but not used' warnings
13193 when yyoverflow is defined.
13194
13195 2002-06-18 Akim Demaille <akim@epita.fr>
13196
13197 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13198 new member.
13199 (symbol_destructor_set): Adjust.
13200 * src/output.c (symbol_destructors_output): Output the destructor
13201 locations.
13202 Output the symbol name.
13203 * data/bison.simple (b4_symbol_destructor): Adjust.
13204
13205 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13206 and Akim Demaille <akim@epita.fr>
13207
13208 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13209 what's left on the stack when the error recovery hits EOF.
13210 * tests/actions.at (Destructors): Complete to exercise this case.
13211
13212 2002-06-17 Akim Demaille <akim@epita.fr>
13213
13214 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13215 arguments is really empty, not only equal to `[]'.
13216 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13217 member.
13218 (symbol_destructor_set): New.
13219 * src/output.c (symbol_destructors_output): New.
13220 * src/reader.h (brace_code_t, current_braced_code): New.
13221 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13222 (handle_dollar): Rename as...
13223 (handle_action_dollar): this.
13224 (handle_destructor_dollar): New.
13225 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13226 (grammar_declaration): Use it.
13227 * data/bison.simple (yystos): Is always defined.
13228 (yydestructor): New.
13229 * tests/actions.at (Destructors): New.
13230 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13231
13232 2002-06-17 Akim Demaille <akim@epita.fr>
13233
13234 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13235 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13236 rule_length only when needed.
13237 * src/output.c (actions_output, token_definitions_output): Output
13238 the full M4 block.
13239 * src/symtab.c: Don't access directly to the symbol tag, use
13240 symbol_tag_get.
13241 * src/parse-gram.y: Use symbol_list_free.
13242
13243 2002-06-17 Akim Demaille <akim@epita.fr>
13244
13245 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13246 (symbol_list_prepend, get_type_name): Move to...
13247 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13248 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13249 Adjust all callers.
13250 (symbol_list_free): New.
13251 * src/scan-gram.l (handle_dollar): Takes a location.
13252 * tests/input.at (Invalid $n): Adjust.
13253
13254 2002-06-17 Akim Demaille <akim@epita.fr>
13255
13256 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13257 (symbol_list_prepend): New.
13258 * src/parse-gram.y (%union): `list' is a new member.
13259 (symbols.1): New, replaces...
13260 (terms_to_prec.1, nterms_to_type.1): these.
13261 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13262 Take a location as additional argument.
13263 Adjust all callers.
13264
13265 2002-06-15 Akim Demaille <akim@epita.fr>
13266
13267 * src/parse-gram.y: Move %token in the declaration section so that
13268 we don't depend upon CVS Bison.
13269
13270 2002-06-15 Akim Demaille <akim@epita.fr>
13271
13272 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13273 * src/print.c (print_core): Use it.
13274
13275 2002-06-15 Akim Demaille <akim@epita.fr>
13276
13277 * src/conflicts.c (log_resolution): Accept the rule involved in
13278 the sr conflicts instead of the lookahead number that points to
13279 that rule.
13280 (flush_reduce): Accept the current lookahead vector as argument,
13281 instead of the index in LA.
13282 (resolve_sr_conflict): Accept the current number of lookahead
13283 bitset to consider for the STATE, instead of the index in LA.
13284 (set_conflicts): Adjust.
13285 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13286
13287 2002-06-15 Akim Demaille <akim@epita.fr>
13288
13289 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13290 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13291 Adjust all dependencies.
13292 * src/lalr.c (initialize_lookaheads): Split into...
13293 (states_lookaheads_count, states_lookaheads_initialize): these.
13294 (lalr): Adjust.
13295
13296 2002-06-15 Akim Demaille <akim@epita.fr>
13297
13298 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13299 out of...
13300 (grammar_rules_print): here.
13301 * src/reduce.c (reduce_output): Use it.
13302 * tests/reduce.at (Useless Rules, Reduced Automaton)
13303 (Underivable Rules): Adjust.
13304
13305 2002-06-15 Akim Demaille <akim@epita.fr>
13306
13307 Copy BYacc's nice way to report the grammar.
13308
13309 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13310 New.
13311 Don't print the rules' location, it is confusing and useless.
13312 (rule_print): Use grammar_rhs_print.
13313 * src/print.c (print_grammar): Use grammar_rules_print.
13314
13315 2002-06-15 Akim Demaille <akim@epita.fr>
13316
13317 Complete and rationalize `useless thing' warnings.
13318
13319 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13320 (symbol_tag_print): New.
13321 Use them everywhere in place of accessing directly the tag member.
13322 * src/gram.h, src/gram.c (rule_print): New.
13323 Use it where a rule used to be printed `by hand'.
13324 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13325 (reduce_grammar_tables): Report the useless rules.
13326 (reduce_print): Useless things are a warning, not an error.
13327 Report it as such.
13328 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13329 (Reduced Automaton, Underivable Rules): Adjust.
13330 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13331 * tests/conflicts.at (Unresolved SR Conflicts)
13332 (Solved SR Conflicts): Adjust.
13333
13334 2002-06-15 Akim Demaille <akim@epita.fr>
13335
13336 Let symbols have a location.
13337
13338 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13339 (getsym): Adjust.
13340 Adjust all callers.
13341 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13342 Use location_t, not int.
13343 * src/symtab.c (symbol_check_defined): Take advantage of the
13344 location.
13345 * tests/regression.at (Invalid inputs): Adjust.
13346
13347 2002-06-15 Akim Demaille <akim@epita.fr>
13348
13349 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13350 (input): Don't try to initialize yylloc here, do it in the
13351 scanner.
13352 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13353 * src/gram.h (rule_t): Change line and action_line into location
13354 and action_location, of location_t type.
13355 Adjust all dependencies.
13356 * src/location.h, src/location.c (empty_location): New.
13357 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13358 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13359 (grammar_current_rule_symbol_append)
13360 (grammar_current_rule_action_append): Expect a location as argument.
13361 * src/reader.c (grammar_midrule_action): Adjust to attach an
13362 action's location as dummy symbol location.
13363 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13364 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13365 the line numbers.
13366
13367 2002-06-14 Akim Demaille <akim@epita.fr>
13368
13369 Grammar declarations may be found in the grammar section.
13370
13371 * src/parse-gram.y (rules_or_grammar_declaration): New.
13372 (declarations): Each declaration may end with a semicolon, not
13373 just...
13374 (grammar_declaration): `"%union"'.
13375 (grammar): Branch to rules_or_grammar_declaration.
13376
13377 2002-06-14 Akim Demaille <akim@epita.fr>
13378
13379 * src/main.c (main): Invoke scanner_free.
13380
13381 2002-06-14 Akim Demaille <akim@epita.fr>
13382
13383 * src/output.c (m4_invoke): Extracted from...
13384 (output_skeleton): here.
13385 Free tempfile.
13386
13387 2002-06-14 Akim Demaille <akim@epita.fr>
13388
13389 * src/parse-gram.y (directives, directive, gram)
13390 (grammar_directives, precedence_directives, precedence_directive):
13391 Rename as...
13392 (declarations, declaration, grammar, grammar_declaration)
13393 (precedence_declaration, precedence_declarator): these.
13394 (symbol_declaration): New.
13395
13396 2002-06-14 Akim Demaille <akim@epita.fr>
13397
13398 * src/files.c (action_obstack): Remove, unused.
13399 (output_obstack): Remove it, and all its dependencies, as it is no
13400 longer needed.
13401 * src/reader.c (epilogue_set): Build the epilogue in the
13402 muscle_obstack.
13403 * src/output.h, src/output.c (muscle_obstack): Move to...
13404 * src/muscle_tab.h, src/muscle_tab.h: here.
13405 (muscle_init): Initialize muscle_obstack.
13406 (muscle_free): New.
13407 * src/main.c (main): Call it.
13408
13409 2002-06-14 Akim Demaille <akim@epita.fr>
13410
13411 * src/location.h: New, extracted from...
13412 * src/reader.h: here.
13413 * src/Makefile.am (noinst_HEADERS): Merge into
13414 (bison_SOURCES): this.
13415 Add location.h.
13416 * src/parse-gram.y: Use location_t instead of Bison's.
13417 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13418 Use location_t instead of ints.
13419
13420 2002-06-14 Akim Demaille <akim@epita.fr>
13421
13422 * data/bison.simple, data/bison.c++: Be sure to restore the
13423 current #line when returning to the skeleton contents after having
13424 exposed the input file's #line.
13425
13426 2002-06-12 Akim Demaille <akim@epita.fr>
13427
13428 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13429 eager.
13430 * tests/actions.at (Exotic Dollars): New.
13431
13432 2002-06-12 Akim Demaille <akim@epita.fr>
13433
13434 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13435 ['"/] too eagerly.
13436 * tests/input.at (Torturing the Scanner): New.
13437
13438 2002-06-11 Akim Demaille <akim@epita.fr>
13439
13440 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13441 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13442 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13443 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13444 * src/reader.c (reader): Use it.
13445
13446 2002-06-11 Akim Demaille <akim@epita.fr>
13447
13448 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13449 Adjust all callers.
13450 (scanner_last_string_free): New.
13451
13452 2002-06-11 Akim Demaille <akim@epita.fr>
13453
13454 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13455 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13456 (last_string, YY_OBS_FREE): New.
13457 Use them when returning an ID.
13458
13459 2002-06-11 Akim Demaille <akim@epita.fr>
13460
13461 Have Bison grammars parsed by a Bison grammar.
13462
13463 * src/reader.c, src/reader.h (prologue_augment): New.
13464 * src/reader.c (copy_definition): Remove.
13465
13466 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13467 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13468 (grammar_current_rule_prec_set, grammar_current_rule_check)
13469 (grammar_current_rule_symbol_append)
13470 (grammar_current_rule_action_append): Export.
13471 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13472 (symbol_list_action_append): Remove.
13473 Hook the routines from reader.
13474 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13475 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13476
13477 * src/reader.c (read_declarations): Remove, unused.
13478
13479 * src/parse-gram.y: Handle the epilogue.
13480 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13481 (grammar_start_symbol_set): this.
13482 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13483 * src/reader.c (readgram): Remove, unused.
13484 (reader): Adjust to insert eoftoken and axiom where appropriate.
13485
13486 * src/reader.c (copy_dollar): Replace with...
13487 * src/scan-gram.h (handle_dollar): this.
13488 * src/parse-gram.y: Remove `%thong'.
13489
13490 * src/reader.c (copy_at): Replace with...
13491 * src/scan-gram.h (handle_at): this.
13492
13493 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13494 New.
13495
13496 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13497 time being.
13498
13499 * src/reader.h, src/reader.c (grammar_rule_end): New.
13500
13501 * src/parse.y (current_type, current_class): New.
13502 Implement `%nterm', `%token' support.
13503 Merge `%term' into `%token'.
13504 (string_as_id): New.
13505 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13506 type name.
13507
13508 * src/parse-gram.y: Be sure to handle properly the beginning of
13509 rules.
13510
13511 * src/parse-gram.y: Handle %type.
13512 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13513
13514 * src/parse-gram.y: More directives support.
13515 * src/options.c: No longer handle source directives.
13516
13517 * src/parse-gram.y: Fix %output.
13518
13519 * src/parse-gram.y: Handle %union.
13520 Use the prologue locations.
13521 * src/reader.c (parse_union_decl): Remove.
13522
13523 * src/reader.h, src/reader.c (epilogue_set): New.
13524 * src/parse-gram.y: Use it.
13525
13526 * data/bison.simple, data/bison.c++: b4_stype is now either not
13527 defined, then default to int, or to the contents of %union,
13528 without `union' itself.
13529 Adjust.
13530 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13531
13532 * src/output.c (actions_output): Don't output braces, as they are
13533 already handled by the scanner.
13534
13535 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13536 characters to themselves.
13537
13538 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13539 that the epilogue has a proper #line.
13540
13541 * src/parse-gram.y: Handle precedence/associativity.
13542
13543 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13544 a terminal.
13545 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13546 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13547 at all to define terminals that cannot be emitted.
13548
13549 * src/scan-gram.l: Escape M4 characters.
13550
13551 * src/scan-gram.l: Working properly with escapes in user
13552 strings/characters.
13553
13554 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13555 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13556 grammar.
13557 Use more modest sizes, as for the time being the parser does not
13558 release memory, and therefore the process swallows a huge amount
13559 of memory.
13560
13561 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13562 stricter %token grammar.
13563
13564 * src/symtab.h (associativity): Add `undef_assoc'.
13565 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13566 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13567
13568 * tests/regression.at (Invalid %directive): Remove, as it is now
13569 meaningless.
13570 (Invalid inputs): Adjust to the new error messages.
13571 (Token definitions): The new grammar doesn't allow too many
13572 eccentricities.
13573
13574 * src/lex.h, src/lex.c: Remove.
13575 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13576 (copy_character, copy_string2, copy_string, copy_identifier)
13577 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13578 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13579 (parse_action): Remove.
13580 * po/POTFILES.in: Adjust.
13581
13582 2002-06-11 Akim Demaille <akim@epita.fr>
13583
13584 * src/reader.c (parse_action): Don't store directly into the
13585 rule's action member: return the action as a string.
13586 Don't require `rule_length' as an argument: compute it.
13587 (grammar_current_rule_symbol_append)
13588 (grammar_current_rule_action_append): New, eved out from
13589 (readgram): here.
13590 Remove `action_flag', `rulelength', unused now.
13591
13592 2002-06-11 Akim Demaille <akim@epita.fr>
13593
13594 * src/reader.c (grammar_current_rule_prec_set).
13595 (grammar_current_rule_check): New, eved out from...
13596 (readgram): here.
13597 Remove `xaction', `first_rhs': useless.
13598 * tests/input.at (Type clashes): New.
13599 * tests/existing.at (GNU Cim Grammar): Adjust.
13600
13601 2002-06-11 Akim Demaille <akim@epita.fr>
13602
13603 * src/reader.c (grammar_midrule_action): New, Eved out from
13604 (readgram): here.
13605
13606 2002-06-11 Akim Demaille <akim@epita.fr>
13607
13608 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13609 New.
13610 (readgram): Use them as replacement of inlined code, crule and
13611 crule1.
13612
13613 2002-06-11 Akim Demaille <akim@epita.fr>
13614
13615 * src/reader.c (grammar_end, grammar_symbol_append): New.
13616 (readgram): Use them.
13617 Make the use of `p' as local as possible.
13618
13619 2002-06-10 Akim Demaille <akim@epita.fr>
13620
13621 GCJ's parser requires the tokens to be defined before the prologue.
13622
13623 * data/bison.simple: Output the token definition before the user's
13624 prologue.
13625 * tests/regression.at (Braces parsing, Duplicate string)
13626 (Mixing %token styles): Check the output from bison.
13627 (Early token definitions): New.
13628
13629 2002-06-10 Akim Demaille <akim@epita.fr>
13630
13631 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13632 assigning twice the same user number to a token, so that we can
13633 use it in...
13634 * src/lex.c (lex): here.
13635 Also use `symbol_class_set' instead of hand written code.
13636 * src/reader.c (parse_assoc_decl): Likewise.
13637
13638 2002-06-10 Akim Demaille <akim@epita.fr>
13639
13640 * src/symtab.c, src/symtab.c (symbol_class_set)
13641 (symbol_user_token_number_set): New.
13642 * src/reader.c (parse_token_decl): Use them.
13643 Use a switch instead of ifs.
13644 Use a single argument.
13645
13646 2002-06-10 Akim Demaille <akim@epita.fr>
13647
13648 Remove `%thong' support as it is undocumented, unused, duplicates
13649 `%token's job, and creates useless e-mail traffic with people who
13650 want to know what it is, why it is undocumented, unused, and
13651 duplicates `%token's job.
13652
13653 * src/reader.c (parse_thong_decl): Remove.
13654 * src/options.c (option_table): Remove "thong".
13655 * src/lex.h (tok_thong): Remove.
13656
13657 2002-06-10 Akim Demaille <akim@epita.fr>
13658
13659 * src/symtab.c, src/symtab.c (symbol_type_set)
13660 (symbol_precedence_set): New.
13661 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13662 (value_components_used): Remove, unused.
13663
13664 2002-06-09 Akim Demaille <akim@epita.fr>
13665
13666 Move symbols handling code out of the reader.
13667
13668 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13669 (axiom): Move to...
13670 * src/symtab.h, src/symtab.c: here.
13671
13672 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13673 * src/reader.c (startval): Rename as...
13674 * src/symtab.h, src/symtab.c (startsymbol): this.
13675 * src/reader.c: Adjust.
13676
13677 * src/reader.c (symbol_check_defined, symbol_make_alias)
13678 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13679 (token_translations_init)
13680 Move to...
13681 * src/symtab.c: here.
13682 * src/reader.c (packsymbols): Move to...
13683 * src/symtab.h, src/symtab.c (symbols_pack): here.
13684 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13685 argument.
13686
13687 2002-06-03 Akim Demaille <akim@epita.fr>
13688
13689 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13690 then statements.
13691
13692 2002-06-03 Akim Demaille <akim@epita.fr>
13693
13694 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13695 structs with non literals.
13696 * src/scan-skel.l: never-interactive.
13697 * src/conflicts.c (enum conflict_resolution_e): No trailing
13698 comma.
13699 * src/getargs.c (usage): Split long literal strings.
13700 Reported by Hans Aberg.
13701
13702 2002-05-28 Akim Demaille <akim@epita.fr>
13703
13704 * data/bison.c++: Use C++ ostreams.
13705 (cdebug_): New member.
13706
13707 2002-05-28 Akim Demaille <akim@epita.fr>
13708
13709 * src/output.c (output_skeleton): Be sure to allocate enough room
13710 for `/' _and_ for `\0' in full_skeleton.
13711
13712 2002-05-28 Akim Demaille <akim@epita.fr>
13713
13714 * data/bison.c++: Catch up with bison.simple:
13715 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13716 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13717 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13718 and popping traces.
13719
13720 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13721
13722 * src/output.c (output_skeleton): Put an explicit path in front of
13723 the skeleton file name, rather than relying on the -I directory,
13724 to partially alleviate effects of having a skeleton file lying around
13725 in the current directory.
13726
13727 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13728
13729 * src/conflicts.c (log_resolution): Correct typo:
13730 obstack_printf should be obstack_fgrow1.
13731
13732 2002-05-26 Akim Demaille <akim@epita.fr>
13733
13734 * src/state.h (state_t): `solved_conflicts' is a new member.
13735 * src/LR0.c (new_state): Set it to 0.
13736 * src/conflicts.h, src/conflicts.c (print_conflicts)
13737 (free_conflicts, solve_conflicts): Rename as...
13738 (conflicts_print, conflicts_free, conflicts_solve): these.
13739 Adjust callers.
13740 * src/conflicts.c (enum conflict_resolution_e)
13741 (solved_conflicts_obstack): New, used by...
13742 (log_resolution): this.
13743 Adjust to attach the conflict resolution to each state.
13744 Complete the description with the precedence/associativity
13745 information.
13746 (resolve_sr_conflict): Adjust.
13747 * src/print.c (print_state): Output its solved_conflicts.
13748 * tests/conflicts.at (Unresolved SR Conflicts)
13749 (Solved SR Conflicts): Exercise --report=all.
13750
13751 2002-05-26 Akim Demaille <akim@epita.fr>
13752
13753 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13754 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13755 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13756 (token_number_t, item_number_as_token_number)
13757 (token_number_as_item_number, muscle_insert_token_number_table):
13758 Rename as...
13759 (symbol_number_t, item_number_as_symbol_number)
13760 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13761 these, since it is more appropriate.
13762
13763 2002-05-26 Akim Demaille <akim@epita.fr>
13764
13765 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13766 `Error:' lines.
13767 * data/bison.simple (yystos) [YYDEBUG]: New.
13768 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13769 error recovery.
13770 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13771
13772 2002-05-25 Akim Demaille <akim@epita.fr>
13773
13774 * doc/bison.texinfo (Debugging): Split into...
13775 (Tracing): this new section, its former contents, and...
13776 (Understanding): this new section.
13777 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13778 by...
13779 (report_flag): this.
13780 Adjust all dependencies.
13781 (report_args, report_types, report_argmatch): New.
13782 (usage, getargs): Report/support -r, --report.
13783 * src/options.h
13784 (struct option_table_struct): Rename as..,
13785 (struct option_table_s): this.
13786 Rename the `set_flag' member to `flag' to match with getopt_long's
13787 struct.
13788 * src/options.c (option_table): Split verbose into an entry for
13789 %verbose, and another for --verbose.
13790 Support --report/-r, so remove -r from the obsolete --raw.
13791 * src/print.c: Attach full item sets and lookaheads reports to
13792 report_flag instead of trace_flag.
13793 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13794
13795 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13796 and Paul Eggert <eggert@twinsun.com>
13797
13798 * data/bison.simple (yyparse): Correct error handling to conform to
13799 POSIX and yacc. Specifically, after syntax error is discovered,
13800 do not reduce further before shifting the error token.
13801 Clean up the code a bit by removing the labels yyerrdefault,
13802 yyerrhandle, yyerrpop.
13803 * NEWS: Document the above.
13804
13805 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13806
13807 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13808 type; it isn't always big enough, since it doesn't necessarily
13809 include non-terminals.
13810 (yytranslate): Expand definition of yy_token_number_type, so that
13811 the latter can be removed.
13812 (yy_token_number_type): Remove, only one use.
13813 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13814 don't use TokenNumberType as element type.
13815
13816 * tests/regression.at: Modify expected output to agree with change
13817 to yyr1 and yytranslate.
13818
13819 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13820
13821 * src/reader.c (parse_action): Use copy_character instead of
13822 obstack_1grow.
13823
13824 2002-05-13 Akim Demaille <akim@epita.fr>
13825
13826 * tests/regression.at (Token definitions): Prototype yylex and
13827 yyerror.
13828
13829 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13830
13831 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
13832 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13833 32-bit arithmetic.
13834 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13835
13836 2002-05-07 Akim Demaille <akim@epita.fr>
13837
13838 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13839 avoid GCC warnings.
13840
13841 2002-05-07 Akim Demaille <akim@epita.fr>
13842
13843 Kill GCC warnings.
13844
13845 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13846 over the RHS of each rule.
13847 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13848 * src/state.h (state_t): Member `nitems' is unsigned short.
13849 * src/LR0.c (get_state): Adjust.
13850 * src/reader.c (packgram): Likewise.
13851 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13852 `Type'.
13853 (muscle_insert_int_table): Remove, unused.
13854 (prepare_rules): Remove `max'.
13855
13856 2002-05-06 Akim Demaille <akim@epita.fr>
13857
13858 * src/closure.c (print_firsts): Display of the symbol tags.
13859 (bitmatrix_print): Move to...
13860 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13861 here.
13862 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13863
13864 2002-05-06 Akim Demaille <akim@epita.fr>
13865
13866 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13867 hash_do_for_each.
13868
13869 2002-05-06 Akim Demaille <akim@epita.fr>
13870
13871 * src/LR0.c (new_state, get_state): Instead of using the global
13872 `kernel_size' and `kernel_base', have two new arguments:
13873 `core_size' and `core'.
13874 Adjust callers.
13875
13876 2002-05-06 Akim Demaille <akim@epita.fr>
13877
13878 * src/reader.c (packgram): No longer end `ritem' with a 0
13879 sentinel: it is not used.
13880
13881 2002-05-05 Akim Demaille <akim@epita.fr>
13882
13883 New experimental feature: display the lookaheads in the report and
13884 graph.
13885
13886 * src/print (print_core): When --trace-flag, display the rules
13887 lookaheads.
13888 * src/print_graph.c (print_core): Likewise.
13889 Swap the arguments.
13890 Adjust caller.
13891
13892 2002-05-05 Akim Demaille <akim@epita.fr>
13893
13894 * tests/torture.at (Many lookaheads): New test.
13895
13896 2002-05-05 Akim Demaille <akim@epita.fr>
13897
13898 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
13899 (GENERATE_MUSCLE_INSERT_TABLE): this.
13900 (output_int_table, output_unsigned_int_table, output_short_table)
13901 (output_token_number_table, output_item_number_table): Replace with...
13902 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
13903 (muscle_insert_short_table, muscle_insert_token_number_table)
13904 (muscle_insert_item_number_table): these.
13905 Adjust all callers.
13906 (prepare_tokens): Don't free `translations', since...
13907 * src/reader.h, src/reader.c (grammar_free): do it.
13908 Move to...
13909 * src/gram.h, src/gram.c (grammar_free): here.
13910 * data/bison.simple, data/bison.c++: b4_token_number_max is now
13911 b4_translate_max.
13912
13913 2002-05-05 Akim Demaille <akim@epita.fr>
13914
13915 * src/output.c (output_unsigned_int_table): New.
13916 (prepare_rules): `i' is unsigned.
13917 `prhs', `rline', `r2' are unsigned int.
13918 Rename muscle `rhs_number_max' as `rhs_max'.
13919 Output muscles `prhs_max', `rline_max', and `r2_max'.
13920 Free rline and r1.
13921 * data/bison.simple, data/bison.c++: Adjust to use these muscles
13922 to compute types instead of constant types.
13923 * tests/regression.at (Web2c Actions): Adjust.
13924
13925 2002-05-04 Akim Demaille <akim@epita.fr>
13926
13927 * src/symtab.h (SALIAS, SUNDEF): Rename as...
13928 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
13929 Adjust dependencies.
13930 * src/output.c (token_definitions_output): Be sure not to output a
13931 `#define 'a'' when fed with `%token 'a' "a"'.
13932 * tests/regression.at (Token definitions): New.
13933
13934 2002-05-03 Paul Eggert <eggert@twinsun.com>
13935
13936 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
13937 for K&R C.
13938
13939 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
13940
13941 * Makefile.am (SUBDIRS): Remove intl.
13942 (EXTRA_DIST): Add config/config.rpath.
13943
13944 2002-05-03 Akim Demaille <akim@epita.fr>
13945
13946 * data/bison.simple (m4_if): Don't output empty enums.
13947 And actually, output valid enum definitions :(.
13948
13949 2002-05-03 Akim Demaille <akim@epita.fr>
13950
13951 * configure.bat: Remove, completely obsolete.
13952 * Makefile.am (EXTRA_DIST): Adjust.
13953 Don't distribute config.rpath...
13954 * config/Makefile.am (EXTRA_DIST): Do it.
13955
13956 2002-05-03 Akim Demaille <akim@epita.fr>
13957
13958 * configure.in (GETTEXT_VERSION): New.
13959 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
13960
13961 2002-05-03 Akim Demaille <akim@epita.fr>
13962
13963 * data/bison.simple (b4_token_enum): New.
13964 (b4_token_defines): Use it to output tokens both as #define and
13965 enums.
13966 Suggested by Paul Eggert.
13967 * src/output.c (token_definitions_output): Don't output spurious
13968 white spaces.
13969
13970 2002-05-03 Akim Demaille <akim@epita.fr>
13971
13972 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13973
13974 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
13975
13976 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
13977 Update the stack class, give a try to deque as the default container.
13978
13979 2002-05-02 Akim Demaille <akim@epita.fr>
13980
13981 * data/bison.simple (yyparse): Do not implement @$ = @1.
13982 (YYLLOC_DEFAULT): Adjust to do it.
13983 * doc/bison.texinfo (Location Default Action): Fix.
13984
13985 2002-05-02 Akim Demaille <akim@epita.fr>
13986
13987 * src/reader.c (parse_braces): Merge into...
13988 (parse_action): this.
13989
13990 2002-05-02 Akim Demaille <akim@epita.fr>
13991
13992 * configure.in (ALL_LINGUAS): Remove.
13993 * po/LINGUAS, hr.po: New.
13994
13995 2002-05-02 Akim Demaille <akim@epita.fr>
13996
13997 Remove the so called hairy (semantic) parsers.
13998
13999 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14000 * src/gram.h, src/gram.c (semantic_parser): Remove.
14001 (rule_t): Remove the guard and guard_line members.
14002 * src/lex.h (token_t): remove tok_guard.
14003 * src/options.c (option_table): Remove %guard and %semantic_parser
14004 support.
14005 * src/output.c, src/output.h (guards_output): Remove.
14006 (prepare): Adjust.
14007 (token_definitions_output): Don't output the `T'
14008 tokens (???).
14009 (output_skeleton): Don't output the guards.
14010 * src/files.c, src/files.c (attrsfile): Remove.
14011 * src/reader.c (symbol_list): Remove the guard and guard_line
14012 members.
14013 Adjust dependencies.
14014 (parse_guard): Remove.
14015 * data/bison.hairy: Remove.
14016 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14017 BISON_HAIRY.
14018
14019 2002-05-02 Akim Demaille <akim@epita.fr>
14020
14021 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14022 (parse_guard): Rename the formal argument `stack_offset' as
14023 `rule_length', which is more readable.
14024 Adjust callers.
14025 (copy_at, copy_dollar): Instead of outputting the hard coded
14026 values of $$, $n and so forth, output invocation to b4_lhs_value,
14027 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
14028 Note: this patch partially drops `semantic-parser' support: it
14029 always does `rule_length - n', where semantic parsers ought to
14030 always use `-n'.
14031 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14032 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14033
14034 2002-05-02 Akim Demaille <akim@epita.fr>
14035
14036 * configure.in (AC_INIT): Bump to 1.49b.
14037 (AM_INIT_AUTOMAKE): Short invocation.
14038
14039 2002-05-02 Akim Demaille <akim@epita.fr>
14040
14041 Version 1.49a.
14042
14043 2002-05-01 Akim Demaille <akim@epita.fr>
14044
14045 * src/skeleton.h: Remove.
14046
14047 2002-05-01 Akim Demaille <akim@epita.fr>
14048
14049 * src/skeleton.h: Fix the #endif.
14050 Reported by Magnus Fromreide.
14051
14052 2002-04-26 Paul Eggert <eggert@twinsun.com>
14053
14054 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14055 Define if we define YYSTYPE and YYLTYPE, respectively.
14056 (YYCOPY): Fix [] quoting problem in the non-GCC case.
14057
14058 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
14059
14060 * src/scan-skel.l: Postprocess quadrigraphs.
14061
14062 * src/reader.c (copy_character): New function, used to output
14063 single characters while replacing `[' and `]' with quadrigraphs, to
14064 avoid troubles with M4 quotes.
14065 (copy_comment): Output characters with copy_character.
14066 (read_additionnal_code): Likewise.
14067 (copy_string2): Likewise.
14068 (copy_definition): Likewise.
14069
14070 * tests/calc.at: Exercise M4 quoting.
14071
14072 2002-04-25 Akim Demaille <akim@epita.fr>
14073
14074 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14075 between `!' and the command.
14076 Reported by Paul Eggert.
14077
14078 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
14079
14080 * tests/calc.at: Exercise prologue splitting.
14081
14082 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14083 `b4_post_prologue' instead of `b4_prologue'.
14084
14085 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14086 muscles.
14087 (output): Free pre_prologue_obstack and post_prologue_obstack.
14088 * src/files.h, src/files.c (attrs_obstack): Remove.
14089 (pre_prologue_obstack, post_prologue_obstack): New.
14090 * src/reader.c (copy_definition): Add a parameter to specify the
14091 obstack to fill, instead of using attrs_obstack unconditionally.
14092 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14093 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14094
14095 2002-04-23 Paul Eggert <eggert@twinsun.com>
14096
14097 * data/bison.simple: Remove unnecessary commentary and white
14098 space differences from 1_29-branch.
14099 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14100
14101 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14102 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14103 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14104 constructors or destructors.
14105
14106 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14107
14108 2002-04-23 Akim Demaille <akim@epita.fr>
14109
14110 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14111 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14112 location with columns.
14113 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14114 All reported by Paul Eggert.
14115
14116 2002-04-22 Akim Demaille <akim@epita.fr>
14117
14118 * src/reduce.c (dump_grammar): Move to...
14119 * src/gram.h, src/gram.c (grammar_dump): here.
14120 Be sure to separate long item numbers.
14121 Don't read the members of a rule's prec if its nil.
14122
14123 2002-04-22 Akim Demaille <akim@epita.fr>
14124
14125 * src/output.c (table_size, table_grow): New.
14126 (MAXTABLE): Remove, replace uses with table_size.
14127 (pack_vector): Instead of dying when the table is too big, grow it.
14128
14129 2002-04-22 Akim Demaille <akim@epita.fr>
14130
14131 * data/bison.simple (yyr1): Its type is that of a token number.
14132 * data/bison.c++ (r1_): Likewise.
14133 * tests/regression.at (Web2c Actions): Adjust.
14134
14135 2002-04-22 Akim Demaille <akim@epita.fr>
14136
14137 * src/reader.c (token_translations_init): 256 is now the default
14138 value for the error token, i.e., it will be assigned another
14139 number if the user assigned 256 to one of her tokens.
14140 (reader): Don't force 256 to error.
14141 * doc/bison.texinfo (Symbols): Adjust.
14142 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14143 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14144 etc. instead of 10, 20, 30 (which was used to `jump' over error
14145 (256) and undefined (2)).
14146
14147 2002-04-22 Akim Demaille <akim@epita.fr>
14148
14149 Propagate more token_number_t.
14150
14151 * src/gram.h (token_number_as_item_number)
14152 (item_number_as_token_number): New.
14153 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14154 Use it to create output_item_number_table and
14155 output_token_number_table.
14156 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14157 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14158 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14159 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14160
14161 2002-04-22 Akim Demaille <akim@epita.fr>
14162
14163 * src/output.h, src/output.c (get_lines_number): Remove.
14164
14165 2002-04-19 Akim Demaille <akim@epita.fr>
14166
14167 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14168 as Lex/Flex'.
14169 (Debugging): More details about enabling the debugging features.
14170 (Table of Symbols): Describe $$, $n, @$, and @n.
14171 Suggested by Tim Josling.
14172
14173 2002-04-19 Akim Demaille <akim@epita.fr>
14174
14175 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14176
14177 2002-04-10 Akim Demaille <akim@epita.fr>
14178
14179 * src/system.h: Rely on HAVE_LIMITS_H.
14180 Suggested by Paul Eggert.
14181
14182 2002-04-09 Akim Demaille <akim@epita.fr>
14183
14184 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14185 full stderr, and strip it according to the bison options, instead
14186 of composing the error message from different bits.
14187 This makes it easier to check for several error messages.
14188 Adjust all the invocations.
14189 Add an invocation exercising the error token.
14190 Add an invocation demonstrating a stupid error message.
14191 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14192 Adjust the tests.
14193 Error message are for stderr, not stdout.
14194
14195 2002-04-09 Akim Demaille <akim@epita.fr>
14196
14197 * src/gram.h, src/gram.c (error_token_number): Remove, use
14198 errtoken->number.
14199 * src/reader.c (reader): Don't specify the user token number (2)
14200 for $undefined, as it uselessly prevents using it.
14201 * src/gram.h (token_number_t): Move to...
14202 * src/symtab.h: here.
14203 (state_t.number): Is a token_number_t.
14204 * src/print.c, src/reader.c: Use undeftoken->number instead of
14205 hard coded 2.
14206 (Even though this 2 is not the same as above: the number of the
14207 undeftoken remains being 2, it is its user token number which
14208 might not be 2).
14209 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14210 `user_token_number_max'.
14211 Output `undef_token_number'.
14212 * data/bison.simple, data/bison.c++: Use them.
14213 Be sure to map invalid yylex return values to
14214 `undef_token_number'. This saves us from gratuitous SEGV.
14215
14216 * tests/conflicts.at (Solved SR Conflicts)
14217 (Unresolved SR Conflicts): Adjust.
14218 * tests/regression.at (Web2c Actions): Adjust.
14219
14220 2002-04-08 Akim Demaille <akim@epita.fr>
14221
14222 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14223 Adding #line.
14224 Remove the duplicate `typedefs'.
14225 (RhsNumberType): Fix the declaration and various other typos.
14226 Use __ofile__.
14227 * data/bison.simple: Use __ofile__.
14228 * src/scan-skel.l: Handle __ofile__.
14229
14230 2002-04-08 Akim Demaille <akim@epita.fr>
14231
14232 * src/gram.h (item_number_t): New, the type of item numbers in
14233 RITEM. Note that it must be able to code symbol numbers as
14234 positive number, and the negation of rule numbers as negative
14235 numbers.
14236 Adjust all dependencies (pretty many).
14237 * src/reduce.c (rule): Remove this `short *' pointer: use
14238 item_number_t.
14239 * src/system.h (MINSHORT, MAXSHORT): Remove.
14240 Include `limits.h'.
14241 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14242 (shortcpy): Remove.
14243 (MAXTABLE): Move to...
14244 * src/output.c (MAXTABLE): here.
14245 (prepare_rules): Use output_int_table to output rhs.
14246 * data/bison.simple, data/bison.c++: Adjust.
14247 * tests/torture.at (Big triangle): Move the limit from 254 to
14248 500.
14249 * tests/regression.at (Web2c Actions): Ajust.
14250
14251 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14252 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14253 passes, but produces negative #line number, once fixed, GCC is
14254 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14255 C), it passes.
14256 * src/state.h (state_h): Code input lines on ints, not shorts.
14257
14258 2002-04-08 Akim Demaille <akim@epita.fr>
14259
14260 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14261 and then the grammar.
14262
14263 2002-04-08 Akim Demaille <akim@epita.fr>
14264
14265 * src/system.h: No longer using strndup.
14266
14267 2002-04-07 Akim Demaille <akim@epita.fr>
14268
14269 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14270 * src/output.c (output_table_data): Return the longest number.
14271 (prepare_tokens): Output `token_number_max').
14272 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14273 New.
14274 Use them to define yy_token_number_type/TokenNumberType.
14275 Use this type for yytranslate.
14276 * tests/torture.at (Big triangle): Push the limit from 124 to
14277 253.
14278 * tests/regression.at (Web2c Actions): Adjust.
14279
14280 2002-04-07 Akim Demaille <akim@epita.fr>
14281
14282 * tests/torture.at (Big triangle): New.
14283 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14284 * tests/existing.at: here.
14285
14286 2002-04-07 Akim Demaille <akim@epita.fr>
14287
14288 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14289 nritems.
14290 Adjust dependencies.
14291
14292 2002-04-07 Akim Demaille <akim@epita.fr>
14293
14294 * src/reader.c: Normalize increments to prefix form.
14295
14296 2002-04-07 Akim Demaille <akim@epita.fr>
14297
14298 * src/reader.c, symtab.c: Remove debugging code.
14299
14300 2002-04-07 Akim Demaille <akim@epita.fr>
14301
14302 Rename all the `bucket's as `symbol_t'.
14303
14304 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14305 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14306 * src/symtab.c, src/symtab.h (bucket): Rename as...
14307 (symbol_t): this.
14308 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14309 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14310 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14311 (buckets_new, buckets_free, buckets_do): Rename as...
14312 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14313 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14314 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14315 (symbols_new, symbols_free, symbols_do): these.
14316
14317 2002-04-07 Akim Demaille <akim@epita.fr>
14318
14319 Use lib/hash for the symbol table.
14320
14321 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14322 EOF.
14323 * src/lex.c (lex): Set the `number' member of new terminals.
14324 * src/reader.c (bucket_check_defined, bucket_make_alias)
14325 (bucket_check_alias_consistence, bucket_translation): New.
14326 (reader, grammar_free, readgram, token_translations_init)
14327 (packsymbols): Adjust.
14328 (reader): Number the predefined tokens.
14329 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14330 for predefined tokens.
14331 * src/symtab.h (bucket): Remove all the hash table related
14332 members.
14333 * src/symtab.c (symtab): Replace by...
14334 (bucket_table): this.
14335 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14336 (buckets_new, buckets_do): New.
14337
14338 2002-04-07 Akim Demaille <akim@epita.fr>
14339
14340 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14341 (start_symbol, max_user_token_number, semantic_parser)
14342 (error_token_number): Initialize.
14343 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14344 Initialize.
14345 (reader): Don't.
14346 (errtoken, eoftoken, undeftoken, axiom): Extern.
14347
14348 2002-04-07 Akim Demaille <akim@epita.fr>
14349
14350 * src/gram.h (rule_s): prec and precsym are now pointers
14351 to the bucket giving the priority/associativity.
14352 Member `associativity' removed: useless.
14353 * src/reduce.c, src/conflicts.c: Adjust.
14354
14355 2002-04-07 Akim Demaille <akim@epita.fr>
14356
14357 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14358 Properly escape the symbols' TAG when outputting them.
14359
14360 2002-04-07 Akim Demaille <akim@epita.fr>
14361
14362 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14363
14364 2002-04-07 Akim Demaille <akim@epita.fr>
14365
14366 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14367 (LArule): this, which is an array to rule_t*.
14368 * src/print.c, src/conflicts.c: Adjust.
14369
14370 2002-04-07 Akim Demaille <akim@epita.fr>
14371
14372 * src/gram.h (rule_t): Rename `number' as `user_number'.
14373 `number' is a new member.
14374 Adjust dependencies.
14375 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14376
14377 2002-04-07 Akim Demaille <akim@epita.fr>
14378
14379 As a result of the previous patch, it is no longer needed
14380 to reorder ritem itself.
14381
14382 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14383
14384 2002-04-07 Akim Demaille <akim@epita.fr>
14385
14386 Be sure never to walk through RITEMS, but use only data related to
14387 the rules themselves. RITEMS should be banished.
14388
14389 * src/output.c (output_token_translations): Rename as...
14390 (prepare_tokens): this.
14391 In addition to `translate', prepare the muscles `tname' and
14392 `toknum', which were handled by...
14393 (output_rule_data): this.
14394 Remove, and move the remainder of its outputs into...
14395 (prepare_rules): this new routines, which also merges content from
14396 (output_gram): this.
14397 (prepare_rules): Be sure never to walk through RITEMS.
14398 (output_stos): Rename as...
14399 (prepare_stos): this.
14400 (output): Always invoke prepare_states, after all, just don't use it
14401 in the output if you don't need it.
14402
14403 2002-04-07 Akim Demaille <akim@epita.fr>
14404
14405 * src/LR0.c (new_state): Display `nstates' as the name of the
14406 newly created state.
14407 Adjust to initialize first_state and last_state if needed.
14408 Be sure to distinguish the initial from the final state.
14409 (new_states): Create the itemset of the initial state, and use
14410 new_state.
14411 * src/closure.c (closure): Now that the initial state has its
14412 items properly set, there is no need for a special case when
14413 creating `ruleset'.
14414
14415 As a result, now the rule 0, reducing to $axiom, is visible in the
14416 outputs. Adjust the test suite.
14417
14418 * tests/conflicts.at (Solved SR Conflicts)
14419 (Unresolved SR Conflicts): Adjust.
14420 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14421 * tests/conflicts.at (S/R in initial): New.
14422
14423 2002-04-07 Akim Demaille <akim@epita.fr>
14424
14425 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14426 the RHS of the rules.
14427 * src/output.c (output_gram): Likewise.
14428
14429 2002-04-07 Akim Demaille <akim@epita.fr>
14430
14431 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14432 bucket.
14433 Adjust all dependencies.
14434 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14435 `number' of the buckets too.
14436 * src/gram.h: Include `symtab.h'.
14437 (associativity): Move to...
14438 * src/symtab.h: here.
14439 No longer include `gram.h'.
14440
14441 2002-04-07 Akim Demaille <akim@epita.fr>
14442
14443 * src/gram.h, src/gram.c (rules_rhs_length): New.
14444 (ritem_longest_rhs): Use it.
14445 * src/gram.h (rule_t): `number' is a new member.
14446 * src/reader.c (packgram): Set it.
14447 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14448 the end of `rules', and count them out of `nrules'.
14449 (reduce_output, dump_grammar): Adjust.
14450 * src/print.c (print_grammar): It is no longer needed to check for
14451 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14452 * tests/reduce.at (Reduced Automaton): New test.
14453
14454 2002-04-07 Akim Demaille <akim@epita.fr>
14455
14456 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14457 lacking `+ 1' to nrules, Bison reported as useless a token if it
14458 was used solely to set the precedence of the last rule...
14459
14460 2002-04-07 Akim Demaille <akim@epita.fr>
14461
14462 * data/bison.c++, data/bison.simple: Don't output the current file
14463 name in #line, to avoid useless diffs between two identical
14464 outputs under different names.
14465
14466 2002-04-07 Akim Demaille <akim@epita.fr>
14467
14468 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14469 Normalize loops to using `< nrules + 1', not `<= nrules'.
14470
14471 2002-04-07 Akim Demaille <akim@epita.fr>
14472
14473 * TODO: Update.
14474
14475 2002-04-07 Akim Demaille <akim@epita.fr>
14476
14477 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14478 bucket.value as bucket.number.
14479
14480 2002-04-07 Akim Demaille <akim@epita.fr>
14481
14482 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14483 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14484 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14485 RHS, instead of being an index in RITEMS.
14486
14487 2002-04-04 Paul Eggert <eggert@twinsun.com>
14488
14489 * doc/bison.texinfo: Update copyright date.
14490 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14491 (Symbols): Warn about running Bison in one character set,
14492 but compiling and/or running in an incompatible one.
14493 Warn about character code 256, too.
14494
14495 2002-04-03 Paul Eggert <eggert@twinsun.com>
14496
14497 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14498 YYERROR_VERBOSE is nonzero, not whether it is defined.
14499
14500 Merge changes from bison-1_29-branch.
14501
14502 2002-03-20 Paul Eggert <eggert@twinsun.com>
14503
14504 Merge fixes from Debian bison_1.34-1.diff.
14505
14506 * configure.in (AC_PREREQ): 2.53.
14507
14508 2002-03-20 Akim Demaille <akim@epita.fr>
14509
14510 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14511
14512 2002-03-19 Paul Eggert <eggert@twinsun.com>
14513
14514 * src/bison.simple (YYCOPY): New macro.
14515 (YYSTACK_RELOCATE): Use it.
14516 Remove Type arg; no longer needed. All callers changed.
14517 (yymemcpy): Remove; no longer needed.
14518
14519 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14520 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14521
14522 2002-03-19 Akim Demaille <akim@epita.fr>
14523
14524 Test and fix the #line outputs.
14525
14526 * tests/atlocal.at (GCC): New.
14527 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14528 (Prologue synch line, %union synch line, Postprologue synch line)
14529 (Action synch line, Epilogue synch line): New tests.
14530 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14531 * data/bison.simple, data/bison.c++: Use it.
14532
14533 2002-03-19 Akim Demaille <akim@epita.fr>
14534
14535 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14536 (Solved SR Conflicts, %expect not enough, %expect right)
14537 (%expect too much): Move to...
14538 * tests/conflicts.at: this new file.
14539
14540 2002-03-19 Akim Demaille <akim@epita.fr>
14541
14542 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14543 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14544 that we can move to enums for instance.
14545 * src/output.c (token_definitions_output): Output a list of
14546 `token-name, token-number' instead of the #define.
14547 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14548
14549 2002-03-14 Akim Demaille <akim@epita.fr>
14550
14551 Use Gettext 0.11.1.
14552
14553 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
14554
14555 * data/bison.c++: Make the user able to add members to the generated
14556 parser by subclassing.
14557
14558 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
14559
14560 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14561 a character.
14562 Reported by Nicolas Tisserand and Nicolas Burrus.
14563
14564 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14565
14566 * src/reader.c: Warn about lacking semi-colons, do not complain.
14567
14568 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14569
14570 * data/bison.c++: Remove a debug line.
14571
14572 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14573
14574 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14575 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14576 provide a default implementation.
14577
14578 2002-03-04 Akim Demaille <akim@epita.fr>
14579
14580 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14581 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14582 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14583 * tests/semantic.at (Parsing Guards): Similarly.
14584 * src/reader.at (readgram): Complain if the last rule is not ended
14585 with a semi-colon.
14586
14587 2002-03-04 Akim Demaille <akim@epita.fr>
14588
14589 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14590 * src/closure.c: here.
14591 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14592 RTC.
14593 * src/warshall.h, src/warshall.c: Remove.
14594 * tests/sets.at (Broken Closure): Adjust.
14595
14596 2002-03-04 Akim Demaille <akim@epita.fr>
14597
14598 * src/output.c (output_skeleton): tempdir is const.
14599 bytes_read is unused.
14600
14601 2002-03-04 Akim Demaille <akim@epita.fr>
14602
14603 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14604 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14605 Update.
14606 From Michael Hayes.
14607
14608 2002-03-04 Akim Demaille <akim@epita.fr>
14609
14610 * src/closure.c (closure): `r' is unused.
14611
14612 2002-03-04 Akim Demaille <akim@epita.fr>
14613
14614 * tests/sets.at (Broken Closure): Add the ending `;'.
14615 * src/reader.at (readgram): Complain if a rule is not ended with a
14616 semi-colon.
14617
14618 2002-03-04 Akim Demaille <akim@epita.fr>
14619
14620 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14621 (count_sr_conflicts): Use bitset_count.
14622 * src/reduce.c (inaccessable_symbols): Ditto.
14623 (bits_size): Remove.
14624 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14625
14626 2002-03-04 Akim Demaille <akim@epita.fr>
14627
14628 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14629 * src/reduce.c: Remove the `bitset_zero's following the
14630 `bitset_create's, as now it is performed by the latter.
14631
14632 2002-03-04 Akim Demaille <akim@epita.fr>
14633
14634 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14635 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14636 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14637 latest sources from Michael.
14638
14639 2002-03-04 Akim Demaille <akim@epita.fr>
14640
14641 * src/output.c (output): Don't free the grammar.
14642 * src/reader.c (grammar_free): New.
14643 * src/main.c (main): Call it and don't free symtab here.
14644
14645 2002-03-04 Akim Demaille <akim@epita.fr>
14646
14647 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14648 before returning.
14649 Reported by Benoit Perrot.
14650
14651 2002-03-04 Akim Demaille <akim@epita.fr>
14652
14653 Use bitset operations when possible, not loops over bits.
14654
14655 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14656 bitset_or.
14657 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14658 * src/reduce.c (useless_nonterminals): Formatting changes.
14659 * src/warshall.c (TC): Use bitset_or.
14660
14661 2002-03-04 Akim Demaille <akim@epita.fr>
14662
14663 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14664 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14665 Ditto.
14666
14667 2002-03-04 Akim Demaille <akim@epita.fr>
14668
14669 * src/lalr.c (F): Now a bitset*.
14670 Adjust all dependencies.
14671
14672 2002-03-04 Akim Demaille <akim@epita.fr>
14673
14674 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14675 Adjust all dependencies.
14676
14677 2002-03-04 Akim Demaille <akim@epita.fr>
14678
14679 * src/L0.c, src/LR0.h (nstates): Be size_t.
14680 Adjust comparisons (signed vs unsigned).
14681 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14682 bitset*.
14683 Adjust all dependencies.
14684
14685 2002-03-04 Akim Demaille <akim@epita.fr>
14686
14687 * src/closure.c (firsts): Now, also a bitset.
14688 Adjust all dependencies.
14689 (varsetsize): Remove, now unused.
14690 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14691
14692 2002-03-04 Akim Demaille <akim@epita.fr>
14693
14694 * src/print.c: Convert to use bitset.h, not hand coded iterations
14695 over ints.
14696
14697 2002-03-04 Akim Demaille <akim@epita.fr>
14698
14699 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14700
14701 2002-03-04 Akim Demaille <akim@epita.fr>
14702
14703 * src/closure.c (ruleset): Be a bitset.
14704 (rulesetsize): Remove.
14705
14706 2002-03-04 Akim Demaille <akim@epita.fr>
14707
14708 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14709 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14710 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14711 * src/closure.c (fderives): Be an array of bitsets.
14712
14713 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
14714
14715 * data/bison.c++: Merge the two generated headers. Insert a copyright
14716 notice in each output file.
14717
14718 2002-02-28 Akim Demaille <akim@epita.fr>
14719
14720 * data/bison.c++: Copy the prologue of bison.simple to fetch
14721 useful M4 definitions, such as b4_header_guard.
14722
14723 2002-02-25 Akim Demaille <akim@epita.fr>
14724
14725 * src/getargs.c (version): Give the name of the authors, and use a
14726 translator friendly scheme for the bgr
14727 copyright notice.
14728
14729 2002-02-25 Akim Demaille <akim@epita.fr>
14730
14731 * src/output.c (header_output): Remove, now handled completely via
14732 M4.
14733
14734 2002-02-25 Akim Demaille <akim@epita.fr>
14735
14736 * m4/m4.m4: New, from CVS Autoconf.
14737 * configure.in: Invoke it.
14738 * src/output.c (output_skeleton): Use its result instead of the
14739 hard coded name.
14740
14741 2002-02-25 Akim Demaille <akim@epita.fr>
14742
14743 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14744 Fileutils 4.1.5.
14745 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14746 * src/output.c (output_skeleton): Use mkstemp to create a real
14747 temporary file.
14748 Move the filling of `skeleton' and its muscle to...
14749 (prepare): here.
14750 (output): Move the definition of the prologue muscle to...
14751 (prepare): here.
14752 * src/system.h (DEFAULT_TMPDIR): New.
14753
14754 2002-02-14 Paul Eggert <eggert@twinsun.com>
14755
14756 Remove the support for C++ namespace cleanliness; it was
14757 causing more problems than it was curing, since it didn't work
14758 properly on some nonstandard C++ compilers. This can wait
14759 for a proper C++ parser.
14760
14761 * NEWS: Document this.
14762 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14763 of C++, as it's treated like C now.
14764 * src/bison.simple (YYSTD): Remove.
14765 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14766 Treat C++ just like Standard C instead of trying to support
14767 namespace cleanliness.
14768
14769 2002-02-14 Akim Demaille <akim@epita.fr>
14770
14771 * tests/regression.at (else): Adjust to Andreas' change.
14772
14773 2002-02-14 Akim Demaille <akim@epita.fr>
14774
14775 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14776
14777 2002-02-13 Andreas Schwab <schwab@suse.de>
14778
14779 * src/output.c (output_rule_data): Don't output NULL, it might
14780 not be defined yet.
14781
14782 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
14783
14784 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14785 (Copyright notice): Update.
14786
14787 2002-02-11 Akim Demaille <akim@epita.fr>
14788
14789 * tests/regression.at (%nonassoc and eof): Don't include
14790 nonportable headers.
14791
14792 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
14793
14794 * data/bison.c++: Correct error recovery. Make the user able to
14795 initialize the starting location.
14796
14797 2002-02-07 Akim Demaille <akim@epita.fr>
14798
14799 * tests/input.at: New.
14800
14801 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14802
14803 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14804 more consistent when naming methods and variables. Put preprocessor
14805 directives around tables only needed for debugging.
14806
14807 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14808
14809 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14810 C++ parsers.
14811 (yy::b4_name::parse): Use print_.
14812
14813 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14814
14815 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14816
14817 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14818
14819 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14820 C++ parsers.
14821 (yy::b4_name::parse): Build verbose error messages, and use error_.
14822
14823 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14824
14825 * data/bison.c++: Fix m4 quoting in comments.
14826
14827 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14828
14829 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14830 not expanded by m4.
14831
14832 2002-02-05 Akim Demaille <akim@epita.fr>
14833
14834 * data/bison.c++: Adjust to the M4 back end.
14835 More is certainly needed.
14836
14837 2002-02-05 Akim Demaille <akim@epita.fr>
14838
14839 Give a try to M4 as a back end.
14840
14841 * lib/readpipe.c: New, from wdiff.
14842 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14843 BISON_HAIRY.
14844 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14845 specific values. Now it is m4 that performs the lookup.
14846 * src/parse-skel.y: Remove.
14847 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14848 * src/output.c (actions_output, guards_output)
14849 (token_definitions_output): No longer keeps track of the output
14850 line number, hence remove the second argument.
14851 (guards_output): Check against the guard member of a rule, not the
14852 action member.
14853 Adjust callers.
14854 (output_skeleton): Don't look for the skeleton location, let m4 do
14855 that.
14856 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14857 file will be used.
14858 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14859 (prepare): Given that for the time being changesyntax is not
14860 usable in M4, rename the muscles using `-' to `_'.
14861 Define `defines_flag', `output_parser_name' and `output_header_name'.
14862 * src/output.h (actions_output, guards_output)
14863 (token_definitions_output): Adjust prototypes.
14864 * src/scan-skel.l: Instead of scanning the skeletons, it now
14865 processes the output of m4: `__oline__' and `#output'.
14866 * data/bison.simple: Adjust to be used by M4(sugar).
14867 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14868 to date.
14869 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14870 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
14871 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
14872 shamelessly stolen from CVS Autoconf.
14873
14874 2002-02-05 Akim Demaille <akim@epita.fr>
14875
14876 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
14877 * configure.in: Check for the declarations of free and malloc.
14878 * src/muscle_tab.c: Adjust.
14879
14880 2002-02-05 Akim Demaille <akim@epita.fr>
14881
14882 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
14883 which have no values.
14884
14885 2002-02-05 Akim Demaille <akim@epita.fr>
14886
14887 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
14888 * data/: here.
14889
14890 2002-01-29 Paul Eggert <eggert@twinsun.com>
14891
14892 * src/bison.simple (YYSIZE_T): Do not define merely because
14893 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
14894 On some platforms, <alloca.h> does not declare YYSTD (size_t).
14895
14896 2002-01-27 Akim Demaille <akim@epita.fr>
14897
14898 Fix `%nonassoc and eof'.
14899
14900 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
14901 which were not properly copied! Replace
14902 memcpy (res->errs, src->errs, src->nerrs);
14903 with
14904 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
14905 !!!
14906 * tests/regression.at (%nonassoc and eof): Adjust to newest
14907 Autotest: `.' is not in the PATH.
14908
14909 2002-01-27 Akim Demaille <akim@epita.fr>
14910
14911 * tests/sets.at (AT_EXTRACT_SETS): New.
14912 (Nullable): Use it.
14913 (Firsts): New.
14914
14915 2002-01-26 Akim Demaille <akim@epita.fr>
14916
14917 * tests/actions.at, tests/calc.at, tests/headers.at,
14918 * tests/torture.at: Adjust to the newest Autotest which no longer
14919 forces `.' in the PATH.
14920
14921 2002-01-25 Akim Demaille <akim@epita.fr>
14922
14923 * tests/regression.at (%nonassoc and eof): New.
14924 Suggested by Robert Anisko.
14925
14926 2002-01-24 Akim Demaille <akim@epita.fr>
14927
14928 Bison dumps core when trying to complain about broken input files.
14929 Reported by Cris van Pelt.
14930
14931 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
14932 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
14933 into...
14934 (Invalid inputs): Strengthen: exercise parse_percent_token.
14935
14936 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
14937
14938 * src/Makefile.am: Add bison.c++.
14939 * src/bison.c++: New skeleton.
14940
14941 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
14942
14943 * po/it.po: New.
14944
14945 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
14946
14947 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
14948
14949 2002-01-20 Marc Autret <marc@gnu.org>
14950
14951 * src/files.c (compute_output_file_names): Fix
14952
14953 2002-01-20 Marc Autret <marc@gnu.org>
14954
14955 * tests/output.at: New test.
14956 * src/files.c (compute_base_names): Don't map extensions when
14957 the YACC flag is set, use defaults.
14958 Reported by Evgeny Stambulchik.
14959
14960 2002-01-20 Marc Autret <marc@gnu.org>
14961
14962 * src/system.h: Need to define __attribute__ away for non-GCC
14963 compilers as well (i.e., the vendor C compiler).
14964 Suggested by Albert Chin-A-Young.
14965
14966 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
14967
14968 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
14969 canonical definition.
14970 * src/system.h: Use the canonical definition for PARAMS (avoids
14971 a conflict with the macro from lib/hash.h).
14972
14973 2002-01-11 Akim Demaille <akim@epita.fr>
14974
14975 * configure.in: Use AC_FUNC_STRNLEN.
14976 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
14977
14978 2002-01-09 Akim Demaille <akim@epita.fr>
14979
14980 * src/files.c, src/files.h (output_infix): New.
14981 (tab_extension): Remove.
14982 (compute_base_names): Compute the former, drop the latter.
14983 * src/output.c (prepare): Insert the muscles `output-infix', and
14984 `output-suffix'.
14985 * src/parse-skel.y (string, string.1): New.
14986 (section.header): Use it.
14987 (section.yacc): Remove.
14988 (prefix): Remove too.
14989 * src/scan-skel.l: Adjust.
14990 * src/bison.simple, src/bison.hairy: Adjust.
14991
14992 2002-01-09 Akim Demaille <akim@epita.fr>
14993
14994 * configure.in (WERROR_CFLAGS): Compute it.
14995 * src/Makefile.am (CFLAGS): Pass it.
14996 * tests/atlocal.in (CFLAGS): Idem.
14997 * src/files.c: Fix a few warnings.
14998 (get_extension_index): Remove, unused.
14999
15000 2002-01-08 Akim Demaille <akim@epita.fr>
15001
15002 * src/getargs.c (AS_FILE_NAME): New.
15003 (getargs): Use it to convert DOSish file names.
15004 * src/files.c (base_name): Rename as full_base_name to avoid
15005 clashes with `base_name ()'.
15006 (filename_split): New.
15007 (compute_base_names): N-th rewrite, using filename_split.
15008
15009 2002-01-08 Akim Demaille <akim@epita.fr>
15010
15011 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15012 New, stolen from the Fileutils 4.1.
15013 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15014 * configure.in: Check for the presence of memrchr, and of its
15015 prototype.
15016
15017 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15018
15019 * lib/hash.h (__P): Added definition for this macro.
15020 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15021 BUILT_SOURCES, to ensure they are generated first.
15022 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15023 %error-verbose to allow bootstrapping with bison 1.30x.
15024
15025 2002-01-06 Akim Demaille <akim@epita.fr>
15026
15027 * src/reader.c (parse_braces): Don't fetch the next char, the
15028 convention is to fetch on entry.
15029 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15030 'switch' without a following semicolon.
15031 * tests/regression.at (braces parsing): New.
15032
15033 2002-01-06 Akim Demaille <akim@epita.fr>
15034
15035 Bison is dead wrong in its RR conflict reports.
15036
15037 * tests/torture.at (GNU Cim Grammar): New.
15038 * src/conflicts.c (count_rr_conflicts): Fix.
15039
15040 2002-01-06 Akim Demaille <akim@epita.fr>
15041
15042 Creating package.m4 from configure.ac causes too many problems.
15043
15044 * tests/Makefile.am (package.m4): Create it by hand,
15045 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15046
15047 2002-01-06 Akim Demaille <akim@epita.fr>
15048
15049 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15050 skeleton.h.
15051
15052 2002-01-04 Paul Eggert <eggert@twinsun.com>
15053
15054 * doc/bison.texinfo (Debugging):
15055 Remove YYSTDERR; it's no longer defined or used.
15056 Also, s/cstdio.h/cstdio/.
15057
15058 2002-01-03 Akim Demaille <akim@epita.fr>
15059
15060 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15061
15062 2002-01-03 Akim Demaille <akim@epita.fr>
15063
15064 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15065 tracing code to --trace, wait for a better --trace option, with
15066 args.
15067
15068 2002-01-03 Akim Demaille <akim@epita.fr>
15069
15070 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15071 The ISO C++ standard is extremely clear about it: stderr is
15072 considered a macro, not a regular symbol (see table 94 `Header
15073 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15074 Therefore std:: does not apply to it. It still does with fprintf.
15075 Also, s/cstdio.h/cstdio/.
15076
15077 2002-01-03 Akim Demaille <akim@epita.fr>
15078
15079 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15080 for non system headers.
15081
15082 2002-01-02 Akim Demaille <akim@epita.fr>
15083
15084 Equip the skeleton chain with location tracking, runtime trace,
15085 pure parser and scanner.
15086
15087 * src/parse-skel.y: Request a pure parser, locations, and prefix
15088 renaming.
15089 (%union): Having several members with the same type does not help
15090 type mismatches, simplify.
15091 (YYPRINT, yyprint): New.
15092 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15093 (skel_error): this.
15094 Handle locations.
15095 * src/scan-skel.l: Adjust to these changes.
15096 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15097 (LOCATION_PRINT, skel_control_t): New.
15098
15099 2001-12-30 Akim Demaille <akim@epita.fr>
15100
15101 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15102 replace `gb' with BLANKS.
15103 * src/scan-skel.l: Adjust.
15104
15105 2001-12-30 Akim Demaille <akim@epita.fr>
15106
15107 * src/system.h: We don't need nor want bcopy.
15108 Throw away MS-DOS crap: we don't need getpid.
15109 * configure.in: We don't need strndup. It was even causing
15110 problems: because Flex includes the headers *before* us,
15111 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15112 not visible.
15113 * lib/xstrndup.c: New.
15114 * src/scan-skel.l: Use it.
15115 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15116 * src/parse-skel.y: Use %directives instead of #defines.
15117
15118 2001-12-30 Akim Demaille <akim@epita.fr>
15119
15120 * src/skeleton.h: New.
15121 * src/output.c (output_parser, output_master_parser): Remove, dead
15122 code.
15123 * src/output.h (get_lines_number, actions_output, guards_output)
15124 (token_definitions_output): Prototype them.
15125 * src/parse-skel.y: Add the license notice.
15126 Include output.h and skeleton.h.
15127 (process_skeleton): Returns void, and takes a single parameter.
15128 * src/scan-skel.l: Add the license notice.
15129 Include skeleton.h.
15130 Don't use %option yylineno: it seems that then Flex imagines
15131 REJECT has been used, and therefore it won't reallocate its
15132 buffers (which makes no other sense to me than a bug). It results
15133 in warnings for `unused: yy_flex_realloc'.
15134
15135 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
15136
15137 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15138 (MUSCLE_INSERT_PREFIX): ...to there.
15139 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15140 (MUSCLE_INSERT_PREFIX): Move from here...
15141
15142 * src/bison.hairy: Add a section directive. Put braces around muscle
15143 names. This parser skeleton is still broken, but Bison should not
15144 choke on a bad muscle 'syntax'.
15145 * src/bison.simple: Add a section directive. Put braces around muscle
15146 names.
15147
15148 * src/files.h (strsuffix, stringappend): Add declarations.
15149 (tab_extension): Add declaration.
15150 (short_base_name): Add declaration.
15151
15152 * src/files.c (strsuffix, stringappend): No longer static. These
15153 functions are used in the skeleton parser.
15154 (tab_extension): New.
15155 (compute_base_names): Use the computations done in this function
15156 to guess if the generated parsers should have '.tab' in their
15157 names.
15158 (short_base_name): No longer static.
15159
15160 * src/output.c (output_skeleton): New.
15161 (output): Disable call to output_master_parser, and give a try to
15162 a new skeleton handling system.
15163 (guards_output, actions_output): No longer static.
15164 (token_definitions_output, get_lines_number): No longer static.
15165
15166 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15167
15168 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
15169 parse-skel.y.
15170
15171 * src/parse-skel.y: New file.
15172 * src/scan-skel.l: New file.
15173
15174 2001-12-29 Akim Demaille <akim@epita.fr>
15175
15176 %name-prefix is broken.
15177
15178 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15179 Adjust all dependencies.
15180 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15181 %name-prefix.
15182
15183 Renaming yylval but not yylloc is not consistent. Now we do.
15184
15185 * src/bison.simple: Prefix yylloc if used.
15186 * doc/bison.texinfo (Decl Summary): Document that.
15187
15188 2001-12-29 Akim Demaille <akim@epita.fr>
15189
15190 * doc/bison.texinfo: Promote `%long-directive' over
15191 `%long_directive'.
15192 Remove all references to fixed-output-files, yacc is enough.
15193
15194 2001-12-29 Akim Demaille <akim@epita.fr>
15195
15196 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15197 user prologue. These are defaults.
15198 * tests/actions.at (Mid-rule actions): Make sure the user can
15199 define YYDEBUG and YYERROR_VERBOSE.
15200
15201 2001-12-29 Akim Demaille <akim@epita.fr>
15202
15203 * src/output.c (header_output): Don't forget to export YYLTYPE and
15204 yylloc.
15205 * tests/headers.at (export YYLTYPE): New, make sure it does.
15206 * tests/regression.at (%union and --defines, Invalid CPP headers):
15207 Move to...
15208 * tests/headers.at: here.
15209
15210 2001-12-29 Akim Demaille <akim@epita.fr>
15211
15212 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15213
15214 2001-12-29 Akim Demaille <akim@epita.fr>
15215
15216 * tests/actions.at (Mid-rule actions): Output on a single line
15217 instead of several.
15218
15219 2001-12-29 Akim Demaille <akim@epita.fr>
15220
15221 * doc/bison.texinfo: Formatting changes.
15222
15223 2001-12-29 Akim Demaille <akim@epita.fr>
15224
15225 Don't store the token defs in a muscle, just be ready to output it
15226 on command. Now possible via `symbols'. Fixes a memory leak.
15227
15228 * src/output.c (token_definitions_output): New.
15229 (output_parser, header_output): Use it.
15230 * src/reader.c (symbols_save): Remove.
15231
15232 2001-12-29 Akim Demaille <akim@epita.fr>
15233
15234 * src/bison.simple: Do not provide a default for YYSTYPE and
15235 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15236 default.
15237
15238 2001-12-29 Akim Demaille <akim@epita.fr>
15239
15240 Mid-rule actions are simply... ignored!
15241
15242 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15243 the empty-rule associated to the dummy symbol, not to the host
15244 rule.
15245 * tests/actions.at (Mid-rule actions): New.
15246
15247 2001-12-29 Akim Demaille <akim@epita.fr>
15248
15249 Memory leak.
15250
15251 * src/reader.c (reader): Free grammar.
15252
15253 2001-12-29 Akim Demaille <akim@epita.fr>
15254
15255 Memory leak.
15256
15257 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15258 since it allocates it for each state, although only one is needed.
15259 (allocate_storage): Do it here.
15260
15261 2001-12-29 Akim Demaille <akim@epita.fr>
15262
15263 * src/options.h, src/options.c (create_long_option_table): Rename
15264 as...
15265 (long_option_table_new): this, with a clearer prototype.
15266 (percent_table): Remove, unused,
15267 * src/getargs.c (getargs): Adjust.
15268
15269 2001-12-29 Akim Demaille <akim@epita.fr>
15270
15271 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15272 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15273 as states.
15274
15275 2001-12-29 Akim Demaille <akim@epita.fr>
15276
15277 * src/lalr.c (build_relations): Rename `states' as `states1'.
15278 Sorry, I don't understand exactly what it is, no better name...
15279
15280 2001-12-29 Akim Demaille <akim@epita.fr>
15281
15282 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15283 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15284 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15285 as rules.
15286
15287 2001-12-29 Akim Demaille <akim@epita.fr>
15288
15289 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15290 ago.
15291
15292 2001-12-29 Akim Demaille <akim@epita.fr>
15293
15294 * src/reader.c, src/reader.h (user_toknums): Remove.
15295 Adjust all users to use symbols[i]->user_token_number.
15296
15297 2001-12-29 Akim Demaille <akim@epita.fr>
15298
15299 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15300 Adjust all users to use symbols[i]->prec or ->assoc.
15301
15302 2001-12-29 Akim Demaille <akim@epita.fr>
15303
15304 * src/reader.c, src/reader.h (tags): Remove.
15305 Adjust all users to use symbols[i]->tag.
15306
15307 2001-12-29 Akim Demaille <akim@epita.fr>
15308
15309 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15310 and rule_table.
15311 * src/reader.c (packsymbols): Fill this table.
15312 Drop sprec.
15313 * src/conflicts.c (resolve_sr_conflict): Adjust.
15314 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15315 single table.
15316 Use symbols[i]->tag instead of tags[i].
15317
15318 2001-12-29 Akim Demaille <akim@epita.fr>
15319
15320 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15321 In addition, put a comment in there, to replace...
15322 * tests/regression.at (%union and C comments): Remove.
15323
15324 2001-12-29 Akim Demaille <akim@epita.fr>
15325
15326 * tests/regression.at (Web2c Actions): Blindly move the actual
15327 output as expected output. The contents *seem* right to me, but I
15328 can't pretend reading perfectly parser tables... Nonetheless, all
15329 the other tests pass correctly, the table look OK, even though the
15330 presence of `$axiom' is to be noted: AFAICS it is useless (but
15331 harmless).
15332
15333 2001-12-29 Akim Demaille <akim@epita.fr>
15334
15335 * src/reader.c (readgram): Don't add the rule 0 if there were no
15336 rules read. In other words, add it _after_ having performed
15337 grammar sanity checks.
15338 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15339
15340 2001-12-29 Akim Demaille <akim@epita.fr>
15341
15342 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15343 visible, and some states have now a different number.
15344
15345 2001-12-29 Akim Demaille <akim@epita.fr>
15346
15347 * src/reader.c (readgram): Bind the initial rule's lineno to that
15348 of the first rule.
15349 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15350 (Solved SR Conflicts): Adjust rule 0's line number.
15351
15352 2001-12-29 Akim Demaille <akim@epita.fr>
15353
15354 Fix the `GAWK Grammar' failure.
15355
15356 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15357 the reductions of the first state which was mistakenly confused
15358 with the final state because precisely final_state was initialized
15359 to 0.
15360 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15361 now noticed by Bison.
15362 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15363 have a reduction on $default.
15364
15365 2001-12-29 Akim Demaille <akim@epita.fr>
15366
15367 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15368 rule line numbers.
15369 * src/closure.c (print_closure): Likewise.
15370 * src/derives.c (print_derives): Likewise.
15371 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15372 now.
15373
15374 2001-12-29 Akim Demaille <akim@epita.fr>
15375
15376 * src/lalr.c (lookaheads_print): New.
15377 (lalr): Call it when --trace-flag.
15378 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15379 are dumped.
15380
15381 2001-12-29 Akim Demaille <akim@epita.fr>
15382
15383 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15384 when walking through ritem, even via rule->rhs.
15385 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15386 (useful_production, useless_nonterminals): Likewise.
15387 (reduce_grammar_tables): Likewise, plus update nritems.
15388 * src/nullable.c (set_nullable): Likewise.
15389 * src/lalr.c (build_relations): Likewise.
15390 * tests/sets.at (Nullable): Adjust.
15391 Fortunately, now, the $axiom is no longer nullable.
15392
15393 2001-12-29 Akim Demaille <akim@epita.fr>
15394
15395 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15396 the 0-sentinel.
15397 * src/gram.c (ritem_longest_rhs): Likewise.
15398 * src/reduce.c (nonterminals_reduce): Likewise.
15399 * src/print_graph.c (print_graph): Likewise.
15400 * src/output.c (output_rule_data): Likewise.
15401 * src/nullable.c (set_nullable): Likewise.
15402
15403 2001-12-29 Akim Demaille <akim@epita.fr>
15404
15405 * src/output.c: Comment changes.
15406
15407 2001-12-27 Paul Eggert <eggert@twinsun.com>
15408
15409 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15410 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15411 Sparc, as they were causing more porting problems than the
15412 (minor) performance improvement was worth.
15413
15414 Also, catch up with 1.31's YYSTD.
15415
15416 2001-12-27 Akim Demaille <akim@epita.fr>
15417
15418 * src/output.c (output_gram): Rely on nritems, not the
15419 0-sentinel. See below.
15420 Use -1 as separator, not 0.
15421 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15422 Rely on -1 as separator in yyrhs, instead of 0.
15423 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15424 twice `Now at end of input', therefore there are two lines less to
15425 expect.
15426
15427 2001-12-27 Akim Demaille <akim@epita.fr>
15428
15429 * tests/regression.at (Unresolved SR Conflicts):
15430 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15431 below.
15432
15433 2001-12-27 Akim Demaille <akim@epita.fr>
15434
15435 * src/LR0.c (new_state): Recognize the final state by the fact it
15436 is reached by eoftoken.
15437 (insert_start_shifting_state, insert_eof_shifting_state)
15438 (insert_accepting_state, augment_automaton): Remove, since now
15439 these states are automatically computed from the initial state.
15440 (generate_states): Adjust.
15441 * src/print.c: When reporting a rule number to the user, substract
15442 1, so that the axiom rule is rule 0, and the first user rule is 1.
15443 * src/reduce.c: Likewise.
15444 * src/print_graph.c (print_core): For the time being, just as for
15445 the report, depend upon --trace-flags to dump the full set of
15446 items.
15447 * src/reader.c (readgram): Once the grammar read, insert the rule
15448 0: `$axiom: START-SYMBOL $'.
15449 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15450 number of the states has changed (the final state is no longer
15451 necessarily the last), catch up.
15452
15453 2001-12-27 Akim Demaille <akim@epita.fr>
15454
15455 Try to make the use of the eoftoken valid. Given that its value
15456 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15457 is used instead of > 0 where appropriate, (ii), depend upon nritems
15458 instead of the 0-sentinel.
15459
15460 * src/gram.h, src/gram.c (nritems): New.
15461 Expected to be duplication of nitems, but for the time being...
15462 * src/reader.c (packgram): Assert nritems and nitems are equal.
15463 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15464 * src/closure.c (print_closure, print_fderives): Likewise.
15465 * src/gram.c (ritem_print): Likewise.
15466 * src/print.c (print_core, print_grammar): Likewise.
15467 * src/print_graph.c: Likewise.
15468
15469 2001-12-27 Akim Demaille <akim@epita.fr>
15470
15471 * src/main.c (main): If there are complains after grammar
15472 reductions, then output the report anyway if requested, then die.
15473 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15474 * src/reader.c (eoftoken): New.
15475 (parse_token_decl): If the token being defined has value `0', it
15476 is the eoftoken.
15477 (packsymbols): No longer hack `tags' to insert `$' by hand.
15478 Be sure to preserve the value of the eoftoken.
15479 (reader): Make sure eoftoken is defined.
15480 Initialize nsyms to 0: now eoftoken is created just like the others.
15481 * src/print.c (print_grammar): Don't special case the eof token.
15482 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15483 lie anyway, albeit pleasant.
15484 * tests/calc.at: Exercise error messages with eoftoken.
15485 Change the grammar so that empty input is invalid.
15486 Adjust expectations.
15487 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15488
15489 2001-12-27 Akim Demaille <akim@epita.fr>
15490
15491 * configure.in: Check the protos of strchr ans strspn.
15492 Replace strchr if needed.
15493 * src/system.h: Provide the protos of strchr, strspn and memchr if
15494 missing.
15495 * lib/strchr.c: New.
15496 * src/reader.c (symbols_save): Use strchr.
15497
15498 2001-12-27 Akim Demaille <akim@epita.fr>
15499
15500 * src/print.c, src/print_graph.c (escape): New.
15501 Use it to quote the TAGS outputs.
15502 * src/print_graph.c (print_state): Now errors are in red, and
15503 reductions in green.
15504 Prefer high to wide: output the state number on a line of its own.
15505
15506 2001-12-27 Akim Demaille <akim@epita.fr>
15507
15508 * src/state.h, src/state.c (reductions_new): New.
15509 * src/LR0.c (set_state_table): Let all the states have a
15510 `reductions', even if reduced to 0.
15511 (save_reductions): Adjust.
15512 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15513 * src/print.c (print_reductions, print_actions): Adjust.
15514 * src/output.c (action_row): Adjust.
15515
15516 2001-12-27 Akim Demaille <akim@epita.fr>
15517
15518 * src/state.h, src/state.c (errs_new, errs_dup): New.
15519 * src/LR0.c (set_state_table): Let all the states have an errs,
15520 even if reduced to 0.
15521 * src/print.c (print_errs, print_reductions): Adjust.
15522 * src/output.c (output_actions, action_row): Adjust.
15523 * src/conflicts.c (resolve_sr_conflict): Adjust.
15524
15525 2001-12-27 Akim Demaille <akim@epita.fr>
15526
15527 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15528
15529 2001-12-27 Akim Demaille <akim@epita.fr>
15530
15531 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15532 * src/print.c: here.
15533 (lookaheadset, shiftset): New, used as additional storage by
15534 print_reductions.
15535 (print_results): Adjust.
15536 (print_shifts, print_gotos, print_errs): New, extracted from...
15537 (print_actions): here.
15538 * src/print_graph.c (print_actions): Remove dead code.
15539
15540 2001-12-27 Akim Demaille <akim@epita.fr>
15541
15542 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15543 `$n' and `@n'.
15544
15545 2001-12-27 Akim Demaille <akim@epita.fr>
15546
15547 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15548 (build_relations): Adjust.
15549
15550 2001-12-27 Akim Demaille <akim@epita.fr>
15551
15552 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15553 duplication.
15554
15555 2001-12-27 Akim Demaille <akim@epita.fr>
15556
15557 * src/reader.c (packgram): Catch nitems overflows.
15558
15559 2001-12-27 Akim Demaille <akim@epita.fr>
15560
15561 * src/files.c, src/files.h (guard_obstack): Remove.
15562 * src/output.c (output): Adjust.
15563 * src/reader.c (parse_braces): New, factoring...
15564 (copy_action, copy_guard): these two which are renamed as...
15565 (parse_action, parse_guard): these.
15566 As a voluntary consequence, using braces around guards is now
15567 mandatory.
15568
15569 2001-12-27 Akim Demaille <akim@epita.fr>
15570
15571 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15572 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15573 members.
15574 (symbol_list_new): Adjust.
15575 (copy_action): action_line is the first line, not the last.
15576 (copy_guard): Just as for actions, store the `action' only, not
15577 the switch/case/break flesh.
15578 Don't parse the user action that might follow the guard, let...
15579 (readgram): do it, i.e., now, there can be an action after a
15580 guard.
15581 In other words the guard is just explicitly optional.
15582 (packgram): Adjust.
15583 * src/output.c (guards_output): New.
15584 (output_parser): Call it when needed.
15585 (output): Also free the guard and attrs obstacks.
15586 * src/files.c, src/files.h (obstack_save): Remove.
15587 (output_files): Remove.
15588 As a result, if one needs the former `.act' file, using an
15589 appropriate skeleton which requires actions and guards is now
15590 required.
15591 * src/main.c (main): Adjust.
15592 * tests/semantic.at: New.
15593 * tests/regression.at: Use `input.y' as input file name.
15594 Avoid 8+3 problems by requiring input.c when the test needs the
15595 parser.
15596
15597 2001-12-27 Akim Demaille <akim@epita.fr>
15598
15599 * src/reader.c (symbol_list_new): Be sure to initialize all the
15600 fields.
15601
15602 2001-12-27 Akim Demaille <akim@epita.fr>
15603
15604 All the hacks using a final pseudo state are now useless.
15605
15606 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15607 * src/lalr.c (nLA): New.
15608 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15609 instead of lookaheadsp from the pseudo state (nstate + 1).
15610
15611 2001-12-27 Akim Demaille <akim@epita.fr>
15612
15613 * src/output.c (action_row, token_actions): Use a state_t instead
15614 of a integer, and nlookaheads instead of the following state's
15615 lookaheadsp.
15616
15617 2001-12-27 Akim Demaille <akim@epita.fr>
15618
15619 * src/conflicts.c (log_resolution, flush_shift)
15620 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15621 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15622 (conflicts_print, print_reductions): Use a state_t instead of an
15623 integer when referring to a state.
15624 As much as possible, depend upon nlookaheads, instead of the
15625 `lookaheadsp' member of the following state (since lookaheads of
15626 successive states are successive, the difference between state n + 1
15627 and n served as the number of lookaheads for state n).
15628 * src/lalr.c (add_lookback_edge): Likewise.
15629 * src/print.c (print_core, print_actions, print_state)
15630 (print_results): Likewise.
15631 * src/print_graph.c (print_core, print_actions, print_state)
15632 (print_graph): Likewise.
15633 * src/conflicts.h: Adjust.
15634
15635 2001-12-27 Akim Demaille <akim@epita.fr>
15636
15637 * src/bison.hairy: Formatting/comment changes.
15638 ANSIfy.
15639 Remove `register' indications.
15640 Add plenty of `static'.
15641
15642 2001-12-27 Akim Demaille <akim@epita.fr>
15643
15644 * src/output.c (prepare): Drop the muscle `ntbase' which
15645 duplicates ntokens.
15646 * src/bison.simple: Formatting/comment changes.
15647 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15648 is an undocumented synonym.
15649
15650 2001-12-22 Akim Demaille <akim@epita.fr>
15651
15652 * src/output.c (output_table_data): Change the prototype to use
15653 `int' for array ranges: some invocations do pass an int, not a
15654 short.
15655 Reported by Wayne Green.
15656
15657 2001-12-22 Akim Demaille <akim@epita.fr>
15658
15659 Some actions of web2c.y are improperly triggered.
15660 Reported by Mike Castle.
15661
15662 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15663 * tests/regression.at (Web2c): Rename as...
15664 (Web2c Report): this.
15665 (Web2c Actions): New.
15666
15667 2001-12-22 Akim Demaille <akim@epita.fr>
15668
15669 Reductions in web2c.y are improperly reported.
15670 Reported by Mike Castle.
15671
15672 * src/conflicts.c (print_reductions): Fix.
15673 * tests/regression.at (Web2c): New.
15674
15675 2001-12-18 Akim Demaille <akim@epita.fr>
15676
15677 Some host fail on `assert (!"foo")', which expands to
15678 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15679 Reported by Nelson Beebee.
15680
15681 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15682 `#define it_succeeded 0' and `assert (it_succeeded)'.
15683
15684 2001-12-17 Marc Autret <autret_m@epita.fr>
15685
15686 * src/bison.simple: Don't hard code the skeleton line and filename.
15687 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15688 New line counter 'skeleton_line' (skeleton-line muscle).
15689
15690 2001-12-17 Paul Eggert <eggert@twinsun.com>
15691
15692 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15693 YYDEBUG must be defined to a nonzero value.
15694
15695 * src/bison.simple (yytname): Do not assume that the user defines
15696 YYDEBUG to a properly parenthesized expression.
15697
15698 2001-12-17 Akim Demaille <akim@epita.fr>
15699
15700 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15701 nlookaheads is a new member.
15702 Adjust all users.
15703 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15704 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15705 state.
15706
15707 2001-12-17 Akim Demaille <akim@epita.fr>
15708
15709 * src/files.h, src/files.c (open_files, close_files): Remove.
15710 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15711 let...
15712 * src/reader.c (reader): Do it.
15713
15714 2001-12-17 Akim Demaille <akim@epita.fr>
15715
15716 * src/conflicts.c (print_reductions): Formatting changes.
15717
15718 2001-12-17 Akim Demaille <akim@epita.fr>
15719
15720 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15721 (flush_reduce): New.
15722 (resolve_sr_conflict): Adjust.
15723
15724 2001-12-17 Akim Demaille <akim@epita.fr>
15725
15726 * src/output.c (output_obstack): Be static and rename as...
15727 (format_obstack): this, to avoid any confusion with files.c's
15728 output_obstack.
15729 * src/reader.h (muscle_obstack): Move to...
15730 * src/output.h: here, since it's defined in output.c.
15731
15732 2001-12-17 Akim Demaille <akim@epita.fr>
15733
15734 * src/output.c (action_row, save_column, default_goto)
15735 (sort_actions, matching_state, pack_vector): Better variable
15736 locality.
15737
15738 2001-12-17 Akim Demaille <akim@epita.fr>
15739
15740 * src/output.c: Various formatting changes.
15741
15742 2001-12-17 Akim Demaille <akim@epita.fr>
15743
15744 * src/files.c (output_files): Free the output_obstack.
15745 * src/main.c (main): Call print and print_graph conditionally.
15746 * src/print.c (print): Work unconditionally.
15747 * src/print_graph.c (print_graph): Work unconditionally.
15748 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15749
15750 2001-12-16 Marc Autret <autret_m@epita.fr>
15751
15752 * src/output.c (actions_output): Fix. When we use %no-lines,
15753 there is one less line per action.
15754
15755 2001-12-16 Marc Autret <autret_m@epita.fr>
15756
15757 * src/bison.simple: Remove a useless #line directive.
15758 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15759 * src/output.c (get_lines_number): New.
15760 (output_parser): Adjust, now takes care about the lines of a
15761 output muscles.
15762 Fix line numbering.
15763 (actions_output): Computes the number of lines taken by actions.
15764 (output_master_parser): Insert new skeleton which is the name of
15765 the output parser file name.
15766
15767 2001-12-15 Marc Autret <autret_m@epita.fr>
15768
15769 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15770
15771 2001-12-15 Marc Autret <autret_m@epita.fr>
15772
15773 * src/output.c (output_gram): Keep track of the hairy one.
15774
15775 2001-12-15 Akim Demaille <akim@epita.fr>
15776
15777 Make `make distcheck' work.
15778
15779 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15780 system.h which uses libgettext.h.
15781
15782 2001-12-15 Akim Demaille <akim@epita.fr>
15783
15784 * src/nullable.c (set_nullable): Useless rules must be skipped,
15785 otherwise, since we range over their symbols, we might look at a
15786 nonterminal which no longer ``exists'', i.e., it is not counted in
15787 `nvars', hence we overflow our arrays.
15788
15789 2001-12-15 Akim Demaille <akim@epita.fr>
15790
15791 The header can also be produced directly, without any obstack!
15792 Yahoo!
15793
15794 * src/files.c, src/files.h (defines_obstack): Remove.
15795 (compute_header_macro): Global.
15796 (defines_obstack_save): Remove.
15797 * src/reader.c (parse_union_decl): No longer output to
15798 defines_obstack: its content can be found in the `stype' muscle
15799 anyway.
15800 (output_token_translations): Merge into...
15801 (symbols_output): this.
15802 Rename as...
15803 (symbols_save): this.
15804 (reader): Adjust.
15805 * src/output.c (header_output): New.
15806 (output): Call it.
15807
15808 2001-12-15 Akim Demaille <akim@epita.fr>
15809
15810 * src/reader.c (parse_union_decl): Instead of handling two obstack
15811 simultaneously, use one to define the `stype' muscle, and use the
15812 value of the latter to fill defines_obstack.
15813 (copy_comment): Remove.
15814 (copy_comment2): Work for a single obstack.
15815 Rename as...
15816 (copy_comment): this.
15817
15818 2001-12-15 Akim Demaille <akim@epita.fr>
15819
15820 * src/lex.c, src/lex.h (xgetc): No longer static.
15821 * src/reader.c (parse_union_decl): Revamp.
15822
15823 2001-12-15 Akim Demaille <akim@epita.fr>
15824
15825 Still making progress in separating Bison into (i) input, (ii)
15826 process, (iii) output: now we can directly output the parser file
15827 without using table_obstack at all.
15828
15829 * src/files.c, src/files.h (table_obstack): Bye bye.
15830 (parser_file_name): New.
15831 * src/files.c (compute_output_file_names): Compute it.
15832 * src/output.c (actions_output, output_parser)
15833 (output_master_parser): To a file instead of an obstack.
15834
15835 2001-12-15 Akim Demaille <akim@epita.fr>
15836
15837 Attach actions to rules, instead of pre-outputting them to
15838 actions_obstack.
15839
15840 * src/gram.h (rule_t): action and action_line are new members.
15841 * src/reader.c (symbol_list): Likewise.
15842 (copy_action): Save the actions within the rule.
15843 (packgram): Save them in rule_table.
15844 * src/output.c (actions_output): New.
15845 (output_parser): Use it on `%%actions'.
15846 (output_rule_data): Don't free rule_table.
15847 (output): Do it.
15848 (prepare): Don't save the `action' muscle.
15849 * src/bison.simple: s/%%action/%%actions/.
15850
15851 2001-12-15 Akim Demaille <akim@epita.fr>
15852
15853 * src/reader.c (copy_action): When --yacc, don't append a `;'
15854 to the user action: let it fail if lacking.
15855 Suggested by Arnold Robbins and Tom Tromey.
15856
15857 2001-12-14 Akim Demaille <akim@epita.fr>
15858
15859 * src/lex.c (literalchar): Simply return the char you decoded, non
15860 longer mess around with obstacks and int pointers.
15861 Adjust all callers.
15862
15863 2001-12-14 Akim Demaille <akim@epita.fr>
15864
15865 * src/lex.c (literalchar): Don't escape the special characters,
15866 just decode them, and keep them as char (before, eol was output as
15867 the 2 char string `\n' etc.).
15868 * src/output.c (output_rule_data): Use quotearg to output the
15869 token strings.
15870
15871 2001-12-13 Paul Eggert <eggert@twinsun.com>
15872
15873 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
15874 Do not infringe on the global user namespace when using C++.
15875 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
15876 All uses of `fprintf' and `stderr' changed.
15877
15878 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
15879
15880 2001-12-13 Akim Demaille <akim@epita.fr>
15881
15882 The computation of nullable is broken: it doesn't handle empty
15883 RHS's properly.
15884
15885 * tests/torture.at (GNU AWK Grammar): New.
15886 * tests/sets.at (Nullable): New.
15887 * src/nullable.c (set_nullable): Instead of blindly looping over
15888 `ritems', loop over the rules, and then over their rhs's.
15889
15890 Work around Autotest bugs.
15891
15892 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
15893 frame, because Autotest understand lines starting with a `+' as
15894 traces from the shell. Then, they are not processed properly.
15895 Admittedly an Autotest bug, but we don't have time to wait for
15896 Autotest to catch up.
15897 * tests/regression.at (Broken Closure): Adjust to the new table
15898 frames.
15899 Move to...
15900 * tests/sets.at: here.
15901
15902 2001-12-13 Akim Demaille <akim@epita.fr>
15903
15904 * src/closure.c (closure): Use nrules instead of playing tricks
15905 with BITS_PER_WORD.
15906
15907 2001-12-13 Akim Demaille <akim@epita.fr>
15908
15909 * src/print.c (print_actions): Output the handling of `$' as the
15910 traces do: shifting the token EOF. Before EOF was treated as a
15911 nonterminal.
15912 * tests/regression.at: Adjust some tests.
15913 * src/print_graph.c (print_core): Complete the set of items via
15914 closure. The next-to-final and final states are still unsatisfying,
15915 but that's to be addressed elsewhere.
15916 No longer output the rule numbers, but do output the state number.
15917 A single loop for the shifts + gotos is enough, but picked a
15918 distinct color for each.
15919 (print_graph): Initialize and finalize closure.
15920
15921 2001-12-13 Akim Demaille <akim@epita.fr>
15922
15923 * src/reader.c (readgram): Remove dead code, an strip useless
15924 braces.
15925 (get_type): Remove, unused.
15926
15927 2001-12-12 Akim Demaille <akim@epita.fr>
15928
15929 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
15930 on that of lib/error.c.
15931
15932 2001-12-12 Akim Demaille <akim@epita.fr>
15933
15934 Some hosts don't like `/' in includes.
15935
15936 * src/system.h: Include libgettext.h without qualifying the path.
15937 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
15938 $(top_srcdir).
15939
15940 2001-12-11 Marc Autret <autret_m@epita.fr>
15941
15942 * src/output.c (output_parser): Remove useless muscle.
15943
15944 2001-12-11 Marc Autret <autret_m@epita.fr>
15945
15946 * src/bison.simple: Remove #line just before %%epilogue. It
15947 is now handled in ...
15948 * src/reader.c (read_additionnal_code): Add the output of a
15949 #line for the epilogue.
15950
15951 2001-12-10 Marc Autret <autret_m@epita.fr>
15952
15953 * src/reader.c (copy_definition): Re-use CPP-outed code which
15954 replace precedent remove.
15955 * src/bison.simple: Remove #line before %%prologue because
15956 %%input-line is wrong at this time.
15957
15958 2001-12-10 Marc Autret <autret_m@epita.fr>
15959
15960 * src/reader.c (symbols_output): Clean up.
15961 * src/output.c (output_gram, output): Clean up.
15962
15963 2001-12-10 Akim Demaille <akim@epita.fr>
15964
15965 * src/lalr.c (initialize_lookaheads): New. Extracted from...
15966 * src/LR0.c (set_state_table): here.
15967 * src/lalr.c (lalr): Call it.
15968
15969 2001-12-10 Akim Demaille <akim@epita.fr>
15970
15971 * src/state.h (shifts): Remove the `number' member: shifts are
15972 attached to state, hence no longer need to be labelled with a
15973 state number.
15974
15975 2001-12-10 Akim Demaille <akim@epita.fr>
15976
15977 Now that states have a complete set of members, the linked list of
15978 shifts is useless: just fill directly the state's shifts member.
15979
15980 * src/state.h (shifts): Remove the `next' member.
15981 * src/LR0.c (first_state, last_state): Remove.
15982 Adjust the callers.
15983 (augment_automaton): Don't look for the shifts that must be added
15984 a shift on EOF: it is those of the state we looked for! But now,
15985 since shifts are attached, it is no longer needed to looking
15986 merely by its id: its number.
15987
15988 2001-12-10 Akim Demaille <akim@epita.fr>
15989
15990 * src/LR0.c (augment_automaton): Better variable locality.
15991 Remove an impossible branch: if there is a state corresponding to
15992 the start symbol being shifted, then there is shift for the start
15993 symbol from the initial state.
15994
15995 2001-12-10 Akim Demaille <akim@epita.fr>
15996
15997 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
15998 only when appropriate: when insert_start_shifting_state' is not
15999 invoked.
16000 * tests/regression.at (Rule Line Numbers): Adjust.
16001
16002 2001-12-10 Akim Demaille <akim@epita.fr>
16003
16004 * src/LR0.c (augment_automaton): Now that all states have shifts,
16005 merge the two cases addition shifts to the initial state.
16006
16007 2001-12-10 Akim Demaille <akim@epita.fr>
16008
16009 * src/lalr.c (set_state_table): Move to...
16010 * src/LR0.c: here.
16011 * src/lalr.c (lalr): Don't call it...
16012 * src/LR0.c (generate_states): do it.
16013 * src/LR0.h (first_state): Remove, only the table is used.
16014
16015 2001-12-10 Akim Demaille <akim@epita.fr>
16016
16017 * src/LR0.h (first_shift, first_reduction): Remove.
16018 * src/lalr.c: Don't use first_shift: find shifts through the
16019 states.
16020
16021 2001-12-10 Akim Demaille <akim@epita.fr>
16022
16023 * src/LR0.c: Attach shifts to states as soon as they are
16024 computed.
16025 * src/lalr.c (set_state_table): Instead of assigning shifts to
16026 state, just assert that the mapping was properly done.
16027
16028 2001-12-10 Akim Demaille <akim@epita.fr>
16029
16030 * src/LR0.c (insert_start_shift): Rename as...
16031 (insert_start_shifting_state): this.
16032 (insert_eof_shifting_state, insert_accepting_state): New.
16033 (augment_automaton): Adjust.
16034 Better locality of the variables.
16035 When looking if the start_symbol is shifted from the initial
16036 state, using `while (... symbol != start_symbol ...)' sounds
16037 better than `while (... symbol < start_symbol ...)': If fail
16038 to see how the order between symbols could be relevant!
16039
16040 2001-12-10 Akim Demaille <akim@epita.fr>
16041
16042 * src/getargs.h: Don't declare `spec_name_prefix' and
16043 `spec_file_prefix', declared by src/files.h.
16044 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16045 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16046 * src/output.c (prepare): Adjust.
16047 * src/reader.c (symbols_output): Likewise.
16048 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16049
16050 2001-12-10 Akim Demaille <akim@epita.fr>
16051
16052 * src/muscle_tab.c (muscle_init): NULL is a better default than
16053 `"0"'.
16054
16055 2001-12-10 Akim Demaille <akim@epita.fr>
16056
16057 * src/reader.c (reader): Calling symbols_output once is enough.
16058
16059 2001-12-10 Akim Demaille <akim@epita.fr>
16060
16061 Now that states have a complete set of members, the linked list of
16062 reductions is useless: just fill directly the state's reductions
16063 member.
16064
16065 * src/state.h (struct reductions): Remove member `number' and
16066 `next'.
16067 * src/LR0.c (first_reduction, last_reduction): Remove.
16068 (save_reductions): Don't link the new reductions, store them in
16069 this_state.
16070 * src/lalr.c (set_state_table): No need to attach reductions to
16071 states, it's already done.
16072 * src/output.c (output_actions): No longer free the shifts, then
16073 the reductions, then the states: free all the states and their
16074 members.
16075
16076 2001-12-10 Akim Demaille <akim@epita.fr>
16077
16078 * src/options.c (OPTN, DRTV, BOTH): New.
16079 (option_table): Use them.
16080
16081 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16082 the job of system.h.
16083 * src/options.c: Don't include stdio.h and xalloc.h for the same
16084 reasons.
16085
16086 2001-12-10 Akim Demaille <akim@epita.fr>
16087
16088 * src/output.c (output, prepare): Make sure the values of the
16089 muscles `action' and `prologue' are 0-terminated.
16090
16091 2001-12-10 Akim Demaille <akim@epita.fr>
16092
16093 Clean up GCC warnings.
16094
16095 * src/reader.c (copy_action): `buf' is not used.
16096 (parse_skel_decl): Be static.
16097 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16098 * src/options.h (create_long_option_table): Have a real prototype.
16099 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16100 (hash_delete_at): Return const void *.
16101 Adjust casts to preserve the const.
16102
16103 2001-12-10 Akim Demaille <akim@epita.fr>
16104
16105 * configure.in: Require 2.52g.
16106 M4 is not needed, but AUTOM4TE is.
16107 * m4/m4.m4: Remove.
16108 * tests/Makefile.am: Adjust.
16109
16110 2001-12-10 Akim Demaille <akim@epita.fr>
16111
16112 One structure for states is enough, even though theoretically
16113 there are LR(0) states and LALR(1) states.
16114
16115 * src/lalr.h (state_t): Remove.
16116 (state_table): Be state_t **, not state_t *.
16117 * src/state.h (core, CORE_ALLOC): Rename as...
16118 (state_t, STATE_ALLOC): this.
16119 Add the LALR(1) members: shifts, reductions, errs.
16120 * src/LR0.c (state_table): Rename as...
16121 (state_hash): this, to avoid name clashes with the global
16122 `state_table'.
16123 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16124 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16125
16126 2001-12-10 Akim Demaille <akim@epita.fr>
16127
16128 Bison dumps core on bash.y.
16129 Reported by Pascal Bart.
16130
16131 * src/warshall.c (bitmatrix_print): New.
16132 (TC): Use it.
16133 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
16134 j must be the outer loop.
16135 * tests/regression.at (Broken Closure): New.
16136
16137 2001-12-05 Akim Demaille <akim@epita.fr>
16138
16139 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16140 its argument.
16141 Reported by Peter Hamorsky.
16142
16143 2001-12-05 Akim Demaille <akim@epita.fr>
16144
16145 * src/conflicts.c (err_table): Remove.
16146 (resolve_sr_conflict): Adjust.
16147 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16148 Rename as...
16149 (state_t.reductions, state_t.shifts): this.
16150
16151 2001-12-05 Akim Demaille <akim@epita.fr>
16152
16153 * src/reduce.c (reduce_grammar_tables): No longer disable the
16154 removal of useless rules via CPP but via `if (0)', so that the
16155 compiler still check the code is valid.
16156 For instance, it should have noticed `rline' no longer exists: use
16157 the `line' member of rule_t.
16158 * src/gram.c (dummy, rline): Remove, unused.
16159
16160 2001-12-05 Akim Demaille <akim@epita.fr>
16161
16162 * src/output.c (pack_vector): Use assert, not berror.
16163 * src/main.c (berror): Remove, unused.
16164
16165 2001-12-05 Akim Demaille <akim@epita.fr>
16166
16167 New experimental feature: if --verbose --trace output all the
16168 items of a state, not only its kernel.
16169
16170 * src/print.c (print_core): If `trace_flag', then invoke closure
16171 before outputting the items of the state (print_core is no longer
16172 a correct name them).
16173 (print_results): Invoke new_closure/free_closure if needed.
16174
16175 2001-12-05 Akim Demaille <akim@epita.fr>
16176
16177 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16178 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16179 (nitemset): for consistency with the rest of the project.
16180
16181 2001-12-05 Akim Demaille <akim@epita.fr>
16182
16183 * src/closure.c (print_closure): Improve.
16184 (closure): Use it for printing input and output.
16185
16186 2001-12-05 Akim Demaille <akim@epita.fr>
16187
16188 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16189 indexed by nonterminals.
16190
16191 2001-12-05 Akim Demaille <akim@epita.fr>
16192
16193 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16194 what it was!).
16195 * src/warshall.h: Remove accidental duplication of the content.
16196
16197 2001-12-05 Akim Demaille <akim@epita.fr>
16198
16199 * src/closure.c (set_fderives): De-obfuscate.
16200
16201 2001-12-05 Akim Demaille <akim@epita.fr>
16202
16203 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16204
16205 2001-12-05 Akim Demaille <akim@epita.fr>
16206
16207 * src/closure.c (set_firsts): De-obfuscate.
16208
16209 2001-12-05 Akim Demaille <akim@epita.fr>
16210
16211 * src/output.c (action_row): De-obfuscate
16212 using the good o' techniques: arrays not pointers, variable
16213 locality, BITISSET, RESETBIT etc.
16214
16215 2001-12-05 Akim Demaille <akim@epita.fr>
16216
16217 Pessimize the code to simplify it: from now on, all the states
16218 have a valid SHIFTS, which NSHIFTS is possibly 0.
16219
16220 * src/LR0.c (shifts_new): Be global and move to..
16221 * src/state.c, src/state.h: here.
16222 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16223 * src/print_graph: Adjust.
16224
16225 2001-12-05 Akim Demaille <akim@epita.fr>
16226
16227 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16228 * src/conflicts.c: Use it.
16229 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16230 incorrectly ``simplified''.
16231
16232 2001-12-05 Akim Demaille <akim@epita.fr>
16233
16234 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16235 using the good o' techniques: arrays not pointers, variable
16236 locality, BITISSET, RESETBIT etc.
16237
16238 2001-12-05 Akim Demaille <akim@epita.fr>
16239
16240 * src/state.h (SHIFT_SYMBOL): New.
16241 * src/conflicts.c: Use it to deobfuscate.
16242
16243 2001-12-05 Akim Demaille <akim@epita.fr>
16244
16245 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16246 (print_reductions): De-obfuscate using the good o' techniques:
16247 arrays not pointers, variable locality, BITISSET.
16248
16249 2001-12-05 Akim Demaille <akim@epita.fr>
16250
16251 * src/conflicts.c (print_reductions): Arrays, not pointers.
16252 Use BITISSET.
16253
16254 2001-12-05 Akim Demaille <akim@epita.fr>
16255
16256 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16257
16258 2001-12-05 Akim Demaille <akim@epita.fr>
16259
16260 * src/conflicts.c (print_reductions): Improve variable locality.
16261
16262 2001-12-05 Akim Demaille <akim@epita.fr>
16263
16264 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16265
16266 2001-12-05 Akim Demaille <akim@epita.fr>
16267
16268 * src/conflicts.c (print_reductions): Improve variable locality.
16269
16270 2001-12-05 Akim Demaille <akim@epita.fr>
16271
16272 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16273 * src/lalr.c: Use them.
16274
16275 2001-12-05 Akim Demaille <akim@epita.fr>
16276
16277 * src/LR0.c (augment_automaton): Formatting changes.
16278 Better variable locality.
16279
16280 2001-12-05 Akim Demaille <akim@epita.fr>
16281
16282 * src/lalr.c (matrix_print): New.
16283 (transpose): Use it.
16284 Use arrays instead of pointers.
16285
16286 2001-12-05 Akim Demaille <akim@epita.fr>
16287
16288 * src/lalr.c (maxrhs): Move to...
16289 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16290 * src/lalr.c (build_relations): Adjust.
16291
16292 2001-12-05 Akim Demaille <akim@epita.fr>
16293
16294 * src/lalr.c (transpose): Free the memory allocated to the
16295 argument, as it is replaced by the results by the unique caller.
16296 (build_relations): Merely invoke transpose: it handles the memory
16297 deallocation.
16298 Improve variable locality.
16299 Avoid variables used as mere abbreviations.
16300 (compute_lookaheads): Use arrays instead of pointers.
16301
16302 2001-12-05 Akim Demaille <akim@epita.fr>
16303
16304 * src/lalr.c (initialize_F): Improve variable locality.
16305 Avoid variables used as mere abbreviations.
16306
16307 2001-12-05 Akim Demaille <akim@epita.fr>
16308
16309 * src/derives.c (print_derives): Display the ruleno.
16310 * src/lalr.c (initialize_F, transpose): Better variable locality
16311 to improve readability.
16312 Avoid variables used as mere abbreviations.
16313
16314 2001-12-05 Akim Demaille <akim@epita.fr>
16315
16316 * src/lalr.c (traverse): Use arrays instead of pointers.
16317
16318 2001-12-05 Akim Demaille <akim@epita.fr>
16319
16320 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16321 the handling of squeue.
16322 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16323
16324 2001-12-05 Akim Demaille <akim@epita.fr>
16325
16326 Because useless nonterminals are now kept alive (instead of being
16327 `destroyed'), we now sometimes examine them, and store information
16328 related to them. Hence we need to know their number, and adjust
16329 memory allocations.
16330
16331 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16332 static.
16333 * src/LR0.c (allocate_itemsets): The memory allocated to
16334 `symbol_count' was used for two different purpose: once to count
16335 the number of occurrences of each symbol, and later reassigned to
16336 `shift_symbol', containing the symbol that can be shifted from a
16337 given state.
16338 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16339 only, and...
16340 (new_itemsets): Allocate `shift_symbol' here.
16341 (allocate_itemsets): symbol_count includes useless nonterminals.
16342 Make room for them.
16343 (free_storage): Use `free', not `XFREE', for pointers that cannot
16344 be null.
16345
16346 2001-12-05 Akim Demaille <akim@epita.fr>
16347
16348 * src/nullable.c (set_nullable): Deobfuscate the handling of
16349 ritem.
16350 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16351
16352 2001-12-05 Akim Demaille <akim@epita.fr>
16353
16354 * src/gram.c, src/gram.h (ritem_print): New.
16355 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16356 (This useless function was defined only to work around VMS linkers
16357 that can't handle compilation units with variables only).
16358 * src/reduce.c (dump_grammar): Use it to trace the construction of
16359 ritem.
16360
16361 2001-12-04 Paul Eggert <eggert@twinsun.com>
16362
16363 * src/bison.simple (union yyalloc): Change member names
16364 to be the same as the stack names.
16365 (yyparse): yyptr is now union yyalloc *, not char *.
16366 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16367 and may generate better code on some machines.
16368 (yystpcpy): Use prototype if __STDC__ is defined, not just
16369 if __cplusplus is defined.
16370
16371 2001-11-30 Akim Demaille <akim@epita.fr>
16372
16373 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16374 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16375 Gettext doesn't compile cleanly, and dies with -Werror.
16376 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16377 Include WARNING_CFLAGS here.
16378 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16379 before being defined.
16380
16381 2001-11-27 Paul Eggert <eggert@twinsun.com>
16382
16383 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16384 First arg is int, not unsigned.
16385 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16386 (SIZE_MAX, UINT_MAX): New macros.
16387 (quotearg_n_options): Abort if N is negative.
16388 Avoid overflow check on hosts where size_t is 64 bits and int
16389 is 32 bits, as overflow is impossible there.
16390 Fix off-by-one typo that caused unnecessary reallocation.
16391
16392 2001-11-29 Paul Eggert <eggert@twinsun.com>
16393
16394 Name space cleanup in generated parser.
16395
16396 * doc/bison.texinfo (Bison Parser): Discuss system headers
16397 and their effect on the user name space.
16398
16399 * src/bison.simple:
16400 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16401 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16402 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16403
16404 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16405 on user names when possible.
16406
16407 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16408 Simplify test for whather <alloca.h> exists.
16409
16410 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16411
16412 (<stdio.h>): Include if YYDEBUG.
16413
16414 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16415 ! defined (yyoverflow) && ! defined (yymemcpy).
16416
16417 (yymemcpy, yyparse): Rename local variables as needed so that
16418 they all begin with 'yy'.
16419
16420 (yystrlen, yystpcpy): New functions.
16421
16422 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16423 All uses changed.
16424
16425 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16426 instead of relying on string.h functions. Use YYSTACK_ALLOC
16427 and YYSTACK_FREE instead of malloc and free.
16428
16429 2001-11-30 Akim Demaille <akim@epita.fr>
16430
16431 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16432 before their first uses.
16433 (YYBISON, YYPURE): Move to the top of the output.
16434
16435 2001-11-30 Akim Demaille <akim@epita.fr>
16436
16437 * tests/reduce.at (Useless Nonterminals): Fix.
16438
16439 2001-11-30 Akim Demaille <akim@epita.fr>
16440
16441 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16442 if body instead of `;' to pacify GCC's warnings.
16443
16444 2001-11-30 Akim Demaille <akim@epita.fr>
16445
16446 Instead of mapping the LHS of unused rules to -1, keep the LHS
16447 valid, but flag the rules as invalid.
16448
16449 * src/gram.h (rule_t): `useful' is a new member.
16450 * src/print.c (print_grammar): Adjust.
16451 * src/derives.c (set_derives): Likewise.
16452 * src/reader.c (packgram, reduce_output): Likewise.
16453 * src/reduce.c (reduce_grammar_tables): Likewise.
16454 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16455
16456 2001-11-30 Akim Demaille <akim@epita.fr>
16457
16458 * src/reduce.c (reduce_output): Formatting changes.
16459 * src/print.c (print_results, print_grammar): Likewise.
16460 * tests/regression.at (Rule Line Numbers)
16461 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16462
16463 2001-11-30 Akim Demaille <akim@epita.fr>
16464
16465 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16466 useless nonterminals, move them at the end of the symbol arrays.
16467 (reduce_output): Adjust.
16468 * tests/reduce.at (Useless Nonterminals): Adjust.
16469
16470 2001-11-30 Akim Demaille <akim@epita.fr>
16471
16472 * src/reduce.c: Various comment/formatting changes.
16473 (nonterminals_reduce): New, extracted from...
16474 (reduce_grammar_tables): here.
16475 (reduce_grammar): Call nonterminals_reduce.
16476
16477 2001-11-29 Paul Eggert <eggert@twinsun.com>
16478
16479 * src/bison.simple (YYSTACK_REALLOC): Remove.
16480 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16481 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16482 New macros.
16483 (union yyalloc): New type.
16484 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16485 an arbitrary restriction on hosts where size_t is wider than int.
16486
16487 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16488 a parser stack overflow. Allocate just one block of memory for all
16489 three stacks, instead of allocating three blocks; this typically is
16490 faster and reduces fragmentation.
16491
16492 Do not limit the number of items in the stack to a value that fits
16493 in 'int', as this is an arbitrary limit on hosts with 64-bit
16494 size_t and 32-bit int.
16495
16496 2001-11-29 Marc Autret <autret_m@epita.fr>
16497
16498 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16499 of defining YYERROR_VERBOSE.
16500 [AT_DATA]: $4 is now out of C declarations in the prologue.
16501
16502 2001-11-28 Marc Autret <autret_m@epita.fr>
16503
16504 * src/reader.c (parse_dquoted_param): New.
16505 (parse_skel_decl): Use it.
16506 * src/lex.h: Add its prototype.
16507 * src/lex.c (literalchar): Become not static.
16508
16509 2001-11-28 Marc Autret <autret_m@epita.fr>
16510
16511 * src/output.h: And put its extern declaration here.
16512 * src/output.c (error_verbose): Define here.
16513 (prepare): Echo name modification.
16514 * src/getargs.h: Clean its extern declaration.
16515 * src/getargs.c (error_verbose_flag): Remove.
16516 (getargs): Remove case 'e'.
16517 * src/options.c (option_table): 'error-verbose' is now seen as simple
16518 percent option.
16519 Include output.h.
16520
16521 * src/reader.c (read_declarations): Remove case tok_include.
16522 (parse_include_decl): Remove.
16523 * src/lex.h (token_t): Remove tok_include.
16524 * src/options.c (option_table): 'include' is now a simple command line
16525 option.
16526
16527 2001-11-28 Marc Autret <autret_m@epita.fr>
16528
16529 * src/bison.simple: Adjust muscle names.
16530 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16531 * src/output.c (prepare): s/_/-/ for the muscles names.
16532 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16533
16534 2001-11-28 Marc Autret <autret_m@epita.fr>
16535
16536 * src/bison.simple: Fix debug.
16537 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16538
16539 2001-11-28 Akim Demaille <akim@epita.fr>
16540
16541 * src/LR0.c (shifts_new): New.
16542 (save_shifts, insert_start_shift, augment_automaton): Use it.
16543
16544 2001-11-28 Akim Demaille <akim@epita.fr>
16545
16546 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16547 keep ruleno only.
16548
16549 2001-11-28 Akim Demaille <akim@epita.fr>
16550
16551 * src/closure.c (closure): Instead of looping over word in array
16552 then bits in words, loop over bits in array.
16553
16554 2001-11-28 Akim Demaille <akim@epita.fr>
16555
16556 * src/closure.c (closure): No longer optimize the special case
16557 where all the bits of `ruleset[r]' are set to 0, to make the code
16558 clearer.
16559
16560 2001-11-28 Akim Demaille <akim@epita.fr>
16561
16562 * src/closure.c (closure): `r' and `c' are new variables, used to
16563 de-obfuscate accesses to RULESET and CORE.
16564
16565 2001-11-28 Akim Demaille <akim@epita.fr>
16566
16567 * src/reduce.c (reduce_print): Use ngettext.
16568 (dump_grammar): Improve the trace accuracy.
16569
16570 2001-11-28 Akim Demaille <akim@epita.fr>
16571
16572 * src/reduce.c (dump_grammar): Don't translate trace messages.
16573
16574 2001-11-28 Akim Demaille <akim@epita.fr>
16575
16576 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16577 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16578 as all tags are free'ed afterwards.
16579 From Enrico Scholz.
16580
16581 2001-11-27 Paul Eggert <eggert@twinsun.com>
16582
16583 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16584 use alloca when we didn't want to, and vice versa.
16585
16586 2001-11-27 Marc Autret <autret_m@epita.fr>
16587
16588 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16589 initialization.
16590 * src/output.c (prepare): Remove its update.
16591
16592 2001-11-27 Marc Autret <autret_m@epita.fr>
16593
16594 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16595 Use %error-verbose.
16596
16597 2001-11-27 Marc Autret <autret_m@epita.fr>
16598
16599 * src/bison.simple: Remove YYERROR_VERBOSE using.
16600 Use %%error_verbose.
16601 (yyparse): Likewise.
16602 * src/output.c (prepare): Give its final value.
16603 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16604 * src/getargs.h: Add its extern declaration.
16605 * src/getargs.c (error_verbose_flag): New int.
16606 (getargs): Update to catch new case.
16607 * src/options.c (option_table): 'error-verbose' is a new option.
16608 (shortopts): Update.
16609
16610 2001-11-27 Akim Demaille <akim@epita.fr>
16611
16612 * src/system.h: Use intl/libgettext.h.
16613 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16614
16615 2001-11-27 Akim Demaille <akim@epita.fr>
16616
16617 * tests/torture.at (Exploding the Stack Size with Malloc):
16618 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16619
16620 2001-11-27 Akim Demaille <akim@epita.fr>
16621
16622 * src/files.c: Include error.h.
16623 Reported by Hans Aberg.
16624
16625 2001-11-26 Marc Autret <autret_m@epita.fr>
16626
16627 * src/reader.c (parse_include_decl): New, not yet implemented.
16628 (read_declarations): Add case tok_include.
16629 * src/getargs.h (include): Add its extern definition.
16630 * src/getargs.c (include): New const char *.
16631 (getargs): Add case '-I'.
16632 * src/options.c (option_table): Add include as command line and
16633 percent option.
16634 * src/lex.h (token_t): Add tok_include.
16635
16636 2001-11-26 Akim Demaille <akim@epita.fr>
16637
16638 * src/reader.c (readgram): Make sure rules for mid-rule actions
16639 have a lineno equal to that of their host rule.
16640 Reported by Hans Aberg.
16641 * tests/regression.at (Rule Line Numbers): New.
16642
16643 2001-11-26 Akim Demaille <akim@epita.fr>
16644
16645 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16646 size_ts.
16647
16648 2001-11-26 Akim Demaille <akim@epita.fr>
16649
16650 * src/complain.c, src/complain.h (error): Remove, provided by
16651 lib/error.[ch].
16652
16653 2001-11-26 Akim Demaille <akim@epita.fr>
16654
16655 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16656 issue an error message.
16657 * tests/regression.at (Invalid %directive): New.
16658 Reported by Hans Aberg.
16659
16660 2001-11-26 Akim Demaille <akim@epita.fr>
16661
16662 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16663 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16664
16665 2001-11-26 Akim Demaille <akim@epita.fr>
16666
16667 * src/conflicts.c (conflicts_print): Don't complain at all when
16668 there are no reduce/reduce conflicts, and as many shift/reduce
16669 conflicts as expected.
16670 * tests/regression.at (%expect right): Adjust.
16671
16672 2001-11-23 Akim Demaille <akim@epita.fr>
16673
16674 * lib/alloca.c: Update, from fileutils.
16675
16676 2001-11-23 Akim Demaille <akim@epita.fr>
16677
16678 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16679
16680 2001-11-23 Akim Demaille <akim@epita.fr>
16681
16682 * src/system.h: Include alloca.h.
16683 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16684
16685 2001-11-23 Akim Demaille <akim@epita.fr>
16686
16687 * src/print_graph.c (print_actions): Remove `rule', unused.
16688 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16689 pacify GCC's signed < unsigned warnings.
16690 * src/closure.c (itemsetsize): Likewise.
16691 * src/reader.c (symbol_list_new): Static.
16692
16693 2001-11-23 Akim Demaille <akim@epita.fr>
16694
16695 Attaching lineno to buckets is stupid, since only one copy of each
16696 symbol is kept, only the line of the first occurrence is kept too.
16697
16698 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16699 * src/reader.c (rline_allocated): Remove, unused.
16700 (symbol_list): Have a `line' member.
16701 (symbol_list_new): New.
16702 (readgram): Use it.
16703 * src/print.c (print_grammar): Output the rule line numbers.
16704 * tests/regression.at (Solved SR Conflicts)
16705 (Unresolved SR Conflicts): Adjust.
16706 Reported by Hans Aberg.
16707
16708 2001-11-22 Marc Autret <autret_m@epita.fr>
16709
16710 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16711
16712 2001-11-22 Marc Autret <autret_m@epita.fr>
16713
16714 * src/muscle_tab.c (muscle_init): Remove initialization of
16715 skeleton muscle.
16716 * src/output.c (output_master_parser): Do it here.
16717
16718 2001-11-20 Akim Demaille <akim@epita.fr>
16719
16720 * po/sv.po: New.
16721 * configure.in (ALL_LINGUAS): Adjust.
16722 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16723 longer contains strings to translate.
16724
16725 2001-11-19 Akim Demaille <akim@epita.fr>
16726
16727 * src/conflicts.c (conflicts_print): Add a missing \n.
16728
16729 2001-11-19 Akim Demaille <akim@epita.fr>
16730
16731 * src/nullable.c (nullable_print): New.
16732 (set_nullable): Call it when tracing.
16733 Better locality of variables.
16734
16735 2001-11-19 Akim Demaille <akim@epita.fr>
16736
16737 * src/print.c (print_actions): Better locality of variables.
16738
16739 2001-11-19 Akim Demaille <akim@epita.fr>
16740
16741 * src/derives.c (print_derives): Fix and enrich.
16742 * src/closure.c (print_fderives): Likewise.
16743
16744 2001-11-19 Akim Demaille <akim@epita.fr>
16745
16746 * src/closure.c (itemsetend): Remove, replaced with...
16747 (itemsetsize): new.
16748
16749 2001-11-19 Akim Demaille <akim@epita.fr>
16750
16751 * src/LR0.c (kernel_end): Remove, replaced with...
16752 (kernel_size): new.
16753
16754 2001-11-19 Akim Demaille <akim@epita.fr>
16755
16756 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16757 to clarify.
16758
16759 2001-11-19 Akim Demaille <akim@epita.fr>
16760
16761 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16762
16763 2001-11-19 Akim Demaille <akim@epita.fr>
16764
16765 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16766 trace messages.
16767 * src/LR0.c: Likewise.
16768 (allocate_itemsets): Use arrays instead of pointers to clarify.
16769
16770 2001-11-19 Akim Demaille <akim@epita.fr>
16771
16772 * src/getargs.c (statistics_flag): Replace with...
16773 (trace_flag): New.
16774 (longopts): Accept --trace instead of --statistics.
16775 * src/getargs.h, src/options.c: Adjust.
16776 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16777 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16778
16779 2001-11-19 Akim Demaille <akim@epita.fr>
16780
16781 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16782 pointers to clarify the code.
16783 (save_reductions, save_shifts): Factor common parts of alternatives.
16784
16785 2001-11-19 Akim Demaille <akim@epita.fr>
16786
16787 * src/LR0.c (new_state, get_state): Complete TRACE code.
16788 * src/closure.c: Include `reader.h' to get `tags', needed by the
16789 trace code.
16790 Rename the conditional DEBUG as TRACE.
16791 Output consistently TRACEs to stderr, not stdout.
16792 * src/derives.c: Likewise.
16793 * src/reduce.c: (inaccessable_symbols): Using if is better style
16794 than goto.
16795 Use `#if TRACE' instead of `#if 0' for tracing code.
16796
16797 2001-11-19 Akim Demaille <akim@epita.fr>
16798
16799 * src/system.h (LIST_FREE, shortcpy): New.
16800 * src/LR0.c: Use them.
16801 * src/output.c (free_itemsets, free_reductions, free_shifts):
16802 Remove, replaced by LIST_FREE.
16803
16804 2001-11-19 Akim Demaille <akim@epita.fr>
16805
16806 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16807 (REDUCTIONS_ALLOC): New.
16808 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16809 allocation.
16810
16811 2001-11-19 Akim Demaille <akim@epita.fr>
16812
16813 * src/LR0.c (new_state): Complete trace code.
16814 * src/nullable.c (set_nullable): Don't translate traces.
16815
16816 2001-11-19 Akim Demaille <akim@epita.fr>
16817
16818 * src/print_graph.c (print_core): Better locality of variables.
16819 * src/print.c (print_core): Likewise.
16820
16821 2001-11-19 Akim Demaille <akim@epita.fr>
16822
16823 * src/vcg.c: You do the output, so you are responsible of the
16824 handling of VCG syntax, in particular: use quotearg.
16825 * src/print_graph.c: Don't.
16826 (print_actions): Don't output the actions as part of the nodes,
16827 since that's the job of the edges.
16828 (print_state): Don't output by hand: fill the node description,
16829 and ask for its output.
16830
16831 2001-11-19 Akim Demaille <akim@epita.fr>
16832
16833 * src/bison.simple (yyparse): When verbosely reporting an error,
16834 no longer put additional quotes around token names.
16835 * tests/calc.at: Adjust.
16836
16837 2001-11-19 Akim Demaille <akim@epita.fr>
16838
16839 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16840 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16841 * src/output.c: Adjust.
16842
16843 2001-11-19 Akim Demaille <akim@epita.fr>
16844
16845 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16846 (rule_t): this.
16847 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16848
16849 2001-11-19 Akim Demaille <akim@epita.fr>
16850
16851 * src/gram.h (rule_t): New.
16852 (rule_table): New.
16853 (rrhs, rlhs): Remove, part of state_t.
16854 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16855 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16856 * src/reader.c, src/reduce.c: Adjust.
16857
16858 2001-11-19 Akim Demaille <akim@epita.fr>
16859
16860 * src/reader.c (symbols_output): New, extracted from...
16861 (packsymbols): Here.
16862 (reader): Call it.
16863
16864 2001-11-19 Akim Demaille <akim@epita.fr>
16865
16866 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16867 (maxrhs): this new function.
16868
16869 2001-11-19 Akim Demaille <akim@epita.fr>
16870
16871 * src/lalr.c (F): New macro to access the variable F.
16872 Adjust.
16873
16874 2001-11-19 Akim Demaille <akim@epita.fr>
16875
16876 * src/lalr.h (LA): New macro to access the variable LA.
16877 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16878 * src/lalr.c: Adjust.
16879
16880 2001-11-19 Akim Demaille <akim@epita.fr>
16881
16882 * src/lalr.c (initialize_LA): Only initialize LA. Let...
16883 (set_state_table): handle the `lookaheads' members.
16884
16885 2001-11-19 Akim Demaille <akim@epita.fr>
16886
16887 * src/lalr.h (lookaheads): Removed array, whose contents is now
16888 a member of...
16889 (state_t): this structure.
16890 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16891 Adjust.
16892
16893 2001-11-19 Akim Demaille <akim@epita.fr>
16894
16895 * src/lalr.h (consistent): Removed array, whose contents is now
16896 a member of...
16897 (state_t): this structure.
16898 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16899 Adjust.
16900
16901 2001-11-19 Akim Demaille <akim@epita.fr>
16902
16903 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
16904 contents are now members of...
16905 (state_t): this structure.
16906 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16907 Adjust.
16908
16909 2001-11-19 Akim Demaille <akim@epita.fr>
16910
16911 * src/lalr.h (state_t): New.
16912 (state_table): Be a state_t * instead of a core **.
16913 (accessing_symbol): Remove, part of state_t.
16914 * src/lalr.c: Adjust.
16915 (set_accessing_symbol): Merge into...
16916 (set_state_table): this.
16917 * src/print_graph.c, src/conflicts.c: Adjust.
16918
16919 2001-11-14 Akim Demaille <akim@epita.fr>
16920
16921 * tests/calc.at, tests/output.at, tests/regression.at,
16922 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
16923 now the tests are run in private dirs, therefore AC_CLEANUP and
16924 family can be simplified to 0-ary.
16925 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
16926 use abs. path to find config.h.
16927 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
16928 stderr, there can be way too much random noise.
16929 Instead pass -Werror to GCC and rely on the exit status.
16930 Reported by Wolfram Wagner.
16931
16932 2001-11-14 Akim Demaille <akim@epita.fr>
16933
16934 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
16935 defined only if yyoverflow is defined, to avoid `warning: unused
16936 variable `yyvs1''.
16937 Reported by The Test Suite.
16938
16939 2001-11-14 Akim Demaille <akim@epita.fr>
16940
16941 * src/print.c: Include reduce.h.
16942 Reported by Hans Aberg.
16943
16944 2001-11-14 Akim Demaille <akim@epita.fr>
16945
16946 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
16947 Revert a previous patch: these are really const.
16948 * src/conflicts.c (conflict_report): Additional useless pair of
16949 braces to pacify GCC's warnings for `if () if () {} else {}'.
16950 * src/lex.c (parse_percent_token): Replace equal_offset with
16951 arg_offset.
16952 arg is const.
16953 Be sure to strdup `arg' when used, since there is no reason for
16954 token_buffer not to change.
16955
16956 2001-11-14 Akim Demaille <akim@epita.fr>
16957
16958 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
16959 definition.
16960 * src/main.c (main): Use them.
16961 Suggested by Hans Aberg.
16962
16963 2001-11-12 Akim Demaille <akim@epita.fr>
16964
16965 * src/system.h (ngettext): Now that we use ngettext, be sure to
16966 provide a default definition when NLS are not used.
16967
16968 2001-11-12 Akim Demaille <akim@epita.fr>
16969
16970 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
16971 Use @kbd to denote user input.
16972 (Language and Grammar): ANSIfy the example.
16973 Adjust its layout for info/notinfo.
16974 (Location Tracking Calc): Output error messages to stderr.
16975 Output locations in a more GNUtically correct way.
16976 Fix a couple of Englishos.
16977 Adjust @group/@end group pairs.
16978
16979 2001-11-12 Akim Demaille <akim@epita.fr>
16980
16981 %expect was not functioning at all.
16982
16983 * src/conflicts.c (expected_conflicts): Set to -1.
16984 (conflict_report): Use ngettext.
16985 (conflicts_print): Check %expect and make its violation an error.
16986 * doc/bison.texinfo (Expect Decl): Adjust.
16987 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
16988 * tests/regression.at (%expect not enough, %expect right)
16989 (%expect too much): New.
16990
16991 2001-11-12 Akim Demaille <akim@epita.fr>
16992
16993 * tests/regression.at (Conflicts): Rename as...
16994 (Unresolved SR Conflicts): this.
16995 (Solved SR Conflicts): New.
16996
16997 2001-11-12 Akim Demaille <akim@epita.fr>
16998
16999 * src/reduce.c (print_results): Rename as...
17000 (reduce_output): This.
17001 Output to OUT, passed as argument, instead of output_obstack.
17002 (dump_grammar): Likewise.
17003 (reduce_free): New.
17004 Also free V1.
17005 (reduce_grammar): No longer call reduce_output, since...
17006 * src/print.c (print_results): do it.
17007 * src/main.c (main): Call reduce_free;
17008
17009 2001-11-12 Akim Demaille <akim@epita.fr>
17010
17011 * src/conflicts.c (print_reductions): Accept OUT as argument.
17012 Output to it, not to output_obstack.
17013 * src/print.c (print_actions): Adjust.
17014
17015 2001-11-12 Akim Demaille <akim@epita.fr>
17016
17017 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17018 the result instead of using...
17019 (src_total, rrc_total, src_count, rrc_count): Remove.
17020 (any_conflicts): Remove.
17021 (print_conflicts): Split into...
17022 (conflicts_print, conflicts_output): New.
17023 * src/conflicts.h: Adjust.
17024 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
17025 * src/print.c (print_grammar): Issue `\n' between two rules.
17026 * tests/regression.at (Conflicts): New.
17027 Reported by Tom Lane.
17028
17029 2001-11-12 Akim Demaille <akim@epita.fr>
17030
17031 * tests/regression.at (Invalid input): Remove, duplicate with
17032 ``Invalid input: 1''.
17033
17034 2001-11-12 Akim Demaille <akim@epita.fr>
17035
17036 * tests/torture.at (AT_DATA_STACK_TORTURE)
17037 (Exploding the Stack Size with Alloca)
17038 (Exploding the Stack Size with Malloc): New.
17039
17040 2001-11-12 Akim Demaille <akim@epita.fr>
17041
17042 * src/bison.simple (YYSTACK_REALLOC): New.
17043 (yyparse) [!yyoverflow]: Use it and free the old stack.
17044 Reported by Per Allansson.
17045
17046 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
17047
17048 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17049 define CPP macro, which substitute YYSTYPE by yystype.
17050 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17051 with yyltype/YYLTYPE. This allows inclusion of the generated
17052 header within the parser if the compiler, such as GGC, accepts
17053 multiple equivalent #defines.
17054 From Akim.
17055
17056 2001-11-05 Akim Demaille <akim@epita.fr>
17057
17058 * src/reader.c (symbols_output): New, extracted from...
17059 (packsymbols): here.
17060 (reader): Adjust.
17061
17062 2001-11-05 Akim Demaille <akim@epita.fr>
17063
17064 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17065
17066 2001-11-05 Akim Demaille <akim@epita.fr>
17067
17068 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17069 pattern.
17070
17071 2001-11-05 Akim Demaille <akim@epita.fr>
17072
17073 * src/options.h (struct option_table_struct): set_flags is void*.
17074 * src/options.c (longopts): Support `--output' and `%output'.
17075 (usage): Adjust.
17076 * src/lex.h (tok_setopt): Remove, replaced with...
17077 (tok_intopt, tok_stropt): these new guys.
17078 * src/lex.c (getopt.h): Not needed.
17079 (token_buffer, unlexed_token_buffer): Not const.
17080 (percent_table): Promote `-' over `_' in directive names.
17081 Active `%name-prefix', `file-prefix', and `output'.
17082 (parse_percent_token): Accept possible arguments to directives.
17083 Promote `-' over `_' in directive names.
17084
17085 2001-11-04 Akim Demaille <akim@epita.fr>
17086
17087 * doc/bison.texinfo (Decl Summary): Split the list into
17088 `directives for grammars' and `directives for bison'.
17089 Sort'em.
17090 Add description of `%name-prefix', `file-prefix', and `output'.
17091 Promote `-' over `_' in directive names.
17092 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17093 Simplify the description of `--name-prefix'.
17094 Promote `-' over `_' in directive names.
17095 Promote `--output' over `--output-file'.
17096 Fix the description of `--defines'.
17097 * tests/output.at: Exercise %file-prefix and %output.
17098
17099 2001-11-02 Akim Demaille <akim@epita.fr>
17100
17101 * doc/refcard.tex: Update.
17102
17103 2001-11-02 Akim Demaille <akim@epita.fr>
17104
17105 * src/symtab.h (SUNDEF): New.
17106 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17107 stand for `uninitialized', instead of 0.
17108 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17109 * src/lex.c (lex): Adjust.
17110
17111 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17112 Number it 0.
17113 Let yylex return it instead of a plain 0.
17114 Reported by Dick Streefland.
17115
17116 2001-11-02 Akim Demaille <akim@epita.fr>
17117
17118 * tests/regression.at (Mixing %token styles): New test.
17119
17120 2001-11-02 Akim Demaille <akim@epita.fr>
17121
17122 * src/reader.c (parse_thong_decl): Formatting changes.
17123 (token_translations_init): New, extracted from...
17124 (packsymbols): Here.
17125 Adjust.
17126
17127 2001-11-01 Akim Demaille <akim@epita.fr>
17128
17129 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17130 Check that `9foo.y' produces correct cpp guards.
17131 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17132 guards.
17133 Reported by Wwp.
17134
17135 2001-11-01 Akim Demaille <akim@epita.fr>
17136
17137 * tests/regression.at (Invalid input: 2): New.
17138 * src/lex.c (unlexed_token_buffer): New.
17139 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17140 too.
17141 Reported by Wwp.
17142
17143 2001-11-01 Akim Demaille <akim@epita.fr>
17144
17145 * tests/calc.at: Catch up with 1.30.
17146 * configure.in: Bump to 1.49a.
17147 Adjust to newer Autotest.
17148
17149 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
17150
17151 * src/conflicts.c: Move global variables rrc_total and src_total ...
17152 (print_conflicts): here.
17153 * src/output.c (output): Free global variable user_toknums.
17154 * src/lex.c (token_obstack): Become static.
17155
17156 2001-10-18 Akim Demaille <akim@epita.fr>
17157
17158 * tests/atlocal.in (GCC): Add.
17159 * tests/calc.at: s/m4_match/m4_bmatch/.
17160 s/m4_patsubst/m4_bpatsubst/.
17161 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17162 * configure.in: AC_SUBST(GCC).
17163
17164 2001-10-14 Marc Autret <autret_m@epita.fr>
17165
17166 * src/options.c (create_long_option_table): Fix.
17167
17168 2001-10-10 Akim Demaille <akim@epita.fr>
17169
17170 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17171
17172 2001-10-04 Akim Demaille <akim@epita.fr>
17173
17174 * src/reader.c (parse_union_decl): Push the caracters in
17175 union_obstack, not attrs_obstack.
17176
17177 2001-10-04 Akim Demaille <akim@epita.fr>
17178
17179 Merge in the branch 1.29.
17180
17181 * src/reader.c (packsymbols): Use a temporary obstack for
17182 `%%tokendef', since output_stack is already used elsewhere.
17183
17184 2001-10-02 Akim Demaille <akim@epita.fr>
17185
17186 Bump 1.29d.
17187
17188 2001-10-02 Akim Demaille <akim@epita.fr>
17189
17190 Version 1.29c.
17191
17192 2001-10-02 Akim Demaille <akim@epita.fr>
17193
17194 * tests/regression.at (Invalid CPP headers): New.
17195 From Alexander Belopolsky.
17196 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17197
17198 2001-10-02 Akim Demaille <akim@epita.fr>
17199
17200 * tests/regression.at (Invalid input): New.
17201 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17202 Reported by Shura.
17203
17204 2001-10-02 Akim Demaille <akim@epita.fr>
17205
17206 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17207
17208 2001-10-02 Akim Demaille <akim@epita.fr>
17209
17210 * src/output.c (output_parser): Assert `skeleton'.
17211 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17212 systems.
17213 From Shura.
17214
17215 2001-10-01 Marc Autret <autret_m@epita.fr>
17216
17217 * src/lex.h: Echo modifications.
17218 * src/lex.c (unlex): Parameter is now token_t.
17219 From Hans Aberg.
17220
17221 2001-10-01 Marc Autret <autret_m@epita.fr>
17222
17223 * src/main.c: Include lex.h.
17224 From Hans Aberg.
17225
17226 2001-09-29 Akim Demaille <akim@epita.fr>
17227
17228 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17229
17230 2001-09-28 Akim Demaille <akim@epita.fr>
17231
17232 * tests/testsuite.at: Update to newer Autotest.
17233 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17234
17235 2001-09-27 Akim Demaille <akim@epita.fr>
17236
17237 Position independent wrapper.
17238
17239 * tests/bison: Remove.
17240 * tests/bison.in: New.
17241 * configure.in: Adjust.
17242
17243 2001-09-27 Paul Eggert <eggert@twinsun.com>
17244
17245 Port quotearg fixes from tar 1.13.24.
17246
17247 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17248 tm to be declared.
17249 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17250 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17251
17252 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17253 * m4/mbrtowc.m4: New file.
17254 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17255 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17256
17257 2001-09-27 Akim Demaille <akim@epita.fr>
17258
17259 Bump to 1.29c.
17260
17261 2001-09-27 Akim Demaille <akim@epita.fr>
17262
17263 Version 1.29b.
17264
17265 2001-09-25 Akim Demaille <akim@epita.fr>
17266
17267 * src/system.h: Include `xalloc.h'.
17268 Remove it from the C files.
17269 * src/files.c (output_files): Free the obstacks.
17270 * src/lex.c (init_lex): Rename as...
17271 (lex_init): this.
17272 (lex_free): New.
17273 * src/main.c (main): Use it.
17274
17275 2001-09-24 Marc Autret <autret_m@epita.fr>
17276
17277 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17278 to output informations in fout (FILE*).
17279 (open_graph, close_graph): Likewise.
17280 (output_graph, output_edge, output_node): Likewise.
17281 * src/vcg.h: Update function prototypes.
17282 * src/print_graph.c (print_graph): Open output graph file.
17283 (print_actions): Adjust.
17284 * src/files.h: Remove extern declaration.
17285 * src/files.c: Remove graph_obstack declaration.
17286 (open_files): Remove graph_obstack initialization.
17287 (output_files): Remove graph_obstack saving.
17288
17289 2001-09-24 Marc Autret <autret_m@epita.fr>
17290
17291 * src/files.c (compute_output_file_names): Fix.
17292
17293 2001-09-24 Marc Autret <autret_m@epita.fr>,
17294 Akim Demaille <akim@epita.fr>
17295
17296 * src/reader.c (reader): Remove call to free_symtab ().
17297 * src/main.c (main): Call it here.
17298 Include symtab.h.
17299 * src/conflicts.c (initialize_conflicts): Rename as...
17300 (solve_conflicts): this.
17301 * src/print.c (print_core, print_actions, print_state)
17302 (print_grammar): Dump to a file instead a `output_obstack'.
17303 (print_results): Dump `output_obstack', and then proceed with the
17304 FILE *.
17305 * src/files.c (compute_output_file_names, close_files): New.
17306 (output_files): Adjust.
17307 * src/main.c (main): Adjust.
17308
17309 2001-09-23 Marc Autret <autret_m@epita.fr>
17310
17311 * src/files.c (compute_header_macro): Computes header macro name
17312 from spec_defines_file when given.
17313
17314 2001-09-23 Marc Autret <autret_m@epita.fr>
17315
17316 * src/files.c (output_files): Add default extensions.
17317
17318 2001-09-22 Akim Demaille <akim@epita.fr>
17319
17320 * src/conflicts.c (finalize_conflicts): Rename as...
17321 (free_conflicts): this.
17322
17323 2001-09-22 Akim Demaille <akim@epita.fr>
17324
17325 * src/gram.c (gram_free): Rename back as...
17326 (dummy): this.
17327 (output_token_translations): Free `token_translations'.
17328 * src/symtab.c (free_symtab): Free the tag field.
17329
17330 2001-09-22 Akim Demaille <akim@epita.fr>
17331
17332 Remove `translations' as it is always set to true.
17333
17334 * src/gram.h: Adjust.
17335 * src/reader.c (packsymbols, parse_token_decl): Adjust
17336 * src/print.c (print_grammar): Adjust.
17337 * src/output.c (output_token_translations): Adjust.
17338 * src/lex.c (lex): Adjust.
17339 * src/gram.c: Be sure the set pointers to NULL.
17340 (dummy): Rename as...
17341 (gram_free): this.
17342
17343 2001-09-22 Akim Demaille <akim@epita.fr>
17344
17345 * configure.in: Invoke AM_LIB_DMALLOC.
17346 * src/system.h: Use dmalloc.
17347 * src/LR0.c: Be sure to have pointers initialized to NULL.
17348 (allocate_itemsets): Allocate kernel_items only if needed.
17349
17350 2001-09-22 Akim Demaille <akim@epita.fr>
17351
17352 * configure.in: Bump to 1.29b.
17353 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17354 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17355 need xmalloc.c in calc.y.
17356 From Pascal Bart.
17357
17358 2001-09-21 Akim Demaille <akim@epita.fr>
17359
17360 Version 1.29a.
17361 * Makefile.maint, config/config.guess, config/config.sub,
17362 * config/missing: Update from masters.
17363 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17364 upon package.m4.
17365 * configure.in (ALL_LINGUAS): Add `tr'.
17366
17367 2001-09-21 Akim Demaille <akim@epita.fr>
17368
17369 * tests/Makefile.am (package.m4): Move to...
17370 ($(srcdir)/$(TESTSUITE)): here.
17371
17372 2001-09-20 Akim Demaille <akim@epita.fr>
17373
17374 * src/complain.c: No longer try to be standalone: use system.h.
17375 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17376 * src/complain.h: Likewise.
17377 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17378 Remove the unused variable `n'.
17379 From Albert Chin-A-Young.
17380
17381 2001-09-18 Marc Autret <autret_m@epita.fr>
17382
17383 * doc/bison.1: Update.
17384 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17385 descriptions.
17386 (Option Cross Key): Update.
17387 Add --graph.
17388
17389 2001-09-18 Marc Autret <autret_m@epita.fr>
17390
17391 * tests/regression.at: New test (comment in %union).
17392
17393 2001-09-18 Marc Autret <autret_m@epita.fr>
17394
17395 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17396 do that.
17397 Reported by Keith Browne.
17398
17399 2001-09-18 Marc Autret <autret_m@epita.fr>
17400
17401 * tests/output.at: Add tests for --defines and --graph.
17402
17403 2001-09-18 Marc Autret <autret_m@epita.fr>
17404
17405 * tests/output.at: Removes tests of %{header,src}_extension features.
17406
17407 2001-09-18 Akim Demaille <akim@epita.fr>
17408
17409 * tests/Makefile.am (package.m4): New.
17410 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17411 (_AT_CHECK_CALC_ERROR): Likewise.
17412 Factor the `, ' part of verbose error messages.
17413
17414 2001-09-18 Marc Autret <autret_m@epita.fr>
17415
17416 * src/getargs.c (longopts): Declare --defines and --graph as options
17417 with optional arguments.
17418 * src/files.h: Add extern declarations.
17419 * src/files.c (spec_graph_file, spec_defines_file): New.
17420 (output_files): Update.
17421 Remove CPP-outed code.
17422
17423 2001-09-18 Marc Autret <autret_m@epita.fr>
17424
17425 Turn off %{source,header}_extension feature.
17426
17427 * src/files.c (compute_exts_from_gf): Update.
17428 (compute_exts_from_src): Update.
17429 (output_files): CPP-out useless code.
17430 * src/files.h: Remove {header,source}_extension extern declarations.
17431 * src/reader.c (parse_dquoted_param): CPP-out.
17432 (parse_header_extension_decl): Remove.
17433 (parse_source_extension_decl): Remove.
17434 (read_declarations): Remove cases tok_{hdrext,srcext}.
17435 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17436 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17437
17438 2001-09-10 Akim Demaille <akim@epita.fr>
17439
17440 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17441 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17442 (AT_CHECK_OUTPUT): this.
17443 Merely check ls' exit status, its output is useless.
17444
17445 2001-09-10 Akim Demaille <akim@epita.fr>
17446
17447 * tests/calc.at: Use m4_match.
17448 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17449
17450 2001-09-10 Marc Autret <autret_m@epita.fr>,
17451 Akim Demaille <akim@epita.fr>
17452
17453 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17454 enum color_e.
17455 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17456 to `normal'.
17457 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17458 * src/lex.h: Adjust prototype.
17459 (token_t): Add `tok_undef'.
17460 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17461 (parse_percent_token): Now returns token_t.
17462 Add default statement in switch.
17463 (lex): Separate `c' as an input variable, from the token_t result
17464 part.
17465 (unlexed): Is a token_t.
17466
17467 2001-09-10 Akim Demaille <akim@epita.fr>
17468
17469 * configure.in: Bump to 1.29a.
17470
17471 2001-09-07 Akim Demaille <akim@epita.fr>
17472
17473 Version 1.29.
17474
17475 2001-08-30 Akim Demaille <akim@epita.fr>
17476
17477 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17478 * m4/atconfig.m4: Remove.
17479 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17480 * tests/bison: New.
17481 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17482 m4_if, m4_patsubst, and m4_regexp.
17483 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17484 `input' file instead of echo.
17485
17486 2001-08-29 Akim Demaille <akim@epita.fr>
17487
17488 Bump to 1.28e.
17489
17490 2001-08-29 Akim Demaille <akim@epita.fr>
17491
17492 Version 1.28d.
17493
17494 2001-08-29 Paul Eggert <eggert@twinsun.com>
17495
17496 * src/bison.simple (yyparse): Don't take the address of an
17497 item before the start of an array, as that doesn't conform to
17498 the C Standard.
17499
17500 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17501
17502 * doc/bison.texinfo (Location Tracking Calc): New node.
17503
17504 2001-08-29 Paul Eggert <eggert@twinsun.com>
17505
17506 * src/output.c (output): Do not define const, as this now
17507 causes more problems than it cures.
17508
17509 2001-08-29 Akim Demaille <akim@epita.fr>
17510
17511 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17512 the nodes.
17513 Be sure to tag the `detailmenu'.
17514
17515 2001-08-29 Akim Demaille <akim@epita.fr>
17516
17517 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17518 download in a tmp dir.
17519
17520 2001-08-28 Marc Autret <autret_m@epita.fr>
17521
17522 * config/depcomp: New file.
17523
17524 2001-08-28 Marc Autret <autret_m@epita.fr>
17525
17526 * doc/bison.1 (mandoc): Adjust.
17527 From Juan Manuel Guerrero.
17528
17529 2001-08-28 Marc Autret <autret_m@epita.fr>
17530
17531 * src/print_graph.c (print_state): Fix.
17532
17533 2001-08-27 Marc Autret <autret_m@epita.fr>
17534
17535 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17536 char * members.
17537 Echo modifications to the functions prototypes.
17538 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17539
17540 2001-08-27 Marc Autret <autret_m@epita.fr>
17541
17542 * src/vcg.c: Include `xalloc.h'.
17543 (add_colorentry): New.
17544 (add_classname): New.
17545 (add_infoname): New.
17546 * src/vcg.h: Add new prototypes.
17547
17548 2001-08-27 Akim Demaille <akim@epita.fr>
17549
17550 * Makefile.maint: Sync. again with CVS Autoconf.
17551
17552 2001-08-27 Akim Demaille <akim@epita.fr>
17553
17554 * Makefile.maint: Formatting changes.
17555 (po-update, cvs-update, update): New targets.
17556 (AMTAR): Remove.
17557
17558 2001-08-27 Akim Demaille <akim@epita.fr>
17559
17560 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17561 * Makefile.maint: Sync. with CVS Autoconf.
17562
17563 2001-08-27 Marc Autret <autret_m@epita.fr>
17564
17565 * src/vcg.h (struct infoname_s): New.
17566 (struct colorentry_s): New.
17567 (graph_s): New fields {vertical,horizontal}_order in structure.
17568 Add `infoname' field.
17569 Add `colorentry' field;
17570 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17571 (G_HORIZONTAL_ORDER): New.
17572 (G_INFONAME): New.
17573 (G_COLORENTRY): New.
17574 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17575 Add output of `infoname'.
17576 Add output of `colorentry'.
17577
17578 2001-08-27 Marc Autret <autret_m@epita.fr>
17579
17580 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17581 This one shadowed a global parameter.
17582
17583 2001-08-24 Marc Autret <autret_m@epita.fr>
17584
17585 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17586 instead of `unsigned'.
17587 (print_state): Do not call obstack_object_size () in obstack_grow ()
17588 to avoid macro variables shadowing.
17589
17590 2001-08-23 Marc Autret <autret_m@epita.fr>
17591
17592 * src/lex.c (percent_table): Typo: s/naem/name/.
17593 Add graph option.
17594 Normalize new options declarations.
17595
17596 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17597
17598 * tests/suite.at: Exercise %header_extension and %source_extension.
17599
17600 2001-08-16 Marc Autret <autret_m@epita.fr>
17601
17602 * src/reader.c (parse_dquoted_param): New.
17603 (parse_header_extension_decl): Use it.
17604 (parse_source_extension_decl): Likewise.
17605
17606 2001-08-16 Marc Autret <autret_m@epita.fr>
17607
17608 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17609 (get_xxxx_str): Use assert () instead of complain ().
17610 Remove return invokations in default cases.
17611 (get_decision_str): Modify default behaviour. Remove second argument.
17612 Echo modifications on calls.
17613 (output_graph): Fix.
17614
17615 2001-08-16 Marc Autret <autret_m@epita.fr>
17616
17617 * src/getargs.c (usage): Update with ``-g, --graph''.
17618
17619 2001-08-16 Marc Autret <autret_m@epita.fr>
17620
17621 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17622 (Option Cross Key): Likewise.
17623 * doc/bison.1: Update.
17624
17625 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
17626
17627 * src/output.c (output_master_parser): Don't finish action_obstack.
17628 (output_parser): Don't care about the muscle action, here.
17629 (prepare): Copy the action_obstack in the action muscle.
17630 (output): Free action_obstack.
17631
17632 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17633
17634 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17635 will contain `%union' declaration.
17636 (parse_union_decl): Delete #line directive output.
17637 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17638 informations about %union.
17639 (parse_union_decl): Copy the union_obstack in the muscle stype.
17640 * src/bison.simple: Add new #line directive.
17641 Add typdef %%stype YYSTYPE.
17642
17643 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17644
17645 * src/bison.simple: Add new `#line' directive.
17646
17647 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
17648
17649 * src/bison.simple: New `#line' directive.
17650 * src/output.c (output_parser): Support new dynamic muscle input_line.
17651
17652 2001-09-22 Marc Autret <autret_m@epita.fr>
17653
17654 * src/output.c (output_master_parser): New.
17655 (output_parser): Be more re-entrant.
17656
17657 2001-09-21 Marc Autret <autret_m@epita.fr>
17658
17659 * src/reader.c (copy_definition, parse_union_decl): Update and use
17660 `linef' muscle.
17661 (copy_action): Likewise.
17662 Use obstack_1grow ().
17663 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17664
17665 2001-09-21 Marc Autret <autret_m@epita.fr>
17666
17667 * src/options.c (option_table): Adjust.
17668 * src/lex.c (parse_percent_token): Fix.
17669
17670 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17671
17672 * src/options.c (symtab.h): Include it, need by lex.h.
17673
17674 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17675
17676 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17677 is now an option_table_struct*.
17678 (option_strcmp): New function option_strcmp.
17679 (parse_percent_token): Call option_strcmp.
17680 * src/getargs.c (xalloc.h, options.h): Include it.
17681 (getargs): Call create_long_option_table.
17682 (getargs): Free longopts at the end of the function.
17683 (shortopts): Move in options.c.
17684 * src/options.c (create_long_option_table): New function. Convert
17685 information from option_table to option structure.
17686 * src/reader.c (options.h): Include it.
17687
17688 * src/Makefile.am: Adjust.
17689 * src/options.c (option_table): Create from longopts and percent_table.
17690 * src/getargs.c (longopts): Delete.
17691 * src/lex.c (struct percent_table_struct): Delete.
17692 (percent_table): Delete.
17693 (options.h): Include it.
17694 * src/options.c: Create.
17695 * src/options.h: Create.
17696 Declare enum opt_access_e.
17697 Define struct option_table_struct.
17698
17699 2001-09-20 Marc Autret <autret_m@epita.fr>
17700
17701 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17702 sections of Bison.
17703
17704 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
17705
17706 * src/bison.simple: s/%%filename/%%skeleton.
17707 * src/muscle_tab.c (getargs.h): Include it.
17708 (muscle_init): Insert new muscle skeleton.
17709
17710 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
17711
17712 * src/output.c (output_parser): Delete unused variable actions_dumped.
17713
17714 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
17715
17716 * src/output.c (output): Delete call to reader_output_yylsp.
17717 * src/reader.c (reader): Likewise.
17718 * src/reader.h: Delete declaration of reader_output_yylsp.
17719
17720 2001-09-02 Marc Autret <autret_m@epita.fr>
17721
17722 * src/reader.c: Include muscle_tab.h.
17723 (parse_union_decl): Update.
17724 (parse_macro_decl): Rename parse_muscle_decl.
17725 Update to use renamed functions and variable.
17726 (read_declarations, copy_action, read_additionnal_code, : Updated
17727 with correct variables and functions names.
17728 (packsymbols, reader): Likewise.
17729
17730 * src/reader.h (muscle_obstack): Extern declaration update.
17731
17732 * src/output.c: Include muscle_tab.h
17733 In all functions using macro_insert, change by using muscle_insert ().
17734 (macro_obstack): Rename muscle_obstack.
17735 Echo modifications in the whole file.
17736 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17737 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17738 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17739
17740 * src/muscle_tab.h: Update double inclusion macros.
17741 (macro_entry_s): Rename muscle_entry_s.
17742 Update prototypes.
17743
17744 * src/muscle_tab.c: Include muscle_tab.h.
17745 Rename macro_tabble to muscle_table.
17746 (mhash1, mhash2, mcmp): Use muscle_entry.
17747 (macro_init): Rename muscle_init. Update.
17748 (macro_insert): Rename muscle_insert. Update.
17749 (macro_find): Rename muscle_find. Update.
17750
17751 * src/main.c: Include muscle_tab.h.
17752 (main): Call muscle_init ().
17753 * src/Makefile.am (bison_SOURCES): Echo modifications.
17754
17755 2001-09-02 Marc Autret <autret_m@epita.fr>
17756
17757 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17758
17759 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17760
17761 2001-09-02 Marc Autret <autret_m@epita.fr>
17762
17763 * src/macrotab.c, src/macrotab.h: Remove.
17764
17765 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
17766
17767 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17768 filename.
17769
17770 2001-09-01 Marc Autret <autret_m@epita.fr>
17771
17772 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17773 to an explicit value to activate the feature. We do it here.
17774
17775 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17776
17777 * src/output.c (prepare): Delete the `filename' muscule insertion.
17778 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17779 (parse_union_decl): Likewise.
17780 * src/macrotab.c (macro_init): Initialize filename by infile.
17781
17782 2001-08-31 Marc Autret <autret_m@epita.fr>
17783
17784 * src/bison.simple (YYLSP_NEEDED): New definition.
17785 * src/output.c (prepare): Add macro insertion of `locations_flag'
17786
17787 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17788
17789 * src/output.c (prepare): Delete insertion of previous muscles,
17790 and insert the `prefix' muscles.
17791 * src/macrotab.c (macro_init): Likewise.
17792 (macro_init): Initialization prefix directive by `yy'.
17793 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17794 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17795 yylval, yydebug, yyerror, yynerrs and yyparse.
17796 New directive `#define' to substitute yydebug, ... with option
17797 name_prefix.
17798
17799 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17800
17801 * src/main.c (main): Standardize.
17802 * src/output.c (output_table_data, output_parser): Likewise.
17803 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17804
17805 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17806
17807 * src/reader.c (read_additionnal_code): Rename %%user_code to
17808 %%epilogue.
17809 * src/output.c (output): Rename %%declarations to %%prologue.
17810 * src/bison.simple: Echo modifications.
17811
17812 2001-08-31 Marc Autret <autret_m@epita.fr>
17813
17814 * src/reader.c (readgram): CleanUp.
17815 (output_token_defines): Likewise.
17816 (packsymbols): Likewise.
17817 (reader): Likewise.
17818 * src/output.c (output): CPP-out useless code.
17819
17820 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17821
17822 * src/reader.c (reader): Delete obsolete call to function
17823 output_trailers and output_headers.
17824 * src/output.h: Remove obsolete functions prototypes of output_headers
17825 and output_trailers.
17826
17827 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
17828
17829 * src/main.c: Include macrotab.h.
17830 * src/macrotab.h (macro_entry_s): Constify fields.
17831 Adjust functions prototypes.
17832 * src/macrotab.c (macro_insert): Constify key and value.
17833 (macro_find): Constify key.
17834 (macro_insert): Include 'xalloc.h'
17835 (macro_insert): Use XMALLOC.
17836 (macro_find): Constify return value.
17837 * src/output.c (output_table_data): Rename table to table_data.
17838 (output_parser): Constify macro_key, macro_value.
17839
17840 2001-08-30 Marc Autret <autret_m@epita.fr>
17841
17842 * src/reader.c (parse_skel_decl): New.
17843 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
17844 * src/lex.h (token_t): New token `tok_skel'.
17845 * src/lex.c (percent_table): Add skeleton option entry.
17846 Standardize.
17847
17848 2001-08-29 Marc Autret <autret_m@epita.fr>
17849
17850 * src/bison.simple: Add %%user_code directive at the end.
17851 * src/reader.c (read_additionnal_code): New.
17852 (reader): Use it.
17853 * src/output.c (output_program): Remove.
17854 (output): Update.
17855
17856 2001-08-28 Marc Autret <autret_m@epita.fr>
17857
17858 * src/output.c (output_actions): Clean up.
17859 (output_gram): CPP-out useless code.
17860 * src/reader.c (reader): Clean up, CPP-out useless code.
17861
17862 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
17863
17864 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
17865 directive.
17866 * src/bison.simple: Add `%%definitions'.
17867
17868 2001-08-28 Marc Autret <autret_m@epita.fr>
17869
17870 * config/depcomp: New file.
17871
17872 2001-08-27 Paul Eggert <eggert@twinsun.com>
17873
17874 * src/bison.simple (yyparse): Don't take the address of an
17875 item before the start of an array, as that doesn't conform to
17876 the C Standard.
17877
17878 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17879
17880 * src/output.c (output): Remove the initialization of the macro
17881 obstack. It was done too late here.
17882
17883 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
17884 completely wrong.
17885 (reader): Initialize the macro obstack here, since we need it to grow
17886 '%define' directives.
17887
17888 * src/reader.h: Declare the macro obstack as extern.
17889
17890 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17891
17892 * src/output.c (output_parser): Fix. Store single '%' characters in
17893 the output obstack instead of throwing them away.
17894
17895 2001-08-27 Akim Demaille <akim@epita.fr>
17896
17897 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17898
17899 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17900
17901 * lib/Makefile.am: Adjust.
17902
17903 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17904
17905 * src/bison.simple: Update and add '%%' directives.
17906
17907 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17908
17909 * src/reader.c (reader): Remove calls to 'output_headers' and
17910 'output_trailers'. Remove some C output.
17911 (readgram): Disable a piece of code that was writing a default
17912 definition for 'YYSTYPE'.
17913 (reader_output_yylsp): Remove.
17914 (packsymbols): Output token defintions to a macro.
17915 (copy_definition): Disable C output.
17916
17917 * src/reader.c (parse_macro_decl): New function used to parse macro
17918 declarations.
17919 (copy_string2): Put the body of copy_string into this new function.
17920 Add a parameter to let the caller choose whether he wants to copy the
17921 string delimiters or not.
17922 (copy_string): Be a simple call to copy_string2 with the last argument
17923 bound to true.
17924 (read_declarations): Add case for macro definition.
17925 (copy_identifier): New.
17926 (parse_macro_decl): Read macro identifiers using copy_identifier
17927 rather than lex.
17928
17929 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17930
17931 * src/output.c (prepare): Add prefixed names.
17932 (output_parser): Output semantic actions.
17933 (output_parser): Fix bug on '%%line' directives.
17934
17935 * src/output.c (output_headers): Remove. The C code printed by this
17936 function should now be in the skeletons.
17937 (output_trailers): Remove.
17938 (output): Disable call to 'reader_output_yylsp'.
17939 (output_rule_data): Do not output tables to the table obstack.
17940
17941 * src/output.c: Remove some C dedicated output.
17942 Improve the use of macro and output obstacks.
17943 (output_defines): Remove.
17944
17945 * src/output.c (output_token_translations): Associate 'translate'
17946 table with a macro. No output to the table obstack.
17947 (output_gram): Same for 'rhs' and 'prhs'.
17948 (output_stos): Same for 'stos'.
17949 (output_rule_data): Same for 'r1' and 'r2'.
17950 (token_actions): Same for 'defact'.
17951 (goto_actions): Same for 'defgoto'.
17952 (output_base): Same for 'pact' and 'pgoto'.
17953 (output_table): Same for 'table'.
17954 (output_check): Same for 'check'.
17955
17956 * src/output.c (output_table_data): New function.
17957 (output_short_table): Remove.
17958 (output_short_or_char_table): Remove.
17959
17960 * src/output.c (output_parser): Replace most of the skeleton copy code
17961 with something new. Skeletons are now processed character by character
17962 rather than line by line, and Bison looks for '%%' macros. This is the
17963 first step in making Bison's output process (a lot) more flexible.
17964 (output_parser): Use the macro table.
17965
17966 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17967
17968 * src/main.c (main): Initialize the macro table.
17969
17970 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17971
17972 * src/lex.c (percent_table): Add tok_define.
17973 * src/lex.h: Add tok_define.
17974
17975 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17976
17977 * src/macrotab.c: New file.
17978 * src/macrotab.h: New file.
17979 * src/Makefile.am: Update.
17980
17981 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17982
17983 * lib/hash.c: New file.
17984 * lib/hash.h: New file.
17985 * lib/Makefile.am: Update.
17986
17987 2001-08-15 Akim Demaille <akim@epita.fr>
17988
17989 Version 1.28c.
17990
17991 2001-08-15 Marc Autret <autret_m@epita.fr>
17992
17993 * src/reader.c (readgram): Indent output macro YYSTYPE.
17994 (packsymbols): Likewise.
17995 (output_token_defines): Likewise.
17996 * src/files.c: Standardize.
17997 (compute_header_macro): New.
17998 (defines_obstack_save): New. Use compute_header_macro.
17999 (output_files): Update. Use defines_obstack_save.
18000
18001 2001-08-15 Akim Demaille <akim@epita.fr>
18002
18003 * doc/bison.texinfo (Table of Symbols): Document
18004 YYSTACK_USE_ALLOCA.
18005
18006 2001-08-15 Akim Demaille <akim@epita.fr>
18007
18008 * missing: Update from CVS Automake.
18009 * config/config.guess, config/config.sub, config/texinfo.tex:
18010 Update from gnu.org.
18011
18012 2001-08-15 Akim Demaille <akim@epita.fr>
18013
18014 * Makefile.maint: Sync with CVS Autoconf.
18015
18016 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
18017
18018 * doc/bison.texinfo: Include GNU Free Documentation License from
18019 `fdl.texi'.
18020 * doc/fdl.texi: Add to package.
18021
18022 2001-08-14 Marc Autret <autret_m@epita.fr>
18023
18024 Turn on %{source,header}_extension features.
18025
18026 * src/lex.c (percent_table): Un-CPP out header_extension and
18027 source_extension.
18028 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
18029 (compute_exts_from_src): Remove conditions. It restores priorities
18030 between options.
18031
18032 2001-08-14 Marc Autret <autret_m@epita.fr>
18033
18034 * src/files.c (compute_base_names): Add extensions computing when
18035 `--file-prefix' used.
18036 Standardize function calls.
18037
18038 2001-08-13 Marc Autret <autret_m@epita.fr>
18039
18040 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
18041 defining it (defined but null disables alloca).
18042
18043 2001-08-13 Marc Autret <autret_m@epita.fr>
18044
18045 * src/bison.simple (_yy_memcpy): CPP reformat.
18046
18047 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
18048
18049 * tests/atconfig.in (CPPFLAGS): Fix.
18050
18051 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
18052
18053 * doc/bison.texinfo: Include GNU General Public License from
18054 `gpl.texi'.
18055 * doc/gpl.texi: Add to package.
18056
18057 2001-08-10 Marc Autret <autret_m@epita.fr>
18058
18059 * src/print_graph.h: Fix.
18060 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18061
18062 2001-08-10 Akim Demaille <akim@epita.fr>
18063
18064 * src/system.h: Provide default declarations for stpcpy, strndup,
18065 and strnlen.
18066
18067 2001-08-10 Robert Anisko <anisko_r@epita.fr>
18068
18069 * doc/bison.texinfo (Locations): Update @$ stuff.
18070
18071 2001-08-09 Robert Anisko <anisko_r@epita.fr>
18072
18073 * src/bison.simple (YYLLOC_DEFAULT): Update.
18074 (yyparse): Adjust.
18075
18076 2001-08-08 Marc Autret <autret_m@epita.fr>
18077
18078 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
18079 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18080 Reported by Fabrice Bauzac.
18081
18082 2001-08-08 Marc Autret <autret_m@epita.fr>
18083
18084 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18085 * src/vcg.c (output_node): Fix.
18086 * src/vcg.h: Cleanup.
18087 * src/print_graph.c: Add comments.
18088 (node_output_size): New global variable. Simplify the formatting of
18089 the VCG graph output.
18090 (print_actions): Unused code is now used. It notifies the final state
18091 and no action states in the VCG graph. It also give the reduce actions.
18092 The `shift and goto' edges are red and the `go to state' edges are
18093 blue.
18094 Get the current node name and node_obstack by argument.
18095 (node_obstack): New variable.
18096 (print_state): Manage node_obstack.
18097 (print_core): Use node_obstack given by argument.
18098 A node is not only computed here but in print_actions also.
18099 (print_graph): CPP out useless code instead of commenting it.
18100
18101 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
18102
18103 * tests/atconfig.in (CPPFLAGS): Fix.
18104
18105 2001-08-07 Akim Demaille <akim@epita.fr>
18106
18107 * src/print_graph.c (quote): New.
18108 (print_core): Use it.
18109
18110 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
18111
18112 * src/vcg.c (complain.h): Include it.
18113 Unepitaize `return' invocations.
18114 [NDEBUG] (main): Remove.
18115 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
18116 * src/files.c (open_files): Initialize graph_obstack.
18117 * src/print_graph.c (print_actions): CPP out useless code.
18118 (print_core): Don't output the last `\n' in labels.
18119 Use `quote'.
18120 * src/files.c (output_files): Output the VCG file.
18121 * src/main.c (main): Invoke print_graph ();
18122
18123 2001-08-06 Marc Autret <autret_m@epita.fr>
18124
18125 Automaton VCG graph output.
18126 Using option ``-g'' or long option ``--graph'', you can generate
18127 a gram_filename.vcg file containing a VCG description of the LALR (1)
18128 automaton of your grammar.
18129
18130 * src/main.c: Call to print_graph() function.
18131 * src/getargs.h: Update.
18132 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18133 (graph_flag): New flag.
18134 (longopts): Update.
18135 (getargs): Add case `g'.
18136 * src/files.c (graph_obstack): New obstack struct.
18137 (open_files): Initialize new obstack.
18138 (output_files): Saves graph_obstack if required.
18139 * src/files.h (graph_obstack): New extern declaration.
18140 * src/Makefile.am: Add new source files.
18141
18142 2001-08-06 Marc Autret <autret_m@epita.fr>
18143
18144 * src/print_graph.c, src/print_graph.h (graph): New.
18145 * src/vcg.h: New file.
18146 * src/vcg.c: New file, VCG graph handling.
18147
18148 2001-08-06 Marc Autret <autret_m@epita.fr>
18149
18150 Add of %source_extension and %header_extension which specify
18151 the source or/and the header output file extension.
18152
18153 * src/files.c (compute_base_names): Remove initialisation of
18154 src_extension and header_extension.
18155 (compute_exts_from_gf): Update.
18156 (compute_exts_from_src): Update.
18157 (output_files): Update.
18158 * src/reader.c (parse_header_extension_decl): New.
18159 (parse_source_extension_decl): New.
18160 (read_declarations): New case statements for the new tokens.
18161 * src/lex.c (percent_table): Add entries for %source_extension
18162 and %header_extension.
18163 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18164
18165 2001-08-06 Marc Autret <autret_m@epita.fr>
18166
18167 * configure.in: Bump to 1.28c.
18168 * doc/bison.texinfo: Texinfo thingies.
18169
18170 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
18171
18172 * tests/atconfig.in (CPPFLAGS): Add.
18173 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18174
18175 2001-08-03 Akim Demaille <akim@epita.fr>
18176
18177 Version 1.28b.
18178
18179 2001-08-03 Akim Demaille <akim@epita.fr>
18180
18181 * tests/Makefile.am (check-local): Ship testsuite.
18182 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18183 Include `string.h'.
18184
18185 2001-08-03 Akim Demaille <akim@epita.fr>
18186
18187 * configure.in: Try using -Wformat when compiling.
18188
18189 2001-08-03 Akim Demaille <akim@epita.fr>
18190
18191 * configure.in: Bump to 1.28b.
18192
18193 2001-08-03 Akim Demaille <akim@epita.fr>
18194
18195 * src/complain.c: Adjust strerror_r portability issues.
18196
18197 2001-08-03 Akim Demaille <akim@epita.fr>
18198
18199 Version 1.28a.
18200
18201 2001-08-03 Akim Demaille <akim@epita.fr>
18202
18203 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18204 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18205 * src/getargs.c: Include complain.h.
18206 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18207 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18208
18209 2001-08-03 Akim Demaille <akim@epita.fr>
18210
18211 * src/reader.c (readgram): Display hidden chars in error messages.
18212
18213 2001-08-03 Akim Demaille <akim@epita.fr>
18214
18215 Update to gettext 0.10.39.
18216
18217 2001-08-03 Akim Demaille <akim@epita.fr>
18218
18219 * lib/strspn.c: New.
18220
18221 2001-08-01 Marc Autret <autret_m@epita.fr>
18222
18223 * doc/bison.texinfo: Update.
18224 * doc/bison.1 (mandoc): Update.
18225 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18226 * src/files.c: Support output files extensions computing.
18227 (src_extension): New static variable.
18228 (header_extension): New static variable.
18229 (tr): New function.
18230 (get_extension_index): New function, gets the index of an extension
18231 filename in a string.
18232 (compute_exts_from_gf): New function, computes extensions from the
18233 grammar file extension.
18234 (compute_exts_from_src): New functions, computes extensions from the
18235 C source file extension, file given by ``-o'' option.
18236 (compute_base_names): Update.
18237 (output_files): Update.
18238
18239 2001-08-01 Robert Anisko <anisko_r@epita.fr>
18240
18241 * doc/bison.texi: Document @$.
18242 (Locations): New section.
18243
18244 2001-07-18 Akim Demaille <akim@epita.fr>
18245
18246 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18247 * config/prev-version.txt, config/move-if-change: New.
18248 * Makefile.am: Adjust.
18249
18250 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
18251
18252 * src/bison.simple (yyparse): Suppress warning `comparaison
18253 between signed and unsigned'.
18254
18255 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
18256
18257 * src/getargs.h (raw_flag): Remove.
18258 * src/getargs.c: Die on `-r'/`--raw'.
18259 * src/lex.c (parse_percent_token): Die on `%raw'.
18260 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18261 * tests/calc.at: Suppress test with option `--raw'.
18262
18263 2001-07-14 Akim Demaille <akim@epita.fr>
18264
18265 * config/: New.
18266 * configure.in: Require Autoconf 2.50.
18267 Update to gettext 0.10.38.
18268
18269 2001-03-16 Akim Demaille <akim@epita.fr>
18270
18271 * doc/bison.texinfo: ANSIfy the examples.
18272
18273 2001-03-16 Akim Demaille <akim@epita.fr>
18274
18275 * getargs.c (skeleton): New variable.
18276 (longopts): --skeleton is a new option.
18277 (shortopts, getargs): -S is a new option.
18278 * getargs.h: Declare skeleton.
18279 * output.c (output_parser): Use it.
18280
18281 2001-03-16 Akim Demaille <akim@epita.fr>
18282
18283 * m4/strerror_r.m4: New.
18284 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18285 * lib/error.h, lib/error.c: Update.
18286
18287 2001-03-16 Akim Demaille <akim@epita.fr>
18288
18289 * src/getargs.c (longopts): Clean up.
18290
18291 2001-02-21 Akim Demaille <akim@epita.fr>
18292
18293 * src/reader.c (gensym): `gensym_count' is your own.
18294 Use a static buf to create the symbol name, as token_buffer is no
18295 longer a buffer.
18296
18297 2001-02-08 Akim Demaille <akim@epita.fr>
18298
18299 * src/conflicts.c (conflict_report): Be sure not to append to res
18300 between two calls, which could happen if both first sprintf were
18301 skipped, but not the first cp += strlen.
18302
18303 2001-02-08 Akim Demaille <akim@epita.fr>
18304
18305 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18306 New, from fileutils 4.0.37.
18307 * configure.in: Require Autoconf 2.49c. I took some time before
18308 making this decision. This is the only way out for portability
18309 issues in Bison, it would mean way too much duplicate effort to
18310 import in Bison features implemented in 2.49c since 2.13.
18311 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18312
18313 2001-02-02 Akim Demaille <akim@epita.fr>
18314
18315 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18316 * lib/xalloc.h, lib/xmalloc.c: Update.
18317
18318 2001-01-19 Akim Demaille <akim@epita.fr>
18319
18320 Get rid of the ad hoc handling of token_buffer in the scanner: use
18321 the obstacks.
18322
18323 * src/lex.c (token_obstack): New.
18324 (init_lex): Initialize it. No longer call...
18325 (grow_token_buffer): this. Remove it.
18326 Adjust all the places which used it to use the obstack.
18327
18328 2001-01-19 Akim Demaille <akim@epita.fr>
18329
18330 * src/lex.h: Rename all the tokens:
18331 s/\bENDFILE\b/tok_eof/g;
18332 s/\bIDENTIFIER\b/tok_identifier/g;
18333 etc.
18334 Let them be enums, not #define, to ease debugging.
18335 Adjust all the code.
18336
18337 2001-01-18 Akim Demaille <akim@epita.fr>
18338
18339 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18340 * src/lex.c (maxtoken, grow_token_buffer): Static.
18341
18342 2001-01-18 Akim Demaille <akim@epita.fr>
18343
18344 Since we now use obstacks, more % directives can be enabled.
18345
18346 * src/lex.c (percent_table): Also accept `%yacc',
18347 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18348 `%debug'.
18349 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18350 instead of returning a token.
18351 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18352 * src/reader.c (read_declarations): Adjust.
18353 * src/files.c (open_files): Don't call `compute_base_names', don't
18354 compute `attrsfile' since they depend upon data which might be
18355 *in* the input file now.
18356 (output_files): Do it here.
18357 * src/output.c (output_headers): Document the fact that this patch
18358 introduces a guaranteed SEGV for semantic parsers.
18359 * doc/bison.texinfo: Document them.
18360 * tests/suite.at: Exercise these %options.
18361
18362 2000-12-20 Akim Demaille <akim@epita.fr>
18363
18364 Also handle the output file (--verbose) with obstacks.
18365
18366 * files.c (foutput): Remove.
18367 (output_obstack): New.
18368 Adjust all dependencies.
18369 * src/conflicts.c: Return a string.
18370 * src/system.h (obstack_grow_string): Rename as...
18371 (obstack_sgrow): this. Be ready to work with non literals.
18372 (obstack_fgrow4): New.
18373
18374 2000-12-20 Akim Demaille <akim@epita.fr>
18375
18376 * src/files.c (open_files): Fix the computation of short_base_name
18377 in the case of `-o foo.tab.c'.
18378
18379 2000-12-20 Akim Demaille <akim@epita.fr>
18380
18381 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18382 (copy_dollar): Now that everything uses obstacks, get rid of the
18383 FILE * parameters.
18384
18385 2000-12-20 Akim Demaille <akim@epita.fr>
18386
18387 * src/files.c (open_files): Actually the `.output' file is based
18388 on the short_base_name, not base_name.
18389 * tests/suite.at (Checking output file names): Adjust.
18390
18391 2000-12-20 Akim Demaille <akim@epita.fr>
18392
18393 * src/bison.s1: Remove, we now use directly...
18394 * src/bison.simple: this.
18395 * src/Makefile.am: Use pkgdata instead of data.
18396
18397 2000-12-20 Akim Demaille <akim@epita.fr>
18398
18399 * src/files.c (guard_obstack): New.
18400 (open_files): Initialize it.
18401 (output_files): Dump it...
18402 * src/files.h: Export it.
18403 * src/reader.c (copy_guard): Use it.
18404
18405 2000-12-19 Akim Demaille <akim@epita.fr>
18406
18407 * src/files.c (outfile, defsfile, actfile): Removed as global
18408 vars.
18409 (open_files): Don't compute them.
18410 (output_files): Adjust.
18411 (base_name, short_base_name): Be global.
18412 Adjust dependencies.
18413
18414 2000-12-19 Akim Demaille <akim@epita.fr>
18415
18416 * src/files.c (strsuffix): New.
18417 (stringappend): Be just like strcat but allocate.
18418 (base_names): Eve out from open_files.
18419 Try to simplify the rather hairy computation of base_name and
18420 short_base_name.
18421 (open_files): Use it.
18422 * tests/suite.at (Checking output file names): New test.
18423
18424 2000-12-19 Akim Demaille <akim@epita.fr>
18425
18426 * src/system.h (obstack_grow_literal_string): Rename as...
18427 (obstack_grow_string): this.
18428 * src/output.c (output_parser): Recognize `%% actions' instead of
18429 `$'.
18430 * src/bison.s1: s/$/%% actions/.
18431 * src/bison.hairy: Likewise.
18432
18433 2000-12-19 Akim Demaille <akim@epita.fr>
18434
18435 * src/output.c (output_parser): Compute the `#line' lines when
18436 there are.
18437 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18438 Suggested by Hans Aberg.
18439
18440 2000-12-19 Akim Demaille <akim@epita.fr>
18441
18442 Let the handling of the skeleton files be local to the procedures
18443 that use it.
18444
18445 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18446 longer static.
18447 (fparser, open_extra_files): Remove.
18448 (open_files, output_files): Don't take care of fparser.
18449 * src/files.h: Adjust.
18450 * src/output.c (output_parser): Open and close the file to the
18451 skeleton.
18452 * src/reader.c (read_declarations): When %semantic_parser, open
18453 fguard.
18454
18455 2000-12-19 Akim Demaille <akim@epita.fr>
18456
18457 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18458 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18459
18460 2000-12-19 Akim Demaille <akim@epita.fr>
18461
18462 * src/files.c (open_files): Yipee! We no longer need all the code
18463 looking for `/tmp' since we have no tmp file.
18464
18465 2000-12-19 Akim Demaille <akim@epita.fr>
18466
18467 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18468 New macros.
18469 * src/files.c (open_files): Less dependency on MSDOS etc.
18470
18471 2000-12-14 Akim Demaille <akim@epita.fr>
18472
18473 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18474 Provide a default definition.
18475 Use it when executing the default @ action.
18476 * src/reader.c (reader_output_yylsp): No longer include
18477 `timestamp' and `text' in the default YYLTYPE.
18478
18479 2000-12-12 Akim Demaille <akim@epita.fr>
18480
18481 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18482 (copy_guard): Quote the file names.
18483 Reported by Laurent Mascherpa.
18484
18485 2000-12-12 Akim Demaille <akim@epita.fr>
18486
18487 * src/output.c (output_headers, output_program, output): Be sure
18488 to escape special characters when outputting filenames.
18489 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18490 (output_headers): Don't depend on them, Use ACTSTR.
18491
18492 2000-11-17 Akim Demaille <akim@epita.fr>
18493
18494 * lib/obstack.h: Formatting changes.
18495 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18496 prevents type checking.
18497 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18498 cast the value to (void *): assigning a `foo *' to a `void *'
18499 variable is valid.
18500 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18501 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18502 append characters.
18503
18504 2000-11-17 Akim Demaille <akim@epita.fr>
18505
18506 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18507 as...
18508 (suite.m4, regression.m4, calc.m4): these.
18509 * tests/atgeneral.m4: Update from CVS Autoconf.
18510
18511 2000-11-17 Akim Demaille <akim@epita.fr>
18512
18513 * tests/regression.m4 (%union and --defines): New test,
18514 demonstrating a current bug in the obstack implementation.
18515
18516 2000-11-17 Akim Demaille <akim@epita.fr>
18517
18518 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18519 macros.
18520 Use them to declare the variables which are global or local to
18521 `yyparse'.
18522
18523 2000-11-17 Akim Demaille <akim@epita.fr>
18524
18525 * acconfig.h: Remove, no longer used.
18526
18527 2000-11-07 Akim Demaille <akim@epita.fr>
18528
18529 * src: s/Copyright (C)/Copyright/g.
18530
18531 2000-11-07 Akim Demaille <akim@epita.fr>
18532
18533 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18534 defining.
18535 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18536
18537 2000-11-07 Akim Demaille <akim@epita.fr>
18538
18539 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18540 Merge in a single CPP if/else.
18541
18542 2000-11-07 Akim Demaille <akim@epita.fr>
18543
18544 * src/output.c (output): Remove useless variables.
18545 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18546 argument `data' for consistency with the prototypes.
18547 Qualify it `const'.
18548 (obstack_copy, obstack_copy0): Rename the second argument as
18549 `address' for consistency. Qualify it `const'.
18550 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18551 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18552 `const' their input argument (`data' or `address').
18553 Adjust the corresponding macros to include `const' in casts.
18554
18555 2000-11-03 Akim Demaille <akim@epita.fr>
18556
18557 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18558 s/PFILE1/BISON_HAIRY/.
18559 Adjust dependencies.
18560
18561 2000-11-03 Akim Demaille <akim@epita.fr>
18562
18563 For some reason, this was not applied.
18564
18565 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18566 `unlink': it's no longer used.
18567
18568 2000-11-03 Akim Demaille <akim@epita.fr>
18569
18570 * src/files.c (skeleton_find): New function, eved out of...
18571 (open_files, open_extra_files): here.
18572
18573 2000-11-03 Akim Demaille <akim@epita.fr>
18574
18575 Don't use `atexit'.
18576
18577 * src/files.c (obstack_save): New function.
18578 (done): Rename as...
18579 (output_files): this.
18580 Use `obstack_save'.
18581 * src/main.c (main): Don't use `atexit' to register `done', since
18582 it no longer has to remove tmp files, just call `output_files'
18583 when there are no errors.
18584
18585 2000-11-02 Akim Demaille <akim@epita.fr>
18586
18587 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18588 `unlink': it's no longer used.
18589 * src/files.h: Formatting changes.
18590
18591 2000-11-02 Akim Demaille <akim@epita.fr>
18592
18593 Remove the last uses of mktemp and unlink/delete.
18594
18595 * src/files.c (fdefines, ftable): Removed.
18596 (defines_ostack, table_obstack): New.
18597 Adjust dependencies of the former into uses of the latter.
18598 * src/output.c (output_short_or_char_table, output_short_table):
18599 Convert to using obstacks.
18600 * src/reader.c (copy_comment2): Accept one FILE * and two
18601 obstacks.
18602 (output_token_defines, reader_output_yylsp): Use obstacks.
18603 * src/system.h (obstack_fgrow3): New.
18604 * po/POTFILES.in: Adjust.
18605
18606 2000-11-01 Akim Demaille <akim@epita.fr>
18607
18608 Change each use of `fattrs' into a use of `attrs_obstack'.
18609
18610 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18611 * src/files.c (fattrs): Remove.
18612 (attrs_obstack): New.
18613 Adjust all dependencies.
18614 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18615
18616 2000-11-01 Akim Demaille <akim@epita.fr>
18617
18618 Introduce obstacks.
18619 Change each use of `faction' into a use of `action_obstack'.
18620
18621 * lib/obstack.h, lib/obstack.c: New files.
18622 * src/files.c (faction): Remove.
18623 (action_obstack): New.
18624 Adjust all dependencies.
18625
18626 2000-10-20 Akim Demaille <akim@epita.fr>
18627
18628 * lib/quote.h (PARAMS): New macro. Use it.
18629
18630 2000-10-16 Akim Demaille <akim@epita.fr>
18631
18632 * src/output.c (output_short_or_char_table): New function.
18633 (output_short_table, output_token_translations): Use it.
18634 (goto_actions): Use output_short_table.
18635
18636 2000-10-16 Akim Demaille <akim@epita.fr>
18637
18638 * src/symtab.c (bucket_new): New function.
18639 (getsym): Use it.
18640
18641 * src/output.c (output_short_table): New argument to display the
18642 comment associated with the table.
18643 Adjust dependencies.
18644 (output_gram): Use it.
18645 (output_rule_data): Nicer output layout for YYTNAME.
18646
18647 2000-10-16 Akim Demaille <akim@epita.fr>
18648
18649 * src/lex.c (read_typename): New function.
18650 (lex): Use it.
18651 * src/reader.c (copy_dollar): Likewise.
18652
18653 2000-10-16 Akim Demaille <akim@epita.fr>
18654
18655 * src/reader.c (copy_comment2): Expect the input stream to be on
18656 the `/' which is suspected to open a comment, instead of being
18657 called after `//' or `/*' was read.
18658 (copy_comment, copy_definition, parse_union_decl, copy_action)
18659 (copy_guard): Adjust.
18660
18661 2000-10-16 Akim Demaille <akim@epita.fr>
18662
18663 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18664 `read_signed_integer'.
18665
18666 2000-10-16 Akim Demaille <akim@epita.fr>
18667
18668 * src/reader.c (copy_dollar): New function.
18669 (copy_guard, copy_action): Use it.
18670
18671 2000-10-16 Akim Demaille <akim@epita.fr>
18672
18673 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18674 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18675 New files, from Fileutils 4.0.27.
18676 * src/main.c (printable_version): Remove.
18677 * src/lex.c, src/reader.c: Use `quote'.
18678
18679 2000-10-04 Akim Demaille <akim@epita.fr>
18680
18681 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18682
18683 2000-10-04 Akim Demaille <akim@epita.fr>
18684
18685 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18686
18687 2000-10-04 Akim Demaille <akim@epita.fr>
18688
18689 When a literal string is used to define two different tokens,
18690 `bison -v' segfaults.
18691 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18692
18693 * tests/regression.m4: New file.
18694 Include the core of the sample provided by Piotr Gackiewicz.
18695 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18696 properly.
18697
18698 2000-10-04 Akim Demaille <akim@epita.fr>
18699
18700 * src/reader.c (parse_expect_decl): Keep `count' within the size
18701 of `buffer'.
18702 From Neil Booth.
18703
18704 2000-10-02 Paul Eggert <eggert@twinsun.com>
18705
18706 * bison.s1 (yyparse): Assign the default value
18707 unconditionally, to avoid a GCC warning and make the parser a
18708 tad smaller.
18709
18710 2000-10-02 Akim Demaille <akim@epita.fr>
18711
18712 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18713 options.
18714
18715 2000-10-02 Akim Demaille <akim@epita.fr>
18716
18717 * src/derives.c, src/print.c, src/reduce.c: To ease the
18718 translation, move some `\n' out of the translated strings.
18719
18720 2000-10-02 Akim Demaille <akim@epita.fr>
18721
18722 The location tracking mechanism is precious for parse error
18723 messages. Nevertheless, it is enabled only when `@n' is used in
18724 the grammar, which is a different issue (you can use it in error
18725 message, but not in the grammar per se). Therefore, there should
18726 be another means to enable it.
18727
18728 * src/getargs.c (getargs): Support `--locations'.
18729 (usage): Report it.
18730 * src/getargs.h (locationsflag): Export it.
18731 * src/lex.c (percent_table): Support `%locations'.
18732 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18733 with `locationsflag'.
18734 * doc/bison.texinfo: Document `--locations' and `%locations'.
18735 Sort the options.
18736 * tests/calc.m4: Test it.
18737
18738 For regularity of the names, replace each
18739 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18740 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18741 In addition replace each `flag' with `_flag'.
18742
18743 2000-10-02 Akim Demaille <akim@epita.fr>
18744
18745 Also test parse error messages, including with YYERROR_VERBOSE.
18746
18747 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18748 associative).
18749 Use it to check the computations.
18750 Use it to check `nonassoc' is honored.
18751 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18752 `--yyerror-verbose'.
18753 (_AT_CHECK_CALC): Adjust to this option.
18754 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18755
18756 2000-10-02 Akim Demaille <akim@epita.fr>
18757
18758 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18759 the latter demonstrates a flaw in the handling of non debugging
18760 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18761 was used in order to simplify:
18762
18763 #if YYDEBUG
18764 if (yydebug)
18765 {
18766 ...
18767 }
18768 #endif
18769
18770 into
18771
18772 if (yydebug)
18773 {
18774 ...
18775 }
18776
18777 unfortunately this leads to a CPP conflict when
18778 `--name-prefix=foo' is used since it produces `#define yydebug
18779 foodebug'.
18780
18781 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18782 (YYDPRINTF): New macro.
18783 Spread its use.
18784 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18785 the bison options.
18786 Also test `--verbose', `--defines' and `--name-prefix'.
18787
18788 2000-10-02 Akim Demaille <akim@epita.fr>
18789
18790 Improve the readability of the produced parsers.
18791
18792 * src/bison.s1: Formatting changes.
18793 Improve the comment related to the `$' mark.
18794 (yydefault): Don't fall through to `yyresume': `goto' there.
18795 * src/output.c (output_parser): When the `$' is met, skip the end
18796 of its line.
18797 New variable, `number_of_dollar_signs', to check there's exactly
18798 one `$' in the parser skeleton.
18799
18800 2000-10-02 Akim Demaille <akim@epita.fr>
18801
18802 * lib/xstrdup.c: New file, from the fileutils.
18803 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18804 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18805 instead of strlen + xmalloc + strcpy.
18806 * src/symtab.c (copys): Remove, use xstrdup instead.
18807
18808 2000-10-02 Akim Demaille <akim@epita.fr>
18809
18810 * src/gram.h (associativity): New enum type which replaces the
18811 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18812 `right_assoc', `left_assoc' and `non_assoc'.
18813 Adjust all dependencies.
18814 * src/reader.c: Formatting changes.
18815 (LTYPESTR): Don't define it, use it as a literal in
18816 `reader_output_yylsp'.
18817 * src/symtab.h (symbol_class): New enum type which replaces the
18818 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18819 `sunknown', `stoken and `snterm'.
18820
18821 2000-10-02 Akim Demaille <akim@epita.fr>
18822
18823 * src/getargs.c (fixed_outfiles): Rename as...
18824 (yaccflag): for consistency and accuracy.
18825 Adjust dependencies.
18826
18827 2000-10-02 Akim Demaille <akim@epita.fr>
18828
18829 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18830 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18831 difficult and introduced a lot of core dump. It turns out that
18832 Bison used an implementation of `xmalloc' based on `calloc', and
18833 at various places it does depend upon the initialization to 0. I
18834 have not tried to isolate the pertinent places, and all the former
18835 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18836 someone should address this issue.
18837
18838 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18839 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18840 files.
18841 Adjust dependencies.
18842 * src/warshall.h: New file.
18843 Propagate.
18844
18845 2000-10-02 Akim Demaille <akim@epita.fr>
18846
18847 Various anti-`extern in *.c' changes.
18848
18849 * src/system.h: Include `assert.h'.
18850
18851 2000-10-02 Akim Demaille <akim@epita.fr>
18852
18853 * src/state.h (nstates, final_state, first_state, first_shift)
18854 (first_reduction): Move their exportation from here...
18855 * src/LR0.h: to here.
18856 Adjust dependencies.
18857 * src/getargs.c (statisticsflag): New variable.
18858 Add support for `--statistics'.
18859 Adjust dependencies.
18860
18861 Remove a lot of now useless `extern' statements in most files.
18862
18863 2000-10-02 Akim Demaille <akim@epita.fr>
18864
18865 * src/LR0.h: New file.
18866 Propagate its use.
18867
18868 2000-10-02 Akim Demaille <akim@epita.fr>
18869
18870 * src/print.h: New file.
18871 Propagate its use.
18872 * src/print.c: Formatting and ordering changes.
18873 (verbose, terse): Replace with...
18874 (print_results): this new function.
18875 Adjust dependencies.
18876
18877 2000-10-02 Akim Demaille <akim@epita.fr>
18878
18879 * src/conflicts.c (conflict_report): New function.
18880 (conflict_log, verbose_conflict_log): Replace with...
18881 (print_conflicts): this function.
18882 Adjust dependencies.
18883 * src/conflicts.h: New file.
18884 Propagate its inclusion.
18885
18886 2000-10-02 Akim Demaille <akim@epita.fr>
18887
18888 * src/nullable.h: New file.
18889 Propagate its inclusion.
18890 * src/nullable.c: Formatting changes.
18891
18892 2000-10-02 Akim Demaille <akim@epita.fr>
18893
18894 * src/reduce.h: New file.
18895 Propagate its inclusion.
18896 * src/reduce.c: Topological sort and other formatting changes.
18897 (bool, TRUE, FALSE): Move their definition to...
18898 * src/system.h: here.
18899
18900 2000-10-02 Akim Demaille <akim@epita.fr>
18901
18902 * src/files.c: Formatting changes.
18903 (tryopen, tryclose, openfiles): Rename as...
18904 (xfopen, xfclose, open_files): this.
18905 (stringappend): static.
18906 * src/files.h: Complete the list of exported symbols.
18907 Propagate its use.
18908
18909 2000-10-02 Akim Demaille <akim@epita.fr>
18910
18911 * src/reader.h: New file.
18912 Propagate its use instead of tedious list of `extern' and
18913 prototypes.
18914 * src/reader.c: Formatting changes, topological sort,
18915 s/register//.
18916
18917 2000-10-02 Akim Demaille <akim@epita.fr>
18918
18919 * src/lex.h: Prototype `lex.c' exported functions.
18920 * src/reader.c: Adjust.
18921 * src/lex.c: Formatting changes.
18922 (safegetc): Rename as...
18923 (xgetc): this.
18924
18925 2000-10-02 Akim Demaille <akim@epita.fr>
18926
18927 * src/lalr.h: New file.
18928 Propagate its inclusion instead of prototypes and `extern'.
18929 * src/lalr.c: Formatting changes, topological sorting etc.
18930
18931 2000-10-02 Akim Demaille <akim@epita.fr>
18932
18933 * src/output.c (token_actions): Introduce a temporary array,
18934 YYDEFACT, that makes it possible for this function to use
18935 output_short_table.
18936
18937 2000-10-02 Akim Demaille <akim@epita.fr>
18938
18939 `user_toknums' is output as a `short[]' in `output.c', while it is
18940 defined as a `int[]' in `reader.c'. For consistency with the
18941 other output tables, `user_toknums' is now defined as a table of
18942 shorts.
18943
18944 * src/reader.c (user_toknums): Be a short table instead of an int
18945 table.
18946 Adjust dependencies.
18947
18948 Factor the short table outputs.
18949
18950 * src/output.c (output_short_table): New function.
18951 * src/output.c (output_gram, output_stos, output_rule_data)
18952 (output_base, output_table, output_check): Use it.
18953
18954 2000-10-02 Akim Demaille <akim@epita.fr>
18955
18956 * src/output.c (output): Topological sort of the functions, in
18957 order to get rid of the `static' prototypes.
18958 No longer use `register'.
18959 * src/output.h: New file.
18960 Propagate its inclusion in files explicitly prototyping functions
18961 from output.c.
18962
18963 2000-09-21 Akim Demaille <akim@epita.fr>
18964
18965 * src/atgeneral.m4: Update from Autoconf.
18966
18967 2000-09-21 Akim Demaille <akim@epita.fr>
18968
18969 * src/closure.h: New file.
18970 * src/closure.c: Formatting changes, topological sort over the
18971 functions, use of closure.h.
18972 (initialize_closure, finalize_closure): Rename as...
18973 (new_closure, free_closure): these. Adjust dependencies.
18974 * src/LR0.c: Formatting changes, topological sort, use of
18975 cloture.h.
18976 (initialize_states): Rename as...
18977 (new_states): this.
18978 * src/Makefile.am (noinst_HEADERS): Adjust.
18979
18980 2000-09-20 Akim Demaille <akim@epita.fr>
18981
18982 * src/acconfig.h: Don't protect config.h against multiple
18983 inclusion.
18984 Don't define PARAMS.
18985 * src/system.h: Define PARAMS.
18986 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
18987 purpose of config.h. system.h must not try to fix wrong
18988 definitions in config.h.
18989
18990 2000-09-20 Akim Demaille <akim@epita.fr>
18991
18992 * src/derives.h: New file.
18993 * src/main.c, src/derives.h: Use it.
18994 Formatting changes.
18995 * src/Makefile.am (noinst_HEADERS): Adjust.
18996
18997 2000-09-20 Akim Demaille <akim@epita.fr>
18998
18999 * tests/atgeneral.m4: Update from Autoconf.
19000 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19001 (AT_CHECK_CALC): New macros.
19002 Use these macros to test bison with options `', `--raw',
19003 `--debug', `--yacc', `--yacc --debug'.
19004
19005 2000-09-19 Akim Demaille <akim@epita.fr>
19006
19007 * src/output.c: Formatting changes.
19008 * src/machine.h: Remove, leaving its contents in...
19009 * src/system.h: here.
19010 Include stdio.h.
19011 Adjust all dependencies on stdio.h and machine.h.
19012 * src/getargs.h: New file.
19013 Let all `extern' declarations about getargs.c be replaced with
19014 inclusion of `getargs.h'.
19015 * src/Makefile.am (noinst_HEADERS): Adjust.
19016
19017 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19018 scope.
19019 (yyerror): Returns void, not int.
19020 * doc/bison.texinfo: Formatting changes.
19021
19022 2000-09-19 Akim Demaille <akim@epita.fr>
19023
19024 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19025 portable.
19026
19027 2000-09-18 Akim Demaille <akim@epita.fr>
19028
19029 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19030 * src/Makefile.am (INCLUDES): Don't.
19031 Be ready to fetch headers in lib/.
19032
19033 2000-09-18 Akim Demaille <akim@epita.fr>
19034
19035 * doc/bison.texinfo: Update the copyright.
19036 ANSIfy and GNUify the examples.
19037 Remove the old menu.
19038
19039 2000-09-18 Akim Demaille <akim@epita.fr>
19040
19041 First set of tests: use the `calc' example from the documentation.
19042
19043 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19044 is defined only when YYDEBUG is.
19045 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19046 * src/files.c (tryopen, tryclose): Formatting changes.
19047 Move to the top and be static.
19048 * src/reader.c (read_signed_integer): Likewise.
19049 * tests/calc.m4: New file.
19050 * Makefile.am, suite.m4: Adjust.
19051 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19052
19053 2000-09-18 Akim Demaille <akim@epita.fr>
19054
19055 Add support for an Autotest test suite for Bison.
19056
19057 * m4/m4.m4, m4/atconfig.m4: New files.
19058 * m4/Makefile.am (EXTRA_DIST): Adjust.
19059 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19060 files.
19061 * src/getargs.c: Display a more standard --version message.
19062 * src/reader.c (reader): Formatting changes.
19063 No longer depend upon VERSION_STRING.
19064 * configure.in: No longer use `dnl'.
19065 Set up the test suite and the new directory `tests/.
19066 (VERSION_STRING): Remove.
19067
19068 2000-04-14 Akim Demaille <akim@epita.fr>
19069
19070 * src/reader.c (copy_comment2): New function, same as former
19071 `copy_comment', but outputs into two FILE *.
19072 (copy_comment): Use it.
19073 (parse_union_decl): Use it.
19074 (get_type, parse_start_decl): Use the same `invalid' message.
19075 (parse_start_decl, parse_union_decl): Use the same `multiple'
19076 message.
19077 (parse_union_decl, copy_guard, copy_action): Use the same
19078 `unmatched' message.
19079 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19080
19081 2000-03-31 Akim Demaille <akim@epita.fr>
19082
19083 * src/files.c (tryopen, tryclose): Move to the top.
19084 Be static.
19085
19086 2000-03-31 Akim Demaille <akim@epita.fr>
19087
19088 * src/main.c (main): Don't call `done', exit does it.
19089
19090 2000-03-31 Akim Demaille <akim@epita.fr>
19091
19092 * allocate.c: s/return (foo)/return foo/.
19093 * lalr.c: Likewise.
19094 * LR0.c: Likewise.
19095 * output.c: Likewise.
19096 * reader.c: Likewise.
19097 * symtab.c: Likewise.
19098 * vmsgetargs.c: Likewise.
19099
19100 2000-03-31 Akim Demaille <akim@epita.fr>
19101
19102 Clean up the error reporting functions.
19103
19104 * src/report.c: New file.
19105 * src/report.h: Likewise.
19106 * src/Makefile.am: Adjust.
19107 * m4/error.m4: New file.
19108 * m4/Makefile.am: Adjust.
19109 * configure.in (jm_PREREQ_ERROR): Call it.
19110 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19111 Remove.
19112 (fatal, fatals): Remove. All callers use complain.c::fatal.
19113 (warn, warni, warns, warnss, warnss): Remove. All callers use
19114 complain.c::complain.
19115 (toomany): Remove, use fatal instead.
19116 * src/files.c (done): No argument, use complain_message_count.
19117 * src/main.c (main): Register `done' to `atexit'.
19118
19119 * src/getargs.c (usage): More `fputs', less `fprintf'.
19120
19121 2000-03-28 Akim Demaille <akim@epita.fr>
19122
19123 * lib/: New directory.
19124 * Makefile.am (SUBDIRS): Adjust.
19125 * configure.in: Adjust.
19126 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19127 useless.
19128 * src/alloca.c: Moved to lib/.
19129 * src/getopt.c: Likewise.
19130 * src/getopt1.c: Likewise.
19131 * src/getopt.h: Likewise.
19132 * src/ansi2knr.c: Likewise.
19133 * src/ansi2knr.1: Likewise.
19134 * src/Makefile.am: Adjust.
19135 * lib/Makefile.am: New file.
19136
19137 2000-03-28 Akim Demaille <akim@epita.fr>
19138
19139 * src/getargs.c (usage): Refresh the help message.
19140
19141 2000-03-17 Akim Demaille <akim@epita.fr>
19142
19143 * src/getopt1.c: Updated from textutils 2.0e
19144 * src/getopt.c: Likewise.
19145 * src/getopt.h: Likewise.
19146
19147 2000-03-17 Akim Demaille <akim@epita.fr>
19148
19149 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19150 the file name, not the whole `#line LINE FILE'.
19151
19152 2000-03-17 Akim Demaille <akim@epita.fr>
19153
19154 On syntax errors, report the token on which we choked.
19155
19156 * src/bison.s1 (yyparse): In the label yyerrlab, when
19157 YYERROR_VERBOSE, add yychar in msg.
19158
19159 2000-03-17 Akim Demaille <akim@epita.fr>
19160
19161 * src/reader.c (copy_at): New function.
19162 (copy_guard): Use it.
19163 (copy_action): Use it.
19164
19165 2000-03-17 Akim Demaille <akim@epita.fr>
19166
19167 Be kind to translators, save some useless translations.
19168
19169 * src/main.c (banner): New function.
19170 (fatal_banner): Use it.
19171 (warn_banner): Use it.
19172
19173 2000-03-17 Akim Demaille <akim@epita.fr>
19174
19175 * src/reader.c (copy_definition): Use copy_string and
19176 copy_comment. Removed now unused `match', `ended',
19177 `cplus_comment'.
19178 (copy_comment, copy_string): Moved, to be visible from
19179 copy_definition.
19180
19181 2000-03-17 Akim Demaille <akim@epita.fr>
19182
19183 * src/reader.c (copy_string): Declare `static inline'. No
19184 problems with inline, since it is checked by configure.
19185 (copy_comment): Likewise.
19186
19187 2000-03-17 Akim Demaille <akim@epita.fr>
19188
19189 * src/reader.c (packsymbols): Formatting changes.
19190
19191 2000-03-17 Akim Demaille <akim@epita.fr>
19192
19193 * src/reader.c (copy_comment): New function, factored out from:
19194 (copy_action): Use it. Removed now unused `match', `ended',
19195 `cplus_comment'.
19196 (copy_guard): Likewise.
19197
19198 2000-03-17 Akim Demaille <akim@epita.fr>
19199
19200 * src/reader.c (copy_string): New function, factored out from:
19201 (copy_action): Use it.
19202 (copy_guard): Likewise.
19203
19204 2000-03-17 Akim Demaille <akim@epita.fr>
19205
19206 Change the handling of @s so that they behave exactly like $s.
19207 There is now a pseudo variable @$ (readble and writable), location
19208 of the lhs of the rule (by default ranging from the location of
19209 the first symbol of the rhs, to the location of the last symbol,
19210 or, if the rhs is empty, YYLLOC).
19211
19212 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19213 yyval.
19214 (yyparse): When providing a default semantic action, provide a
19215 default location action.
19216 (after the $): No longer change `*YYLSP', just stack YYLOC the
19217 same way you stack YYVAL.
19218 * src/reader.c (read_declarations): Use warns.
19219 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19220 (copy_action, case '@'): Likewise.
19221 Use a standard error message, to save useless work from
19222 translators.
19223
19224 2000-03-17 Akim Demaille <akim@epita.fr>
19225
19226 * src/bison.s1: Formatting and cosmetics changes.
19227 * src/reader.c: Likewise.
19228 Update the Copyright notice.
19229
19230 2000-03-17 Akim Demaille <akim@epita.fr>
19231
19232 * src/bison.s1 (#line): All set to `#line' only, since the
19233 Makefile now handles them.
19234
19235 2000-03-16 Akim Demaille <akim@epita.fr>
19236
19237 * src/output.c (output_rule_data): Output the documentation of
19238 some of the tables.
19239 (Copyright notice): Update.
19240 Formatting changes.
19241
19242 2000-03-16 Akim Demaille <akim@epita.fr>
19243
19244 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19245 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19246 One `#if YYDEBUG' remains, since it uses variables which are
19247 defined only if `YYDEBUG != 0'.
19248
19249 2000-03-16 Akim Demaille <akim@epita.fr>
19250
19251 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19252 and related variables so that the similarities are highlighted.
19253
19254 2000-03-16 Akim Demaille <akim@epita.fr>
19255
19256 * src/bison.s1: Properly indent CPP directives.
19257
19258 2000-03-16 Akim Demaille <akim@epita.fr>
19259
19260 * src/bison.s1: Properly indent the `alloca' CPP section.
19261
19262 2000-03-16 Akim Demaille <akim@epita.fr>
19263
19264 Do not hard code values of directories in `configure.in'.
19265 Update the `configure' tool chain.
19266
19267 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19268 src/makefile.am.
19269 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19270 (AC_OUTPUT): Add m4/Makefile.
19271 Bump to bison 1.28a, 1.29 has never been released.
19272 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19273 handled via src/Makefile.am.
19274 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19275 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19276 autoheader.
19277 * Makefile.am (SUBDIRS): Add m4.
19278 (ACLOCAL_AM_FLAGS): New variable.
19279 (AUTOMAKE_OPTIONS): Add check-news.
19280 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19281 the proper line number and file name.
19282 (DEFS): Propagate the location of bison library files and of the
19283 locale files.
19284 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19285 builddir.
19286 * acinclude.m4: Remove, replaced by the directory m4.
19287 * m4/Makefile.am (EXTRA_DIST): New variable.
19288 * m4/gettext.m4: New file, from the fileutils.
19289 * m4/lcmessage.m4: Likewise
19290 * m4/progtest.m4: Likewise.
19291 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19292
19293 2000-03-10 Akim Demaille <akim@epita.fr>
19294
19295 * src/closure.c:
19296 Formatting changes of various comments.
19297 Respect the GNU coding standards at various places.
19298 Don't use `_()' when no translation is needed.
19299
19300 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19301
19302 * src/files.c:
19303 OS/2 honors TMPDIR environment variable.
19304
19305 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19306
19307 * doc/bison.texinfo: Tweaked spelling and grammar.
19308 Updated ISBN.
19309 Removed reference to price of printed copy.
19310 Mention BISON_SIMPLE and BISON_HAIRY.
19311
19312 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19313
19314 * configure.in, NEWS:
19315 Bison 1.29 released.
19316
19317 1999-10-27 Jesse Thilo <jthilo@gnu.org>
19318
19319 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19320 Added reference card.
19321
19322 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19323
19324 * po/ru.po: Added Russian translation.
19325
19326 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19327
19328 * configure.in: Added Russian translation.
19329
19330 1999-07-06 Jesse Thilo <jthilo@gnu.org>
19331
19332 * configure.in, NEWS, README:
19333 Released version 1.28.
19334
19335 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19336
19337 * src/system.h:
19338 Squashed redefinition warning on some systems.
19339
19340 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19341 Have configure build version string instead of relying on ANSI string
19342 concatentation.
19343
19344 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19345
19346 * po/POTFILES.in: Got rid of version.c.
19347
19348 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19349
19350 * acconfig.h, configure.in:
19351 Have configure build version string instead of relying on ANSI string
19352 concatentation.
19353
19354 1999-06-08 Jesse Thilo <jthilo@gnu.org>
19355
19356 * doc/bison.1:
19357 Dropped mention of `+' for long-named options.
19358
19359 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19360
19361 * src/files.c: Added <unistd.h> for unlink().
19362
19363 * src/Makefile.am, src/system.h:
19364 I18n fixes.
19365
19366 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19367
19368 * README: Added a FAQ list.
19369
19370 * configure.in, acconfig.h:
19371 I18n fixes.
19372
19373 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19374
19375 * doc/FAQ, doc/Makefile.am:
19376 Added a FAQ list.
19377
19378 1999-05-19 Jesse Thilo <jthilo@gnu.org>
19379
19380 * src/alloc.h, src/symtab.h, src/version.c:
19381 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19382
19383 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19384
19385 * src/.cvsignore, src/Makefile.am:
19386 Reorganized: sources in `src', documentation in `doc'.
19387
19388 * src/lex.c (literalchar):
19389 fixed the code for escaping double quotes (thanks
19390 Jonathan Czisny.)
19391
19392 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19393
19394 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19395 Adjusted paths to reflect directory reorganization.
19396
19397 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19398
19399 * doc/.cvsignore, doc/Makefile.am:
19400 Reorganized: sources in `src', documentation in `doc'.
19401
19402 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19403
19404 * configure.in:
19405 Updated AC_INIT file to reflect directory reorganization.
19406
19407 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19408 Reorganized: sources in `src', documentation in `doc'.
19409
19410 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19411
19412 * src/allocate.c:
19413 Don't declare calloc() and realloc() if not necessary.
19414
19415 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19416
19417 * configure.in, acconfig.h, acinclude.m4:
19418 Don't declare calloc() and realloc() if not necessary.
19419
19420 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19421
19422 * po/.cvsignore: Added i18n support.
19423
19424 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19425
19426 * acconfig.h, configure.in, Makefile.am:
19427 Added i18n support.
19428
19429 1999-03-22 Jesse Thilo <jthilo@gnu.org>
19430
19431 * src/bison.s1: Fixed #line numbers.
19432
19433 1999-03-15 Jesse Thilo <jthilo@gnu.org>
19434
19435 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19436 Added PO files from Translation Project.
19437
19438 1999-03-03 Jesse Thilo <jthilo@gnu.org>
19439
19440 * Makefile.am:
19441 Added support for non-ANSI compilers (ansi2knr).
19442
19443 1999-02-16 Jesse Thilo <jthilo@gnu.org>
19444
19445 * configure.in: Bumped version number to 1.27.
19446
19447 * Makefile.am:
19448 Added `bison.simple' to list of files removed by `make distclean'.
19449
19450 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19451
19452 * src/files.c, src/files.h:
19453 Defined locations of parser files in config.h instead of Makefile.
19454
19455 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19456
19457 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19458 Defined locations of parser files in config.h instead of Makefile.
19459
19460 1999-02-09 Jesse Thilo <jthilo@gnu.org>
19461
19462 * Makefile.am:
19463 Removed inappropriate use of $< macro.
19464
19465 1999-02-05 Jesse Thilo <jthilo@gnu.org>
19466
19467 * po/Makefile.in.in, po/POTFILES.in:
19468 Add `po' directory skeleton.
19469
19470 1999-01-27 Jesse Thilo <jthilo@gnu.org>
19471
19472 * README: Document help-bison list.
19473
19474 * configure.in: Add check for mkstemp().
19475
19476 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19477
19478 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19479 Hush a few compiler warnings.
19480
19481 * src/files.c:
19482 Add tryclose(), which verifies that fclose was successful.
19483 Hush a couple of compiler warnings.
19484
19485 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19486
19487 * Makefile.am, OChangeLog:
19488 ChangeLog is now automatically generated. Include the old version as
19489 OChangeLog.
19490
19491 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19492
19493 * 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:
19494 Update FSF address.
19495
19496 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19497
19498 * doc/bison.texinfo: Fix formatting glitch.
19499
19500 * doc/bison.texinfo: Update FSF address.
19501
19502 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19503
19504 * acconfig.h: Update FSF address.
19505
19506 1999-01-08 Jesse Thilo <jthilo@gnu.org>
19507
19508 * src/system.h:
19509 Don't define PACKAGE here, since config.h defines it.
19510
19511 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19512
19513 * src/reader.c: Update copyright date.
19514
19515 * src/main.c:
19516 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19517 favor of output directly to stderr (avoids buffer overruns).
19518
19519 * src/reader.c: Some checks for premature EOF.
19520
19521 * 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:
19522 Use prototypes if the compiler understands them.
19523
19524 * src/files.c: Honor TMPDIR on Unix hosts.
19525 Use prototypes if the compiler understands them.
19526
19527 * src/reader.c:
19528 Fix a couple of buffer overrun bugs.
19529 Use prototypes if the compiler understands them.
19530
19531 * src/system.h: Include unistd.h and ctype.h.
19532 Use #ifdef instead of #if for NLS symbols.
19533
19534 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19535
19536 * doc/bison.texinfo:
19537 Delete comment "consider using @set for edition number, etc..." since
19538 we now are doing so.
19539
19540 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19541
19542 * configure.in:
19543 Use prototypes if the compiler understands them.
19544
19545 * NEWS: Document 1.26 highlights.
19546
19547 * Makefile.am: Require Automake 1.3 or later.
19548
19549 * acconfig.h:
19550 Use prototypes if the compiler understands them.
19551
19552 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19553
19554 * src/version.c:
19555 Use VERSION symbol from automake for version number.
19556
19557 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19558
19559 * acconfig.h, configure.in, version.cin:
19560 Use VERSION symbol from automake for version number.
19561
19562 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19563
19564 * Makefile.am:
19565 Distribute original version of simple parser (bison.s1), not built
19566 version (bison.simple).
19567
19568 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19569
19570 * doc/bison.texinfo: Add info dir entry.
19571
19572 * doc/bison.texinfo:
19573 Let automake put version number into documentation.
19574
19575 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19576
19577 * src/bison.cld, src/build.com, src/vmshlp.mar:
19578 Add non-RCS files from /gd/gnu/bison.
19579
19580 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19581
19582 * doc/bison.1:
19583 Document the BISON_HAIRY and BISON_SIMPLE variables.
19584
19585 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19586
19587 * src/version.c: Build version.c automatically.
19588
19589 * src/reader.c:
19590 Fix token numbering (used to start at 258, not 257).
19591
19592 * src/system.h: Include config.h.
19593
19594 * src/getargs.c: Update bug report address.
19595
19596 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19597 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19598
19599 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19600
19601 * Makefile.am:
19602 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19603
19604 * configure.in, version.cin:
19605 Build version.c automatically.
19606
19607 * AUTHORS: Add AUTHORS file.
19608
19609 * README: Update bug report address.
19610
19611 * bison.simple:
19612 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19613
19614 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19615 Add automake stuff.
19616
19617 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19618
19619 * doc/bison.texinfo: Clean up some formatting.
19620
19621 1998-05-05 Richard Stallman <rms@gnu.org>
19622
19623 * doc/bison.texinfo:
19624 Explain better why to make a pure parser.
19625
19626 1998-01-05 Richard Stallman <rms@gnu.org>
19627
19628 * src/files.c (openfiles):
19629 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19630 find a temporary directory, if possible. Do not unlink files while
19631 they are open.
19632
19633 1997-08-25 Richard Stallman <rms@gnu.org>
19634
19635 * src/reader.c (stack_offset;):
19636 Change some warni to warns.
19637
19638 * src/lex.c (literalchar): Use warns, not warni.
19639
19640 1997-06-28 Richard Stallman <rms@gnu.org>
19641
19642 * src/bison.s1: Add a Bison version comment.
19643
19644 * src/main.c (fatal, warn, berror):
19645 Use program_name.
19646
19647 1997-06-28 Richard Stallman <rms@gnu.org>
19648
19649 * Makefile.in (bison_version): New variable.
19650 (dist): Use that variable.
19651 (bison.s1): Substitute the Bison version into bison.simple.
19652
19653 * bison.simple: Add a Bison version comment.
19654
19655 1997-06-18 Richard Stallman <rms@gnu.org>
19656
19657 * src/main.c (fatal, warn, berror):
19658 Make error messages standard.
19659 (toomany): Improve error message text.
19660
19661 * 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:
19662 new.h renamed to alloc.h.
19663
19664 1997-06-18 Richard Stallman <rms@gnu.org>
19665
19666 * Makefile.in: new.h renamed to alloc.h.
19667
19668 1997-05-24 Richard Stallman <rms@gnu.org>
19669
19670 * src/lex.c (literalchar):
19671 Fix the code for escaping \, " and '.
19672
19673 (lex): Avoid trouble when there are many chars
19674 to discard in a char literal with just several chars in it.
19675
19676 1997-05-17 Richard Stallman <rms@gnu.org>
19677
19678 * src/bison.s1:
19679 Use malloc, if using alloca is troublesome.
19680 (YYSTACK_USE_ALLOCA): New flag macro.
19681 Define it for some systems and compilers.
19682 (YYSTACK_ALLOC): New macro.
19683 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19684 If it was malloc'd, free it.
19685
19686 1997-05-17 Richard Stallman <rms@gnu.org>
19687
19688 * bison.simple:
19689 Use malloc, if using alloca is troublesome.
19690 (YYSTACK_USE_ALLOCA): New flag macro.
19691 Define it for some systems and compilers.
19692 (YYSTACK_ALLOC): New macro.
19693 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19694 If it was malloc'd, free it.
19695
19696 1997-04-23 Richard Stallman <rms@gnu.org>
19697
19698 * src/bison.s1:
19699 (alloca) [__hpux]: Always define as __builtin_alloca.
19700
19701 1997-04-23 Richard Stallman <rms@gnu.org>
19702
19703 * bison.simple:
19704 (alloca) [__hpux]: Always define as __builtin_alloca.
19705
19706 1997-04-22 Richard Stallman <rms@gnu.org>
19707
19708 * src/bison.s1:
19709 [__hpux]: Include alloca.h (right for HPUX 10)
19710 instead of declaring alloca (right for HPUX 9).
19711
19712 * src/bison.s1 (__yy_memcpy):
19713 Declare arg `count' as unsigned int.
19714 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19715
19716 1997-04-22 Richard Stallman <rms@gnu.org>
19717
19718 * bison.simple:
19719 [__hpux]: Include alloca.h (right for HPUX 10)
19720 instead of declaring alloca (right for HPUX 9).
19721
19722 * bison.simple (__yy_memcpy):
19723 Declare arg `count' as unsigned int.
19724 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19725
19726 1997-01-03 Richard Stallman <rms@gnu.org>
19727
19728 * src/allocate.c: [__STDC__ or _MSC_VER]:
19729 Declare calloc and realloc to return void *.
19730
19731 1997-01-02 Richard Stallman <rms@gnu.org>
19732
19733 * src/system.h:
19734 [_MSC_VER]: Include stdlib.h and process.h.
19735 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19736
19737 * src/main.c (main): Return FAILURE as a value.
19738 (printable_version): Declare arg as int, not char.
19739
19740 1997-01-02 Richard Stallman <rms@gnu.org>
19741
19742 * Makefile.in (dist):
19743 Explicitly check for symlinks, and copy them.
19744
19745 1996-12-19 Richard Stallman <rms@gnu.org>
19746
19747 * src/files.c:
19748 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19749
19750 1996-12-18 Paul Eggert <eggert@gnu.org>
19751
19752 * src/bison.s1 (yyparse):
19753 If __GNUC__ and YYPARSE_PARAM are both defined,
19754 declare yyparse to have a void * argument.
19755
19756 1996-12-18 Paul Eggert <eggert@gnu.org>
19757
19758 * bison.simple (yyparse):
19759 If __GNUC__ and YYPARSE_PARAM are both defined,
19760 declare yyparse to have a void * argument.
19761
19762 1996-12-17 Richard Stallman <rms@gnu.org>
19763
19764 * src/reduce.c (nbits): Add some casts.
19765
19766 1996-08-12 Richard Stallman <rms@gnu.org>
19767
19768 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19769
19770 1996-08-12 Richard Stallman <rms@gnu.org>
19771
19772 * bison.simple: Test _MSDOS as well as _MSDOS_.
19773
19774 1996-07-31 Richard Stallman <rms@gnu.org>
19775
19776 * src/bison.s1:
19777 [__sun && __i386]: Include alloca.h.
19778
19779 1996-07-31 Richard Stallman <rms@gnu.org>
19780
19781 * bison.simple:
19782 [__sun && __i386]: Include alloca.h.
19783
19784 1996-07-30 Richard Stallman <rms@gnu.org>
19785
19786 * src/bison.s1: Comment change.
19787
19788 * src/bison.s1: Test _MSDOS_, not MSDOS.
19789
19790 1996-07-30 Richard Stallman <rms@gnu.org>
19791
19792 * bison.simple: Comment change.
19793
19794 * bison.simple: Test _MSDOS_, not MSDOS.
19795
19796 1996-06-01 Richard Stallman <rms@gnu.org>
19797
19798 * 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:
19799 Insert `_' macro around many string constants.
19800
19801 * src/main.c:
19802 Insert `_' macro around many string constants.
19803
19804 (main): Call setlocale, bindtextdomain and textdomain.
19805
19806 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19807 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19808 [ENABLE_NLS]: Include libintl.h.
19809 [ENABLE_NLS] (gettext): Define.
19810 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19811 (N_, PACKAGE, LOCALEDIR): New macros.
19812
19813 1996-06-01 Richard Stallman <rms@gnu.org>
19814
19815 * POTFILES.in: New file.
19816
19817 * Makefile.in (allocate.o):
19818 Define target explicitly.
19819
19820 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19821 (LDFLAGS): Set to @LDFLAGS@.
19822 (configure): Run autoconf only if preceding `cd' succeeds.
19823 (bison.s1): Redirect output to temporary file then move the
19824 temporary to the target, rather than redirecting directly to bison.s1.
19825 (clean): Remove config.status and config.log.
19826 (distclean): Don't remove config.status here.
19827
19828 1996-05-12 Richard Stallman <rms@gnu.org>
19829
19830 * src/bison.s1:
19831 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19832
19833 1996-05-12 Richard Stallman <rms@gnu.org>
19834
19835 * bison.simple:
19836 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19837
19838 1996-05-11 Richard Stallman <rms@gnu.org>
19839
19840 * src/bison.s1 (__yy_memcpy):
19841 Really reorder the args, as was supposedly done on Feb 14 1995.
19842 (yyparse): Calls changed accordingly.
19843
19844 1996-05-11 Richard Stallman <rms@gnu.org>
19845
19846 * Makefile.in (dist): Don't use $(srcdir).
19847
19848 * bison.simple (__yy_memcpy):
19849 Really reorder the args, as was supposedly done on Feb 14 1995.
19850 (yyparse): Calls changed accordingly.
19851
19852 1996-01-27 Richard Stallman <rms@gnu.org>
19853
19854 * src/output.c (output_rule_data):
19855 Test YYERROR_VERBOSE in the conditional
19856 around the definition of ttyname.
19857
19858 1995-12-29 Richard Stallman <rms@gnu.org>
19859
19860 * src/bison.s1:
19861 Fix line numbers in #line commands.
19862
19863 1995-12-29 Richard Stallman <rms@gnu.org>
19864
19865 * bison.simple:
19866 Fix line numbers in #line commands.
19867
19868 1995-12-27 Richard Stallman <rms@gnu.org>
19869
19870 * src/bison.s1 (YYPARSE_PARAM_DECL):
19871 In C++, make it always null.
19872 (YYPARSE_PARAM_ARG): New macro.
19873 (yyparse): Use YYPARSE_PARAM_ARG.
19874
19875 1995-12-27 Richard Stallman <rms@gnu.org>
19876
19877 * bison.simple (YYPARSE_PARAM_DECL):
19878 In C++, make it always null.
19879 (YYPARSE_PARAM_ARG): New macro.
19880 (yyparse): Use YYPARSE_PARAM_ARG.
19881
19882 1995-11-29 Richard Stallman <rms@gnu.org>
19883
19884 * doc/bison.texinfo:
19885 Describe literal string tokens, %raw, %no_lines, %token_table.
19886
19887 1995-11-29 Daniel Hagerty <hag@gnu.org>
19888
19889 * doc/bison.texinfo: Fixed update date
19890
19891 1995-10-16 Richard Stallman <rms@gnu.org>
19892
19893 * src/version.c: Version 1.25.
19894
19895 1995-10-16 Richard Stallman <rms@gnu.org>
19896
19897 * NEWS: *** empty log message ***
19898
19899 1995-10-16 Richard Stallman <rms@gnu.org>
19900
19901 * doc/bison.1, doc/bison.rnh:
19902 Add new options.
19903
19904 1995-10-15 Richard Stallman <rms@gnu.org>
19905
19906 * src/vmsgetargs.c, src/getargs.c:
19907 Added -n, -k, and -raw switches.
19908 (noparserflag, toknumflag, rawtoknumflag): New variables.
19909
19910 * src/symtab.h (SALIAS):
19911 New #define for adding aliases to %token.
19912 (struct bucket): Added `alias' field.
19913
19914 * src/reduce.c (reduce_grammar):
19915 Revise error message.
19916 (print_notices): Remove final `.' from error message.
19917
19918 * src/reader.c (reader_output_yylsp):
19919 New function.
19920 (readgram): Use `#if 0' around code that accepted %command
19921 inside grammar rules: The documentation doesn't allow it,
19922 and it will fail since the %command processors scan for the next %.
19923 (parse_token_decl): Extended the %token
19924 declaration to allow a multi-character symbol as an alias.
19925 (parse_thong_decl): New function.
19926 (read_declarations): Added %thong declarations.
19927 (read_declarations): Handle NOOP to deal with allowing
19928 % declarations as another means to specify the flags.
19929 (readgram): Allow %prec prior to semantics embedded in a rule.
19930 (skip_to_char, read_declarations, copy_definition)
19931 (parse_token_decl, parse_start_decl, parse_type_decl)
19932 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
19933 (get_type_name, copy_guard, copy_action, readgram)
19934 (get_type, packsymbols): Revised most error messages.
19935 Changed `fatal' to `warnxxx' to avoid aborting for error.
19936 Revised and use multiple warnxxx functions to avoid using VARARGS1.
19937 (read_declarations): Improve the error message for
19938 an invalid character. Do not abort.
19939 (read_declarations, copy_guard, copy_action): Use
19940 printable_version to avoid unprintable characters in printed output.
19941 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
19942 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
19943 Allow the type of a non-terminal can be given
19944 more than once, as long as all specifications give the same type.
19945
19946 * src/output.c:
19947 (output_headers, output_trailers, output, output_gram)
19948 (output_rule_data): Implement noparserflag variable.
19949 Implement toknumflag variable.
19950 (output): Call reader_output_yylsp to output LTYPESTR.
19951
19952 * src/main.c (main):
19953 If reader sees an error, don't process the grammar.
19954 (fatals): Updated to not use VARARGS1.
19955 (printable_version, int_to_string, warn, warni, warns, warnss)
19956 (warnsss): New error reporting functions. Avoid abort for error.
19957
19958 * src/lex.h:
19959 Added THONG and NOOP for alias processing.
19960 Added SETOPT for the new code that allows setting options with %flags.
19961
19962 * src/lex.c:
19963 Include getopt.h. Add some extern decls.
19964 (safegetc): New function to deal with EOF gracefully.
19965 (literalchar); new function to deal with reading \ escapes.
19966 (lex): Use literalchar.
19967 (lex): Implemented "..." tokens.
19968 (literalchar, lex, parse_percent_token): Made tokenbuffer
19969 always contain the token. This includes growing the token
19970 buffer while reading an integer.
19971 (parse_percent_token): Replaced if-else statement with percent_table.
19972 (parse_percent_token): Added % declarations as another
19973 way to specify the flags -n, -l, and -r. Also added hooks for
19974 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
19975 major changes to files.c.
19976 (lex) Retain in the incoming stream a character following
19977 an incorrect '/'.
19978 (skip_white_space, lex): Revised most error messages
19979 and changed fatal to warn to avoid aborting.
19980 (percent_table): Added %thong declarations.
19981
19982 * src/gram.h: Comment changes.
19983
19984 * src/files.c (openfiles, open_extra_files, done):
19985 Add faction flag
19986 and actfile file. Handle noparserflag. Both for -n switch.
19987
19988 * src/conflicts.c (resolve_sr_conflict):
19989 Remove use of alloca.
19990
19991 1995-06-01 Jim Meyering <meyering@gnu.org>
19992
19993 * doc/bison.texinfo: *** empty log message ***
19994
19995 1995-05-06 Richard Stallman <rms@gnu.org>
19996
19997 * src/bison.s1: Comment change.
19998
19999 1995-05-06 Richard Stallman <rms@gnu.org>
20000
20001 * bison.simple: Comment change.
20002
20003 1995-05-03 Richard Stallman <rms@gnu.org>
20004
20005 * src/version.c: Version now 1.24.
20006
20007 * src/bison.s1: Change distribution terms.
20008
20009 * src/version.c: Version now 1.23.
20010
20011 1995-05-03 Richard Stallman <rms@gnu.org>
20012
20013 * doc/bison.texinfo:
20014 Rewrite "Conditions for Using Bison".
20015 Update version to 1.24.
20016
20017 1995-05-03 Richard Stallman <rms@gnu.org>
20018
20019 * bison.simple: Change distribution terms.
20020
20021 1995-02-23 Richard Stallman <rms@gnu.org>
20022
20023 * src/files.c: Test __VMS_POSIX as well as VMS.
20024
20025 1995-02-14 Jim Meyering <meyering@gnu.org>
20026
20027 * src/bison.s1 (__yy_memcpy):
20028 Renamed from __yy_bcopy to avoid
20029 confusion. Reverse FROM and TO arguments to be consistent with
20030 those of memcpy.
20031
20032 1995-02-14 Jim Meyering <meyering@gnu.org>
20033
20034 * bison.simple (__yy_memcpy):
20035 Renamed from __yy_bcopy to avoid
20036 confusion. Reverse FROM and TO arguments to be consistent with
20037 those of memcpy.
20038
20039 1994-11-10 David J. MacKenzie <djm@gnu.org>
20040
20041 * NEWS: reformat
20042
20043 * NEWS: New file.
20044
20045 * Makefile.in (DISTFILES): Include NEWS.
20046
20047 * Makefile.in (DISTFILES):
20048 Include install-sh, not install.sh.
20049
20050 * configure.in: Update to Autoconf v2 macro names.
20051
20052 1994-10-05 David J. MacKenzie <djm@gnu.org>
20053
20054 * Makefile.in: fix typo
20055
20056 * Makefile.in (prefix, exec_prefix):
20057 Let configure set them.
20058
20059 1994-09-28 David J. MacKenzie <djm@gnu.org>
20060
20061 * Makefile.in: Set datadir to $(prefix)/share.
20062
20063 1994-09-15 Richard Stallman <rms@gnu.org>
20064
20065 * src/bison.s1:
20066 Update copyright notice and GPL version.
20067
20068 1994-09-15 Richard Stallman <rms@gnu.org>
20069
20070 * bison.simple:
20071 Update copyright notice and GPL version.
20072
20073 1994-07-12 Richard Stallman <rms@gnu.org>
20074
20075 * src/reduce.c, src/reader.c:
20076 entered into RCS
20077
20078 1994-05-05 David J. MacKenzie <djm@gnu.org>
20079
20080 * Makefile.in: entered into RCS
20081
20082 1994-03-26 Richard Stallman <rms@gnu.org>
20083
20084 * src/bison.s1: entered into RCS
20085
20086 1994-03-26 Richard Stallman <rms@gnu.org>
20087
20088 * bison.simple: entered into RCS
20089
20090 1994-03-25 Richard Stallman <rms@gnu.org>
20091
20092 * src/main.c: entered into RCS
20093
20094 1994-03-24 Richard Stallman <rms@gnu.org>
20095
20096 * src/conflicts.c: entered into RCS
20097
20098 1994-01-02 Richard Stallman <rms@gnu.org>
20099
20100 * Makefile.in: *** empty log message ***
20101
20102 1993-11-21 Richard Stallman <rms@gnu.org>
20103
20104 * src/bison.s1: *** empty log message ***
20105
20106 1993-11-21 Richard Stallman <rms@gnu.org>
20107
20108 * doc/bison.texinfo: entered into RCS
20109
20110 * doc/bison.texinfo: *** empty log message ***
20111
20112 1993-11-21 Richard Stallman <rms@gnu.org>
20113
20114 * bison.simple: *** empty log message ***
20115
20116 1993-10-25 David J. MacKenzie <djm@gnu.org>
20117
20118 * doc/bison.texinfo: *** empty log message ***
20119
20120 1993-10-19 Richard Stallman <rms@gnu.org>
20121
20122 * src/bison.s1: *** empty log message ***
20123
20124 1993-10-19 Richard Stallman <rms@gnu.org>
20125
20126 * bison.simple: *** empty log message ***
20127
20128 1993-10-14 Richard Stallman <rms@gnu.org>
20129
20130 * src/bison.s1: *** empty log message ***
20131
20132 1993-10-14 Richard Stallman <rms@gnu.org>
20133
20134 * bison.simple: *** empty log message ***
20135
20136 1993-09-14 David J. MacKenzie <djm@gnu.org>
20137
20138 * doc/bison.texinfo: *** empty log message ***
20139
20140 1993-09-13 Noah Friedman <friedman@gnu.org>
20141
20142 * Makefile.in: *** empty log message ***
20143
20144 1993-09-10 Richard Stallman <rms@gnu.org>
20145
20146 * src/conflicts.c: *** empty log message ***
20147
20148 * src/system.h: entered into RCS
20149
20150 1993-09-10 Richard Stallman <rms@gnu.org>
20151
20152 * doc/bison.1: entered into RCS
20153
20154 1993-09-06 Noah Friedman <friedman@gnu.org>
20155
20156 * src/version.c: entered into RCS
20157
20158 1993-09-06 Noah Friedman <friedman@gnu.org>
20159
20160 * Makefile.in: *** empty log message ***
20161
20162 1993-07-30 David J. MacKenzie <djm@gnu.org>
20163
20164 * Makefile.in: *** empty log message ***
20165
20166 1993-07-24 Richard Stallman <rms@gnu.org>
20167
20168 * src/bison.s1: *** empty log message ***
20169
20170 1993-07-24 Richard Stallman <rms@gnu.org>
20171
20172 * bison.simple: *** empty log message ***
20173
20174 1993-07-08 David J. MacKenzie <djm@gnu.org>
20175
20176 * Makefile.in: *** empty log message ***
20177
20178 1993-07-04 Richard Stallman <rms@gnu.org>
20179
20180 * src/bison.s1: *** empty log message ***
20181
20182 1993-07-04 Richard Stallman <rms@gnu.org>
20183
20184 * bison.simple: *** empty log message ***
20185
20186 1993-06-26 David J. MacKenzie <djm@gnu.org>
20187
20188 * src/getargs.c: entered into RCS
20189
20190 1993-06-26 David J. MacKenzie <djm@gnu.org>
20191
20192 * doc/bison.texinfo: *** empty log message ***
20193
20194 * doc/bison.1: New file.
20195
20196 1993-06-25 Richard Stallman <rms@gnu.org>
20197
20198 * src/getargs.c: New file.
20199
20200 1993-06-16 Richard Stallman <rms@gnu.org>
20201
20202 * src/bison.s1: *** empty log message ***
20203
20204 1993-06-16 Richard Stallman <rms@gnu.org>
20205
20206 * bison.simple: *** empty log message ***
20207
20208 1993-06-03 Richard Stallman <rms@gnu.org>
20209
20210 * src/bison.s1: New file.
20211
20212 1993-06-03 Richard Stallman <rms@gnu.org>
20213
20214 * doc/bison.texinfo: *** empty log message ***
20215
20216 1993-06-03 Richard Stallman <rms@gnu.org>
20217
20218 * bison.simple: New file.
20219
20220 1993-05-19 Richard Stallman <rms@gnu.org>
20221
20222 * doc/bison.texinfo: New file.
20223
20224 1993-05-07 Noah Friedman <friedman@gnu.org>
20225
20226 * Makefile.in: *** empty log message ***
20227
20228 1993-04-28 Noah Friedman <friedman@gnu.org>
20229
20230 * src/reader.c: *** empty log message ***
20231
20232 1993-04-23 Noah Friedman <friedman@gnu.org>
20233
20234 * src/alloc.h: entered into RCS
20235
20236 1993-04-20 David J. MacKenzie <djm@gnu.org>
20237
20238 * src/version.c: *** empty log message ***
20239
20240 * src/files.c, src/allocate.c:
20241 entered into RCS
20242
20243 * src/reader.c: *** empty log message ***
20244
20245 * src/lex.c: entered into RCS
20246
20247 * src/conflicts.c: New file.
20248
20249 * src/symtab.c: entered into RCS
20250
20251 * src/alloc.h: New file.
20252
20253 * src/LR0.c: entered into RCS
20254
20255 1993-04-18 Noah Friedman <friedman@gnu.org>
20256
20257 * src/reader.c: New file.
20258
20259 * src/version.c: *** empty log message ***
20260
20261 1993-04-18 Noah Friedman <friedman@gnu.org>
20262
20263 * Makefile.in: *** empty log message ***
20264
20265 1993-04-17 Noah Friedman <friedman@gnu.org>
20266
20267 * Makefile.in: *** empty log message ***
20268
20269 1993-04-15 Richard Stallman <rms@gnu.org>
20270
20271 * src/main.c, src/files.c:
20272 New file.
20273
20274 1993-04-15 Noah Friedman <friedman@gnu.org>
20275
20276 * configure.in: entered into RCS
20277
20278 * configure.in: *** empty log message ***
20279
20280 * configure.in: New file.
20281
20282 1993-04-14 Richard Stallman <rms@gnu.org>
20283
20284 * Makefile.in: New file.
20285
20286 1993-04-13 Richard Stallman <rms@gnu.org>
20287
20288 * src/version.c: New file.
20289
20290 1993-03-25 Richard Stallman <rms@gnu.org>
20291
20292 * src/output.c: entered into RCS
20293
20294 1992-09-25 Richard Stallman <rms@gnu.org>
20295
20296 * configure.bat: entered into RCS
20297
20298 1992-06-22 Richard Stallman <rms@gnu.org>
20299
20300 * src/vmsgetargs.c: entered into RCS
20301
20302 1992-06-22 Richard Stallman <rms@gnu.org>
20303
20304 * doc/bison.rnh: entered into RCS
20305
20306 1992-04-20 David J. MacKenzie <djm@gnu.org>
20307
20308 * README: entered into RCS
20309
20310 1992-01-22 Richard Stallman <rms@gnu.org>
20311
20312 * src/machine.h: entered into RCS
20313
20314 1991-12-21 Richard Stallman <rms@gnu.org>
20315
20316 * src/lalr.c, src/closure.c:
20317 entered into RCS
20318
20319 1991-12-20 Richard Stallman <rms@gnu.org>
20320
20321 * src/state.h: entered into RCS
20322
20323 1991-12-18 Richard Stallman <rms@gnu.org>
20324
20325 * src/print.c, src/nullable.c, src/derives.c:
20326 entered into RCS
20327
20328 1991-11-03 David J. MacKenzie <djm@gnu.org>
20329
20330 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20331 entered into RCS
20332
20333 1988-09-09 Richard Stallman <rms@gnu.org>
20334
20335 * src/bison.hairy: entered into RCS
20336
20337 1987-12-16 Richard Stallman <rms@gnu.org>
20338
20339 * REFERENCES: entered into RCS
20340
20341
20342 -----
20343
20344 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20345 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20346 Free Software Foundation, Inc.
20347
20348 Copying and distribution of this file, with or without
20349 modification, are permitted provided the copyright notice and this
20350 notice are preserved.
20351
20352 $Id$