]> git.saurik.com Git - bison.git/blob - ChangeLog
* doc/bison.texinfo: Fix a few typos.
[bison.git] / ChangeLog
1 2008-02-28 Akim Demaille <demaille@gostai.com>
2
3 * doc/bison.texinfo: Fix a few typos.
4
5 2008-02-28 Akim Demaille <akim@epita.fr>
6
7 * doc/bison.texinfo (Bison Options): Document -W.
8 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
9
10 2008-02-28 Akim Demaille <akim@epita.fr>
11
12 * src/getargs.c (short_options): Split and sort for readability.
13 -g and -x take optional arguments, just like their long options.
14 * build-aux/cross-options.pl: Use /x to make the regexp easier to
15 understand.
16 Fix the handling of $opt which resulted in all the argument to be
17 considered as optional.
18
19 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
20
21 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
22 say its interface is experimental.
23 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
24 Java.
25 (Bison Options): In the -L and --language entry, mention Java.
26 (Java Bison Interface): Say the interface is experimental.
27 * src/getargs.c (usage): Mention -L and --language.
28
29 * NEWS (2.3a+): Say the push parsing interface is experimental.
30 * doc/bison.texinfo (Push Decl): Likewise.
31 (Decl Summary): Likewise in the "%define api.push_pull" entry.
32 (Push Parser Function): Likewise.
33 (Pull Parser Function): Likewise.
34 (Parser Create Function): Likewise.
35 (Parser Delete Function): Likewise.
36 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
37 yypull_parse, and yypush_parse entries.
38
39 * NEWS (2.3a+): Mention XML support, and say the schema is
40 experimental.
41 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
42 * src/getargs.c (usage): Say the XML schema is experimental.
43
44 * NEWS (2.3a+): Say option instead of flag.
45
46 2008-02-21 Wojciech Polak <polak@gnu.org>
47
48 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
49 text.
50
51 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
52
53 Fix impure push parser compile error reported by Bob Rossi at
54 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
55 * data/yacc.c: Clean up whitespace in the output a little.
56 (yypstate_allocated): Define for impure push parsers regardless of
57 whether the pull interface is also requested.
58 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
59 check impure push parsers without the pull interface.
60
61 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
62 yyerror takes arguments specified by %parse-param while yypstate_new
63 does not.
64 * doc/bison.texinfo (Parser Create Function): Document that
65 yypstate_new returns 0 for multiple impure parser instances.
66 * tests/push.at (Push Parsing: Multiple impure instances): Update
67 expected stderr output.
68
69 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
70
71 * runtime-po/POTFILES.in (push.c): Remove.
72
73 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
74
75 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
76 * data/push.c: Rename to...
77 * data/yacc.c: ... this, overwriting it.
78 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
79 `%push-pull-parser' -> `%define api.push_pull "both"'.
80 Remove old yacc.c tests, and update push.c tests to yacc.c.
81
82 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
83
84 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
85 `"%code top" blocks' instead of `%code "top" blocks'.
86 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
87 Clean up whitespace in the output a little.
88
89 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
90
91 Fix documentation problems reported by Tim Josling at
92 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
93 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
94 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
95 integers. Explain the effect of literal string aliases on error
96 messages. Copy token 0 documentation from the C++ skeleton
97 documentation.
98
99 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
100
101 Accept a token number in a %left, %right, or %nonassoc for POSIX
102 conformance. Reported by Tim Josling at
103 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
104 * NEWS (2.3a+): Mention.
105 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
106 and code numbers are treated by precedence declarations.
107 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
108 of symbols.1.
109 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
110 of symbol.
111 (symbol.prec): New, just like symbol but allows INT.
112 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
113 longer holds.
114 * tests/regression.at (Token number in precedence declaration): New
115 test case.
116
117 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
118
119 DJGPP specific issues.
120 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
121 be changed. Copyright timestamp adjusted.
122 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
123 be changed. Copyright timestamp adjusted.
124 * djgpp/config.site: Copyright timestamp adjusted.
125 * djgpp/config_h.sed: Copyright timestamp adjusted.
126 * djgpp/djunpack.bat: Copyright timestamp adjusted.
127 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
128 filename translation list.
129 * djgpp/subpipe.c (init_subpipe): Check the environment variables
130 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
131 files shall be created. Before trying to use the temp dir where the
132 environment variable points to check that the dir really exists. If
133 not default to the cwd as temp dir. Copyright timestamp adjusted.
134 * djgpp/subpipe.h: Copyright timestamp adjusted.
135 * djgpp/testsuite.sed: Copyright timestamp adjusted.
136
137 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
138
139 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
140
141 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
142
143 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
144 Problem reported by Claudio Saavedra in
145 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
146
147 2008-01-05 Wojciech Polak <polak@gnu.org>
148
149 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
150 document's title with the input grammar file name.
151
152 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
153
154 Automate regression testing of the XML/XSLT implementation. Discussed
155 starting at
156 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
157 * configure.ac (XSLTPROC): New substitution.
158 * Makefile.am (maintainer-xml-check): New phony target invoking...
159 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
160 invoking make maintainer-check with BISON_TEST_XML=1.
161 * tests/atlocal.in (XSLTPROC): New.
162 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
163 not to report reachable memory when Bison is expected to have a
164 non-zero exit status and (2) to compare XML/XSLT output with --graph
165 and --report=all output for every working grammar when
166 BISON_TEST_XML=1.
167 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
168 (AT_BISON_CHECK_XML): New.
169 (AT_QUELL_VALGRIND): New.
170 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
171 (AT_CHECK): ... don't redefine this since this was the old way to
172 quell Valgrind.
173 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
174 AT_BISON_CHECK invocations.
175 * tests/c++.at: Likewise.
176 * tests/calc.at: Likewise.
177 * tests/conflicts.at: Likewise.
178 * tests/cxx-type.at: Likewise.
179 * tests/existing.at: Likewise.
180 * tests/glr-regression.at: Likewise.
181 * tests/headers.at: Likewise.
182 * tests/input.at: Likewise.
183 * tests/java.at: Likewise.
184 * tests/output.at: Likewise.
185 * tests/push.at: Likewise.
186 * tests/reduce.at: Likewise.
187 * tests/regression.at: Likewise.
188 * tests/sets.at: Likewise.
189 * tests/skeletons.at: Likewise.
190 * tests/synclines.at: Likewise.
191 * tests/torture.at: Likewise.
192 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
193 tends to hang xsltproc.
194 (Big horizontal): Likewise.
195
196 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
197
198 In XML output, remove redundant class attribute on symbol element.
199 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
200 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
201 look up a symbol to determine whether it's a nonterminal or terminal.
202 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
203 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
204
205 Add prec/assoc information to XML output.
206 * src/gram.c (grammar_rules_print_xml): For each rule that has a
207 %prec, add a percent_prec attribute.
208 * src/print-xml.c (print_grammar): For each terminal that has a
209 precedence or associativity, add a prec or assoc attribute.
210 (xml_indent): New.
211 (xml_puts): Use xml_indent.
212 (xml_printf): Use xml_indent.
213 * src/print-xml.h (xml_indent): Prototype.
214
215 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
216 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
217
218 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
219
220 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
221 (bison:ruleByNumber): ... this for clarity.
222 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
223 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
224 (xsl:template match="reduction"): Update.
225 (xsl:template match="item"): Update.
226 (xsl:template match="reduction"): Update.
227
228 In the XML output, don't print the list of rules where symbols appear.
229 Compute it in XSLT instead. Discussed at
230 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
231 * data/xslt/bison.xsl (bison:ruleByLhs): New.
232 (bison:ruleByRhs): New.
233 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
234 bison:ruleByRhs.
235 (xsl:template match="terminal/rule"): Remove.
236 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
237 bison:ruleByRhs.
238 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
239 Remove.
240 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
241 bison:ruleByRhs and mode="number-link" for rule template.
242 (xsl:template match="terminal/rule"): Remove.
243 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
244 bison:ruleByRhs and mode="number-link" for rule template.
245 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
246 Rewrite as...
247 (xsl:template match="rule" mode="number-link"): ... this.
248 * src/print-xml.c (print_grammar): Don't print the list of rules.
249
250 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
251
252 Don't let --report affect XML output; always print all information.
253 Discussed at
254 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
255 * src/conflicts.c (log_resolution): Implement.
256 * src/print-xml.c (print_core): Implement.
257 (print_state): Implement.
258 (print_xml): Implement.
259
260 * NEWS (2.3a+): Fix quotes.
261 * src/parse-gram.y (prologue_declaration): For consistency with -v,
262 don't let %verbose clear the list specified by --report.
263
264 2007-11-26 Akim Demaille <akim@epita.fr>
265
266 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
267
268 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
269
270 In the XML output, list useless and unused symbols and rules with the
271 useful ones and add a "usefulness" attribute. Discussed starting at
272 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
273 * src/gram.c (grammar_rules_partial_print_xml): Remove.
274 (grammar_rules_print_xml): Print all rules instead of just those
275 useful in the grammar, and add a "usefulness" attribute.
276 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
277 * src/print-xml.c (print_rules_useless_in_parser): Remove.
278 (print_grammar): Print all nonterminals instead of just useful ones,
279 and add a "usefulness" attribute to nonterminals and terminals.
280 (print_xml): Don't print a separate "reductions" or
281 "rules-useless-in-parser" element.
282 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
283 (reduce_xml): Remove.
284 (reduce_token_unused_in_grammar): New.
285 (reduce_nonterminal_useless_in_grammar): New.
286 * src/reduce.h (reduce_xml): Remove prototype.
287 (reduce_token_unused_in_grammar): Add prototype.
288 (reduce_nonterminal_useless_in_grammar): Add prototype.
289 * data/xslt/xml2text.xsl: Update for XML changes.
290 * data/xslt/xml2xhtml.xsl: Update for XML changes.
291 * tests/reduce.at (Useless Terminals): Update output.
292 (Useless Rules): Update output.
293 (Reduced Automaton): Update output.
294
295 Say "Terminals unused in grammar" instead of "Unused terminals".
296 * NEWS (2.3a+): Update.
297 * doc/bison.texinfo (Understanding): Update example output.
298 * src/reduce.c (reduce_output): Implement.
299 * data/xslt/xml2text.xsl: Implement.
300 * data/xslt/xml2xhtml.xsl: Implement.
301
302 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
303
304 Accept --report-file=FILE to override the default `.output' filename.
305 * NEWS (2.3a+): Mention.
306 * doc/bison.texinfo (Bison Options): Add an entry.
307 * src/files.c (compute_output_file_names): Don't override
308 spec_verbose_file if already set.
309 * src/getargs.c (usage): Document --report-file.
310 (REPORT_FILE_OPTION): New anonymous enum member.
311 (long_options): Add entry for it.
312 (getargs): Add case for it setting spec_verbose_file.
313
314 * build-aux/cross-options.pl: Don't record a short option just because
315 there's an arg.
316 * doc/.cvsignore: Add yacc.1.
317
318 2007-11-14 Akim Demaille <akim@epita.fr>
319
320 * doc/yacc.1.in: New.
321 * configure.ac, doc/Makefile.am: Adjust.
322 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
323 config.h symbol.
324 Use AC_SUBST for assignments too.
325 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
326
327 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
328
329 * src/gram.c: Remove comments that duplicate comments in gram.h.
330
331 When reporting useless rules and nonterminals, say "useless in grammar"
332 instead of "useless", and say "useless in parser" instead of "never
333 reduced". Discussed starting at
334 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
335 * NEWS (2.3a+): Mention this change.
336 * data/xslt/xml2text.xsl: Update output text and expected input XML
337 element names to match changes below.
338 * data/xslt/xml2xhtml.xsl: Likewise.
339 (xsl:template match="bison-xml-report"): Add missing entry in Table of
340 Contents: "Rules useless in parser due to conflicts".
341 * doc/bison.texinfo (Decl Summary): Reword a little.
342 (Understanding): Update example output for changes below.
343 * src/gram.c: (rule_useful_p): Rename to...
344 (rule_useful_in_grammar_p): ... this.
345 (rule_useless_p): Rename to...
346 (rule_useless_in_grammar_p): ... this.
347 (rule_never_reduced_p): Rename to...
348 (rule_useless_in_parser_p): ... this.
349 (grammar_rules_print): Update for renames.
350 (grammar_rules_print_xml): Update for renames.
351 (grammar_rules_never_reduced_report): Rename to...
352 (grammar_rules_useless_report): ... this since it is used for either
353 kind of useless rule.
354 * src/gram.h: Reword comments and update function names in prototypes.
355 * src/main.c (main): Say "rule useless in parser due to conflicts".
356 * src/print-xml.c (print_rules_never_reduced): Rename to...
357 (print_rules_useless_in_parser): ... this, and rename output XML
358 element "rules-never-reduced" to "rules-useless-in-parser".
359 (print_xml): Update for rename.
360 * src/print.c (print_results): Say "Rules useless in parser due to
361 conflicts".
362 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
363 (nonterminals_reduce): Say "nonterminal useless in grammar".
364 (reduce_output): Say "Nonterminals useless in grammar".
365 Say "Rules useless in grammar".
366 (reduce_xml): Rename output XML element "useless" to
367 "useless-in-grammar".
368 (reduce_print): Don't report the count of grammatically useless rules
369 as "rules never reduced" just because %yacc is specified.
370 In the correct report of this count, say nonterminal(s) and rule(s)
371 "useless in grammar".
372 * tests/conflicts.at (S/R in initial): Update expected output.
373 (Defaulted Conflicted Reduction): Likewise.
374 (Unreachable States After Conflict Resolution): Likewise.
375 * tests/existing.at (GNU pic Grammar): Likewise.
376 * tests/reduce.at (Useless Nonterminals): Likewise.
377 (Useless Rules): Likewise.
378 (Reduced Automaton): Likewise.
379 (Underivable Rules): Likewise.
380 (Empty Language): Likewise.
381
382 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
383
384 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
385 here document and before the EOF so that BSD's implementation of Bourne
386 shell doesn't parse the delimiter as part of the here document.
387 * doc/.cvsignore: Add cross-options.texi.
388 * src/getargs.c (usage): Add a blank line after the warning categories.
389
390 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
391
392 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
393
394 2007-11-05 Akim Demaille <akim@epita.fr>
395
396 Remove Id: from bison.1.
397 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
398 (perl -0777 -pi -e 's/\.PP\nId): New.
399 (.x.1): Use it to ignore the version control revision.
400
401 2007-11-05 Akim Demaille <demaille@gostai.com>
402
403 * build-aux/Makefile.am: Ship cross-options.pl.
404 * doc/Makefile.am: Always refer to cross-options.texi with
405 $(srcdir).
406 (MAINTAINERCLEANFILES): Add it.
407
408 2007-11-04 Akim Demaille <demaille@gostai.com>
409
410 Generate the long/short option cross-table.
411 * build-aux/cross-options.pl: New.
412 * doc/Makefile.am (cross-options.texi): New.
413 * doc/bison.texinfo: Use it.
414
415 2007-11-04 Akim Demaille <demaille@gostai.com>
416
417 Generate bison.1 using help2man.
418 * doc/common.x, doc/bison.x: New.
419 * doc/Makefile.am (bison.1, .x.1): New.
420 The code is taken from autoconf-2.61/man/Makefile.am.
421 * configure.ac: Look for help2man.
422
423 2007-11-04 Akim Demaille <demaille@gostai.com>
424
425 Complete --help.
426 * src/getargs.c (usage): Document -W, make it clear that -d,
427 -g and -x have optional arguments.
428
429 2007-11-04 Akim Demaille <demaille@gostai.com>
430
431 Find sha1sum when named gsha1sum.
432 * bootstrap (find_tool): New.
433 ($SHA1SUM): New.
434
435 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
436
437 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
438 at
439 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
440 * NEWS (2.3a+): Mention.
441 * data/bison.m4 (b4_pure_if): Don't define it here.
442 * data/c.m4 (b4_identification): Depend on individual skeletons to
443 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
444 values of the %define variables api.pure or api.push_pull. Define
445 YYPURE, YYPUSH, and YYPULL accordingly.
446 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
447 glr.cc has already defined b4_pure_flag.
448 * data/push.c: Define b4_pure_if based on `%define api.pure'.
449 Remove YYPUSH and YYPULL since they're back in b4_identification again.
450 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
451 * doc/bison.texinfo (Pure Decl): Update.
452 (Push Decl): Update.
453 (Decl Summary): Add api.pure to %define entry.
454 In %pure-parser entry, say it's deprecated and reference %define.
455 (Pure Calling): Update.
456 (Error Reporting): Update.
457 (C++ Scanner Interface): Update.
458 (How Can I Reset the Parser): Update.
459 (Table of Symbols): In %pure-parser entry, say it's deprecated and
460 reference %define.
461 * src/getargs.c (pure_parser): Remove global variable.
462 * src/getargs.h (pure_parser): Remove extern.
463 * src/output.c (prepare): Don't define pure_flag muscle.
464 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
465 wrapper around `%define api.pure'.
466 * tests/calc.at (Simple LALR Calculator): Update.
467 (Simple GLR Calculator): Update.
468 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
469 Update.
470 (GLR: Resolve ambiguity, pure, locations): Update.
471 (GLR: Merge conflicting parses, pure, no locations): Update.
472 (GLR: Merge conflicting parses, pure, locations): Update.
473 * tests/glr-regression.at (Uninitialized location when reporting
474 ambiguity): Update
475 * tests/input.at (Unused %define api.pure): New test case.
476 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
477 AT_PURE_IF and AT_PURE_AND_LOC_IF.
478 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
479
480 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
481
482 %define push_pull -> %define api.push_pull. Discussed starting at
483 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
484 * data/push.c: Expect the new name.
485 * data/yacc.c: Likewise.
486 * doc/bison.texinfo (Push Decl): Update.
487 (Decl Summary): Update %define entry.
488 (Push Parser Function): Update.
489 (Pull Parser Function): Update.
490 (Parser Create Function): Update.
491 (Parser Delete Function): Update.
492 * tests/calc.at (Simple LALR Calculator): Update.
493 * tests/input.at (%define enum variables): Update.
494 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
495 (Push Parsing: Multiple impure instances): Update.
496 (Push Parsing: Unsupported Skeletons): Update.
497 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
498 (Exploding the Stack Size with Malloc): Update.
499
500 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
501 other entries some.
502
503 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
504
505 For the XML output's terminal element, rename @number to @token-number,
506 and add @symbol-number. In the nonterminal element, rename @number to
507 @symbol-number. Discussed starting at
508 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
509 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
510 renames.
511 (xsl:template match="nonterminal"): Likewise.
512 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
513 (xsl:template match="nonterminal"): Likewise.
514 * src/print-xml.c (print_grammar): Implement.
515
516 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
517
518 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
519 2007-10-11 change, the child elements here are items not rules.
520 (xsl:template match="item"): New.
521 (xsl:template match="rule"): Update for new reduced itemset.
522 (xsl:template match="point"): Remove.
523 (xsl:template match="empty"): For consistency with --graph, don't
524 output "/* empty */".
525 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
526 line-wrap, don't pass a negative value as first-line-length since this
527 won't work with the following changes.
528 (xsl:template name="line-wrap"): Simplify slightly.
529 (xsl:template name="ws-search"): Eliminate recursion.
530 * src/print_graph.c (print_core): Don't print a reduction's lookahead
531 set next to an item whose dot is not at the end of the RHS even if it
532 happens to be associated with the same rule.
533
534 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
535
536 Add %define lr.keep_unreachable_states.
537 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
538 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
539 * src/main.c (main): Implement it.
540 * tests/conflicts.at (Unreachable States After Conflict Resolution):
541 Extend to test it, and fix a typo.
542
543 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
544
545 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
546 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
547 the example .output text.
548 * tests/regression.at (Extra lookahead sets in report): Improve wording
549 of comments.
550
551 2007-10-17 Wojciech Polak <polak@gnu.org>
552
553 * src/print-xml.c (print_grammar): Renamed
554 <terminal> and <nonterminal> attributes:
555 "type" to "number" and "symbol" to "name".
556 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
557 Use new attribute names.
558 (xsl:template match="nonterminal"): Likewise.
559 * data/xslt/xml2xhtml.xsl: Likewise.
560
561 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
562
563 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
564 (Option Cross Key): Likewise.
565
566 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
567 next to an item whose dot is not at the end of the RHS even if it
568 happens to be associated with the same rule.
569 * src/print.c (print_core): Likewise.
570 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
571 (Resolved SR Conflicts): Update output.
572 * tests/regression.at (Extra lookahead sets in report): New test case.
573
574 2007-10-11 Wojciech Polak <polak@gnu.org>
575
576 * src/print-xml.c (print_core): Remove item set
577 redundancy.
578 * data/xslt/bison.xsl (bison:ruleNumber): New key.
579 Improve processing time. Suggested by Joel E. Denny.
580 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
581 Write xsl:param "required" attribute as comment.
582 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
583 (xsl:template match="rule"): Support new reduced itemset.
584 (xsl:template match="point"): Remove.
585 * data/xslt/xml2xhtml.xsl: Likewise.
586
587 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
588
589 * src/getargs.c (version): Update copyright year.
590
591 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
592
593 Make xml2dot.xsl and --graph produce the same output.
594 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
595 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
596 escaped later.
597 (xsl:template name="output-node"): Use the new escape template instead
598 of the string-replace template directly.
599 (xsl:template name="output-edge"): Likewise.
600 (xsl:template name="escape"): New, escapes backslashes and newlines in
601 addition to quotation marks.
602 * src/graphviz.c (start_graph, output_node, output_edge): Add
603 whitespace to output for legibility.
604
605 Make xml2text.xsl and --report produce the same output, and remove the
606 XML "conflicts" element since a conflict summary is easily extracted
607 from the automaton.
608 * data/xslt/bison.xsl: New.
609 (xsl:template match="state" mode="bison:count-conflicts): New.
610 * data/xslt/xml2text.xsl: Import bison.xsl.
611 (xsl:template match="bison-xml-report"): Instead of styling the
612 "conflicts" element, style the "automaton" element with mode
613 "conflicts". Unlike the former, the latter lists S/R and R/R
614 conflicts for a state on the same line.
615 (xsl:template match="conflicts"): Remove.
616 (xsl:template match="conflict"): Remove.
617 (xsl:template match="terminal"): Line-wrap the list of rules in which
618 the terminal is used.
619 (xsl:template match="nonterminal"): Likewise for nonterminals.
620 (xsl:template match="automaton" mode="conflicts"): New.
621 (xsl:template match="state" mode="conflicts"): New.
622 (xsl:template name="line-wrap"): New.
623 (xsl:template name="ws-search"): New.
624 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
625 (xsl:template match="bison-xml-report"): Instead of styling the
626 "conflicts" element, style the "automaton" element with mode
627 "conflicts."
628 (xsl:template match="conflicts"): Remove.
629 (xsl:template match="conflict"): Remove.
630 (xsl:template match="automaton" mode="conflicts"): New.
631 (xsl:template match="state" mode="conflicts): New.
632 * src/conflicts.c (conflicts_output_xml): Remove.
633 * src/conflicts.h (conflicts_output_xml): Remove prototype.
634 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
635 * src/print.c (print_grammar): Consistently wrap at the 66th column so
636 the corresponding XSLT is easier. Also, never wrap between a word and
637 the comma that follows it.
638
639 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
640
641 Improve C++ namespace support. Discussed starting at
642 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
643 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
644 b4_namespace_close): New macros that interpret the %define variable
645 "namespace" so its value can contain "::" to indicate nested
646 namespaces.
647 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
648 the above macros.
649 * data/lalr1.cc (b4_namespace): Likewise.
650 * data/location.cc (b4_namespace): Likewise.
651 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
652 inside a new table in the general %define entry. Document `%define
653 namespace' there as well. Point the %name-prefix entry to it since it
654 explains it more completely in the case of C++.
655 (C++ Bison Interface): Mention `%define namespace' instead of
656 %name-prefix.
657 (Table of Symbols): Remove the `%define push_pull' entry. The %define
658 entry suffices.
659 * tests/c++.at (Relative namespace references): New test case.
660 (Absolute namespace references): New test case.
661 (Syntactically invalid namespace references): New test case.
662 * tests/input.at (C++ namespace reference errors): New test case.
663
664 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
665
666 Add syncline support and location accessor to internal %define
667 interfaces.
668 * data/bison.m4 (b4_percent_define_get_loc): New.
669 (b4_percent_define_get_syncline): New.
670 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
671 (b4_percent_define_default): Record defining location as line 1 rather
672 than 0 for the sake of synchronizing #line's, and define
673 b4_percent_define_syncline(VARIABLE).
674 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
675 * src/muscle_tab.c (muscle_syncline_grow): New.
676 (muscle_code_grow): Use muscle_syncline_grow.
677 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
678 define b4_percent_define_syncline(VARIABLE).
679 (muscle_percent_define_get_loc): New.
680 (muscle_percent_define_get_syncline): New.
681 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
682 remove some unused variables.
683 (muscle_percent_define_default): Record defining location as line 1
684 rather than 0 for the sake of synchronizing #line's, and define
685 b4_percent_define_syncline(VARIABLE).
686 (muscle_percent_define_check_values): Use
687 muscle_percent_define_get_loc.
688 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
689 (muscle_percent_define_get_syncline): Prototype.
690 * tests/skeletons.at (%define Boolean variables: invalid skeleton
691 defaults): Update output for location change.
692 (Complaining during macro argument expansion): Extend to test
693 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
694
695 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
696
697 Fix some error-reporting macro bugs.
698 * data/bison.m4 (b4_cat): New.
699 (b4_error, b4_error_at): Use b4_cat to send error directives directly
700 to stdout so they don't become arguments to other macros. Update
701 comments and add examples.
702 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
703 add examples.
704 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
705 after printing the error directive so that M4 doesn't report subsequent
706 problems that are induced by this problem.
707 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
708 instead of just in them. Recognize @\n in both places. Both expand to
709 the empty string. Needed by b4_cat.
710 * tests/skeletons.at (Complaining during macro argument expansion):
711 New test case.
712 (Fatal errors make M4 exit immediately): New test case.
713
714 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
715
716 Implement --print-datadir.
717 * src/getargs.c (usage): Mention.
718 (PRINT_DATADIR_OPTION): New anonymous enum member.
719 (long_options): Add entry for it.
720 (getargs): Add case for it calling compute_pkgdatadir.
721 * src/output.c (output_skeleton): Encapsulate data directory
722 computation from here...
723 (prepare): ... and from here...
724 (compute_pkgdatadir): ... into this new function.
725 * src/output.h (compute_pkgdatadir): Prototype.
726
727 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
728
729 * src/print-xml.c (escape_bufs): New static global variable
730 replacing...
731 (xml_escape_n): ... the static local variable buf here.
732 (print_xml): Free memory for escape_bufs.
733 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
734
735 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
736
737 Replace `%push-parser' and `%push-pull-parser' with
738 `%define push_pull "push"' and `%define push_pull "both"'.
739 `%define push_pull "pull"' is the default.
740 * doc/bison.texinfo (Push Decl, Push Parser Function,
741 Pull Parser Function, Parser Create Function, Parser Delete Function):
742 Update declarations.
743 (Decl Summary, Table of Symbols): Replace %push-parser and
744 %push-pull-parser entries with a %define push_pull entry.
745 * data/bison.m4 (b4_percent_define_check_values): New macro.
746 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
747 definitions...
748 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
749 definitions...
750 * data/push.c: ... to here and compute them from the value of the
751 %define variable push_pull.
752 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
753 parsing requests here...
754 * data/yacc.c: ... hack this to switch to push.c any time
755 b4_use_push_pull_flag or the %define variable push_pull is set. This
756 will go away when we mv push.c yacc.c.
757 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
758 push parsing is not supported since unused %define variables are
759 reported anyway.
760 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
761 * src/muscle_tab.h (muscle_percent_define_check_values): Update
762 comments for consistency with b4_percent_define_check_values.
763 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
764 muscles.
765 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
766 Remove.
767 (prologue_declaration): Remove %push-parser and %push-pull-parser
768 rules.
769 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
770 * tests/calc.at: Update declarations.
771 * tests/input.at (%define enum variables): New test case.
772 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
773 declaration.
774 (Push Parsing: Multiple impure instances): Update declaration.
775 (Push Parsing: Unsupported Skeletons): New test case.
776 * tests/torture.at (Exploding the Stack Size with Alloca): Update
777 declaration.
778 (Exploding the Stack Size with Malloc): Update declaration.
779
780 2007-09-24 Wojciech Polak <polak@gnu.org>
781
782 Add XSLT transformations.
783
784 * data/xslt/xml2dot.xsl: Transform XML into DOT.
785 * data/xslt/xml2text.xsl: Transform XML into plain text.
786 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
787 * data/Makefile.am (xsltdir): New variable.
788 (dist_xslt_DATA): Add xslt/*.xsl files.
789
790 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
791
792 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
793 Problem reported by Wojciech Polak.
794 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
795 (xml_printf): Undo change I made on 21 September; that is,
796 indent 2 spaces, not 1.
797
798 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
799
800 Pacify ./configure --enable-gcc-warnings.
801 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
802 `char const *' instead of `char *'.
803 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
804 local variable `sep'.
805
806 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
807
808 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
809 elsewhere.
810 * src/print-xml.c: Prefer "const" after types; that's more consistent.
811 (xml_printf): Indent just 1 space for level.
812 (e_char, xlate_char): Remove.
813 (xml_escape_string): Rewrite to avoid undefined behavior (used
814 storage that was freed from the stack).
815 (xml_escape_n): Don't bother checking for subscript error.
816
817 2007-09-21 Wojciech Polak <polak@gnu.org>
818
819 Add Bison XML Automaton Report.
820
821 Add support for an -x option to generate an XML report.
822 It is not documented yet.
823 * src/print-xml.c: New file.
824 * src/print-xml.h: Likewise.
825 * lib/timevar.def (TV_XML): New var.
826 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
827 * src/conflicts.c: Include print-xml.h.
828 (solved_conflicts_xml_obstack): New var.
829 (log_resolution, conflicts_solve, conflicts_free):
830 Add support for XML report.
831 (conflicts_output_val): New function.
832 * src/conflicts.h (conflicts_output_val): New decl.
833 * src/files.c (spec_xml_file): New var.
834 (compute_output_file_names, output_file_names_free): Add XML support.
835 * src/files.h (spec_xml_file): New decl.
836 * src/getargs.c (xml_flag): New var.
837 (usage, short_options, long_options, getargs): Add XML support.
838 * src/getargs.h (xml_flag): New decl.
839 * src/gram.c: Include print-xml.h.
840 (rule_lhs_print_xml, rule_rhs_print_xml):
841 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
842 New functions.
843 * src/gram.h: Declare external ones.
844 * src/main.c: Include print-xml.h.
845 (main): Add XML support.
846 * src/reduce.c: Include print-xml.h.
847 (reduce_xml): New function.
848 * src/reduce.h: Declare it.
849 * src/state.c: Include print-xml.h.
850 (state_new): Add XML support.
851 (state_rule_lookahead_tokens_print_xml): New function.
852 * src/state.h: Declare it.
853 (struct state): New member solved_conflicts_xml.
854 * src/symtab.c (symbol_class_get_string): New function.
855 * src/symtab.h: Declare it.
856
857 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
858
859 * GNUmakefile: Switch to coreutils's version.
860 * bootstrap: Likewise.
861 * Makefile.cfg: Adjust to new GNUmakefile.
862 * README-hacking: Likewise.
863
864 Import from gnulib:
865
866 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
867 Bruno Haible <bruno@clisp.org>
868
869 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
870 and is a script that invokes bison. Tighten the code. Add comments.
871
872 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
873
874 Spell "boolean" as "Boolean". Reported by Akim Demaille.
875 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
876 * doc/bison.texinfo (Decl Summary): Fix.
877 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
878 * tests/input.at (Boolean %define variables): Update output.
879 * tests/skeletons.at (%define boolean variables: invalid skeleton
880 defaults): Rename to...
881 (%define Boolean variables: invalid skeleton defaults): ... this and
882 update output.
883
884 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
885
886 In impure push mode, don't allow more than one yypstate to be allocated
887 since multiple impure parsers would corrupt yynerrs.
888 * data/push.c (yypstate_allocated): New static global variable
889 initialized to 0.
890 (yypull_parse): If yypstate_new returns 0, don't report it as memory
891 exhaustion if yypstate_allocated is 1, but still return 2.
892 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
893 already 1. Otherwise, set it to 1.
894 (yypstate_delete): Set it to 0.
895 * tests/push.at (Push Parsing: Multiple impure instances): New test
896 case.
897
898 2007-08-17 Bob Rossi <bob@brasko.net>
899
900 * doc/bison.texinfo (Push Decl): Document the push parser.
901 (Table of Symbols): Ditto.
902 (Pure Decl): Ditto.
903 (Decl Summary): Ditto.
904 (Multiple Parsers, Push Parser Function, Pull Parser Function,
905 Parser Create Function, Parser Delete Function):
906 Add new push parser symbols.
907 (Table of Symbols): Document push-parser, push-pull-parser,
908 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
909
910 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
911
912 Update to GPLv3.
913 * doc/gpl-3.0.texi: New file.
914 * doc/gpl.texi: Remove.
915 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
916 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
917 * README-hacking, TODO, bootstrap, bootstrap.conf:
918 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
919 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
920 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
921 * data/lalr1.cc, data/lalr1.java, data/location.cc:
922 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
923 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
924 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
925 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
926 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
927 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
928 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
929 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
930 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
931 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
932 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
933 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
934 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
935 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
936 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
937 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
938 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
939 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
940 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
941 * src/complain.c, src/complain.h, src/conflicts.c:
942 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
943 * src/files.h, src/flex-scanner.h, src/getargs.c:
944 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
945 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
946 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
947 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
948 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
949 * src/print.c, src/print.h, src/print_graph.c:
950 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
951 * src/reduce.h, src/relation.c, src/relation.h:
952 * src/revision.h, src/scan-code.h, src/scan-code.l:
953 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
954 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
955 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
956 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
957 * tests/Makefile.am, tests/actions.at, tests/c++.at:
958 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
959 * tests/existing.at, tests/glr-regression.at:
960 * tests/headers.at, tests/input.at, tests/java.at:
961 * tests/local.at, tests/output.at, tests/push.at:
962 * tests/reduce.at, tests/regression.at, tests/sets.at:
963 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
964 * tests/torture.at:
965 Update to GPLv3.
966
967 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
968
969 Get rid of broken %no-parser, -n, and --no-parser implementation and
970 documentation.
971 * TODO: Don't mention them.
972 * doc/bison.1: Likewise.
973 * doc/bison.texinfo (Decl Summary): Likewise.
974 (Bison Options): Likewise.
975 (Option Cross Key): Likewise.
976 * src/getargs.c (no_parser_flag): Remove global variable.
977 (usage): Don't print description of -n and --no-parser.
978 (long_options): Remove --no-parser entry here.
979 (getargs): Remove -n case in the switch here.
980 * src/getargs.h (no_parser_flag): Remove extern.
981 * tests/regression.at (Web2c Actions): Remove comment that mentions
982 --no-parser.
983
984 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
985
986 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
987 name user variables starting with `yy'. Just pass NULL instead of a
988 dummy local &yylval to yypush_parse.
989 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
990 starting with `yy'.
991
992 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
993
994 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
995 true since it's then always used regardless of whether yyoverflow is
996 defined. Reported by Christian Burger at
997 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
998 * THANKS: Add Christian Burger.
999
1000 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1001 node names: say "Decl Summary" not "Bison Declaration Summary".
1002
1003 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1004
1005 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1006 determine whether this function has already complained about an invalid
1007 value for a %define boolean variable, don't check whether Bison has
1008 ever examined the value. As written, the check was a tautology.
1009 Instead, record and check for this complaint using a separate muscle.
1010
1011 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1012
1013 Fix push parsing memory leak reported by Brandon Lucia at
1014 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1015 * THANKS: Add Brandon Lucia.
1016 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1017 but the parse never completed and thus freed it.
1018 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1019 * tests/testsuite.at: Include push.at.
1020 * test/push.at: New.
1021 (Push Parsing: Memory Leak for Early Deletion): New test case.
1022
1023 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1024
1025 Improve handling of multiple S/R conflicts in the same state and of S/R
1026 conflicts involving multiple reductions.
1027 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1028 set for a state here or Bison will abort if it is reassigned on a
1029 later conflicted reduction in the same state.
1030 Similarly, don't finalize and assign the solved conflicts report here
1031 or it will be lost if it is reassigned on a later conflicted reduction
1032 in the same state.
1033 (set_conflicts): Instead, assign them both here after all S/R conflicts
1034 in the state have been fully examined.
1035 * src/print.c (shift_set): Rename to...
1036 (no_reduce_set): ... this.
1037 (print_reductions): Update for rename, and add %nonassoc error action
1038 tokens to no_reduce_set so that, when printing the first remaining
1039 reduction on an error action token, the reduction is enclosed in
1040 brackets.
1041 (print_results): Update for rename.
1042 * tests/conflicts.at (Solved conflicts report for multiple reductions
1043 in a state): New test case.
1044 (%nonassoc error actions for multiple reductions in a state): New test
1045 case.
1046
1047 * src/main.c (main): Don't depend on C99 features.
1048
1049 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1050
1051 * build-aux/.cvsignore: Add compile.
1052 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1053 uniwidth.
1054
1055 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1056
1057 * bootstrap (slurp): Create target directories that don't exist.
1058 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1059
1060 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1061
1062 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1063 than item number.
1064 * closure.c (closure): Likewise.
1065 * state.h (reductions): Comment sorting of rules.
1066 (state): Comment sorting of items.
1067
1068 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1069
1070 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1071 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1072 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1073 definition in order to avoid Gnulib headers since we don't use config.h
1074 here.
1075 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1076 rather than AT_DATA so that config.h is included.
1077
1078 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1079
1080 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1081 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1082 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1083 and so that YYFPRINTF is guaranteed to be defined here.
1084
1085 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1086
1087 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1088 with...
1089 (muscle_percent_define_check_values): ... this more helpful function.
1090 Again, it's not used yet, but it will be.
1091 * src/muscle_tab.h: Likewise.
1092
1093 Improve some comments in parser table construction.
1094 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1095 (generate_states): Don't mention ruleset, which is internal to closure.
1096 * src/closure.c (closure): Explain sorting of core and itemset, which
1097 is required for this function to behave correctly.
1098 * src/closure.h (closure): Mention sorting.
1099
1100 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1101
1102 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1103 move the check for disabled transitions to an aver since conflict
1104 resolution hasn't happened yet.
1105
1106 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1107 labels a state as inconsistent just because it has error transitions.
1108 The original form of this check appeared in revision 1.1 of lalr.c,
1109 which was committed on 1991-12-21. Now (at least), changing the
1110 consistency label on such a state appears to have no useful effect in
1111 any of the places it is examined, which I enumerate below. The key
1112 point to understanding each item in this enumeration is that a state
1113 with an error transition is labelled consistent in the first place only
1114 if it has no rules, so the check cannot matter for states that have
1115 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1116 to try to identify its conflicts, and a state must have *rules* to have
1117 conflicts. (2) Labelling a state as inconsistent will affect how
1118 action_row sets the default *rule* for the state. (3) Labelling a
1119 state as inconsistent will cause build_relations to add lookback edges
1120 to *rules* in that state.
1121 * src/state.h (struct state): Word the comment for member consistent
1122 more carefully.
1123
1124 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1125
1126 Don't depend on C99 features.
1127 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1128 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1129 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1130 * src/state.c (state_mark_reachable_states): Fix for-loop.
1131 (state_remove_unreachable_states): Fix for-loop.
1132
1133 Don't widen struct state with member reachable just to temporarily
1134 record reachability. Instead, use a local bitset.
1135 * src/state.h (struct state): Remove member.
1136 * src/state.c (state_new): Don't initialize it.
1137 (state_mark_reachable_states): Rename to...
1138 (state_record_reachable_states): ... this, and use bitset.
1139 (state_remove_unreachable_states): Use bitset.
1140
1141 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1142
1143 * src/Makefile.am (yacc): Quote target action commands properly so
1144 that the yacc script isn't corrupt. Reported by Hans Aberg at
1145 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1146
1147 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1148 the case of pure parsers. Reported by Frans Englich at
1149 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1150 * THANKS: Add Frans Englich.
1151
1152 * NEWS (2.3a+): In the %code entry, reference section `Bison
1153 Declaration Summary' from the manual now since the %code summary has
1154 moved there.
1155 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1156 in the rules section must be terminated by semicolons.
1157
1158 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1159
1160 Extend the front-end API for %define variables to more completely
1161 mirror the back-end. This will be useful in the future.
1162 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1163 Update comments to mention the new front-end counterparts of these
1164 macros.
1165 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1166 for muscle_string_decode and muscle_location_decode.
1167 (muscle_string_decode): New static function.
1168 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1169 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1170 functions.
1171 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1172 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1173 implementation more closely.
1174 (muscle_percent_define_invalid_value): New function.
1175 * src/muscle_tab.h (muscle_percent_define_get,
1176 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1177 Prototype.
1178
1179 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1180
1181 * NEWS (2.3a+): Mention yesterday's state-removal change.
1182 (2.3a): Remove the %language entry, which was added after 2.3a.
1183 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1184 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1185 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1186 tests/existing.at: Update copyright date.
1187
1188 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1189
1190 If conflict resolution makes states unreachable, remove those states,
1191 report rules that are then unused, and don't report conflicts in those
1192 states.
1193 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1194 New global function.
1195 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1196 function.
1197 * src/main.c (main): After conflict resolution, remove the unreachable
1198 states and update all data structures that reference states by number.
1199 * src/state.c (state_new): Initialize each state's reachable member to
1200 false.
1201 (state_mark_reachable_states): New static function.
1202 (state_remove_unreachable_states): New global function.
1203 * src/state.h (struct state): Add member bool reachable.
1204 (state_remove_unreachable_states): Prototype.
1205 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1206 New test case.
1207 * tests/existing.at (GNU pic Grammar): Update test case output now that
1208 an unused rule is discovered.
1209
1210 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 Minor code cleanup in parser table construction.
1213 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1214 (new_itemsets, save_reductions): Update for rename to nitemset.
1215 * src/closure.c (nritemset): Rename to...
1216 (nitemset): ... this since the "r" appears to meaningless and isn't
1217 used in the comments.
1218 (closure): Update for rename.
1219 * src/closure.h (nritemset): Update extern to...
1220 (nitemset): ... this.
1221 * src/lalr.c (LA): Fix a typo in comments.
1222 * src/print.c (print_core): Update for rename to nitemset.
1223 * src/print_graph.c (print_graph): Likewise.
1224 * src/state.h: Fix some typos in header comments.
1225
1226 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1227
1228 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1229 still sticks to ASCII. Sorry!
1230
1231 * README-hacking: New file, taken mostly from coreutils, with changes
1232 for Bison. Contains much of the contents of:
1233 * README-cvs: Remove.
1234 * bootstrap: Sync from gnulib.
1235 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1236 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1237
1238 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1239
1240 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1241 Setzer.
1242 (Java Differences): Fix some typos.
1243 * THANKS: Add Sebastian Setzer.
1244
1245 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
1246
1247 * data/java.m4 (b4_single_class_if): Remove.
1248 (b4_abstract_if): Look at "%define abstract".
1249 (b4_lexer_if): New.
1250 (b4_union_name): Rename...
1251 (b4_yystype): ... to this. Map to "%define stype".
1252 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1253 b4_maybe_throws): Fix quoting.
1254 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1255 * data/lalr1.java (Lexer interface): Always define.
1256 (Lexer interface within parser class): Remove.
1257 (YYLexer class): New, used when "%code lexer" is present.
1258 (constructor): When "%code lexer" is used, pass %lex-param
1259 to the lexer constructor.
1260 (yylex, yyparse): Remove %lex-param from method invocations
1261 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1262
1263 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1264 abstract". Rename "%define union_name" to "%define stype".
1265 Rename method names according to previous patch.
1266 (Java Scanner Interface): Describe "%code lexer" instead of
1267 "%pure-parser" and "%define single_class".
1268 (Java Differences): Mention "%code lexer".
1269
1270 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1271 Include scanner here, using macros from tests/local.at.
1272 (AT_DATA_CALC_Y): Remove final argument.
1273 (_AT_CHECK_JAVA_CALC): Likewise.
1274 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1275 of %locations and %error-verbose.
1276 (main): Test with and without %lex-param.
1277 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1278 (AT_BISON_OPTION_POPDEFS): Pop it.
1279
1280 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1281
1282 DJGPP spefic issue. Inhibit the use of disallowed characters for
1283 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1284 and concern testsuite case 46.
1285 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1286 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1287 * djgpp/config.bat: Inhibit the use of disallowed characters.
1288
1289 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1290
1291 Miscellaneous %define and %code cleanup.
1292 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1293 values are interpreted.
1294 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1295 documentation a little more.
1296 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1297 muscle_percent_define_insert, muscle_percent_code_grow): New
1298 functions/macros.
1299 * src/muscle_tab.h (muscle_percent_define_insert,
1300 muscle_percent_code_grow): Prototype.
1301 * src/parse-gram.y (prologue_declaration): Use
1302 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1303 %define and %code directives.
1304
1305 Make it easy to share %define boolean variables between the front-end
1306 and back-end. Though not used yet, this will be useful in the future.
1307 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1308 Bison uses of names rather than just skeleton uses of names.
1309 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1310 b4_percent_define_skeleton_variables(VARIABLE) to
1311 b4_percent_define_bison_variables(VARIABLE).
1312 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1313 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1314 b4_percent_code_bison_qualifiers(QUALIFIER).
1315 (b4_check_user_names_wrap): Update for renames.
1316 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1317 muscle_percent_define_default): New functions mimicking
1318 b4_percent_define_flag_if and b4_percent_define_default.
1319
1320 For %define variables, report locations for invalid values and
1321 redefinitions.
1322 * data/bison.m4 (b4_percent_define_flag_if): Read
1323 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1324 value for VARIABLE.
1325 (b4_percent_define_default): Save a special location in
1326 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1327 must later be reported as invalid.
1328 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1329 functions.
1330 (muscle_percent_define_insert): Record the location of VARIABLE in
1331 muscle percent_define_loc(VARIABLE), and use it to report the previous
1332 location for a redefinition.
1333 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1334 (muscle_percent_define_default): Update like b4_percent_define_default.
1335 (muscle_grow_user_name_list): Rename to...
1336 (muscle_user_name_list_grow): ... this for consistency and use
1337 muscle_location_grow.
1338 * src/muscle_tab.h (muscle_location_grow): Prototype.
1339 * tests/input.at (%define errors): Update expected output.
1340 * tests/skeletons.at (%define boolean variables: invalid skeleton
1341 defaults): New test case.
1342
1343 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1344
1345 * src/print.c (lookahead_set, state_default_rule): Remove.
1346 (print_reductions): Replace state_default_rule invocation with
1347 equivalent use of yydefact, which was computed in token_actions in
1348 tables.c.
1349 (print_results): Don't allocate lookahead_set.
1350
1351 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
1352
1353 * data/lalr1.java: Prefix all private members with yy.
1354
1355 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1356
1357 Use YYFPRINTF instead of fprintf where appropriate. Reported by
1358 Sebastien Fricker at
1359 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
1360 * THANKS: Add Sebastien Fricker.
1361 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1362 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1363 accept a variable number of arguments.
1364
1365 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1366
1367 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1368
1369 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1370
1371 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1372 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1373 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1374
1375 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1376
1377 Undo my 2007-02-07 change, switching back to the c-strcase module
1378 introduced in the 2007-02-03 change. Bruno Haible reported that
1379 the 2007-02-07 change would be dangerous in Turkish if we add a
1380 language whose name contains "i", since "i" is not lowercase "I"
1381 in Turkish.
1382 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1383 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1384 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1385 * m4/.cvsignore: Remove strcase.m4.
1386 * src/getargs.c: Revert 2007-02-07 change, as follows.
1387 Include c-strcase.h.
1388 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1389
1390 2007-02-11 Bruno Haible <bruno@clisp.org>
1391
1392 Enable the Java related testsuite tests when the only Java compiler
1393 found is a gcj < 4.3. Discussed at
1394 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1395 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1396
1397 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1398
1399 * data/Makefile.am: Update copyright date.
1400 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1401 yypstate_new returns NULL.
1402 (yypstate_new): Return NULL if malloc does.
1403 * src/reader.c (packgram): Move translation of rule actions from the
1404 beginning of packgram to...
1405 (check_and_convert_grammar): ... here right before packgram is invoked
1406 so it's easier to write more complete comments, and remove redundant
1407 code.
1408
1409 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1410
1411 As in semantic actions, make @$ in %initial-action, %destructor, and
1412 %printer imply %locations.
1413 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1414 scanning @$.
1415 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1416 (@$ in %initial-action implies %locations,
1417 @$ in %destructor implies %locations,
1418 @$ in %printer implies %locations): ... these new test cases.
1419
1420 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1421
1422 Undo most of the 2007-02-03 change, switching to the strcase module
1423 now that gnulib strcase has been fixed.
1424 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1425 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1426 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1427 * m4/.cvsignore: Add strcase.m4.
1428 * src/getargs.c: Revert 2007-02-03 change, as follows.
1429 Don't include c-strcase.h.
1430 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1431 strcasecmp has "unspecified behavior" outside the POSIX locale,
1432 but it works fine in practice if at least one argument is ASCII,
1433 as is the case in Bison.
1434
1435 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
1436
1437 * tests/java.at: Skip tests if only one of javac/java is present.
1438 Reported by Joel E. Denny.
1439 * tests/atlocal.in: Adjust copyright years.
1440
1441 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1442
1443 * data/lalr1.java (Stack): Work around old verifiers that disallow
1444 access to the private fields of an inner class, from the outer class.
1445 We can make Stack's fields public because user code doesn't have access
1446 to the instance of Stack used by parse(). Reported by Paul Eggert.
1447
1448 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1449
1450 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1451 the right spot for these files?
1452 * bootstrap.conf (gnulib_modules): Add c-strcase.
1453 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1454 c-strncasecmp.c.
1455 * src/getargs.c: Include c-strcase.h.
1456 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1457 to avoid unspecified behavior.
1458
1459 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1460
1461 * doc/bison.texinfo (Decl Summary): Correct typo.
1462
1463 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
1464
1465 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1466 Complain if the value does not match empty, "true" or "false".
1467 * data/c++.m4: Adjust default definitions of %define variables.
1468 * data/java.m4: Adjust default definitions of %define variables.
1469 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1470 to above behavior.
1471 * tests/input.at (Boolean %define variables): Test new behavior.
1472
1473 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
1474
1475 * NEWS: Mention java.
1476 * TODO: Remove things that are done.
1477 * bootstrap.conf: Add javacomp-script and javaexec-script.
1478 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1479
1480 * data/Makefile.am: Add new files.
1481 * data/java-skel.m4: New.
1482 * data/java.m4: New.
1483 * data/lalr1.java: New.
1484
1485 * doc/bison.texinfo: Put "A Complete C++ Example" under
1486 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1487 under Other Languages.
1488
1489 * src/getargs.c (valid_languages): Add Java.
1490 * src/getargs.h (struct bison_language): Update size of string fields.
1491
1492 * tests/Makefile.am: Add java.at.
1493 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1494 * tests/java.at: New.
1495 * tests/testsuite.at: Include it.
1496
1497 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1498
1499 Clean up.
1500 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1501 at_directive_argv arguments so these no longer have to be global
1502 variables. Also, update the implementation for the following changes.
1503 (fail_for_at_directive_too_many_args,
1504 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1505 (at_directive_name): Remove as at_directive_argv[0] will be used for
1506 this now.
1507 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1508 for the directive name.
1509 (at_directive_argc, at_directive_argv): Make these local within
1510 skel_lex instead of global.
1511 (INITIAL): Update directive start action for above changes.
1512 (SC_AT_DIRECTIVE_ARG): Rename to...
1513 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1514 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1515 (scan_skel): Move yylex_destroy to...
1516 (skel_scanner_free): ... here.
1517 * tests/skeletons.at (installed skeleton file name): Rename to...
1518 (installed skeleton file names): ... this.
1519
1520 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1521
1522 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1523 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1524 Summary" not "Directives".
1525 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1526 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1527 since the former is now the more complete one.
1528 (Prologue Alternatives): Likewise and do the same for %defines.
1529 (Table of Symbols): Add summary of %code, add summary of %define, and
1530 move full %code documentation to...
1531 (Decl Summary): ... here for consistency with other entries in these
1532 sections.
1533 Move %define entry in order to keep this list alphabetized.
1534 Reword %define entry a little to put less emphasis on the skeleton
1535 concept, which most users shouldn't have to think about.
1536
1537 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1538
1539 Adjust to recent gnulib changes.
1540 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1541 Add string.h, string_.h, unistd_.h, wchar_.h.
1542 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1543 * src/system.h: Don't include <stpcpy.h>; this is now done by
1544 <string.h>.
1545
1546 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
1547
1548 Simplify implementation of unqualified %code, implement macros for
1549 uniform treatment of boolean %define flags. Document %define.
1550 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1551 b4_percent_code_ifdef): New.
1552 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1553 * data/c++.m4: Define default value for global_tokens_and_yystype.
1554 * data/glr.cc: Likewise.
1555 * data/location.cc: Use b4_percent_define_flag_if.
1556
1557 * doc/bison.texinfo (Decl Summary): Document %define.
1558
1559 * src/parse-gram.y (Unqualified %code): Change muscle name to
1560 b4_percent_code().
1561 (content.opt): Default to empty.
1562
1563 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1564
1565 Implement support for relative and absolute skeleton file names.
1566 Discussed starting at
1567 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1568 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1569 (Bison Options): Document in --skeleton entry.
1570 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1571 full_skeleton can't necessarily hold all of pkgdatadir.
1572 If the specified skeleton file name contains a `/', don't prepend
1573 pkgdatadir.
1574 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1575 file name contains a `/', prepend the grammar file directory.
1576 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1577 * skeletons.at: New file.
1578 (relative skeleton file names): New test case.
1579 (installed skeleton file names): New test case.
1580 * tests/testsuite.at: Include skeletons.at.
1581
1582 * bootstrap: Update copyright to 2007.
1583
1584 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
1585
1586 * bootstrap: Remove occurrences of .#bootmp from the files.
1587
1588 2007-01-17 Akim Demaille <akim@epita.fr>
1589
1590 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1591 nonterminals.
1592 Use per-type %printer.
1593
1594 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1595
1596 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1597 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1598 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1599 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1600 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1601 tests/glr-regression.at, tests/input.at, tests/local.at,
1602 tests/output.at, tests/torture.at: Update copyright to 2007.
1603
1604 2007-01-16 Akim Demaille <akim@epita.fr>
1605
1606 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1607 error code.
1608 (Calc++ Scanner): Exit with failure if we can't open the input
1609 file.
1610 Accept "-" standing for stdin.
1611 (Calc++ Top Level): Print the result only if the parsing was
1612 successful.
1613
1614 2007-01-16 Akim Demaille <akim@epita.fr>
1615
1616 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1617
1618 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
1619 and Joel E. Denny <jdenny@ces.clemson.edu>
1620
1621 Clean up %define and %code implementation in M4 some. Most
1622 importantly, rename all related macros to be in the b4_percent_define
1623 and b4_percent_code namespaces. Also, complete support for `.' in
1624 %define variable names and %code qualifiers.
1625 * data/bison.m4 (b4_check_user_names): Check for special
1626 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1627 m4_foreach loops.
1628 (b4_get_percent_define, b4_get_percent_code): Rename to...
1629 (b4_percent_define_get, b4_percent_code_get): ... these.
1630 Extend documentation with examples.
1631 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1632 b4_percent_define_skeleton_variables and
1633 b4_percent_code_skeleton_qualifiers.
1634 Expect any value for the %define variable `foo' to be stored in the
1635 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1636 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1637 expect any unqualified %code blocks to be stored in a macro named
1638 `b4_percent_code_unqualified'.
1639 Use m4_indir so that %define variable names and %code qualifiers can
1640 contain `.', which is allowed by the grammar parser.
1641 (b4_percent_define_default): New macro to set a default value for a
1642 %define variable.
1643 (m4_wrap): Update wrapped code, and fix some underquoting.
1644 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1645 Expect grammar uses of %define variables and %code qualifiers to be
1646 defined in b4_percent_define_user_variables and
1647 b4_percent_code_user_qualifiers.
1648 * data/c++.m4: Use b4_percent_define_default rather than
1649 m4_define_default. Fix some underquoting. Skeleton usage of %define
1650 variable define_location_comparison now implies skeleton usage of
1651 %define variable filename_type.
1652 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1653 data/push.c, data/yacc.c: Update macro names.
1654 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1655 muscle names.
1656
1657 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1658
1659 DJGPP specific issues.
1660
1661 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1662 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1663
1664 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1665
1666 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1667 run parsers in all tests so that Valgrind is invoked during
1668 maintainer-check-valgrind.
1669 (Duplicate representation of merged trees): Free all semantic values.
1670 (Duplicated user destructor for lookahead): Likewise.
1671
1672 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1673
1674 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1675 command-line prefix.
1676 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1677 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1678 miss Valgrind messages.
1679 (Exploding the Stack Size with Malloc): Likewise.
1680
1681 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1682
1683 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1684 locals. Reported by Juan Manuel Guerrero at
1685 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1686 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1687 Fix some indentation also.
1688 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1689 explaining this issue.
1690
1691 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
1692 and Joel E. Denny <jdenny@ces.clemson.edu>
1693
1694 Simplify union and prologue handling, and escape union and lex/parse
1695 params with digraphs.
1696 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1697 values to the empty string since these are no longer guaranteed
1698 initialized by the front-end.
1699 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1700 braces around b4_user_stype since this is no longer done by the
1701 front-end.
1702 * src/files.c, src/files.h (pre_prologue_obstack,
1703 post_prologue_obstack): Remove.
1704 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1705 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1706 with digraphs. This fixes lex params and parse params.
1707 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1708 * src/output.c (prepare): Remove muscle insertion of the prologues.
1709 (output): Remove freeing of pre_prologue_obstack and
1710 post_prologue_obstack.
1711 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1712 than prologue_augment for prologue parsing so you don't need prologue
1713 obstacks.
1714 (grammar_declaration): For %union RHS, use `braceless' instead of
1715 "{...}" so that braces are already stripped and code is escaped with
1716 digraphs.
1717 * src/reader.c (prologue_augment): Remove.
1718 (reader): Remove initialization of pre_prologue_obstack and
1719 post_prologue_obstack.
1720 * src/reader.h (prologue_augment): Remove.
1721
1722 * data/c.m4: Remove stray parenthesis.
1723
1724 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1725
1726 Remove quotes from variables names in %define directives and from
1727 qualifiers in %code directives, and restrict the characters that are
1728 allowed in them to M4-friendly ones. For %define, continue to support
1729 the quoted form as a deprecated feature. Discussed starting at
1730 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1731 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1732 %code.
1733 * doc/bison.texinfo (Prologue Alternatives): Update.
1734 (Decl Summary): In %defines entry, update mention of `%code requires'
1735 and `%code provides'.
1736 (C++ Location Values): Update %define uses.
1737 (Calc++ Parser Interface): Likewise.
1738 (Calc++ Parser): Likewise, and update `%code requires' uses.
1739 (Table of Symbols): Update %code documentation.
1740 * src/parse-gram.y (prologue_declaration): For %define variables, use
1741 `variable' instead of `STRING'.
1742 (grammar_declaration): For %code qualifiers, use `ID' instead of
1743 `STRING'.
1744 (variable): New nonterminal that takes an `ID' or a `STRING'.
1745 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1746 and %define uses.
1747 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1748 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1749 (%define errors): Update %define uses.
1750
1751 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1752
1753 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1754 instead of muscle_insert for %define values so that M4-special
1755 characters are replaced with digraphs.
1756 * tests/input.at (%define errors): Extend to check weird values.
1757
1758 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1759
1760 Instead of having skeletons declare all valid %define variables and
1761 %code qualifiers, provide macros that retrieve the associated values
1762 and build these lists automatically. Thus Bison will now warn when a
1763 variable or qualifier is not used by the skeleton in the current
1764 invocation regardless of whether it might sometimes be used by that
1765 skeleton in other invocations. Also, move all %define value macros to
1766 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1767 form, which is replaced by %code.
1768 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1769 (b4_check_user_names): ... this, and change the series of valid name
1770 arguments to a single list argument for names used in the skeleton
1771 similar to the existing list argument for names used in the grammar.
1772 Warn instead of complaining.
1773 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1774 values and %code code, to format %code code properly, and to build
1775 lists of all %define variables and %code qualifiers used in the
1776 skeleton: b4_skeleton_percent_define_variables and
1777 b4_skeleton_percent_code_qualifiers.
1778 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1779 Remove, and...
1780 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1781 the skeleton names lists can finish building first. In place of
1782 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1783 expect the lists b4_user_percent_define_variables and
1784 b4_user_percent_code_qualifiers.
1785 * data/c++.m4: Where setting default values for b4_parser_class_name,
1786 b4_location_type, b4_filename_type, b4_namespace, and
1787 b4_define_location_comparison, update their names to the
1788 b4_percent_define_ namespace.
1789 * data/glr.c: Don't use b4_check_percent_define_variables and
1790 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1791 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1792 (b4_parser_class_name, b4_namespace): Define these using
1793 b4_get_percent_define for parser_class_name and namespace.
1794 * data/location.cc: Use b4_get_percent_define.
1795 * data/push.c: Don't use b4_check_percent_define_variables and
1796 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1797 * data/yacc.c: Likewise, and don't call m4_exit in
1798 b4_use_push_for_pull_if or m4_wrap code will never execute.
1799 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1800 Rename to...
1801 (muscle_grow_user_name_list): ... this for consistency with the
1802 terminology used in bison.m4.
1803 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1804 %define variable names, and rename muscle used_percent_define_variables
1805 to user_percent_define_variables.
1806 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1807 user_percent_code_qualifiers.
1808 (content): Remove.
1809 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1810 {CODE} form is no longer accepted.
1811 * tests/input.at (Reject bad %code qualifiers): Rename to...
1812 (Reject unused %code qualifiers): ... this, and update test output.
1813 (%define error): Update test output.
1814
1815 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1816
1817 Check for unrecognized %define variables similar to checking for
1818 unrecognized %code qualifiers. Check for redefined %define variables.
1819 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1820 generalizes...
1821 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1822 (b4_check_percent_define_variables): New, also wraps it.
1823 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1824 variables using b4_check_percent_define_variables.
1825 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1826 all those exercised in the test suite and all those listed in the
1827 `Default values' section of c++.m4. Are there others?
1828 * data/push.c, data/yacc.c: Declare no valid %define variables.
1829 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1830 similar to muscle_find, but it works even when the muscle stores a
1831 const value.
1832 (muscle_grow_used_name_list): New function for constructing the used
1833 name list muscles that b4_check_for_unrecognized_names requires.
1834 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1835 %define'd more than once. Define the b4_used_percent_define_variables
1836 muscle with muscle_grow_used_name_list.
1837 (grammar_declaration): Abbreviate %code code with
1838 muscle_grow_used_name_list.
1839 * tests/input.at (%define errors): New.
1840
1841 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1842
1843 Provide warn_at, complain_at, and fatal_at function callbacks to the
1844 skeletons, and use this for %code qualifier complaints.
1845 * data/bison.m4 (b4_error_at): New, invoked by...
1846 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1847 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1848 @fatal_at(...@) directives.
1849 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1850 qualifiers in b4_used_percent_code_qualifiers and to use
1851 b4_complain_at.
1852 * src/location.c, src/location.h (boundary_set_from_string): New global
1853 function.
1854 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1855 function.
1856 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1857 to b4_used_percent_code_qualifiers.
1858 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1859 function.
1860 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1861 (lineno): Rename to...
1862 (out_lineno): ... this so I don't misunderstand it again.
1863 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1864 here; these newlines are in the input but not the output file.
1865 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1866 (at_directive_perform): ... this new static function, and add handling
1867 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1868 directives.
1869 * tests/input.at (Reject bad %code qualifiers): Update test output with
1870 locations and extend.
1871
1872 * tests/output.at (Output file name: [, Output file name: ]): Remove
1873 bogus comment about these tests failing.
1874
1875 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1876
1877 Clean up b4_check_percent_code_qualifiers a little.
1878 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1879 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1880 documentation and add examples.
1881 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1882 qualifiers here.
1883
1884 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1885
1886 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1887 unreliable -- especially when they're hidden inside another macro.
1888 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1889 data/c.m4: Remove m4_divert(-1).
1890 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1891 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1892 m4_divert_push(0) and m4_divert_pop(0).
1893 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
1894 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1895 pushed and popped by m4sugar, should be first on the stack.
1896
1897 Provide warn, complain, and fatal function callbacks to the skeletons.
1898 This provides more flexibility than m4_fatal, improves the error
1899 message format, and captures messages for translation. Discussed
1900 starting at
1901 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1902 * data/bison.m4 (b4_error): New, invoked by...
1903 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1904 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1905 directives. Because these M4 macros might be called when the current
1906 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1907 the previous removal of uses of m4_divert, which caused trouble.
1908 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1909 m4_fatal to report unrecognized %code qualifiers.
1910 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1911 push parser requests.
1912 * data/glr.c: Use b4_complain instead of m4_fatal to report
1913 non-deterministic push parser requests.
1914 Update @output usage to @output(...@) form.
1915 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
1916 report missing %defines. Update @output usage to @output(...@) form.
1917 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
1918 @output(...@) form.
1919 * src/main.c (main): Invoke skel_scanner_free.
1920 * src/scan-skel.h (skel_scanner_free): Prototype new function.
1921 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
1922 obstack_for_string from flex-scanner.h.
1923 (YY_DECL): Use to declare skel_lex static.
1924 (decode_at_digraphs): Remove; now handled in the new
1925 SC_AT_DIRECTIVE_ARG start condition.
1926 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
1927 functions.
1928 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
1929 at_directive_argv): New static globals.
1930 (INITIAL): Use fail_for_invalid_at.
1931 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
1932 recognize the start of a generalized `@directive(...@)' form and
1933 start...
1934 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
1935 directive args (using the new obstack_for_string), to decode the
1936 contained @ diagraphs, and to perform the directive. It recognizes
1937 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
1938 @output(...@).
1939 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
1940 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
1941 `@,'.
1942 (scan_skel): Initialize obstack_for_string on the first call.
1943 (skel_scanner_free): New function to free obstack_for_string.
1944 * tests/input.at (Reject bad %code qualifiers): Update test output.
1945
1946 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
1947
1948 Consolidate the 4 prologue alternative directives (%code, %requires,
1949 %provides, and %code-top) into a single %code directive with an
1950 optional qualifier field. Discussed at
1951 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
1952 * NEWS (2.3a+): Rewrite the existing entry for the prologue
1953 alternatives.
1954 * doc/bison.texinfo (Prologue Alternatives): Update.
1955 (Decl Summary): Update to %code "requires" and %code "provides".
1956 (Calc++ Parser): Update to %code "requires".
1957 (Table of Symbols): Remove entries for %requires, %provides, and
1958 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
1959 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
1960 are replaced by b4_percent_code_provides and b4_percent_code_requires,
1961 which are skeleton-specific.
1962 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
1963 declare what %code qualifiers it supports and to complain if any other
1964 qualifiers were used in the grammar.
1965 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
1966 and b4_user_code([b4_percent_code_provides]) in place of
1967 b4_user_requires and b4_user_provides.
1968 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
1969 Add b4_user_code([b4_percent_code_top]) and
1970 b4_user_code([b4_percent_code]).
1971 Invoke b4_check_percent_code_qualifiers.
1972 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1973 PERCENT_REQUIRES): Remove.
1974 (grammar_declaration): Remove RHS's for %code-top, %provides, and
1975 %requires. Rewrite the %code RHS as the unqualified form defining the
1976 muscle b4_percent_code. Add another RHS for the qualified %code form,
1977 which defines muscles of the form b4_percent_code_QUALIFIER and the
1978 b4_used_percent_code_qualifiers muscle.
1979 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
1980 PERCENT_REQUIRES): Remove.
1981 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
1982 %code "requires" and %code "provides".
1983 * tests/input.at (Reject bad %code qualifiers): New.
1984
1985 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
1986
1987 Use the new code_props interface for destructors and printers.
1988 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
1989 printer_location members, and change the type of the destructor and
1990 printer members to code_props.
1991 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
1992 symbol_printer_get, semantic_type_destructor_set,
1993 semantic_type_printer_set, default_tagged_destructor_set,
1994 default_tagless_destructor_set, default_tagged_printer_set,
1995 default_tagless_printer_set): Use code_props in arguments and return
1996 types in place of char const * and location.
1997 (symbol_destructor_location_get, symbol_printer_location_get): Remove
1998 since the locations are now contained in the return of
1999 symbol_destructor_get and symbol_printer_get.
2000 * src/output.c (symbol_destructors_output, symbol_printers_output):
2001 Replace with...
2002 (symbol_code_props_output): ... this to eliminate duplicate code.
2003 (output_skeleton): Update to use symbol_code_props_output.
2004 * src/reader.c (symbol_should_be_used): Update use of
2005 symbol_destructor_get.
2006 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2007 Update uses of the various _destructor_set and _printer_set functions.
2008 * src/symtab.c: (default_tagged_destructor_location,
2009 default_tagless_destructor_location, default_tagged_printer_location,
2010 default_tagless_printer_location): Remove since we...
2011 (default_tagged_destructor, default_tagless_destructor,
2012 default_tagged_printer, default_tagless_printer): ... change the type
2013 of these to code_props.
2014 (symbol_new, semantic_type_new, symbol_destructor_set,
2015 semantic_type_destructor_set, symbol_destructor_get,
2016 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2017 symbol_check_alias_consistency, default_tagged_destructor_set,
2018 default_tagless_destructor_set, default_tagged_printer_set,
2019 default_tagless_printer_set): Update.
2020 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2021 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2022 code_props members.
2023 (symbol_print): Use SYMBOL_CODE_PRINT.
2024
2025 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2026
2027 Use the new code_props interface for rule actions.
2028 * src/symlist.h (symbol_list): Replace action, action_location, and
2029 used members with a code_props action_props member.
2030 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2031 grammar_midrule_action, grammar_current_rule_merge_set,
2032 grammar_current_rule_symbol_append, packgram): Update.
2033 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2034 * src/scan-code.l (handle_action_dollar): Update.
2035 (translate_rule_action): Remove, no longer used.
2036 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2037
2038 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2039
2040 Use the new code_props interface in parse-gram.y.
2041 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2042 Update all uses of translate_* functions to use the new code_props
2043 interface and to use gram_scanner_last_string_free and
2044 code_scanner_last_string_free where possible.
2045 (grammar_declaration): symbol_list_destructor_set and
2046 symbol_list_printer_set now perform the translation, so don't do it
2047 here. Use gram_scanner_last_string_free where possible.
2048 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2049 translate_code): Remove, no longer used.
2050 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2051 symbol_list_printer_set): Perform code translation here rather than
2052 depending on the caller to do so.
2053
2054 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2055 * src/scan-gram.h (gram_last_string): Remove declaration.
2056 * src/scan-gram.l (last_string): Declare it static.
2057
2058 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2059
2060 Encapsulate code properties and related functionality for the various
2061 destructors, printers, and actions into a code_props structure and
2062 interface. This patch merely implements code_props in scan-code.h and
2063 scan-code.l. Future patches will rewrite other modules to use it.
2064 Discussed starting at
2065 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2066 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2067 consistently initialize const structs that have an empty location
2068 field.
2069 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2070 to ensure consistency.
2071 * src/scan-code.h (code_props): New structure.
2072 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2073 function, macro, and const global variable for initializing a
2074 code_props with no code.
2075 (code_props_plain_init, code_props_symbol_action_init,
2076 code_props_rule_action_init, code_props_translate_code): The rest of
2077 the new code_props functional interface. Among other things, the init
2078 functions set the code_props kind field so that
2079 code_props_translate_code will know whether to behave like
2080 translate_symbol_action, translate_rule_action, or translate_code.
2081 These old translate functions must remain until all other modules are
2082 updated to use the new code_props interface.
2083 (code_scanner_last_string_free): New function similar to
2084 gram_scanner_last_string_free.
2085 (code_scanner_free): Add documentation.
2086 * src/scan-code.l: Implement the new interface.
2087 (code_lex): Make it static, add a code_props* argument, and remove the
2088 rule argument.
2089 (last_string): New static global similar to the one in scan-gram.l.
2090 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2091 instead of rule.
2092 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2093 code_props since Bison may one day use this information for destructors
2094 and printers.
2095 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2096 (handle_action_dollar): Use symbol_list_n_get and set used flag
2097 directly since symbol_list_n_used_set is removed.
2098 (translate_action): Add a code_props* argument and remove the rule,
2099 action, and location arguments. Pass the code_props* on to code_lex.
2100 (translate_rule_action, translate_symbol_action, translate_code):
2101 Rewrite as wrappers around the new code_props interface.
2102 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2103 it would eventually need to break the encapsulation of code_props.
2104
2105 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2106
2107 * etc/.cvsignore: New.
2108
2109 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2110
2111 Add maintainer-push-check to run maintainer-check using push parsing in
2112 place of pull parsing where available.
2113 * Makefile.am (maintainer-push-check): New.
2114 * data/bison.m4 (b4_use_push_for_pull_if): New.
2115 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2116 appropriately based on their existing values.
2117 (yypush_parse): Don't print push-parser-specific diagnostics if push
2118 parsing is being used in place of pull parsing.
2119 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2120 push.c.
2121 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2122 variable, and insert b4_use_push_for_pull_flag into muscles.
2123 * tests/Makefile.am (maintainer-push-check): New.
2124
2125 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2126
2127 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2128 (whether successful or failed) so that yypush_parse can be invoked
2129 again to start a new parse using the same yypstate.
2130 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2131 check multiple yypull_parse invocations on the same yypstate. For pull
2132 mode, extend to check multiple yyparse invocations.
2133 (Exploding the Stack Size with Alloca): Extend to try with
2134 %push-pull-parser.
2135 (Exploding the Stack Size with Malloc): Likewise.
2136
2137 * tests/calc.at (Simple LALR Calculator): Don't specify
2138 %skeleton "push.c" since %push-pull-parser implies that now.
2139 * tests/headers.at (export YYLTYPE): Don't check for the push
2140 declarations. Otherwise, this test case can't be used to see if push
2141 mode can truly emulate pull mode.
2142 * tests/input.at (Torturing the Scanner): Likewise.
2143 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2144 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2145 AT_YACC_IF, which now includes the case of push mode since %skeleton
2146 need not be used for push mode. This will be more intuitive once
2147 push.c is renamed to yacc.c.
2148
2149 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2150
2151 For push mode, convert yyparse from a macro to a function, invoke yylex
2152 instead of passing a yylexp argument to yypull_parse, and don't
2153 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2154 Discussed starting at
2155 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2156 * data/bison.m4 (b4_pull_if): New.
2157 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2158 * data/push.c: Improve M4 quoting a little.
2159 (b4_generate_macro_args, b4_parenthesize): Remove.
2160 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2161 any time a pull parser is requested.
2162 Don't #define this as a wrapper around yypull_parse. Instead, when
2163 both push and pull are requested, make it a function that does that
2164 same thing.
2165 (yypull_parse): If there's a b4_prefix, #define this to
2166 b4_prefix[pull_parse] when both push and pull are requested.
2167 Don't define this as a function unless both push and pull are
2168 requested.
2169 Remove the yylexp argument and hard-code yylex invocation instead.
2170 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2171 %push-parser.
2172 * src/getargs.c (pull_parser): New global initialized to true.
2173 * getargs.h (pull_parser): extern it.
2174 * src/output.c (prepare): Insert pull_flag muscle.
2175 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2176 (prologue_declaration): Set both push_parser and pull_parser = true for
2177 %push-pull-parser. Set push_parser = true and pull_parser = false for
2178 %push-parser.
2179 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2180 %push-parser since there's no backward-compatibility concern here.
2181 Scan %push-pull-parser.
2182 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2183 instead of %push-parser.
2184 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2185 prototype it in the module that calls yyparse.
2186 * tests/input.at (Torturing the Scanner): Likewise.
2187 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2188
2189 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2190
2191 Update etc/bench.pl. Optimize push mode a little (the yyn change
2192 deserves most of the credit).
2193 * Makefile.am (SUBDIRS): Add etc subdirectory.
2194 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2195 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2196 yytoken, yyval, and yyloc declarations to...
2197 (yyparse or yypush_parse): ... here to improve performance. For
2198 yypush_parse invocations after the first, be sure to assign yyn its old
2199 value again.
2200 (yypstate_new): Don't bother initializing the yyresult field since the
2201 initial value isn't used.
2202 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2203 remove the #define that, in push mode, set it to yyps->NAME.
2204 * etc/Makefile.am: New.
2205 * etc/bench.pl: Remove and build it instead from...
2206 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2207 "tests/bison" from the build directory by default rather than just
2208 invoking "bison" from $PATH.
2209 (calc_grammar): Update push parser code: don't declare yylval globally,
2210 don't define yyparse_wrapper, and don't #define yyparse.
2211 (bench_grammar): Update to check all working combinations of yacc.c,
2212 push.c, impure, pure, pull, and push.
2213
2214 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2215
2216 For push mode, add pull wrappers around yypush_parse.
2217 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2218 (yypull_parse): New function wrapping yypush_parse.
2219 (yyparse): New #define wrapping yypull_parse.
2220 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2221 is declared.
2222 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2223 prototype yylex in the module that calls yyparse, and don't prototype
2224 yyparse there. Otherwise, the yyparse expansion won't compile.
2225 * tests/input.at (Torturing the Scanner): Likewise.
2226
2227 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2228
2229 Enable push parsers to operate in impure mode. Thus, %push-parser no
2230 longer implies %pure-parser. The point of this change is to move
2231 towards being able to test the push parser code by running the entire
2232 test suite as if %push-parser had been declared.
2233 * data/push.c (yypush_parse): For impure mode, remove the
2234 yypushed_char, yypushed_val, and yypushed_loc arguments.
2235 Instead, declare these as local variables initialized to the global
2236 yychar, yylval, and yylloc.
2237 For the first yypush_parse invocation only, restore the initial values
2238 of these global variables when it's time to read a token since they
2239 have been overwritten.
2240 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2241 %push-parser.
2242 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2243 %pure-parser along with %push-parser since this test case was designed
2244 for pure push parsers.
2245 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2246 (AT_YACC_OR_PUSH_IF): New.
2247 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2248 add a note that it's still wrong for some cases (as it has been for a
2249 while).
2250 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2251 %push-parser no longer implies %pure-parser.
2252
2253 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2254
2255 Remove some unnecessary differences between the pull parser code and
2256 the push parser code. This patch enables yynerrs in push mode.
2257 * data/push.c: Reformat M4 a little.
2258 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2259 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2260 because push mode is on. Instead, if pure mode is on, move yynerrs
2261 to...
2262 (b4_declare_parser_state_variables): ... here.
2263 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2264 to yyps->NAME so it can be used in yypush_parse.
2265 (yypush_parse): Don't omit uses of yynerrs in push mode.
2266
2267 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2268
2269 Fix bug such that the first pushed token's value and location are
2270 sometimes overwritten (sometimes by %initial-action) before being used.
2271 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2272 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2273 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2274 more closely mimic the pull parser logic.
2275 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2276 time to read a token, which is after any initialization of yylval and
2277 yylloc.
2278 (gottoken): Rename label to...
2279 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2280 user namespace.
2281
2282 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2283
2284 Rearrange initialization of the parser state variables so that the
2285 skeleton doesn't have to have a copy for pull mode and another for push
2286 mode. This patch also fixes at least a bug such that yylloc was not
2287 initialized (with b4_location_initial_line and
2288 b4_location_initial_column) upon calling yypush_parse. However, that
2289 initialization now overwrites the first token's location;
2290 %initial-action assigning @$ already did the same thing, and both bugs
2291 will be fixed in a later patch.
2292 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2293 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2294 yyss, yyvs, yyls, and yystacksize.
2295 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2296 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2297 yylsp.
2298 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2299 yyps->NAME so it can be used in yypush_parse.
2300 (yyparse or yypush_parse): For yypush_parse, don't print the
2301 "Starting parse" diagnostic for invocations after the first.
2302 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2303 yypush_parse, only do it for the first invocation.
2304 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2305 initialization to occur in yypush_parse but only on the first
2306 invocation.
2307
2308 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2309
2310 * data/push.c: Add CPP guards around push parser declarations in both
2311 the header and the code file.
2312 In the code file, move the push parser declarations to the same place
2313 they appear in the header file.
2314 Clean up the M4 some, especially the inconsistent underquoting in
2315 some b4_c_function_def and b4_c_function_decl uses.
2316
2317 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2318
2319 Encapsulate the push parser state variables into an M4 macro so the
2320 push skeleton doesn't have to list them again for pull mode's yyparse.
2321 For push mode, remove yypush_parse's local equivalents of these
2322 variables to eliminate unnecessary copying between the two sets at
2323 run-time. This patch also fixes at least a bug related to multiple
2324 %initial-action invocations in push mode.
2325 * data/push.c (b4_declare_parser_variables): Rename to...
2326 (b4_declare_scanner_communication_variables): ... this for clarity and
2327 update both uses.
2328 (b4_declare_yyparse_variables): Remove and move its contents to the one
2329 spot where it was invoked.
2330 (b4_declare_parser_state_variables): New macro containing the parser
2331 state variables required by push mode.
2332 (struct yypstate): Replace all fields but yynew with
2333 b4_declare_parser_state_variables.
2334 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2335 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2336 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2337 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2338 parser state variable declarations with
2339 b4_declare_parser_state_variables.
2340 Don't initialize parser state variables when calling yypush_parse since
2341 yypstate_new already does that.
2342 Invoke the user's initial action only upon the first yypush_parse
2343 invocation.
2344 Remove all code that copies between the local parser state variables
2345 and the yypstate.
2346
2347 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2348
2349 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2350 prevent a name collision in a future patch where these names will
2351 sometimes be #define'd.
2352 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2353 since it no longer has the same name as the existing argument.
2354 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2355
2356 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
2357 and Joel E. Denny <jdenny@ces.clemson.edu>
2358
2359 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2360 that the argument is case-insensitive, and there's no `=' here.
2361 For the %skeleton entry, mention that %language is better.
2362 (Bison Options): Likewise for --language and --skeleton. Move the
2363 --skeleton entry so that the `Tuning the parser' section is sorted
2364 alphabetically on long options.
2365 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2366 %language directive in detail here; cross-reference the %language
2367 documentation instead.
2368 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2369 `%require "2.3b"' so that the example is always up-to-date.
2370 (Table of Symbols): Add entries for %language and %skeleton.
2371 * examples/extexi (normalize): Instead of replacing every %require
2372 argument with the current Bison version, just substitute for
2373 `@value{VERSION}'. This guarantees that we're testing what actually
2374 appears in the documentation.
2375 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2376 rather than `@VERSION@'.
2377
2378 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2379
2380 * NEWS: Reword the %language news a bit, and put it earlier.
2381
2382 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2383 Rewrite to simplify the logic.
2384 (language_argmatch): Likewise.
2385 (program_name): We now own this var.
2386 * src/getargs.h (struct bison_language): Use char[] rather than
2387 const char *.
2388
2389 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2390 Java is supported.
2391 * src/complain.c (program_name): Remove decl; no longer needed.
2392 * src/main.c (program_name): Remove; now belongs to getargs.
2393
2394 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
2395
2396 * NEWS: Document %language.
2397
2398 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2399
2400 * data/c-skel.m4, data/c++-skel.m4: New files.
2401 * data/glr.c: Complain on push parsers.
2402
2403 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2404 over %skeleton.
2405 (Decl Summary): Document %language and %skeleton.
2406 (Command line): Document -L.
2407
2408 * examples/extexi: Rewrite %require directive.
2409 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2410
2411 * src/files.c (compute_exts_from_gc): Look in language structure
2412 for .y extension.
2413 (compute_file_name_parts): Check whether .tab should be added.
2414 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2415 (language, skeleton_arg, language_argmatch): New.
2416 (long_options): Add --language.
2417 (getargs): Use skeleton_arg, add -L/--language.
2418 * src/getargs.h: Include location.h.
2419 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2420 * src/output.c (prepare): Pick default skeleton from struct language.
2421 Don't dispatch C skeletons here.
2422 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2423 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2424 * src/scan-gram.l ("%language"): New rule.
2425
2426 * tests/calc.at: Test %skeleton and %language.
2427 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2428 (AT_GLR_IF): Look for %skeleton "glr.cc".
2429 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2430 (AT_YACC_IF): Reject %language.
2431
2432 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2433
2434 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2435 since it wasn't used; only the typedef name 'semantic_type' is needed.
2436 Also, omit trailing white space.
2437
2438 * bootstrap: Sync from coreutils.
2439 (gnulib_extra_files): Add build-aux/announce.gen.
2440 (slurp): Adjust .gitignore files like .cvsignore files.
2441 * build-aux/announce-gen: Remove from CVS, since bootstrap
2442 now creates this.
2443
2444 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2445
2446 Make %push-parser imply %pure-parser. This fixes several bugs; see
2447 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2448 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2449 pure_parser = true.
2450 * data/push.c: Don't bother testing b4_push_if when deciding whether
2451 to expand b4_declare_parser_variables globally.
2452 (yypush_parse): Likewise in here.
2453
2454 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2455 (yy_reduce_print): Reformat M4 for readability.
2456
2457 2006-12-15 Bob Rossi <bob@brasko.net>
2458 and Joel Denny <jdenny@ces.clemson.edu>
2459
2460 * data/push.c (yypstate): Add typedef, and update all uses of
2461 struct yypstate to just yypstate.
2462 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2463
2464 2006-12-14 Bob Rossi <bob@brasko.net>
2465
2466 * data/push.c (yypush_parse): Declare prototype regardless of
2467 %locations option.
2468
2469 2006-12-14 Bob Rossi <bob@brasko.net>
2470
2471 * data/push.c (yyparse): Remove the prototype and the #define when in
2472 push-parser mode.
2473
2474 2006-12-13 Bob Rossi <bob@brasko.net>
2475
2476 * data/push.c (yypstate_init): Rename to...
2477 (yypstate_new): ... this and use b4_c_function_def.
2478 (yypstate_delete): New.
2479 (yypush_parse): Change parameters yynval and yynlloc to be const.
2480 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2481 yypstate_delete functions.
2482
2483 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2484
2485 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2486 strange test case titles. Reported by Bob Rossi.
2487
2488 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2489
2490 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2491 of potential ambiguities in GLR grammers.
2492
2493 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2494
2495 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2496 `bison ', use m4_index instead of m4_substr since chopping up a string
2497 containing M4-special characters causes problems here.
2498
2499 Fix a couple of bugs related to special characters in user-specified
2500 file names, and make it easier for skeletons to compute output file
2501 names with the same file name prefix as Bison-computed output file
2502 names.
2503 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2504 b4_parser_file_name and b4_spec_defines_file instead of
2505 @output_parser_name@ and @output_header_name@, which are now redundant.
2506 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2507 b4_parser_file_name, b4_spec_defines_file, and the new
2508 @basename(FILENAME@) instead of @output_parser_name@ and
2509 @output_header_name@, which inappropriately escaped the file names as
2510 C string literals.
2511 * src/files.c (all_but_ext): Remove static qualifier.
2512 (compute_output_file_names): Move `free (all_but_ext)' to...
2513 (output_file_names_free): ... here since all_but_ext is needed later.
2514 * src/files.h (all_but_ext): Extern.
2515 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2516 exactly what MUSCLE_INSERT_STRING used to do.
2517 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2518 characters are escaped properly.
2519 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2520 all_but_ext.
2521 For pkgdatadir muscle, maintain previous functionality by using
2522 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2523 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2524 digraphs would never be expanded. Hopefully no one has M4-special
2525 characters in his Bison installation path.
2526 * src/scan-skel.l: Don't parse @output_header_name@ and
2527 @output_parser_name@ anymore since they're now redundant.
2528 In @output, use decode_at_digraphs.
2529 Parse a new @basename command that invokes last_component.
2530 (decode_at_digraphs): New.
2531 (BASE_QPUTS): Remove unused.
2532 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2533 (Output file name): New tests.
2534
2535 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2536
2537 Warn about output files that are generated by the skeletons and that
2538 conflict with other output files.
2539 * data/glr.c: Don't generate the header file here when glr.cc does.
2540 * src/files.c (file_names, file_names_count): New static globals.
2541 (compute_output_file_names): Invoke output_file_name_check for files
2542 not generated by the skeletons and remove existing checks.
2543 (output_file_name_check): New function that warns about conflicting
2544 output file names.
2545 (output_file_names_free): Free file_names.
2546 * src/files.h (output_file_name_check): Declare.
2547 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2548 the skeletons.
2549 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2550 (Conflicting output files): New tests.
2551
2552 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2553
2554 * doc/bison.texinfo: Fix a couple of typos.
2555
2556 2006-12-08 Bob Rossi <bob@brasko.net>
2557
2558 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2559 Rename to...
2560 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2561 update all uses.
2562 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2563 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2564 local pv.
2565 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2566 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2567
2568 2006-12-07 Bob Rossi <bob@brasko.net>
2569 and Joel Denny <jdenny@ces.clemson.edu>
2570
2571 * data/push.c (yypvarsinit): Change return type from void* to struct
2572 yypvars*. No longer cast to void* on return.
2573 (struct yypvars): Remove yylen since it need not be remembered between
2574 yypushparse invocations.
2575 (yypushparse): Don't copy between yylen and pv->yylen.
2576
2577 2006-12-05 Bob Rossi <bob@brasko.net>
2578
2579 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2580 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2581 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2582 (struct yypvars): Remove b4_declare_parser_variables.
2583 (yypvarsinit): Remove init code for removed variables.
2584 (global scope): Do not declare b4_declare_parser_variables if
2585 push or pure mode.
2586 (yypushparse): Add b4_declare_parser_variables.
2587 Init new local variables, and remove init code for removed
2588 yypvars variables.
2589 (yyparse): Delete.
2590 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2591 and yyparse for other modes.
2592 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2593 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2594 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2595 (AT_PURE_LEX_IF): True if pure or push parser.
2596
2597 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2598
2599 Document Yacc prologue alternatives and default %destructor's and
2600 %printer's as experimental. Don't mention Java yet. Discussed at
2601 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2602 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2603 (2.3a): Annotate this entry to say the old forms of these features were
2604 also experimental.
2605 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2606 Table of Symbols): Say they're experimental. Comment out any mention
2607 of Java (we'll want this back eventually).
2608
2609 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2610
2611 Support a file name argument to %defines. Deprecate `=' in
2612 %file-prefix, %name-prefix, and %output. Discussed at
2613 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2614 * NEWS (2.3a+): Mention.
2615 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2616 form of %defines, and remove `=' from entries for %file-prefix,
2617 %name-prefix, and %output.
2618 * src/parse-gram.y (prologue_declaration): Implement.
2619 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2620 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2621 all but one occurrence of %name-prefix.
2622 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2623 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2624 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2625 occurrence of each of %file-prefix and %output. Add check for %defines
2626 with argument.
2627 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2628 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2629 Remove the `=' from %output.
2630
2631 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2632
2633 Don't escape $ in test case titles since Autoconf 2.61 now does that
2634 correctly.
2635 * tests/actions.at (Default %printer and %destructor are not for error
2636 or $undefined): Here.
2637 (Default %printer and %destructor are not for $accept): Here.
2638 * tests/input.at (Invalid $n and @n): Here.
2639
2640 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2641
2642 Rename <!> to <>. Discussed starting at
2643 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2644 * NEWS (2.3a+): Update.
2645 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2646 Update.
2647 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2648 * src/scan-gram.l (INITIAL): Implement.
2649 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2650 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2651 comment.
2652 * tests/actions.at (Default tagless %printer and %destructor,
2653 Default tagged and per-type %printer and %destructor,
2654 Default %printer and %destructor are not for error or $undefined,
2655 Default %printer and %destructor are not for $accept,
2656 Default %printer and %destructor for mid-rule values): Update.
2657 * tests/input.at (Default %printer and %destructor redeclared,
2658 Unused values with default %destructor): Update.
2659
2660 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2661
2662 Don't let %prec take a nonterminal.
2663 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2664 token.
2665 * tests/input.at (%prec takes a token): New test checking that %prec
2666 won't take a nonterminal.
2667
2668 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2669
2670 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2671 it was double-quoted.
2672 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2673 grammar is maintained with Bison's highest standards.
2674 * src/getargs.c: Fix some typos in Doxygen comments.
2675
2676 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2677
2678 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2679 later. Reported by Paul Eggert in
2680 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2681 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2682 * src/scan-code.l (translate_action): Don't bother invoking
2683 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2684 (code_scanner_free): Instead of invoking
2685 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2686 which frees more.
2687 * src/scan-gram.l (gram_scanner_free): Likewise.
2688 * src/scan-skel.l (scan_skel): Likewise.
2689
2690 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2691
2692 * src/files.c (tr): Change return type to void.
2693 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2694 has been called previously for the same key.
2695 (muscle_find): Return storage instead of value so that
2696 --enable-gcc-warnings doesn't produce warnings that the return discards
2697 const. aver that the value and storage are the same since storage
2698 could potentially be NULL when value is not.
2699 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2700 same as 0.
2701
2702 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2703
2704 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2705 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2706 us a slightly cleaner distribution, and also works.
2707 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2708 gnulib changes.
2709
2710 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2711 and Paul Eggert <eggert@cs.ucla.edu>
2712
2713 Don't let Bison leak memory except when it complains.
2714 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2715 (spec_defines_file, dir_prefix): Now char *, not const char *,
2716 since they are freed.
2717 * src/files.c: Likewise.
2718 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2719 Likewise.
2720 (tr): Now operates in-place. All uses changed.
2721 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2722 values.
2723 (compute_file_name_parts, compute_output_file_names): Don't store
2724 read-only data in variables that will be freed.
2725 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2726 src_extension, and header_extension.
2727 (output_file_names_free): New public function to free
2728 spec_verbose_file, spec_graph_file, spec_defines_file,
2729 parser_file_name, and dir_prefix.
2730 * src/getargs.c (getargs): Don't store read-only data in variables that
2731 will be freed.
2732 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2733 (which previously existed but was unused), and quotearg_free.
2734 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2735 * src/muscle_tab.c: Likewise.
2736 (muscle_entry): Make the value char const *,
2737 and add a new storage member that is char * and can be freed.
2738 (muscle_entry_free): New private function.
2739 (muscle_init): Use it instead of free.
2740 (muscle_insert, muscle_grow): Update and use new storage member.
2741 (muscle_code_grow): Free the string passed to muscle_grow
2742 since it's not needed anymore.
2743 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2744 add a new `char *code' member.
2745 ("{...}"): Declare semantic type as code.
2746 * src/scan-code.h (translate_rule_action):
2747 (translate_symbol_action, translate_code, translate_action): Return
2748 `char const *' rather than `char *' since external code should not free
2749 these strings.
2750 * src/scan-code.l: Likewise.
2751 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2752 which is "{...}" in the parser.
2753 * tests/Makefile.am (maintainer-check-valgrind): Set
2754 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2755 Valgrind.
2756 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2757 complain.
2758 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2759 expecting a non-zero exit status sets --leak-check=summary and
2760 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2761 this case, and we don't want to hear about it.
2762
2763 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2764
2765 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2766 instead of from the template, to simplify configuration a bit.
2767 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2768 and m4/wint_t.m4, as they are needed with the latest gnulib.
2769
2770 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2771
2772 Disable unset/unused mid-rule value warnings by default, and recognize
2773 --warnings=midrule-values to enable them. Discussed starting at
2774 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2775 * NEWS (2.3a+): Mention.
2776 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2777 warnings): Add entry for midrule-values subargument.
2778 * src/reader.c (symbol_should_be_used): Don't return true just because
2779 the value is a set/used mid-rule value unless
2780 --warnings=midrule-values was specified.
2781 * tests/input.at (Unused values, Unused values before symbol
2782 declarations): Run tests with and without --warnings=midrule-values.
2783
2784 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2785 than LIST_FREE directly.
2786
2787 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2788
2789 Finish implementing --warnings=error, which should not be implied by
2790 --warnings=all (or by its synonyms -W and --warnings without
2791 subarguments).
2792 * src/complain.c (set_warning_issued): New function to report that
2793 warnings are being treated as errors and to record an error if so.
2794 Invoke...
2795 (warn_at, warn): ... here.
2796 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2797 "error - warnings are errors" does not appear above "all - all of the
2798 above".
2799 (getargs): For -W and --warnings without subarguments, don't let
2800 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2801 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2802
2803 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2804
2805 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2806 empty subargument list. For example: `bison --warnings= parser.y'.
2807
2808 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2809
2810 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2811 the parser header file so that gcc doesn't warn.
2812
2813 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2814
2815 Split the default %destructor/%printer into two kinds: <*> and <!>.
2816 Discussed starting at
2817 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2818 * NEWS (2.3a+): Mention.
2819 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2820 previous change today related to mid-rules.
2821 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2822 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2823 (TYPE_TAG_ANY): Add as <*>.
2824 (TYPE_TAG_NONE): Add as <!>.
2825 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2826 for <*> and <!>.
2827 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2828 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2829 * src/symlist.c (symbol_list_default_new): Split into tagged and
2830 tagless versions.
2831 (symbol_list_destructor_set, symbol_list_printer_set): Split
2832 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2833 SYMLIST_DEFAULT_TAGLESS.
2834 * src/symlist.h: Update symbol_list_default*_new prototypes.
2835 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2836 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2837 * src/symtab.c (default_destructor, default_destructor_location,
2838 default_printer, default_printer_location): Split each into tagged and
2839 tagless versions.
2840 (symbol_destructor_get, symbol_destructor_location_get,
2841 symbol_printer_get, symbol_printer_location_get): Implement tagged
2842 default and tagless default cases.
2843 (default_destructor_set, default_printer_set): Split each into tagged
2844 and tagless versions.
2845 * src/symtab.h: Update prototypes.
2846 * tests/actions.at (Default %printer and %destructor): Rename to...
2847 (Default tagless %printer and %destructor): ... this, and extend.
2848 (Per-type %printer and %destructor): Rename to...
2849 (Default tagged and per-type %printer and %destructor): ... this, and
2850 extend.
2851 (Default %printer and %destructor for user-defined end token): Extend.
2852 (Default %printer and %destructor are not for error or $undefined):
2853 Update.
2854 (Default %printer and %destructor are not for $accept): Update.
2855 (Default %printer and %destructor for mid-rule values): Extend.
2856 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2857 (Unused values with default %destructor): Extend.
2858
2859 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2860
2861 Don't apply the default %destructor/%printer to an unreferenced midrule
2862 value. Mentioned at
2863 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2864 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2865 like $@n instead of just @n so that the default %destructor/%printer
2866 logic doesn't see them as user-defined symbols.
2867 (symbol_is_dummy): Check for both forms of the name.
2868 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2869 name for which the midrule value is referenced in any action.
2870 * tests/actions.at (Default %printer and %destructor for mid-rule
2871 values): New test.
2872 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2873 for change to dummy symbol names.
2874
2875 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2876
2877 Warn about unset midrule $$ if the corresponding $n is used.
2878 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2879 $n usage.
2880 (packgram): Before invoking grammar_rule_check on any rule, make sure
2881 all actions have already been scanned in order to set `used' flags.
2882 Otherwise, checking that a midrule's $$ is set will not always work
2883 properly because the midrule check must forward-reference the midrule's
2884 parent rule.
2885 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2886 warning.
2887
2888 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2889
2890 More improvements to the documentation of the prologue alternatives:
2891 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2892 Bison manual.
2893 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2894 some text to clarify the relative importance of the new directives and
2895 to show how these directives may be viewed as code labels.
2896
2897 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2898
2899 Similar to the recently removed %before-header, add %code-top as the
2900 alternative to the pre-prologue. Mentioned at
2901 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2902 Also, let the prologue alternatives appear in the grammar section.
2903 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2904 (prologue_declaration): Move the existing prologue alternatives to...
2905 (grammar_declaration): ... here and add %code-top.
2906 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2907
2908 Clean up and extend documentation for the prologue alternatives.
2909 * NEWS (2.3a+): Describe prologue alternatives.
2910 * doc/bison.texinfo (Prologue): Move discussion of prologue
2911 alternatives to...
2912 (Prologue Alternatives): ... this new section, and extend it to discuss
2913 all 4 directives in detail.
2914 (Table of Symbols): Clean up discussion of prologue alternatives and
2915 add %code-top.
2916
2917 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2918
2919 DJGPP specific issues.
2920
2921 * djgpp/config.bat: config.hin has been moved to lib. Adjust
2922 config.bat accordingly.
2923 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
2924 * djgpp/config.site: Likewise.
2925
2926 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
2927
2928 Replace %*-header with %provides, %requires, %code. See discussion at
2929 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
2930
2931 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
2932 (b4_user_start_header): Remove.
2933 * data/glr.c: Use new macros instead of b4_*start_header
2934 and b4_*end_header.
2935 * data/glr.cc: Likewise.
2936 * data/lalr1.cc: Likewise.
2937 * data/push.c: Likewise.
2938 * data/yacc.c: Likewise.
2939
2940 * doc/bison.texinfo: Remove %before-header, rename
2941 %{start,end,after}-header to %requires, %provides, %code.
2942
2943 * src/parse-gram.y: Likewise (also rename token names accordingly).
2944 * src/scan-gram.l: Likewise.
2945 * tests/actions.at: Likewise.
2946
2947 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
2948
2949 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
2950 Problem reported by Joel E. Denny.
2951
2952 2006-10-14 Jim Meyering <jim@meyering.net>
2953
2954 (Sync from coreutils.)
2955 Work also when the working directory (with e.g. coreutils sources)
2956 is version controlled with git, rather than CVS.
2957 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
2958 rather than CVS.
2959 In messages and comments, say e.g., "checked-out sources",
2960 rather than "CVS sources".
2961 (version_controlled_file): New function. Work for git as well as
2962 for CVS. Don't use grep's -q option.
2963 (slurp): Call it here, in place of CVS-specific code.
2964
2965 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
2966
2967 Fix testsuite for ./configure --enable-gcc-warnings:
2968 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
2969 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
2970 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
2971 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
2972 * test/regression.at (Diagnostic that expects two alternatives):
2973 Likewise.
2974
2975 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
2976
2977 * bootstrap.conf (gnulib_modules): Add config-h.
2978 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
2979 worry about HAVE_CONFIG_H.
2980 * lib/abitset.c: Likewise.
2981 * lib/bitset.c: Likewise.
2982 * lib/bitset_stats.c: Likewise.
2983 * lib/bitsetv-print.c: Likewise.
2984 * lib/bitsetv.c: Likewise.
2985 * lib/ebitset.c: Likewise.
2986 * lib/get-errno.c: Likewise.
2987 * lib/lbitset.c: Likewise.
2988 * lib/subpipe.c: Likewise.
2989 * lib/timevar.c: Likewise.
2990 * lib/vbitset.c: Likewise.
2991 * lib/bitset.c: Include "bitset.h" first, to test interface.
2992 * lib/bitset_stats.c: Include "bitset_stats.h" first.
2993 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
2994 * lib/bitsetv.c: Include "bitsetv.h" first.
2995 * lib/get-errno.c: Include "get-errno.h" first.
2996 * m4/.cvsignore: Add config-h.m4.
2997 * tests/actions.at (Default %printer and %destructor for ...):
2998 Adjust expected line numbers in output to reflect removal of #if
2999 HAVE_CONFIG_H lines.
3000 * tests/glr-regression.at (Missed %merge type warnings when ...):
3001 Likewise.
3002 * tests/regression.at (Braced code in declaration in rules section):
3003 Likewise.
3004 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3005 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3006 Include <config.h> unconditionally.
3007
3008 * bootstrap: Sync from coreutils, as follows:
3009
3010 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3011
3012 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3013 variable was sometimes used without being initialized. This
3014 messed up the installation of the INSTALL file in some cases.
3015
3016 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3017
3018 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3019 --copy. Inspired by a suggestion from Bruno Haible.
3020
3021 2006-10-03 Jim Meyering <jim@meyering.net>
3022
3023 * bootstrap: Undo last change to this file, since now gnulib-tool
3024 sticks with the automake default in generating dependencies.
3025
3026 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3027
3028 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3029 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3030
3031 * doc/bison.1: Add copyright notice.
3032
3033 * data/glr.c: Don't include <stdarg.h>; not used.
3034
3035 * NEWS: The -g and --graph options now output graphs in Graphviz
3036 DOT format, not VCG format.
3037 * doc/bison.1: Likewise.
3038 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
3039 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3040 of this change in
3041 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
3042 * TODO: Remove Graphviz entry.
3043 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3044 remove vcg.c, vcg.h, vcg_defaults.h.
3045 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3046 * src/graphviz.c, src/graphviz.h: New files.
3047 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3048 * src/files.h: Make comment more generic.
3049 * src/main.c (main): Likewise.
3050 * src/print_graph.h: Likewise.
3051 * src/getargs.c (usage): Make usage description more generic.
3052 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3053 (static_graph, fgraph): Remove. All uses changed to pass
3054 arguments instead of sharing a static var.
3055 (print_core, print_actions, print_state, print_graph):
3056 Output graphviz format rather than VCG format.
3057 * tests/.cvsignore: Remove *.vcg; add *.dot.
3058 * tests/output.at: Expect *.dot files, not *.vcg files.
3059
3060 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3061 accommodates the 2006-10-08 change.
3062
3063 2006-10-11 Bob Rossi <bob@brasko.net>
3064
3065 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3066 (b4_yyssa, b4_yyerror_range): New macros.
3067 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3068 (yypvarsinit): Remove init of removed fields.
3069 (yypushparse): Remove use of removed fields; use new macros instead.
3070
3071 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3072
3073 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3074 in a push parser. Reindent slightly to match yacc.c better.
3075
3076 2006-10-11 Bob Rossi <bob@brasko.net>
3077
3078 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3079 yymsg_alloc fields.
3080 (yypvarsinit, yypushparse): Remove init of removed fields.
3081 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
3082
3083 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3084
3085 * THANKS: Add Paolo Bonzini and Bob Rossi.
3086
3087 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
3088
3089 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3090 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3091 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3092 b4_define_user_cde and uses): Remove.
3093 (b4_comment, b4_prefix, b4_sync_start): New.
3094 * data/bison.m4: New file, with most of the content removed from c.m4.
3095 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3096 * src/output.c (output_skeleton): Pass bison.m4.
3097 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3098 only if specified.
3099
3100 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3101
3102 Fix test failure reported by Tom Lane in
3103 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3104 and try to make such failures easier to catch in the future.
3105 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3106 that's now the caller's responsibility.
3107 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3108 Set yychar = YYEOF if it's negative.
3109 * tests/actions.at (yylex): Abort if asked to read past EOF.
3110 * tests/conflicts.at (yylex): Likewise.
3111 * tests/cxx-type.at (yylex): Likewise.
3112 * tests/glr-regression.at (yylex): Likewise.
3113 * tests/input.at (yylex): Likewise.
3114 * tests/regression.at (yylex): Likewise.
3115 * tests/torture.at (yylex): Likewise.
3116
3117 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3118
3119 Fix problems with translating English-language diagnostics.
3120 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3121 respect to bison-runtime pot generation. The YY_ stuff
3122 wasn't being captured.
3123 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3124 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3125 * runtime-po/POTFILES.in: Add data/push.c.
3126
3127 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3128
3129 Merge bootstrap changes from coreutils.
3130
3131 2006-09-28 Jim Meyering <jim@meyering.net>
3132
3133 Automatically generated dependencies are important even
3134 when all of the sources in a directory come from gnulib.
3135 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3136 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3137
3138 2006-09-23 Jim Meyering <jim@meyering.net>
3139
3140 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3141
3142 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3143
3144 * bootstrap: Add support for --force.
3145 (usage): New function. Describe usage less tersely.
3146 (CVS_only_file): New var.
3147
3148 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3149
3150 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3151 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3152 Adjust white space and comments to match GNU style better.
3153
3154 2006-09-20 Bob Rossi <bob@brasko.net>
3155
3156 * data/push.c (yyresult_get): Remove function.
3157 (YYPUSH_MORE): Add #define.
3158 (yypushparse): Modify return value.
3159
3160 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3161
3162 * stamp-h.in: Remove; no longer needed.
3163 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3164 Remove config.h, config.hin, intl (no longer created).
3165 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3166 stamp-h1.
3167
3168 Sync bootstrap from coreutils, as follows:
3169
3170 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3171
3172 * bootstrap (symlink_to_gnulib): New function.
3173 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3174 to copies-of-gnulib.
3175 (cp_mark_as_generated, slurp, gnulib_files):
3176 Avoid making a copy if it's the same as the old version.
3177 (gnulib_files): Add support for this variable (used by Bison).
3178
3179 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3180
3181 * src/getargs.c (usage): Rework to use conventions similar to
3182 coreutils, to make translation a bit easier and the code a bit
3183 smaller. Problem reported by Tim Van Holder.
3184
3185 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3186
3187 Use some of gnulib's new modules, taken from coreutils.
3188
3189 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3190 * bootstrap.conf: New file.
3191 (gnulib_modules): Add configmake, inttypes, unistd.
3192 (XGETTEXT_OPTIONS): Add complain, complain_at,
3193 fatal, fatal_at, warn, warn_at, unexpected_end.
3194 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3195 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3196 (gl_EARLY): Add.
3197 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3198 (gl_INIT): Add
3199 (GNULIB_AUTOCONF_SNIPPET): Remove.
3200 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3201 the pickiest.
3202 * lib/.cvsignore: Add inttypes_.h.
3203 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3204 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3205 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3206 no-longer-necessary initializations.
3207 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3208 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3209 use the unistd module.
3210 * src/system.h: Likewise.
3211 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3212 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3213 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3214 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3215 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3216 * src/system.h: Include inttypes.h unconditionally, now that we
3217 use the inttypes module. Don't bother to include stdint.h, since
3218 inttypes.h now does that for us.
3219 (LOCALEDIR): Remove, now that we use the configmake module.
3220 * src/getargs.c: Include configmake.h.
3221 * src/main.c: Likewise.
3222 * src/output.c: Likewise.
3223 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3224 not from $abs_top_builddir, since config.h moved.
3225
3226
3227 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3228 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3229
3230 * src/parse-gram.y (symbol_declaration): Don't put statements
3231 before declarations; it's not portable to C89.
3232 * src/scan-code.l (handle_action_at): Likewise.
3233
3234 * src/scan-code.l: Always initialize braces_level; the old code
3235 left it uninitialized and therefore had undefined behavior.
3236
3237 Don't attempt to redefine 'assert', since it runs afoul of
3238 systems where standard headers (mistakenly) include <assert.h>.
3239 Instead, define and use our own alternative, called 'aver'.
3240 * src/reader.c: Don't include assert.h, since we no longer
3241 use assert.
3242 * src/scan-code.l: Likewise.
3243 * src/system.h (assert): Remove, replacing with....
3244 (aver): New function, taking a bool arg. All uses changed.
3245 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3246 not merely an integer.
3247
3248 2006-09-15 Bob Rossi <bob@brasko.net>
3249
3250 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3251 * data/c.m4 (YYPUSH): New.
3252 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3253 * src/getargs.c (push_parser): New var.
3254 * src/getargs.h (push_parser): New declaration.
3255 * src/output.c (prepare): Add macro insertion of `push_flag'.
3256 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3257 (prologue_declaration): Parse %push-parser.
3258 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3259 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3260 list of removed lines from the traces observed.
3261 (AT_CHECK_CALC_LALR): Added push parser tests.
3262
3263 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3264
3265 * NEWS: Version 2.3a.
3266 * configure.ac (AC_INIT): Likewise.
3267
3268 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3269 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3270 due to header ordering dependencies. I don't know why the #define
3271 was there.
3272
3273 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3274 runtime cost when YYDEBUG is not defined, and so that some tests
3275 that used to fail now work. Problem and initial suggestion by
3276 Paolo Bonzini.
3277 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3278 * data/glr.cc (b4_parser_class_name):
3279 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3280 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3281 (yydebug_) [YYDEBUG]: New member.
3282 (yycdebug_): Now defined only if YYDEBUG.
3283 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3284 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3285 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3286 if YYYDEBUG.
3287 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3288 Define only if YYDEBUG.
3289 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3290 set_debug_level.
3291 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3292 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3293 AT_CHECK_CALC_GLR_CC that are working now.
3294
3295 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3296
3297 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3298 We don't need them in glr.cc, and glr.c defines them.
3299 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3300 assumes that defining it to anything is the same as defining
3301 it to 1. Problem reported by Paolo Bonzini.
3302
3303 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3304
3305 * data/c.m4 (b4_null, b4_case): Define.
3306 * src/output.c (prepare_symbols): Use b4_null.
3307 (user_actions_output): Use b4_case.
3308
3309 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3310
3311 * data/glr.c (b4_shared_declarations): Put start-header first,
3312 before any #includes that we generate, so that feature-test
3313 macros work. Problem reported by Michael Deutschmann in
3314 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3315 * data/lalr1.cc: Likewise.
3316 * doc/bison.texinfo (Prologue): Document that feature-test macros
3317 should be defined before any Bison declarations.
3318 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3319 that depend on location.hh after, not before, Bison decls, since
3320 we now include location.hh after the first user prologue.
3321
3322 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3323 Sander Brandenburg in
3324 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3325 Also, fix minor white space and comment issues.
3326 (Prologue): Mention that it's better to define feature-test macros
3327 before Bison declarations. Problem reported by Michael Deutschmann.
3328
3329 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3330 by Jim Meyering.
3331 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3332 This adjusts to recent gnulib changes.
3333
3334 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3335
3336 Finish implementation of per-type %destructor/%printer. Discussed
3337 starting at
3338 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3339 and
3340 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3341 * NEWS (2.3+): Add a description of this feature to the default
3342 %destructor/%printer description.
3343 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3344 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3345 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3346 list node contains a semantic type.
3347 * src/symtab.c, src/symtab.h: Extend with a table that associates
3348 semantic types with their %destructor's and %printer's.
3349 (semantic_type_from_uniqstr, semantic_type_get,
3350 semantic_type_destructor_set, semantic_type_printer_set): New functions
3351 composing the public interface of that table.
3352 (symbol_destructor_get, symbol_destructor_location_get,
3353 symbol_printer_get, symbol_printer_location_get): If there's no
3354 per-symbol %destructor/%printer, look up the per-type before trying
3355 the default.
3356 * tests/actions.at (Per-type %printer and %destructor): New test case.
3357 * tests/input.at (Default %printer and %destructor redeclared):
3358 Extend to check that multiple occurrences of %symbol-default in a
3359 single %destructor/%printer declaration is an error.
3360 (Per-type %printer and %destructor redeclared, Unused values with
3361 per-type %destructor): New test cases.
3362
3363 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3364
3365 Require default %destructor/%printer to be declared using
3366 %symbol-default instead of an empty symbol list, and start working on
3367 new per-type %destructor/%printer. Discussed at
3368 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3369 * NEWS (2.3+): Add %symbol-default to example.
3370 * bison.texinfo (Freeing Discarded Symbols): Likewise.
3371 (Table of Symbols): Add entry for %symbol-default.
3372 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3373 (generic_symlist, generic_symlist_item): New nonterminals for creating
3374 a list in which each item is a symbol, semantic type, or
3375 %symbol-default.
3376 (grammar_declaration): Use generic_symlist in %destructor and %printer
3377 declarations instead of symbols.1 or an empty list.
3378 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3379 for changes to symbol_list.
3380 * src/reader.c: Update for changes to symbol_list.
3381 * src/scan-code.l: Likewise.
3382 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3383 * src/symlist.c, src/symlist.h: Extend such that a list node may
3384 represent a semantic type or a %symbol-default in addition to just an
3385 ordinary symbol. Add switched functions for setting %destructor's and
3386 %printer's.
3387 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3388 %destructor/%printer declarations.
3389
3390 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3391
3392 Whether the default %destructor/%printer applies to a particular symbol
3393 isn't a question of whether the user *declares* that symbol (in %token,
3394 for example). It's a question of whether the user by any means
3395 *defines* the symbol at all (by simply using a char token, for
3396 example). $end is defined by Bison whereas any other token with token
3397 number 0 is defined by the user. The error token is always defined by
3398 Bison regardless of whether the user declares it with %token, but we
3399 may one day let the user define error as a nonterminal instead.
3400 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3401 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3402 the meaning of "user-defined".
3403 * tests/actions.at (Default %printer and %destructor for user-declared
3404 end token): Rename to...
3405 (Default %printer and %destructor for user-defined end token): ...
3406 this.
3407
3408 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3409 computation of whether to apply the default, don't maintain a list of
3410 every Bison-defined symbol. Instead, just check for a first character
3411 of '$', which a user symbol cannot have, and check for the error token.
3412
3413 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3414
3415 Don't apply the default %destructor or %printer to the error token,
3416 $undefined, or $accept. This change fits the general rule that the
3417 default %destructor and %printer are only for user-declared symbols,
3418 and it solves several difficulties that are described in the new test
3419 cases listed below.
3420 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3421 * tests/actions.at (Default %printer and %destructor are not for error
3422 or $undefined, Default %printer and %destructor are not for $accept):
3423 New test cases.
3424
3425 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3426
3427 Allow %start after the first rule.
3428 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3429 when parsing the first rule.
3430 (check_and_convert_grammar): Search for it here after all grammar
3431 declarations have been parsed. Skip midrules, which have dummy LHS
3432 nonterminals.
3433 * src/symtab.c (symbol_is_dummy): New function.
3434 * src/symtab.h (symbol_is_dummy): Declare it.
3435 * tests/input.at (%start after first rule): New test.
3436
3437 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3438
3439 Redo some of the previous commit: add back the ability to use
3440 non-aliased/undeclared string literals since it might be useful to
3441 those declaring %token-table.
3442 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3443 commit: don't worry about complaints from symbols_pack.
3444 * src/symtab.c (symbol_new, symbol_class_set,
3445 symbol_check_alias_consistency): Undo changes in previous commit: count
3446 each string literal as a new symbol and token, assign it a symbol
3447 number, and don't complain about non-aliased string literals.
3448 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3449 and token counts but does still set aliased tokens to the same number,
3450 symbol_pack_processor now leaves empty slots in the symbols array.
3451 Remove those slots.
3452 * tests/regression.at (Undeclared string literal): Remove test case
3453 added in previous commit since non-aliased string literals are allowed
3454 again.
3455 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3456 remove unnecessary string literal declarations.
3457 * tests/sets.at (Firsts): Likewise.
3458
3459 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3460
3461 Don't allow an undeclared string literal, but allow a string literal to
3462 be used before its declaration.
3463 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3464 symbols_pack complained.
3465 * src/symtab.c (symbol_new): Don't count a string literal as a new
3466 symbol.
3467 (symbol_class_set): Don't count a string literal as a new token, and
3468 don't assign it a symbol number since symbol_make_alias does that.
3469 (symbol_make_alias): It's not necessary to decrement the symbol and
3470 token counts anymore. Don't assume that an alias declaration occurs
3471 before any uses of the identifier or string, and thus don't assert that
3472 one of them has the highest symbol number so far.
3473 (symbol_check_alias_consistency): Complain if there's a string literal
3474 that wasn't declared as an alias.
3475 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3476 symbol_pack asserts that every token has been assigned a symbol number
3477 although undeclared string literals have not.
3478 * tests/regression.at (String alias declared after use, Undeclared
3479 string literal): New test cases.
3480 (Characters Escapes, Web2c Actions): Declare string literals as
3481 aliases.
3482 * tests/sets.at (Firsts): Likewise.
3483
3484 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3485
3486 In the grammar scanner, STRING_FINISH unclosed constructs and return
3487 them to the parser in order to improve error messages.
3488 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3489 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3490 * tests/input.at (Unclosed constructs): New test case.
3491 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3492 seen.
3493
3494 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3495 unused global.
3496
3497 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3498
3499 Handle string aliases for character tokens correctly.
3500 * src/symtab.c (symbol_user_token_number_set): If the token has an
3501 alias, check and set its alias's user token number instead of its own,
3502 which is set to indicate the alias. Previously, every occurrence of
3503 the character token in the grammar overwrote that alias indicator with
3504 the character code.
3505 * tests/input.at (String aliases for character tokens): New test.
3506
3507 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3508
3509 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3510
3511 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3512
3513 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3514 to prevent failures when building on older platforms.
3515 Check for autopoint failure.
3516 Set XGETTEXT_OPTIONS to values that check for C format strings,
3517 so that translators are warned about them (this also helps
3518 prevent core dumps).
3519
3520 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3521 function, since it simplifies our code a bit.
3522
3523 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3524 rather than -W, so we don't get bogus warnings about sign comparisons.
3525 Add -Wpointer-arith, since that warning is useful (it reports code
3526 that does not conform to C89 and that some compilers reject).
3527 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3528 since it's no longer needed.
3529
3530 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3531
3532 Clean up scanners a bit.
3533 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3534 definitions so gcc won't warn when obstack_for_string is unused.
3535 * src/scan-code.l: config.h and system.h are already #include'd by
3536 scan-code-c.c, so get rid of them here.
3537 * src/scan-gram.l: Likewise.
3538 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3539 definitions rather than duplicating the rest of it.
3540 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3541
3542 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3543
3544 Suppress signed/unsigned comparison warnings for yycheck.
3545 * data/c.m4 (b4_safest_int_type): New macro.
3546 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3547 a signed int type, cast it to b4_safest_int_type first.
3548 * data/yacc.c: Likewise.
3549 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3550 also overwritten.
3551
3552 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3553
3554 * doc/bison.texinfo: Fix some typos.
3555
3556 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3557
3558 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3559 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3560
3561 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3562 the latest gnulib does this a different way.
3563 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3564 translation was patched, so stop omitting it.
3565
3566 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3567
3568 Enable declaration of default %printer/%destructor. Make the parser
3569 use these for all user-declared grammar symbols for which the user does
3570 not declare a specific %printer/%destructor. Thus, the parser uses it
3571 for token 0 if the user declares it but not if Bison generates it as
3572 $end. Discussed starting at
3573 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3574 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3575 and
3576 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3577 * NEWS (2.3+): Mention.
3578 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3579 declare a %destructor for a mid-rule's semantic value. It's just
3580 impossible to declare one specific to it.
3581 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3582 code. Describe default %destructor form.
3583 * src/parse-gram.y (grammar_declaration): Parse default
3584 %printer/%destructor declarations.
3585 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3586 and symbol_destructor_location_get rather than accessing the destructor
3587 and destructor_location members of struct symbol.
3588 (symbol_printers_output): Likewise but for %printer's.
3589 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3590 again.
3591 * src/symtab.c (default_destructor, default_destructor_location,
3592 default_printer, default_printer_location): New static global
3593 variables to record the default %destructor and %printer.
3594 (symbol_destructor_get, symbol_destructor_location_get,
3595 symbol_printer_get, symbol_printer_location_get): New functions to
3596 compute the appropriate %destructor and %printer for a symbol.
3597 (default_destructor_set, default_printer_set): New functions to set the
3598 default %destructor and %printer.
3599 * src/symtab.h: Prototype all those new functions.
3600 * tests/actions.at (Default %printer and %destructor): New test to
3601 check that the right %printer and %destructor are called, that they're
3602 not called for $end, and that $$ and @$ work correctly.
3603 (Default %printer and %destructor for user-declared end token): New
3604 test to check that the default %printer and %destructor are called for
3605 a user-declared end token.
3606 * tests/input.at (Default %printer and %destructor redeclared, Unused
3607 values with default %destructor): New tests to check related grammar
3608 warnings and errors.
3609
3610 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3611
3612 Clean up handling of %destructor for the end token (token 0).
3613 Discussed starting at
3614 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3615 and
3616 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3617
3618 Make the skeletons consistent in how they pop the end token and invoke
3619 its %destructor.
3620 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3621 state, which has token number 0, since this would invoke the
3622 %destructor for the end token.
3623 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3624 until after shifting the end token, or else it won't be popped.
3625 * data/yacc.c (yyparse): Likewise.
3626
3627 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3628 it's the end token. Upon termination, destroy an unshifted lookahead
3629 even when it's the end token.
3630 * data/lalr1.cc (yy::parser::parse): Likewise.
3631 * data/yacc.c (yyparse): Likewise.
3632
3633 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3634 value warnings for the end token when the user gives the end token a
3635 %destructor.
3636
3637 * tests/actions.at (Printers and Destructors): Test all the above.
3638
3639 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3640
3641 Update to latest gnulib and gettext versions.
3642 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3643 Add fopen-safer.
3644 (gnulib_files): Add m4/warning.m4. Don't worry about files
3645 overwritten by autopoint.
3646 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3647 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3648 rejects them.
3649 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3650 so that we can remove the intl files at a better time.
3651 (intl_files_to_remove): Remove aclocal.m4, since it gets
3652 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3653 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3654 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3655 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3656 Remove datarootdir hack; no longer needed.
3657 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3658 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3659 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3660 strdup.h.
3661 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3662 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3663
3664 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3665
3666 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3667 it with --assume-autoconf='latest-stable'.
3668
3669 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3670
3671 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3672 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3673 YYSTYPE' and `{'.
3674 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3675 those from muscle_tab.c since the old ones are misleading.
3676
3677 2006-07-13 Akim Demaille <akim@epita.fr>
3678
3679 Support %define "KEY" {VALUE}.
3680 * src/scan-code.h, src/scan-code.l (translate_action)
3681 (translate_rule_action, translate_symbol_action, translate_code):
3682 Return char *, not const char *.
3683 * src/parse-gram.y (declaration): Rename as...
3684 (prologue_declaration): this.
3685 (string_content): Remove this nonterminal, use STRING.
3686 (braceless, content, content.opt): New nonterminal.
3687 Use them.
3688 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3689 as value.
3690 * src/scan-gram.l (getargs.h): Don't include it.
3691
3692 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3693
3694 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3695 rather than a for-loop that declares a local bool variable. This
3696 should work around a compatibility problem with a Cray x1e C++
3697 compiler reported by Hung Nguyen in
3698 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3699 The for-loop was introduced in the 2004-11-17 change but I don't
3700 know why it was needed.
3701
3702 2006-07-12 Akim Demaille <akim@epita.fr>
3703
3704 * data/c.m4: Comment changes.
3705
3706 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
3707
3708 * src/complain.c (error_message, ERROR_MESSAGE): New.
3709 To factor...
3710 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3711 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3712
3713 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3714
3715 * NEWS: Instead of %union, you can define and use your own union type
3716 YYSTYPE if your grammar contains at least one <type> tag.
3717 Your YYSTYPE need not be a macro; it can be a typedef.
3718 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3719 (Union Decl, Decl Summary): Document this.
3720 * data/glr.c (YYSTYPE): Implement this.
3721 * data/glr.cc (YYSTYPE): Likewise.
3722 * data/lalr1.cc (YYSTYPE): Likewise.
3723 * data/yacc.c (YYSTYPE): Likewise.
3724 * src/output.c (prepare): Output tag_seen_flag.
3725 * src/parse-gram.y (declaration, grammar_declaration):
3726 Use 'union_seen' rather than 'typed' to determine whether
3727 %union has been seen, since grammars can now be typed without
3728 %union.
3729 (symbol_declaration, type.opt, symbol_def):
3730 Keep track of whether a tag has been seen.
3731 * src/reader.c (union_seen, tag_seen): New vars.
3732 (typed): remove.
3733 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3734 * src/scan-code.l (untyped_var_seen): New variable.
3735 (handle_action_dollar): Adjust to above changes.
3736 (handle_action_dollar, handle_action_at):
3737 Improve overflow checking for outlandish numbers.
3738 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3739 avoid new diagnostics generated by above changes.
3740 * tests/regression.at (YYSTYPE typedef): Add test to check
3741 for type tags without %union.
3742
3743 * src/symlist.c (symbol_list_length): Return int, not unsigned
3744 int, since callers expect int. This may need to get revisited
3745 once we have proper integer overflow checking.
3746
3747 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3748 object is now static.
3749
3750 * src/getargs.c (flags_argmatch): Return void, not int,
3751 to pacify ./configure --enable-gcc-warnings.
3752
3753 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3754 since last_string is already defined to FLEX_PREFIX (last_string).
3755
3756 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3757
3758 Implement --warnings/-W.
3759 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3760 replaced by...
3761 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3762 Adjust callers.
3763 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3764 (warnings_args, warnings_types): New.
3765 (getargs, short_options, long_options): Accept -W/--warnings.
3766 Sort the options by alphabetical order, upper case letter right
3767 before its lower case.
3768
3769 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3770
3771 Change %merge result type clash warnings to errors. Discussed at
3772 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3773 * src/reader.c (record_merge_function_type): Use complain_at.
3774 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3775 declared later): Update test case results.
3776
3777 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3778
3779 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3780 to be in alphabetical order.
3781 (trace_args): Spelling fixes.
3782
3783 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3784
3785 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3786 so they don't collide with user-defined macros.
3787 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3788 this was never guaranteed, and now that we're using gnulib stdint,
3789 which defines int_fast16_t to long int, the problem is exposed.
3790
3791 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3792
3793 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3794 need the full POSIX semantics (and weren't implementing them
3795 anyway).
3796
3797 Adjust to Autoconf 2.60 and today's gnulib.
3798 * bootstrap (gnulib_modules): Add stdint.
3799 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3800 no longer copies it.
3801 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3802 since stdint needs the former and wcwidth (which is now required
3803 by mbswidth) needs the latter.
3804 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3805 work around a compatibility glitch between gettext 0.14.6 and
3806 Autoconf 2.60.
3807 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3808 Do not check for uintptr_t, since new stdint module does the right
3809 thing.
3810 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3811 Add stdint.h, stdint_.h, wcwidth.h.
3812 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3813 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3814 stdint.m4, wchar_t.m4, wcwidth.m4.
3815 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3816 usual order for ../lib/*.h files.
3817 (file_name_split): Use last_component, not base_name, to adjust
3818 to gnulib changes.
3819 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3820 for ../lib/*.h files.
3821 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3822 Define unconditionally, since we now assume the stdint module.
3823 * src/scan-skel.l: Include <dirname.h>.
3824 (BASE_QPUTS): Use last_component, not base_name.
3825 * src/system.h: Include <unlocked-io.h> in the usual order
3826 for ../lib/*.h files. Include <stdint.h> unconditionally,
3827 since we now use the stdint module.
3828 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3829 HAVE_UINTPTR_T, since we now use the stdint module.
3830 (base_name): Remove decl, since files now include <dirname.h>
3831 to get the decl.
3832
3833 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3834
3835 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3836 New, default to 1.
3837 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3838 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3839 default.
3840 * tests/calc.at: Adjust.
3841
3842 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3843
3844 * data/c.m4 (b4_basename): New.
3845 (b4_syncline): Also output the location of its invocation (from
3846 the skeleton).
3847 (b4_user_action, b4_define_user_action, b4_user_actions)
3848 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3849 (b4_user_stype): New.
3850 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3851
3852 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3853
3854 In the grammar file, the first column is 1 not 0 on the first line as
3855 on every other line.
3856 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3857 * tests/input.at (Torturing the Scanner): Update output.
3858
3859 * src/scan-gram.l (scanner_cursor): Declare it static.
3860
3861 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3862
3863 In warnings, say "previous declaration" rather than "first
3864 declaration".
3865 * src/symtab.c (redeclaration): Do that here.
3866 * src/reader.c (record_merge_function_type): In the case of a result
3867 type clash, report the previous declaration rather than the very first
3868 one in the grammar file.
3869 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3870 declared later): Add a third declaration to check this behavior.
3871 * tests/input.at (Incompatible Aliases): Update output.
3872
3873 2006-06-27 Akim Demaille <akim@epita.fr>
3874
3875 * doc/Doxyfile.in: New.
3876 * doc/Makefile.am: Use it.
3877 * src/lalr.h, src/symtab.h: Initial doxygenation.
3878
3879 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3880
3881 Don't miss %merge result type warnings just because the LHS types are
3882 declared after the %merge. This continues the effort of the previous
3883 patch.
3884 * src/reader.c (get_merge_function): Don't set the merger type yet.
3885 (record_merge_function_type): New function for setting the merger type
3886 and checking for clashes.
3887 (grammar_current_rule_merge_set): Set the location of the %merge for
3888 the current rule.
3889 (packgram): Invoke record_merge_function_type for each rule now that
3890 all symbol type declarations have been parsed.
3891 * src/reader.h (merger_list.type_declaration_location): New member
3892 storing the location of the first %merge from which the type for this
3893 merging function was derived.
3894 * src/symlist.h (symbol_list.merger_declaration_location): New member
3895 storing the location of a rule's %merge, if any.
3896 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3897 declared later): New test to catch the error fixed by the above patch.
3898
3899 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3900
3901 Get action warnings (grammar_rule_check) right even when symbol
3902 declarations appear after the rules. Discussed at
3903 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3904 and
3905 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3906 Don't mistake the type of $$ in a midrule to be that of its parent
3907 rule's $$.
3908 * src/reader.c (grammar_current_rule_end): Don't invoke
3909 grammar_rule_check yet since not all symbol declarations may have been
3910 parsed yet.
3911 (grammar_midrule_action): Likewise.
3912 Don't record whether the midrule's $$ has been used yet since actions
3913 haven't been translated yet.
3914 Record the midrule's parent rule and its RHS index within the parent
3915 rule.
3916 (grammar_current_rule_action_append): Don't translate the action yet
3917 since not all symbol declarations may have been parsed yet and, thus,
3918 warnings about types for $$, $n, @$, and @n can't be reported yet.
3919 (packgram): Translate the action and invoke grammar_rule_check now that
3920 all symbol declarations have been parsed.
3921 * src/scan-code.l (handle_action_dollar): Now that this is invoked
3922 after parsing the entire grammar file, the symbol list here in the case
3923 of a midrule is actually the midrule's empty RHS, so reference its
3924 parent rule's RHS where necessary.
3925 On the other hand, now that you can already know it's a midrule, you
3926 aren't forced to think $$ has the same type as its parent rule's $$.
3927 (handle_action_at): In the case of a midrule, reference the parent rule
3928 where necessary.
3929 * src/symlist.c (symbol_list_new): Initialize new midrule-related
3930 members.
3931 (symbol_list_length): Now that this is invoked after all rules have
3932 been parsed, a NULL symbol (rather than a NULL symbol list node)
3933 terminates a rule. symbol_list_print already does this correctly.
3934 * src/symlist.h (symbol_list.midrule_parent_rule,
3935 symbol_list.midrule_parent_rhs_index): New members so that midrules can
3936 remember their relationships with their parents.
3937 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
3938 fixed by the above patch.
3939 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
3940 implementing...
3941 (Unused values): ... this old test case and...
3942 (Unused values before symbol declarations): ... this new test case.
3943 This one is the same as `Unused values' except that all symbol
3944 declarations appear after the rules in order to catch the rest of the
3945 errors fixed by the above patch.
3946
3947 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3948
3949 More cleanup.
3950 * src/reader.c (current_rule): Declare it static since it's no longer
3951 used outside this file.
3952 (grammar_current_rule_action_append): Remove redundant arguments from
3953 translate_rule_action invocation.
3954 * src/reader.h (current_rule): Remove this unused extern.
3955 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
3956 * src/scan-code.l (translate_rule_action): Likewise.
3957
3958 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
3959
3960 Clean up yesterday's patch.
3961 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
3962 to...
3963 * src/reader.c (grammar_current_rule_action_append): ... here for
3964 consistency with grammar_current_rule_symbol_append.
3965 * tests/regression.at (Braced code in declaration in rules section):
3966 Make yyerror and yylex static as usual.
3967
3968 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
3969
3970 Fix bug that mistakes braced code in a declaration in the rules section
3971 to be a rule action. Mentioned at
3972 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
3973 * src/scan-gram.l: Move midrule action detection from the start of the
3974 scanning of any braced code to...
3975 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
3976 action. For readability, use $2 and @2 rather than the equivalent
3977 global variables.
3978 * tests/regression.at (Braced code in declaration in rules section):
3979 New test to catch the error fixed by the above patch.
3980
3981 Work on code readability some.
3982 * src/scan-code.l (current_rule): Get rid of this misleading and
3983 redundant declaration: it's actually extern'ed in reader.h.
3984 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
3985 translate_action): Add a rule argument and use it instead of the global
3986 current_rule.
3987 (translate_rule_action): This already receives current_rule through an
3988 argument, so pass it on to translate_action instead of assigning
3989 current_rule to current_rule.
3990 (translate_symbol_action, translate_code): Pass rule = NULL to
3991 translate_action.
3992
3993 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
3994
3995 Rename %before-definitions to %start-header and %after-definitions to
3996 %end-header. Don't use these declarations to separate pre-prologue
3997 blocks from post-prologue blocks. Add new order-independent
3998 declarations %before-header and %after-header as alternatives to the
3999 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4000 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4001 * NEWS (2.3+): Update for these changes.
4002 * data/glr.c (b4_before_definitions): Update to...
4003 (b4_start_header): ... this.
4004 (b4_after_definitions): Update to...
4005 (b4_end_header): ... this.
4006 * data/glr.cc: Likewise.
4007 * data/lalr1.cc: Likewise.
4008 * data/yacc.c: Likewise.
4009 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4010 prologue blocks with %*-header declarations.
4011 (Calc++ Parser): Likewise.
4012 (Decl Summary): Update names.
4013 (Table of Symbols): Update description.
4014 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4015 (PERCENT_END_HEADER): ... this.
4016 (PERCENT_BEFORE_DEFINITIONS): Update to...
4017 (PERCENT_START_HEADER): ... this.
4018 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4019 (declaration): Update token names and m4 macro names.
4020 When parsing %end-header and %start-header, invoke translate_code
4021 before muscle_code_grow, and no longer set global booleans to remember
4022 whether these declarations have been seen.
4023 Parse new %after-header and %before-header.
4024 * src/reader.c (before_definitions, after_definitions): Remove.
4025 (prologue_augment): Accept a new bool argument to specify whether to
4026 augment the pre-prologue or post-prologue.
4027 * src/reader.h (before_definitions, after_definitions): Remove these
4028 extern's.
4029 (prologue_augment): Add new bool argument.
4030 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4031 (PERCENT_END_HEADER): ... this.
4032 (PERCENT_BEFORE_DEFINITIONS): Update to...
4033 (PERCENT_START_HEADER): ... this.
4034 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4035 * tests/actions.at (Printers and Destructors): Update names.
4036
4037 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4038
4039 Add comparison operators for C++ location classes. Discussed at
4040 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4041 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4042 declaration indicating whether filename_type has an operator==. If
4043 filename_type is `std::string', it defaults to `1', `0' otherwise.
4044 * data/location.cc: Iff b4_define_location_comparison is `1', add
4045 operator== and operator!= for class position and for class location.
4046
4047 Some minor fixes.
4048 * src/scan-action.l: Remove unused file.
4049 * src/symtab.c (symbol_printer_set): Use printer_location not
4050 destructor_location.
4051 * src/symtab.h (struct symbol): Replace incorrect source comment for
4052 printer members.
4053 * tests/input.at (Incompatible Aliases): Update output with correct
4054 printer location.
4055
4056 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4057
4058 Don't put the pre-prologue in the header file. For the yacc.c code
4059 file and the glr.c header and code files, move the pre-prologue before
4060 the token definitions. Add new %before-definitions and
4061 %after-definitions to declare code that will go in both the header file
4062 and code file. Discussed at
4063 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4064 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4065 and
4066 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4067 * NEWS (2.3+): Describe these changes.
4068 * data/glr.c (b4_pre_prologue): Move from within to before...
4069 (b4_shared_declarations): ... this.
4070 Add new b4_before_definitions before b4_token_enums.
4071 Add new b4_after_definitions at the end.
4072 * data/glr.cc (b4_pre_prologue): Replace with...
4073 (b4_before_definitions): ... this in the header file.
4074 (b4_after_definitions): New near the end of the header file.
4075 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4076 code file right before including the header file.
4077 (b4_before_definitions): New in the previous position of
4078 b4_pre_prologue in the header file.
4079 (b4_after_definitions): New near the end of the header file.
4080 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4081 (b4_token_enums_defines): In the code file, move to right before
4082 YYSTYPE for consistency with the header file.
4083 (b4_before_definitions): New right before b4_token_enums_defines in
4084 both the header and code file.
4085 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4086 header and code file.
4087 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4088 of prologues for %union dependencies.
4089 (Decl Summary): In %defines description, mention the effect of
4090 %before-definitions and %after-definitions on the header file.
4091 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4092 than in the pre-prologue so that make check succeeds.
4093 (Table of Symbols): Add entries for %before-definitions and
4094 %after-definitions.
4095 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4096 %before-definitions.
4097 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4098 (declaration): Parse those declarations and append to
4099 b4_before_definitions and b4_after_definitions, respectively.
4100 * src/reader.c (before_definitions, after_definitions): New bools to
4101 track whether those declarations have been seen.
4102 (prologue_augment): Add to the post-prologue if %union,
4103 %before-definitions, or %after-definitions has been seen.
4104 * src/reader.h (before_definitions, after_definitions): New extern's.
4105 * src/scan-gram.l: Scan the new declarations.
4106 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4107 prologue block in a %before-definitions or a %after-definitions based
4108 on whether the %union is declared.
4109 * tests/regression.at (Early token definitions with --yacc, Early token
4110 definitions without --yacc): Move tests for token definitions into the
4111 post-prologue since token names are no longer defined in the
4112 pre-prologue.
4113
4114 2006-06-20 Akim Demaille <akim@epita.fr>
4115
4116 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4117 (symbol_get): Use it.
4118 * src/parse-gram.y: Use it.
4119
4120 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4121
4122 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4123 build succeeds when configured with --enable-gcc-warnings.
4124
4125 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4126
4127 * src/parse-gram.y (char_name): New function.
4128 (CHAR, STRING, string_content): For %printer, properly escape.
4129 (ID): Prefer fputs to fprintf.
4130 (id): Reindent to be consistent with other rules.
4131 Properly quote char.
4132
4133 The Translation Project changed its way of publishing translations
4134 to maintainers. I haven't received any responses to my request
4135 for supporting the old way, or for documenting the new way. I
4136 have modified 'bootstrap' to use screen scraping
4137 (in this case, HTML scraping). This is unreliable and inelegant,
4138 but I don't see any better way. Yuck.
4139 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4140 (get_translations): New function, which uses HTML scraping to
4141 deduce locations of latest translations.
4142 Use this function to grab both bison and bison-runtime .po files.
4143 Don't bother priming the pump for the runtime-po domain any more,
4144 as it's now translated better than bison is.
4145
4146 2006-06-19 Akim Demaille <akim@epita.fr>
4147
4148 * src/scan-gram.l: No longer "parse" things after `%union' until
4149 `{'. Rather, return a single "%union" token.
4150 No longer make symbols: return strings, and leave the conversion
4151 to symbols to the parser.
4152 (SC_PRE_CODE, token_type): Remove.
4153 * src/parse-gram.y (%union): New field `character'.
4154 Sort tokens.
4155 (CHAR): New token.
4156 (ID, ID_COLON): Now that the scanner no longer makes them
4157 identifiers, adjust all uses to invoke symbol_get.
4158 (id_colon): New, wraps the conversion from string to symbol.
4159 (%union): Accept a possible union_name.
4160 (symbol): Now can be a char.
4161 * data/c.m4 (b4_union_name): Leave a default value.
4162 * data/glr.c, data/yacc.c: Use it.
4163
4164 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4165
4166 For associating token numbers with token names for "yacc.c", don't use
4167 #define statements unless `--yacc' is specified; always use enum
4168 yytokentype. Most important discussions start at:
4169 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4170 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4171 and
4172 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4173 * NEWS (2.3+): Mention.
4174 * data/c.m4 (b4_yacc_if): New.
4175 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4176 token #define's.
4177 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4178 on token name definitions.
4179 * src/getargs.c (usage): Capitalize `Yacc' in English.
4180 * src/output.c (prepare): Define b4_yacc_flag.
4181 * tests/regression.at (Early token definitions): Test that tokens names
4182 are defined before the pre-prologue not just before the post-prologue.
4183 Remove this test case and copy to...
4184 (Early token definitions with --yacc): ... this to test #define's.
4185 (Early token definitions without --yacc): ... and this to test enums.
4186
4187 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4188
4189 * NEWS: Reword the post-2.3 change to not be so optimistic about
4190 removing the old "look-ahead" spelling.
4191 Update previous look-ahead/lookahead change reports.
4192 * REFERENCES: look-ahead -> lookahead (since that's
4193 what he actually wrote).
4194 * doc/refcard.tex: look ahead -> lookahead,
4195 look-ahead -> lookahead
4196
4197 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4198
4199 For consistency, use `lookahead' instead of `look-ahead' or
4200 `look_ahead'. Discussed starting at
4201 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4202 and then at
4203 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4204 * NEWS: For the next release, note the change to `--report'.
4205 * TODO, doc/bison.1: Update English.
4206 * doc/bison.texinfo: Update English.
4207 (Understanding Your Parser, Bison Options): Document as
4208 `--report=lookahead' rather than `--report=look-ahead'.
4209 * src/conflicts.c: Update English in comments.
4210 (lookahead_set): Rename from look_ahead_set.
4211 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4212 (resolve_sr_conflict): Rename local look_ahead_tokens to
4213 lookahead_tokens, and update other uses.
4214 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4215 count_rr_conflicts, conflicts_free): Update uses.
4216 * src/getargs.c (report_args): Move "lookahead" before alternate
4217 spellings.
4218 (report_types): Update uses.
4219 (usage): For `--report' usage description, state `lookahead' spelling
4220 rather than `look-ahead'.
4221 * src/getargs.h (report.report_lookahead_tokens): Rename from
4222 report_look_ahead_tokens.
4223 * src/lalr.c: Update English in comments.
4224 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4225 (state_lookahead_tokens_count): Rename from
4226 state_look_ahead_tokens_count.
4227 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4228 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4229 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4230 Update other uses.
4231 Update English in output.
4232 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4233 * src/print.c: Update English in comments.
4234 (lookahead_set): Rename from look_ahead_set.
4235 (print_reduction): Rename argument lookahead_token from
4236 look_ahead_token.
4237 (print_core, state_default_rule, print_reductions, print_results):
4238 Update uses.
4239 * src/print_graph.c: Update English in comments.
4240 (print_core): Update uses.
4241 * src/state.c: Update English in comments.
4242 (reductions_new): Update uses.
4243 (state_rule_lookahead_tokens_print): Rename from
4244 state_rule_look_ahead_tokens_print, and update other uses.
4245 * src/state.h: Update English in comments.
4246 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4247 (state_rule_lookahead_tokens_print): Rename from
4248 state_rule_look_ahead_tokens_print.
4249 * src/tables.c: Update English in comments.
4250 (conflict_row, action_row): Update uses.
4251 * tests/glr-regression.at
4252 (Incorrect lookahead during deterministic GLR,
4253 Incorrect lookahead during nondeterministic GLR): Rename
4254 print_look_ahead to print_lookahead.
4255 * tests/torture.at: Update English in comments.
4256 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4257 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4258 (Many lookahead tokens): Update uses.
4259 * data/glr.c: Update English in comments.
4260 * lalr1.cc: Likewise.
4261 * yacc.c: Likewise.
4262 * src/conflicts.h: Likewise.
4263 * src/lalr.h: Likewise.
4264 * src/main.c: Likewise.
4265 * src/output.c: Likewise.
4266 * src/parse-gram.c: Likewise.
4267 * src/tables.h: Likewise.
4268 * tests/calc.at: Likewise.
4269
4270 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4271
4272 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4273
4274 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4275
4276 * TODO: Add request from Nelson H. F. Beebe to be able to install
4277 Bison without installing the yacc script.
4278
4279 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4280
4281 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4282 and yytext if they're already #define'd.
4283 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4284 * src/scan-code-c.c: ... here.
4285 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4286 <config.h>.
4287
4288 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4289
4290 Get Bison to build again when configured with --enable-gcc-warnings.
4291 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4292 missing #include's.
4293 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4294 loc argument as it shadows a global.
4295 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4296 invocation.
4297
4298 * src/.cvsignore: Add scan-code.c.
4299
4300 2006-06-07 Akim Demaille <akim@epita.fr>
4301
4302 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4303 to...
4304 * src/scan-code.l: here.
4305 * tests/input.at (Torturing the Scanner): Fix another location
4306 error.
4307
4308 2006-06-07 Akim Demaille <akim@epita.fr>
4309
4310 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4311
4312 2006-06-06 Akim Demaille <akim@epita.fr>
4313
4314 Extract the parsing of user actions from the grammar scanner.
4315 As a consequence, the relation between the grammar scanner and
4316 parser is much simpler. We can also split "composite tokens" back
4317 into simple tokens.
4318 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4319 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4320 rename as...
4321 * src/location.h, src/location.c (add_column_width)
4322 (location_compute): these.
4323 Fix the column count: the initial column is 0.
4324 (location_print): Be robust to ending column being 0.
4325 * src/location.h (boundary_set): New.
4326 * src/main.c: Adjust to scanner_free being renamed as
4327 gram_scanner_free.
4328 * src/output.c: Include scan-code.h.
4329 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4330 Use boundary_set.
4331 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4332 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4333 which is now, again, a separate token.
4334 Adjust all dependencies.
4335 Whereever actions with $ and @ are used, use translate_code.
4336 (action): Remove this nonterminal which is now useless.
4337 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4338 (grammar_current_rule_action_append): Use translate_code.
4339 (packgram): Bound check ruleno, itemno, and rule_length.
4340 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4341 (last_string, last_braced_code_loc, max_left_semantic_context)
4342 (scanner_initialize, scanner_free, scanner_last_string_free)
4343 (gram_out, gram_lineno, YY_DECL_): Move to...
4344 * src/scan-gram.h: this new file.
4345 (YY_DECL): Rename as...
4346 (GRAM_DECL): this.
4347 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4348 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4349 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4350 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4351 Move these declarations, and...
4352 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4353 these to...
4354 * src/flex-scanner.h: this new file.
4355 * src/scan-gram.l (rule_length, rule_length_overflow)
4356 (increment_rule_length): Remove.
4357 (last_braced_code_loc): Rename as...
4358 (gram_last_braced_code_loc): this.
4359 Adjust to the changes of the parser.
4360 Move all the handling of $ and @ into...
4361 * src/scan-code.l: here.
4362 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4363 (handle_action_dollar, handle_action_at): Move to...
4364 * src/scan-code.l: here.
4365 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4366 scan-code.h, scan-code-c.c, scan-gram.h.
4367 (EXTRA_bison_SOURCES): Add scan-code.l.
4368 (BUILT_SOURCES): Add scan-code.c.
4369 (yacc): Be robust to white spaces.
4370
4371 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4372 * tests/regression.at: Adjust the column numbers.
4373 * tests/regression.at: Adjust the error message.
4374
4375 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4376
4377 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4378 Use Akim's wording from
4379 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4380
4381 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4382
4383 Between Bison releases, manually append `+' to the previous Bison
4384 release number, and use that as a signal to automatically print the
4385 ChangeLog's CVS Id keyword from --version. Discussed starting at
4386 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4387 * ChangeLog: Add Id header.
4388 * configure.ac (AC_INIT): Append `+' to `2.3'.
4389 * src/.cvsignore: Add revision.c.
4390 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4391 (BUILT_SOURCES): Add revision.c.
4392 (revision.c): New target rule. This file defines a new global variable
4393 named revision. It initializes it with either the Id from ChangeLog
4394 or, if VERSION doesn't contain `+', with the empty string.
4395 * src/getargs.c (version): Print the value of revision.
4396 * src/revision.h: Extern revision.
4397
4398 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4399
4400 * NEWS: Version 2.3.
4401 * configure.ac (AC_INIT): Likewise.
4402
4403 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4404
4405 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4406 with no arguments, not as an object-like macro. This is for
4407 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4408 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4409 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4410 Document this.
4411
4412 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4413
4414 * src/getargs.c (usage): Back out yesterday's modification of the
4415 --help output so that we don't have to wait for translation before
4416 releasing 2.3.
4417
4418 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4419
4420 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4421 Problem reported by Akim Demaille.
4422
4423 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4424
4425 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4426
4427 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4428
4429 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4430 generated source code. Problem reported by Frans Englich in
4431 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4432
4433 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4434
4435 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4436 shell, not within 'make', so that 'make' by an ordinary builder
4437 (using GNU make) does not worry about configuring gzip. This also
4438 works around a bug reported independently by Keith Thompson and by
4439 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4440 stderr rather than stdout, messing up the build logs.
4441
4442 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4443
4444 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4445 to make sure that YYID will never be unused. This fixes a 'make
4446 maintainer-check' failure caused by the recent changes to the 'Trivial
4447 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4448 not used.
4449 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4450
4451 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4452
4453 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4454 state before an empty RHS is always resolved here. Only the location
4455 of that state is guaranteed to be resolved, and that's enough. This
4456 fixes the remaining bug reported by Derek M. Jones in
4457 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4458 * tests/glr-regression.at (Uninitialized location when reporting
4459 ambiguity): Test the above case.
4460 Also, the embedded comments in this test case claim it checks the case
4461 of an empty RHS that has inherited the initial location. However, the
4462 corresponding LHS was already resolved, so yyresolveLocations didn't
4463 actually have reason to modify it. Fix this by forcing
4464 nondeterministic operation at the beginning of the parse.
4465
4466 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4467
4468 * data/c.m4 (b4_yy_symbol_print_generate):
4469 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4470 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4471 of the bugs reported today by Derek M Jones in
4472 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4473 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4474 defined to be a type name without parens or brackets.
4475 (Location Type): Similarly for YYLTYPE.
4476 * tests/regression.at (Trivial grammars): Put in a test for this
4477 bug that will be caught by 'make maintainer-check' (though not,
4478 alas, by 'make check' unless your compiler is picky).
4479
4480 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4481
4482 * NEWS: Version 2.2.
4483 * configure.ac (AC_INIT): Likewise.
4484
4485 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4486
4487 * data/glr.c (yyreportTree): Make room in yystates for the state
4488 preceding the RHS. This fixes the segmentation fault reported by Derek
4489 M. Jones in
4490 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4491 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4492 to the user. Reported for yyreportTree by Derek M. Jones later in the
4493 same thread.
4494 * THANKS: Add Derek M. Jones.
4495 Update my email address.
4496 Fix typo in Steve Murphy's name.
4497
4498 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4499
4500 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4501 checking against YYLAST that caused the parser to miss a potential
4502 alternative in its diagnostic.
4503 Problem reported by Maria Jose Moron Fernandez in
4504 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4505 * data/lalr1.cc (yysyntax_error_): Likewise.
4506 * data/yacc.c (yysyntax_error): Likewise.
4507 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4508 tokens, in case we run into an older C compiler.
4509 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4510 Use them to check for the off-by-one error fixed above.
4511
4512 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4513 YYSIZE_T, not size_t.
4514 * tests/regression.at (Trivial grammars): New test, to catch
4515 the error fixed by the above patch.
4516
4517 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4518
4519 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4520 scheme.
4521 Reported by Steve Murphy.
4522
4523 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4524
4525 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4526 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4527
4528 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4529
4530 Implement --trace=m4.
4531 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4532 * src/output.c (output_skeleton): When set, pass -dV to m4.
4533
4534 Factor the handling of flags in m4.
4535 * src/output.c (prepare): Rename the muscle names debug, defines,
4536 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4537 * data/c.m4: Adjust.
4538 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4539 Use b4_define_flag_if to define other b4_FLAG_if macros.
4540 (b4_location_if): As a consequence, rename as...
4541 (b4_locations_if): this, for consistency.
4542 Adjust all the skeletons.
4543
4544 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4545
4546 * etc/bench.pm: Shorten bench names.
4547
4548 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4549
4550 * src/output.h, src/output.c (error_verbose): Move to...
4551 * src/getargs.h, src/getargs.c: here.
4552 Sort the flags.
4553 Adjust dependencies.
4554
4555 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4556
4557 * data/c.m4 (b4_copyright): Put the special exception for Bison
4558 skeletons here, so we don't have to put it in each skeleton. All
4559 uses changed. Suggested by Akim Demaille. Also, wrap the
4560 copyright notice, in case it is longer than 80 columns. Replace
4561 comma by newline after title.
4562
4563 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4564
4565 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4566 incompatibility, not a bug. Mention that it wasn't fixed as of
4567 flex 2.5.33.
4568
4569 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4570
4571 * examples/extexi: Enforce the precedence of concatenation over
4572 >>.
4573 Reported by Tommy Nordgren.
4574
4575 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4576
4577 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4578 with the member "token".
4579 Reported by Martin Nylin.
4580
4581 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4582
4583 * data/glr.c: Switch to Bison 2.2 special-exception language in
4584 the copyright notice. Use more-regular format for titles and
4585 copyright notices.
4586 * data/glr.cc: Likewise.
4587 * data/location.cc: Likewise.
4588 * data/yacc.cc: Likewise.
4589 * doc/bison.texinfo (Conditions): Document this.
4590 * NEWS: likewise. Upgrade version to 2.2.
4591
4592 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
4593
4594 * data/glr.cc: Remove dead code.
4595
4596 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4597
4598 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4599 that variable and the line breaks the bootstrap. Problem reported
4600 by Juan M. Guerrero.
4601
4602 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4603
4604 * doc/bison.texinfo (Multiple start-symbols): New.
4605
4606 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4607
4608 * etc/README, etc/bench.pl: New.
4609
4610 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
4611
4612 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4613 rule.
4614 Reported by Mickael Labau.
4615 * tests/input.at (Torturing the Scanner): Test it.
4616
4617 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4618
4619 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4620 Problem reported by Bob Rossi.
4621
4622 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4623
4624 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4625 and didn't really work.
4626 For the index, use @ifnotinfo, not @iftex.
4627 Minor cleanups of spacing and terminology.
4628
4629 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4630
4631 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4632 of AT_NAME_PREFIX when %name-prefix is not used.
4633
4634 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4635
4636 Apply --prefix to C++ skeletons too: they change the namespace.
4637 The test suite already exercize these cases.
4638 * data/c++.m4 (b4_namespace): New.
4639 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4640 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4641 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4642 * doc/bison.texinfo: Document it.
4643 (Option Cross Key): Use @multitable in all formats. It looks
4644 nicer, even in TeX outputs.
4645 (Rules): Use the same code whatever the output type is.
4646 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4647 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4648 * tests/calc.at: Use it, instead of hard coding `yy'.
4649
4650 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4651
4652 * TODO: Remove dead items.
4653
4654 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4655
4656 * doc/FAQ: Remove, merged into...
4657 * doc/bison.texinfo (FAQ): this.
4658 * doc/Makefile.am (EXTRA_DIST): Adjust.
4659
4660 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4661
4662 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4663 even if empty.
4664 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4665 * doc/bison.texinfo (Calc++ Scanner): Use it.
4666
4667 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4668
4669 Fix two nits reported by twlevo, plus one more that I discovered.
4670
4671 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4672 this is the usual Bison style.
4673 * src/location.h (location_print): Likewise.
4674
4675 * src/reader.h (token_name): Likewise.
4676
4677 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4678
4679 Fix some nits reported by twlevo.
4680 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4681 and "POSIX". Use more-modern syntax for URLs. Mention C++
4682 and ask for Java. Don't hardwire OS version numbers. Add
4683 copyright notice.
4684 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4685 * src/conflicts.c (solved_conflicts_obstack): Now static.
4686
4687 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4688
4689 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4690 page. Say "you can use it" not "you may use it" as on the web page;
4691 we're describing capabilities not granting permission.
4692
4693 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4694
4695 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4696 shadowing warnings. Use usual patter for iterating through RHS.
4697 * tests/glr-regression.at
4698 (Uninitialized location when reporting ambiguity):
4699 Modify yylex so that it uses its argument, rather than trying
4700 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4701 const char -> char const.
4702
4703 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4704 Don't use tabs inside commands; it messes up 'ps'.
4705 Problem reported by twlevo.
4706
4707 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4708
4709 * tests/glr-regression.at (Uninitialized location when reporting
4710 ambiguity): New test case.
4711 * data/glr.c (yyresolveLocations): New function, which uses
4712 YYLLOC_DEFAULT.
4713 (yyresolveValue): Invoke yyresolveLocations before reporting an
4714 ambiguity.
4715 * doc/bison.texinfo (Default Action for Locations): Note
4716 YYLLOC_DEFAULT's usage for ambiguity locations.
4717 (GLR Semantic Actions): Cross-reference those notes.
4718
4719 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4720
4721 * tests/glr-regression.at (Leaked semantic values when reporting
4722 ambiguity): Remove unnecessary union and type declarations.
4723 (Leaked lookahead after nondeterministic parse syntax error): New test
4724 case.
4725 * data/glr.c (yyparse): Check for zero stacks remaining before
4726 attempting to shift the lookahead so that you don't lose it.
4727
4728 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4729
4730 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4731 * tests/glr-regression.at (Leaked semantic values when reporting
4732 ambiguity): New test case.
4733 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4734 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4735 now unnecessary yystackp parameter.
4736 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4737 destructors can be called.
4738
4739 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4740 in existing testcases.
4741
4742 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4743
4744 Don't leak semantic values for parent RHS when a user action cuts the
4745 parser, and clean up related code a bit.
4746 * tests/glr-regression.at (Leaked merged semantic value if user action
4747 cuts parse): Rename to...
4748 (Leaked semantic values if user action cuts parse): ... this. Add check
4749 for leaked parent RHS values.
4750 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4751 between an unresolved state (non-empty chain of semantic options) and
4752 an incomplete one (signaled by an empty chain).
4753 (yyresolveStates): Document the interface. Move all manipulation of a
4754 successfully or unsuccessfully resolved yyGLRState to...
4755 (yyresolveValue): ... here so that yyresolveValue always leaves a
4756 yyGLRState with consistent data and thus is easier to understand.
4757 Remove the yyvalp and yylocp parameters since they are always just
4758 taken from the yys parameter. When reporting a discarded merged value
4759 in debugging output, note that it is incompletely merged. Document the
4760 interface.
4761 (yyresolveAction): If resolving any of the RHS states fails, destroy
4762 them all rather than leaking them. Thus, as long as user actions are
4763 written to clean up the RHS correctly, yyresolveAction always cleans up
4764 the RHS of a semantic option. Document the interface.
4765
4766 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4767
4768 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4769 led to a segmentation fault in GNU Pascal. Problem reported
4770 by Waldek Hebisch.
4771
4772 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4773
4774 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4775 mid-rule action inside a nonterminal symbol in order to declare a
4776 destructor for its semantic value.
4777
4778 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4779
4780 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4781 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4782 __cplusplus && ! defined _STDLIB_H && !
4783 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4784 defined free))]: Include <stdlib.h> rather than rolling our own
4785 declarations of malloc and free, to avoid problems with
4786 incompatible declarations (using 'throw') C++'s stdlib.h. This
4787 should fix Debian bug 340012
4788 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4789 reported by Guillaume Melquiond.
4790
4791 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4792
4793 * NEWS: Clarify symbols versus types in unused-value warnings.
4794
4795 * configure.ac (AC_INIT): Bump version number.
4796
4797 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4798
4799 * NEWS: Version 2.1a.
4800 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4801 since C99 requires this.
4802
4803 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4804
4805 * m4/c-working.m4: New file.
4806 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4807
4808 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4809
4810 * Makefile.maint: Merge from coreutils.
4811
4812 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4813
4814 More portability fixes for problems summarized by Nelson H. F. Beebe.
4815
4816 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4817 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4818 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4819 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4820 messes up because C++ code is compiled in 32-bit mode but linked
4821 in 64-bit mode.
4822
4823 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4824
4825 More portability fixes for problems summarized by Nelson H. F. Beebe.
4826
4827 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4828 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4829
4830 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4831 nodist_PROGRAMS, since we don't need to actually compile the
4832 example if we're just doing a plain 'make'. This avoids bothering
4833 the installer unnecessarily about problems due to weird C++
4834 compilers.
4835
4836 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4837
4838 More portability fixes for problems summarized by Nelson H. F. Beebe.
4839
4840 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4841 than #include "...", and compile with -I'.'. The old method was
4842 not portable, according to Posix and the C standard, and it does
4843 not work with Sun C 5.7, where previous #line directives affect
4844 the working directory used in later #include "..." directives.
4845
4846 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4847
4848 Various DJGGP specific issues in /djgpp
4849
4850 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4851
4852 More portability fixes for problems summarized by Nelson H. F. Beebe.
4853
4854 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4855 '#include <map>' works and that you can apply ++ to iterators.
4856
4857 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4858
4859 Work around portability problems summarized by Nelson H. F. Beebe in
4860 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4861
4862 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4863 that '#include <string>' works.
4864
4865 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4866 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4867 "warning: sorry: semantics of inline function static data `const
4868 unsigned char translate_table[262]' are wrong (you'll wind up with
4869 multiple copies)".
4870
4871 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4872 or, xor to not_, and_, or_, and xor_, respectively. This works
4873 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4874 random system header somewhere that includes the equivalent of
4875 <iso646.h>.
4876
4877 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4878 -E" works; it apparently doesn't work with PathScale EKO Compiler
4879 Suite Version 2.0.
4880
4881 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4882
4883 During deterministic GLR operation, user actions should be able to
4884 influence the parse by changing yychar. To make this easier to fix and
4885 to make glr.c easier to evolve in general, don't maintain yytoken in
4886 parallel with yychar; just compute yytoken when needed.
4887 * tests/glr-regression.at (Incorrect lookahead during deterministic
4888 GLR): Check that setting yychar in a user action has the intended
4889 effect.
4890 * data/glr.c (yyGLRStack): Remove yytokenp member.
4891 (yyclearin): Don't set *yytokenp.
4892 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4893 yychar rather than *yytokenp to determine the current lookahead.
4894 Compute yytoken locally when needed.
4895 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4896 point to.
4897
4898 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4899 after `--report' documentation.
4900
4901 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4902
4903 * src/parse-gram.y (grammar_declaration): Location of printer
4904 symbol is @1, not list->location. Bug reported by twlevo.
4905 * tests/input.at (Incompatible Aliases): Adjust to above change.
4906
4907 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4908
4909 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4910 all the test at once. This makes the output easier to read in the
4911 normal case.
4912
4913 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4914 got from <http://bro-ids.org/download.html>. The bug is that
4915 when two actions appeared in succession, the second one was
4916 scanned before the first one was added to the grammar rule
4917 as a midrule action. Bison then output the incorrect warning
4918 "parse.y:905.17-906.36: warning: unused value: $3".
4919 * src/parse-gram.y (BRACED_CODE, action): These are no longer
4920 associated with a value.
4921 (rhs): Don't invoke grammar_current_rule_action_append.
4922 (action): Invoke it here instead.
4923 * src/reader.c (grammar_midrule_action): Now extern.
4924 (grammar_current_rule_action_append): Don't invoke
4925 grammar_midrule_action; that is now the scanner's job.
4926 * src/reader.h (last_string, last_braced_code_loc):
4927 (grammar_midrule_action): New decls.
4928 * src/scan-gram.l (last_string): Now extern, sigh.
4929 (last_braced_code_loc): New extern variable.
4930 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
4931 rule already has an action.
4932 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
4933 * tests/input.at (AT_CHECK_UNUSED_VALUES):
4934 Add some tests to check that the above changes fixed the bug.
4935
4936 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
4937
4938 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
4939 All used changed. Check whether the symbol has a destructor,
4940 not whether it is typed.
4941 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
4942 that the values are still reported as unused. All line numbers
4943 adjusted.
4944
4945 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
4946
4947 Work around a bug in bro 0.8, which underparenthesizes its
4948 definition of YYLLOC_DEFAULT.
4949 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
4950 their arguments.
4951 * data/lalr1.cc: Likewise.
4952 * data/yacc.cc: Likewise.
4953
4954 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
4955
4956 Work around a bug in Pike 7.0, and give the Pike folks a
4957 better way to override the usual int widths.
4958 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
4959 user can override the types.
4960 (short): #undef, to work around a bug in Pike 7.0.
4961 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
4962 (union yyalloc.yyss): Use yytype_int16 rather than short.
4963 All uses changed.
4964 (yysigned_char): Remove.
4965 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
4966 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
4967 * tests/regression.at (Web2c Actions): Adjust to above changes.
4968
4969 * src/reader.c (check_and_convert_grammar): New function.
4970 (reader): Close the input file even if something went wrong during
4971 parsing. Minor file descriptor leak reported by twlevo.
4972
4973 * src/assoc.c (assoc_to_string): Use a default: abort (); case
4974 to pacify gcc -Wswitch-default.
4975 * src/scan-gram.l (adjust_location): Use a default: break; case
4976 to pacify gcc -Wswitch-default.
4977 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
4978 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
4979 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
4980 Move these decls to scan-skel.l, since they don't need to be
4981 visible elsewhere.
4982 * src/scan-skel.l: Accept the above decls.
4983 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
4984 is used.
4985
4986 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
4987
4988 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
4989 since we don't want to insist on a version number at the start
4990 of the changelog every time.
4991 * Makefile.maint: Sync from coreutils a bit better.
4992 (sc_trailing_blank): Renamed from sc_trailing_space.
4993 All uses changed.
4994 (sc_no_if_have_config_h, sc_require_config_h):
4995 (sc_prohibit_assert_without_use): New rules.
4996 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
4997 (sc_dd_max_sym_length): Fix leading spaces in rule.
4998 (sc_system_h_headers): Prefix with @.
4999 (sc_useless_cpp_parens, m4-check): Output line numbers.
5000 (changelog-check): Allow version only in head.
5001 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5002 satisfy new Makefile.maint rule.
5003 * data/glr.c: Likewise.
5004 * data/glr.cc: Likewise.
5005 * data/lalr1.cc: Likewise.
5006 * data/yacc.c: Likewise.
5007 * lib/ebitsetv.c: Likewise.
5008 * lib/lbitset.c: Likewise.
5009 * lib/subpipe.c: Likewise.
5010 * lib/timevar.c: Likewise.
5011 * src/system.h: Likewise.
5012 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5013 * djgpp/Makefile.maint: Add copyright notice.
5014 * djgpp/README.in: Likewise.
5015 * djgpp/config.bat: Likewise.
5016 * djgpp/config.site: Likewise.
5017 * djgpp/config_h.sed: Likewise.
5018 * djgpp/djunpack.bat: Likewise.
5019 * djgpp/config.sed: Fix copyright notice to match standard format.
5020 * djgpp/subpipe.h: Likewise.
5021 * lib/bitsetv-print.c: Likewise.
5022 * lib/bitsetv.c: Likewise.
5023 * lib/subpipe.h: Likewise.
5024 * lib/timevar.c: Likewise.
5025 * lib/timevar.h: Likewise.
5026 * djgpp/subpipe.c: Use standard recipe for config.h.
5027 * lib/abitset.c: Likewise.
5028 * lib/bitset.c: Likewise.
5029 * lib/bitset_stats.c: Likewise.
5030 * lib/bitsetv-print.c: Likewise.
5031 * lib/bitsetv.c: Likewise.
5032 * lib/ebitsetv.c: Likewise.
5033 * lib/get-errno.c: Likewise.
5034 * lib/lbitset.c: Likewise.
5035 * lib/subpipe.c: Likewise.
5036 * lib/timevar.c: Likewise.
5037 * lib/vbitset.c: Likewise.
5038 * tests/local.at: Likewise.
5039 * src/scan-gram.l: Don't include verify.h, since system.h does
5040 that for us.
5041 * .x-sc_require_config_h: New file.
5042 * .x-sc_unmarked_diagnostics: New file.
5043
5044 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5045
5046 Be a bit more systematic about using 'abort'.
5047 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5048 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5049 Put 'default: abort ();' before some other case, to satisfy older
5050 pedantic compilers.
5051 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5052 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5053 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5054 * src/conflicts.c (resolve_sr_conflict): Likewise.
5055 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5056 (get_decision_str, get_orientation_str, get_node_alignment_str):
5057 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5058 (get_linestyle_str, get_arrowstyle_str): Likewise.
5059 * src/conflicts.c (resolve_sr_conflict):
5060 Use a default case rather than one for the one remaining enum
5061 value, to catch invalid enum values as well.
5062 * src/lalr.c (set_goto_map, map_goto):
5063 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5064 * src/nullable.c (nullable_compute, token_definitions_output):
5065 Likewise.
5066 * src/reader.c (packgram, reader): Likewise.
5067 * src/state.c (transitions_to, state_new, state_reduction_find):
5068 Likewise.
5069 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5070 (symbol_pack): Likewise.
5071 * src/tables.c (conflict_row, pack_vector): Likewise.
5072 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5073 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
5074 * src/system.h: Don't include <assert.h>.
5075 (assert): New macro.
5076
5077 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5078 (Destructor Decl, Parser Function, Pure Calling):
5079 Describe rules for braces inside C code more carefully.
5080
5081 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5082
5083 Fix some porting glitches found by Nelson H. F. Beebe.
5084 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5085 compilers that don't understand that abort () does not return.
5086 * src/state.c (transitions_to): Likewise.
5087 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5088 that '#include <cstdlib>' works.
5089 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5090 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5091 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5092 for the benefit of some pre-C99 compilers.
5093
5094 * bootstrap: Undo changes to gnulib files that autoreconf made.
5095
5096 Minor fixups to get 'make maintainer-check' to work.
5097 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5098 with the new verify.h implementation.
5099 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5100 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5101 * data/yacc.c (YYUSE): Likewise.
5102 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5103 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5104 * src/parse-gram.y (declaration): Don't pass a string constant
5105 to a function that expects char *, since GCC might complain
5106 about the constant value.
5107 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5108 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5109 before #defining them.
5110 * tests/glr-regression.at
5111 (Incorrectly initialized location for empty right-hand side in GLR):
5112 In yyerror, use the msg arg.
5113 (Corrupted semantic options if user action cuts parse):
5114 (Incorrect lookahead during deterministic GLR):
5115 (Incorrect lookahead during nondeterministic GLR):
5116 Don't name a local var 'index'; it shadows string.h's 'index'.
5117
5118 2006-01-19 Akim Demaille <akim@epita.fr>
5119
5120 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5121 location, not just parts of it.
5122
5123 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5124
5125 * NEWS: Document the fact that multiple %unions are now allowed.
5126 * doc/bison.texinfo (Union Decl): Likewise.
5127 * TODO: This feature is now implemented, so remove it from
5128 the wishlist.
5129
5130 * Makefile.maint: Merge with coreutils Makefile.maint.
5131 (CVS_LIST): Use build-aux version if available.
5132 (VERSION_REGEXP): New macro.
5133 (syntax-check-rules): Add sc_no_if_have_config_h,
5134 sc_prohibit_assert_without_use, sc_require_config_h,
5135 sc_useless_cpp_parens.
5136 (sc_obsolete_symbols): Check for O_NDELAY.
5137 (sc_dd_max_sym_length): Track coreutils.
5138 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5139 (sc_useless_cpp_parens): New rule.
5140 (news-date-check): Look for version or today's date.
5141 (changelog-check): Don't require version number near head.
5142 (copyright-check): Use current year instead of hardwiring 2005.
5143 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5144 (announcement): Add --gpg-key-ID.
5145
5146 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5147 with "file system".
5148
5149 Avoid undefined behavior that addressed just before the start of an
5150 array. Problem reported by twlevo.
5151 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5152 * src/lalr.c (build_relations): Rely on new sentinel.
5153 * src/gram.c (gram_free): Adjust to new sentinel.
5154
5155 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5156
5157 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5158 yylookaheadNeeds. All uses updated.
5159 (yysplitStack): Rename local yynewLookaheadStatuses to
5160 yynewLookaheadNeeds.
5161 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5162 GLR): In comments, change `lookahead status' to `lookahead need'.
5163
5164 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5165
5166 * data/glr.c (yysplitStack): A little stylistic rewrite.
5167
5168 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5169
5170 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5171
5172 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5173
5174 * doc/bison.texinfo: Fix some typos.
5175 (GLR Semantic Actions): New subsection discussing special
5176 considerations because GLR semantic actions might be deferred.
5177 (Actions): Mention look-ahead usage of yylval.
5178 (Actions and Locations): Mention look-ahead usage of yylloc.
5179 (Special Features for Use in Actions): Add YYEOF entry and mention it
5180 in the yychar entry.
5181 In the yychar entry, remove mention of the local yychar case (pure
5182 parser) since this is irrelevant information when writing semantic
5183 actions and since it's already discussed in `Table of Symbols' where
5184 yychar is otherwise described as an external variable.
5185 In the yychar entry, don't call it the `current' look-ahead since it
5186 isn't when semantic actions are deferred.
5187 In the yychar and yyclearin entries, add note about deferred semantic
5188 actions.
5189 Add yylloc and yylval entries discussing look-ahead usage.
5190 (Look-Ahead Tokens): When discussing yychar, don't call it the
5191 `current' look-ahead, and do mention yylval and yylloc.
5192 (Error Recovery): Cross-reference `Action Features' when mentioning
5193 yyclearin.
5194 (Table of Symbols): In the yychar entry, don't call it the `current'
5195 look-ahead.
5196 In the yylloc and yylval entries, mention look-ahead usage.
5197
5198 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5199
5200 * tests/glr-regression.at: Update copyright year to 2006.
5201
5202 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5203
5204 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5205 use during nondeterministic operation to track which stacks have
5206 actually needed the current lookahead.
5207 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5208 Allocate, deallocate, resize, and otherwise shuffle space for
5209 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5210 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5211 appropriately during nondeterministic operation.
5212 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5213 members to store the current lookahead to be used by the deferred
5214 user action.
5215 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5216 from which the RHS is taken. Set the lookahead members of the new
5217 yySemanticOption according to the lookahead status for stack yyk.
5218 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5219 yyaddDeferredAction.
5220 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5221 members of yySemanticOption before invoking yyuserAction, and then set
5222 them back to their current values afterward.
5223 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5224 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5225 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5226 titles for consistency.
5227 (Leaked merged semantic value if user action cuts parse): In order to
5228 suppress lint warnings, use arguments in merge function, and assign
5229 char value < 128 in main.
5230 (Incorrect lookahead during deterministic GLR): New test case.
5231 (Incorrect lookahead during nondeterministic GLR): New test case.
5232
5233 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5234
5235 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
5236 !yyvaluep as signal that no semantic value is available to print.
5237 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5238 to print a semantic value.
5239
5240 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5241
5242 * tests/glr-regression.at: For consistency with my newer test cases,
5243 don't thank myself.
5244
5245 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5246
5247 * data/glr.c (yyresolveValue): When merging semantic options, if at
5248 least one user action succeeds but a later one cuts the parse, then
5249 destroy the semantic value before returning rather than leaking it.
5250 (yyresolveStates): If a user action cuts the parse and thus
5251 yyresolveValue fails, ignore the (unset) semantic value rather than
5252 corrupting the yyGLRState, and empty the semantic options list since
5253 the user actions should have called all necessary destructors.
5254 Simplify code with YYCHK.
5255 * tests/glr-regression.at (Corrupted semantic options if user action
5256 cuts parse): New test case.
5257 (Undesirable destructors if user action cuts parse): New test case.
5258 Before applying any of this patch, this test case never actually failed
5259 for me... but only because the corrupted semantic options usually
5260 masked this bug.
5261 (Leaked merged semantic value if user action cuts parse): New test
5262 case.
5263
5264 2006-01-05 Akim Demaille <akim@epita.fr>
5265
5266 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5267
5268 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5269
5270 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5271 _MSC_VER. Problem reported by Cenzato Marco.
5272 (b4_c_function_def): Use it.
5273 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5274 b4_c_modern.
5275 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5276 than rolling our own.
5277
5278 2006-01-04 Akim Demaille <akim@epita.fr>
5279
5280 Also warn about non-used mid-rule values.
5281 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5282 member.
5283 (symbol_list_new): Adjust.
5284 * src/reader.c (symbol_typed_p): New.
5285 (grammar_rule_check): Use it.
5286 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5287 Check its rule.
5288 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5289 Use it.
5290 * tests/actions.at (Exotic Dollars): Adjust.
5291
5292 2006-01-04 Akim Demaille <akim@epita.fr>
5293
5294 * src/reader.c (grammar_midrule_action): If $$ is set in a
5295 mid-rule, move the `used' bit to its lhs.
5296 * tests/input.at (Unused values): New.
5297 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5298
5299 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5300
5301 * doc/bison.texinfo (Bison Options): Say more accurately what
5302 --yacc does.
5303 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5304 about declarations in the grammar when in Yacc mode, as POSIX does
5305 not require a diagnostic when the grammar uses extensions.
5306
5307 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5308
5309 Warn about dubious constructions like "%token T T".
5310 Reported by twlevo.
5311 * src/symtab.h (struct symbol.declared): New member.
5312 * src/symtab.c (symbol_new): Initialize it to false.
5313 (symbol_class_set): New arg DECLARING, specifying whether
5314 this is a declaration that we want to warn about, if there
5315 is more than one of them. All uses changed.
5316
5317 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5318 Allow multiple %union directives, whose contents concatenate.
5319 * src/parse-gram.y (grammar_declaration): Likewise.
5320 Use muscle_code_grow, so that we don't need stype_line any more.
5321 All uses changed.
5322
5323 * src/muscle_tab.c (muscle_grow): Fix comment.
5324
5325 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5326 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5327 Update copyright year to 2006.
5328
5329 2006-01-03 Akim Demaille <akim@epita.fr>
5330
5331 Have glr.cc pass (some of) the calc.at tests.
5332 * data/glr.cc (b4_parse_param_orig): New.
5333 (b4_parse_param): Improve its definition, and bound it more
5334 clearly in the skeleton.
5335 (b4_epilogue): Append, instead of prepending, in order to keep
5336 #line consistency.
5337 Simplify the generation of auxiliary functions: locations and
5338 purity are mandated.
5339 (b4_global_tokens_and_yystype): Honor it.
5340 * data/location.cc (c++.m4): Don't include it.
5341 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5342 and AT_SKEL_CC_IF.
5343 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5344 AT_LALR1_CC_IF.
5345 Be sure to initialize the first position's filename.
5346 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5347 mandated anyway.
5348 (AT_CHECK_CALC_GLR_CC): New.
5349 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5350
5351 2006-01-02 Akim Demaille <akim@epita.fr>
5352
5353 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5354 c.m4.
5355 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
5356 * data/glr.cc: Do not include stack.hh.
5357
5358 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5359
5360 * data/glr.c: Reformat whitespace with tabs.
5361 (b4_lpure_formals): Remove this unused m4 macro.
5362 * tests/cxx-type.at: Reformat whitespace with tabs.
5363 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5364 since it's a member. Rename type to isNterm for clarity.
5365
5366 2005-12-29 Akim <akim@sulaco.local>
5367
5368 Let glr.cc catch up with symbol_value_print.
5369 * data/glr.cc (b4_yysymprint_generate): Replace by...
5370 (b4_yy_symbol_print_generate): this.
5371 (yy_symbol_print, yy_symbol_value_print): Declare them.
5372
5373 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5374
5375 * src/location.h (boundary): Note that a line or column equal
5376 to INT_MAX indicates an overflow.
5377 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5378 (rule_length_overflow, increment_rule_length, add_column_width):
5379 New functions.
5380 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5381 (<SC_BRACED_CODE>"}"):
5382 Use increment_rule_length rather than incrementing it by hand.
5383 (adjust_location, handle_syncline): Diagnose overflow.
5384 (handle_action_dollar, handle_action_at):
5385 Fix bug with monstrosities like $-2147483648.
5386 Remove now-unnecessary checks.
5387 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5388 (convert_ucn_to_byte): Verify assumptions.
5389 (handle_syncline): New arg LOC. All callers changed.
5390 Don't store through a value derived from char const * pointer.
5391
5392 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5393 GCC warnings.
5394
5395 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5396
5397 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5398 Remove unnecessary forward static decls.
5399
5400 2005-12-27 Akim Demaille <akim@epita.fr>
5401
5402 * src/reader.c (grammar_current_rule_check): Also check that $$
5403 is used.
5404 Take the rule to check as argument, hence rename as...
5405 (grammar_rule_check): this.
5406 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5407 Rename as...
5408 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5409 (grammar_midrule_action, grammar_symbol_append): Now static.
5410 * tests/torture.at (input): Don't rely on the default action
5411 being always performed.
5412 * tests/calc.at: "Set" $$ even when the action is "cut" with
5413 YYERROR or other.
5414 * tests/actions.at (Exotic Dollars): Instead of using unused
5415 values, check that the warning is issued.
5416
5417 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5418
5419 * NEWS: Improve wording for unused-value warnings.
5420
5421 2005-12-22 Akim Demaille <akim@epita.fr>
5422
5423 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5424 (b4_yysymprint_generate): Rename as...
5425 (b4_yy_symbol_print_generate): this.
5426 Generate yy_symbol_print instead of yysymprint.
5427 Generate also yy_symbol_value_print, and use it.
5428
5429 2005-12-22 Akim Demaille <akim@epita.fr>
5430
5431 * NEWS: Warn about unused values.
5432 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5433 a `used' member.
5434 (symbol_list_n_get, symbol_list_n_used_set): New.
5435 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5436 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5437 * src/reader.c (grammar_current_rule_check): Check that values are
5438 used.
5439 * src/symtab.c (symbol_print): Accept 0.
5440 * tests/existing.at: Remove the type information.
5441 Empty the actions.
5442 Remove useless actions (beware of mid-rule actions: perl -000
5443 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5444 * tests/actions.at (Exotic Dollars): Use unused values.
5445 * tests/calc.at: Likewise.
5446 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5447 Likewise.
5448
5449 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5450 rule_useful_p.
5451
5452 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5453
5454 Undo 2005-12-01 tentative license wording change. The wording is
5455 still being reviewed by the lawyers, and we don't want to wait for
5456 them before publishing a test release. For now, revert to the
5457 previous wording.
5458 * NEWS: Undo 2005-12-01 change.
5459 * data/glr.c: Revert to previous license wording.
5460 * data/glr.cc: Likewise.
5461 * data/lalr1.cc: Likewise.
5462 * data/location.cc: Likewise.
5463 * data/yacc.c: Likewise.
5464
5465 * NEWS: Reword %destructor vs YYABORT etc.
5466 * data/glr.c: Use American spacing, for consistency.
5467 * data/glr.cc: Likewise.
5468 * data/lalr1.cc: Likewise.
5469 * data/yacc.c: Likewise.
5470 * data/yacc.c: Reformat comments slightly.
5471 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5472 for consistency. Fix some spelling errors and reword recently-included
5473 text slightly.
5474 * tests/cxx-type.at: Cast results of malloc, for C++.
5475
5476 2005-12-21 Joel E. Denny <address@hidden>
5477
5478 * tests/cxx-type.at: Construct a tree, count the parents of shared
5479 nodes, and free each node once and only once. Previously, the memory
5480 for semantic values was leaked instead.
5481
5482 2005-12-21 Joel E. Denny <address@hidden>
5483
5484 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5485 (yylval, yylloc): If pure, #define to yystackp->yyval and
5486 yystackp->yyloc similar to yychar and yynerrs.
5487 (yyparse): If pure, remove local yylval and yylloc. Add local
5488 yystackp to accommodate pure definitions of yylval and yylloc.
5489 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5490 yylvalp and yyllocp to &yylval and &yylloc.
5491 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5492 namespace. Previously, nerrs and char were missing, but lval and lloc
5493 weren't necessary.
5494 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5495 yylvalp and yyllocp parameters since, if pure, these are now always
5496 accessible through yystackp. If not pure, they are still accessible
5497 globally.
5498 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5499 `if (YYID (N))' to pacify lint.
5500
5501 2005-12-21 Akim Demaille <akim@epita.fr>
5502
5503 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5504 destroy the RHS symbols of a rule.
5505 * data/yacc.c (yylen): Initialize to 0.
5506 Keep its value to the number of items to possibly shift.
5507 In particular, a regular successful parse that ends on YYFINAL by
5508 a (internal) YYACCEPT must not have yylen != 0.
5509 (yyerrorlab, yyreturn): Pop the RHS.
5510 Reorder a bit to emphasize the `shifting' bits of code.
5511 (YYPOPSTACK): Now accept a number of items to pop.
5512 * data/lalr1.cc: Likewise.
5513 * data/glr.c: Formatting changes.
5514 Use goto instead of fall through.
5515 * doc/bison.texinfo (Destructor Decl): Complete.
5516
5517 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5518
5519 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5520 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5521 * djgpp/config.bat: Replace every occurence of the file name
5522 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5523 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5524 * djgpp/config.sed: Replace every occurence of the file name
5525 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5526 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5527 * djgpp/djunpack.bat: DJGPP specific file.
5528 * djgpp/fnchange.lst: DJGPP specific file.
5529 * djgpp/README.in: Add new information about how to unpack the bison
5530 source on MSDOS and other systems which have 8.3 file name restrictions
5531 using djunpack.bat and fnchange.lst.
5532
5533 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5534
5535 * bootstrap (build_cvs_prefix): Remove; unused.
5536 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5537 when getting gnulib.
5538
5539 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5540
5541 * data/glr.c: Reorder typedef declarations for structs to match order
5542 of struct declarations.
5543 Rename yystack everywhere to yystackp except in yyparse where it's not
5544 a pointer.
5545 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5546 consistency.
5547 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5548 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5549 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5550 lint.
5551
5552 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5553
5554 * tests/sets.at (Accept): Fix typos in regular expression used to
5555 sed out the final state number.
5556
5557 Work around portability problem on Solaris 10: flex-generated
5558 files include <stdio.h> before <config.h>, which messes up
5559 because the latter defines __EXTENSIONS__. Address the problem
5560 by creating two new little files that include <config.h> first,
5561 then include the flex-generated files. Rewrite everyone else
5562 to include <config.h> first, as well.
5563 * lib/timevar.c: Always include "config.h".
5564 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5565 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5566 (EXTRA_bison_SOURCES): New macro.
5567 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5568 * src/system.h: Don't include config.h.
5569 * src/LR0.c: Include <config.h> first.
5570 * src/assoc.c: Likewise.
5571 * src/closure.c: Likewise.
5572 * src/complain.c: Likewise.
5573 * src/conflicts.c: Likewise.
5574 * src/derives.c: Likewise.
5575 * src/files.c: Likewise.
5576 * src/getargs.c: Likewise.
5577 * src/gram.c: Likewise.
5578 * src/lalr.c: Likewise.
5579 * src/location.c: Likewise.
5580 * src/main.c: Likewise.
5581 * src/muscle_tab.c: Likewise.
5582 * src/nullable.c: Likewise.
5583 * src/output.c: Likewise.
5584 * src/parse-gram.y: Likewise.
5585 * src/print.c: Likewise.
5586 * src/print_graph.c: Likewise.
5587 * src/reader.c: Likewise.
5588 * src/reduce.c: Likewise.
5589 * src/relation.c: Likewise.
5590 * src/state.c: Likewise.
5591 * src/symlist.c: Likewise.
5592 * src/symtab.c: Likewise.
5593 * src/tables.c: Likewise.
5594 * src/uniqstr.c: Likewise.
5595 * src/vcg.c: Likewise.
5596
5597 * src/parse-gram.y: Fix minor problems uncovered by lint.
5598 (current_lhs, current_lhs_location): Now static.
5599 (current_assoc): Remove unused variable.
5600
5601 Cleanups so that Bison-generated parsers have less lint.
5602 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5603 Prepend /*ARGSUSED*/, for lint's sake.
5604 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5605 definition if 'lint' is defined.
5606 (YYID): New macro (or function, if lint).
5607 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5608 * data/yacc.c: Likewise.
5609 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5610 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5611 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5612 is C++ only.
5613 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5614 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5615 Use YYID(0) rather than 0, for lint.
5616 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5617 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5618
5619 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5620
5621 * tests/glr-regression.at
5622 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5623 Close memory leak reported by twlevo.
5624
5625 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5626
5627 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5628 all stacks.
5629 (yyparse): Iterate another stack in order to call user destructors.
5630 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5631 New test case.
5632 (Duplicated user destructor for lookahead): This test now is expected
5633 to succeed.
5634
5635 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5636
5637 * NEWS: Document the following change.
5638 * data/yacc.c: Say "parser skeleton" rather than "file", since
5639 it's no longer just a file.
5640 * data/glr.c: Grant a special exception for C GLR parsers, that
5641 reads like the already-existing exception for C LALR(1) parsers.
5642 * data/glr.cc: Likewise.
5643 * data/lalr1.cc: Likewise.
5644 * data/location.cc: Likewise.
5645 * data/yacc.c: Reword the "written by" statement to clarify that
5646 it was the parser skeleton, not the entire output file.
5647 * data/glr.c: Written by Paul Hilfinger.
5648 * data/glr.cc: Written by Akim Demaille.
5649 * data/lalr1.cc: Likewise.
5650
5651 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5652
5653 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5654 Fix typos in previous change that broke 'make check'.
5655 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5656 supported in C.
5657 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5658 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5659 We can revert this once things settle down.
5660
5661 * src/conflicts.c (conflicts_print): Don't print file name twice
5662 when %expect fails because there were no conflicts.
5663 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5664 change.
5665 * tests/conflicts.at (%expect not enough, %expect too much):
5666 (%expect with reduce conflicts): Adjust to new behavior.
5667
5668 2005-11-18 Akim Demaille <akim@epita.fr>
5669
5670 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5671 errors.
5672 * NEWS: Document this.
5673 * doc/bison.texinfo (Expect Decl): Likewise.
5674
5675 2005-11-16 Akim Demaille <akim@epita.fr>
5676
5677 Generalize the display of semantic values and locations in traces.
5678 * data/glr.c (yy_reduce_print): Fix indices (again).
5679 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5680 literal integers.
5681 * data/lalr1.cc (yyreduce_print): Rename as...
5682 (yy_reduce_print): this.
5683 Display values and locations.
5684 * data/yacc.c (yy_reduce_print): Likewise.
5685 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5686 (yysymprint): Move higher to be visible from yy_reduce_print).
5687 (yyparse): Adjust.
5688 * tests/calc.at: Adjust the expected length of the traces.
5689
5690 2005-11-14 Akim Demaille <akim@epita.fr>
5691
5692 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5693 from 1 to N, while values and location start at 0.
5694 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5695
5696 2005-11-14 Akim Demaille <akim@epita.fr>
5697
5698 * data/glr.c (yy_reduce_print): Fix the $ number.
5699
5700 2005-11-14 Akim Demaille <akim@epita.fr>
5701
5702 "Use" parse parameters.
5703 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5704 * data/glr.c, data/glr.cc: Use them.
5705 * data/glr.c (YYUSE): Have a C++ definition that supports
5706 non-pointer types.
5707
5708 2005-11-14 Akim Demaille <akim@epita.fr>
5709
5710 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5711
5712 2005-11-14 Akim Demaille <akim@epita.fr>
5713
5714 * data/glr.cc: New.
5715 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5716
5717 2005-11-12 Akim Demaille <akim@epita.fr>
5718
5719 Let position and location be PODs.
5720 * data/location.cc (position::initialize, location::initialize): New.
5721 (position::position, location::location): Define only if
5722 b4_location_constructors is defined.
5723 * data/lalr1.cc (b4_location_constructors): Define it for backward
5724 compatibility.
5725 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5726
5727 2005-11-12 Akim Demaille <akim@epita.fr>
5728
5729 * data/lalr1.cc: Move the body of the ctor and dtor into the
5730 parser file (instead of the header).
5731 Wrap the implementations in a "namespace yy".
5732
5733 2005-11-12 Akim Demaille <akim@epita.fr>
5734
5735 Have glr.c include its header file when created.
5736 * data/glr.c (b4_shared_declarations): New.
5737 Output them verbatim in the parser if !%defines, otherwise
5738 output then in the header file, and include it instead.
5739
5740 2005-11-11 Akim Demaille <akim@epita.fr>
5741
5742 * data/glr.c: Comment changes.
5743
5744 2005-11-11 Akim Demaille <akim@epita.fr>
5745
5746 When yydebug, report semantic and location values for reductions.
5747 * data/glr.c (yy_reduce_print): Report the semantic values and the
5748 locations.
5749 (YY_REDUCE_PRINT): Adjust.
5750 (yyglrReduce): Use them.
5751 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5752 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5753 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5754 traces.
5755
5756 2005-11-10 Akim Demaille <akim@epita.fr>
5757
5758 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5759 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5760 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5761
5762 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5763
5764 * m4/cxx.m4, examples/Makefile.am: Don't build
5765 examples/calc++ if no C++ compiler is available. (trivial change)
5766
5767 2005-11-09 Akim Demaille <akim@epita.fr>
5768
5769 * src/scan-skel.l: Use a couple of asserts.
5770
5771 2005-11-03 Akim Demaille <akim@epita.fr>
5772
5773 In some (weird) cases, the final state number is incorrect.
5774 Reported by Alexandre Duret-Lutz.
5775 * src/LR0.c (state_list_append): Remove the computation of
5776 final_state.
5777 (save_reductions): Do it here.
5778 (get_state): Alpha conversion.
5779 (generate_states): Use a for loop.
5780 * src/gram.h (item_number_is_rule_number)
5781 (item_number_is_symbol_number): New.
5782 * src/state.c: Use assert.
5783 * src/system.h: Include assert.h.
5784 * tests/sets.at (Accept): New.
5785
5786 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5787
5788 * data/glr.c (yyfill): Adjust comment.
5789 (yyresolveAction): Initialize default location properly
5790 for empty right-hand sides.
5791 (yydoAction): Ditto.
5792 Add comment explaining apparently dead code.
5793 * tests/glr-regression.at
5794 (Incorrectly initialized location for empty right-hand side in GLR):
5795 New test.
5796
5797 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5798
5799 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5800 gnulib when interrupted. This fixes some race conditions and
5801 works around some portability problems (one noted by Paul
5802 Hilfinger).
5803
5804 2005-10-22 Akim <akim@epita.fr>
5805
5806 * Makefile.cfg: Adjust to config -> build-aux.
5807 Reported by twledo.
5808
5809 2005-10-21 Akim Demaille <akim@epita.fr>
5810
5811 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5812 the %parse-params.
5813 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5814 * data/yacc.c (b4_Pure_if): Rename as...
5815 (b4_yacc_pure_if): this.
5816 (YY_SYMBOL_PRINT, yyparse): Adjust.
5817 * doc/bison.texinfo: Formatting changes.
5818
5819 2005-10-21 Akim Demaille <akim@epita.fr>
5820
5821 Finish the transition config -> build-aux.
5822 * configure.ac, Makefile.am: Use build-aux.
5823 * config/prev-version, config/announce-gen, config/Makefile.am:
5824 Move to...
5825 * build-aux/prev-version, build-aux/announce-gen,
5826 * build-aux/Makefile.am: here.
5827
5828 2005-10-14 Akim Demaille <akim@epita.fr>
5829
5830 * examples/calc++/test: Use set -x only when VERBOSE.
5831
5832 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5833
5834 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5835 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5836
5837 2005-10-13 Akim Demaille <akim@epita.fr>
5838
5839 * src/scan-skel.l: Output the base name parts of the parser and
5840 header file names.
5841 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5842 additional checks.
5843 Use this to exercise C++ outputs in subdirs.
5844 Reported by Oleg Smolsky.
5845
5846 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5847
5848 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5849 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5850 Problem reported by John P. Hartmann.
5851 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5852 already defined it.
5853
5854 2005-10-12 Akim Demaille <akim@epita.fr>
5855
5856 * src/parse-gram.y (version_check): Exit 63 to please missing
5857 (stands for "version mismatch).
5858 * tests/input.at, doc/bison.texinfo: Adjust.
5859
5860 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5861
5862 Work around portability problems with Visual Age C compiler
5863 (xlc and xlC_r) reported by John P. Hartmann.
5864 * data/location.cc (initial_column, initial_line): Remove.
5865 All uses replaced by 0 and 1.
5866 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5867 that xlc complains about.
5868 * src/scan-skel.l (skel_wrap): Likewise.
5869 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5870 as __STDC__.
5871 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5872 __STDC_VERSION__. Use it everywhere instead of looking at
5873 __STDC__ and __cplusplus.
5874
5875 2005-10-10 Akim Demaille <akim@epita.fr>
5876
5877 * examples/calc++/test: Be quiet unless VERBOSE.
5878
5879 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5880
5881 * data/c.m4 (yydestruct, yysymprint):
5882 Use YYUSE instead of casting to void.
5883 * data/glr.c (YYUSE): New macro.
5884 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5885 Use it instead of rolling our own.
5886 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5887 (YYCHK1):
5888 Use /*CONSTCOND*/ to suppress lint warnings.
5889 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5890 (YY_STACK_PRINT): Use 'false' not '0'.
5891 (YYUSE): New macro.
5892 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5893 * data/yacc.c (YYUSE): New macro.
5894 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5895 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5896 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5897
5898
5899 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5900 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5901
5902 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5903
5904 Undo the parts of the unlocked-I/O change that substituted
5905 putc or puts for printf. This might hurt performance a bit,
5906 but some people prefer the printf style.
5907 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5908 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5909 All uses replaced by YYFPRINTF and YYDPRINTF.
5910 * data/yacc.c: Likewise.
5911 * lib/bitset.c (bitset_print): Likewise.
5912 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5913 putc and puts.
5914 * lib/lbitset.c (debug_lbitset): Likewise.
5915 * src/closure.c (print_firsts, print_fderives): Likewise.
5916 * src/gram.c (grammar_dump): Likewise.
5917 * src/lalr.c (look_ahead_tokens_print): Likewise.
5918 * src/output.c (escaped_output): Likewise.
5919 (user_actions_output): Break apart two printfs.
5920 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
5921 * src/reduce.c (reduce_print): Likewise.
5922 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5923 * src/system.h: Include unlocked-io.h rathe than stdio.h.
5924
5925 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5926 Use assignments rather than casts-to-void to suppress
5927 unused-variable warnings. This pacifies 'lint'.
5928 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
5929 unused-variable warnings.
5930
5931 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5932
5933 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5934
5935 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
5936
5937 Use unlocked I/O for a minor performance improvement on hosts like
5938 GNU/Linux and Solaris that support unlocked I/O. The basic idea
5939 is to use the gnlib unlocked-io module, and to prefer putc and
5940 puts to printf when either will work (since the latter doesn't
5941 come in an unlocked flavor).
5942 * bootstrap (gnulib_modules): Add unlocked-io.
5943 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
5944 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
5945 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
5946 and similarly for puts and putc and printf.
5947 * data/yacc.c: Likewise.
5948 * lib/bitset.c (bitset_print): Likewise.
5949 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
5950 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
5951 to printf.
5952 * lib/lbitset.c (debug_lbitset): Likewise.
5953 * src/closure.c (print_firsts, print_fderives): Likewise.
5954 * src/gram.c (grammar_dump): Likewise.
5955 * src/lalr.c (look_ahead_tokens_print): Likewise.
5956 * src/output.c (escaped_output): Likewise.
5957 (user_actions_output): Coalesce two printfs.
5958 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
5959 * src/reduce.c (reduce_print): Likewise.
5960 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
5961 * src/system.h: Include unlocked-io.h rather than stdio.h.
5962
5963 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
5964 this confuses xgettext.
5965
5966 2005-10-02 Akim Demaille <akim@epita.fr>
5967
5968 * bootstrap (gnulib_modules): Add strverscmp.
5969 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
5970 * m4/.cvsignore: Add strverscmp.m4.
5971 * src/parse-gram.y (%require): New token, new rule.
5972 (version_check): New.
5973 * src/scan-gram.l (%require): Adjust.
5974 * tests/input.at (AT_REQUIRE): New.
5975 Use it.
5976 * doc/bison.texinfo (Require Decl): New.
5977 (Calc++ Parser): Use %require.
5978
5979 2005-10-02 Akim Demaille <akim@epita.fr>
5980
5981 * data/location.cc: New.
5982
5983 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
5984 Akim Demaille <akim@epita.fr>
5985
5986 Make sure -odir/foo.cc creates dir/location.hh etc.
5987 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
5988 (spec_file_prefix, spec_verbose_file, spec_graph_file)
5989 (spec_defines_file): Now const.
5990 (dir_prefix): New.
5991 (short_base_name): Remove.
5992 * src/files.c: Adjust.
5993 (dirname.h): Include.
5994 (base_name): Don't prototype it.
5995 (finput): Remove, duplicates gram_in.
5996 (full_base_name, short_base_name): Replace by...
5997 (all_but_ext, all_but_tab_ext): these.
5998 (compute_base_names): Rename as...
5999 (compute_file_name_parts): this.
6000 Update to compute the new variables, including dir_prefix.
6001 Adjust dependencies.
6002 * src/output.c (prepare): Output them.
6003 * src/reader.c: Adjust to use gram_in, not finput.
6004 * src/scan-skel.l (@dir_prefix@): New.
6005
6006 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6007
6008 * lib/subpipe.c: New function end_of_output_subpipe() added
6009 to allow support for non-posix systems. This is a no-op function
6010 for posix systems.
6011
6012 * lib/subpipe.h: New function end_of_output_subpipe() added
6013 to allow support for non-posix systems. This is a no-op function
6014 for posix systems.
6015
6016 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6017 handle the lack of pipe/fork functionality on non-posix systems.
6018
6019 * djgpp/Makefile.maint: DJGPP specific file.
6020
6021 * djgpp/README.in: DJGPP specific file.
6022
6023 * djgpp/config.bat: DJGPP specific configuration file.
6024
6025 * djgpp/config.sed: DJGPP specific configuration file.
6026
6027 * djgpp/config.site: DJGPP specific configuration file.
6028
6029 * djgpp/config_h.sed: DJGPP specific configuration file.
6030
6031 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6032
6033 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6034
6035 2005-10-02 Akim Demaille <akim@epita.fr>
6036
6037 * data/location.cc: New, extract from...
6038 * data/lalr1.cc: here.
6039 (location.hh): Include it after the user prologue, in case the
6040 filename type is defined by the user.
6041 Forward declation location and position before the pre-prologue.
6042 (yyresult_): Rename as...
6043 (yyresult): this, it's a local variable, not an attribute.
6044 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6045
6046 2005-10-01 Akim Demaille <akim@epita.fr>
6047
6048 * examples/extexi: Restore the #line generation.
6049
6050 2005-09-30 Akim Demaille <akim@epita.fr>,
6051 Alexandre Duret-Lutz <adl@gnu.org>
6052
6053 Move the token type and YYSTYPE in the parser class.
6054 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6055 (parser::token): New, from the moved free definition of tokens.
6056 (parser::semantic_value): Now a full definition instead of an
6057 indirection to YYSTYPE.
6058 (b4_post_prologue): No longer included in the header file, but
6059 in the implementation file.
6060 * doc/bison.texi (C+ Language Interface): Update.
6061 * src/parse-gram.y: Support unary %define.
6062 * tests/actions.at: Define global_tokens_and_yystype for backward
6063 compatibility until we update the tests.
6064 * tests/calc.at: Idem.
6065 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6066 to simplify the code.
6067
6068 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6069
6070 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6071 Ah, the good old days! Problem reported by Peter Klein.
6072 * bootstrap (gnulib_modules): Add strerror, strtoul.
6073 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6074 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6075
6076 2005-09-29 Akim Demaille <akim@epita.fr>
6077
6078 * data/c.m4 (b4_error_verbose_if): New.
6079 * data/lalr1.cc: Use it.
6080 (YYERROR_VERBOSE_IF): Remove.
6081 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6082 parser members, replaced by...
6083 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6084 local variables.
6085 (yysyntax_error_): Takes the state number as argument.
6086 (yyreduce_print_): Use the argument yyrule, not the former
6087 attribute yyn_.
6088
6089 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6090
6091 * bootstrap (gnulib_modules): Add verify.
6092 * lib/.cvsignore: Add verify.h.
6093 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6094 * src/system.h (verify): Remove.
6095 Include verify.h instead.
6096 * src/tables.c (tables_generate): Use new API for 'verify'.
6097
6098 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6099
6100 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6101 local variables whose names begin with 'yy'.
6102 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6103 Trivial changes from Joel E. Denny.
6104
6105 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6106 it itself.
6107 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6108 don't use alloca any more.
6109
6110 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6111 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
6112 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
6113 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6114 to match yacc.c, to test more hosts.
6115
6116 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6117
6118 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6119 doesn't affect behavior.
6120 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6121 Solaris, AIX, MSC.
6122 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6123 This works a bit better with glibc, if user code has already included
6124 stdlib.h.
6125 * doc/bison.texinfo (Bison Parser): Document that users can't
6126 arbitrarily use malloc and free for other purposes. Document
6127 that <alloca.h> and <malloc.h> might be included.
6128 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6129 user must declare alloca.
6130
6131 * HACKING (release): Forwarn the Translation Project about
6132 stable releses.
6133
6134 2005-09-20 Akim Demaille <akim@epita.fr>
6135
6136 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6137
6138 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6139
6140 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6141 (YYSTACK_ALLOC_MAXIMUM): Use it.
6142 (yysyntax_error): New function.
6143 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6144 multiple syntax errors are reported, and alloca is being used.
6145 Instead, reallocate buffers twice as big each time, so that
6146 we waste at most half the allocated memory. Start with a small
6147 (128-byte) buffer that will suffice in most cases anyway.
6148 Use yysyntax_error to do most of the work.
6149
6150 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6151 yynerrs is the number of errors reported, not the number of
6152 errors encountered.
6153
6154 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6155 Mark it as expected to fail.
6156 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6157 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6158 Don't start user-code symbols with "yy", to avoid name space problems.
6159
6160 2005-09-19 Akim Demaille <akim@epita.fr>
6161
6162 Remove the traits, failed experiment.
6163 It never proved useful, and anyway because of the current
6164 definition, it was not possible to have several specialization of
6165 this traits, making it useless.
6166 * data/lalr1.cc (yy:traits): Remove.
6167 Inline its definitions in the parser class.
6168
6169 2005-09-19 Akim Demaille <akim@epita.fr>
6170
6171 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6172 least Mac OSX with a /usr/local install of gettext.
6173
6174 2005-09-19 Akim Demaille <akim@epita.fr>
6175
6176 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6177 and yytoken for similarity with the other skeletons.
6178
6179 2005-09-19 Akim Demaille <akim@epita.fr>
6180
6181 * NEWS, configure.ac: update version number to 2.1a.
6182
6183 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6184
6185 * NEWS: Version 2.1.
6186
6187 * NEWS: Remove notice of yytname change, since it was never in an
6188 official release.
6189 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6190 diagnostic.
6191 * src/output.c (prepare): Likewise.
6192 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6193 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6194 is not defined. This is an awful hack, but it's enough for now.
6195 All callers changed.
6196 * tests/glr-regression-at (make_value): Args are const pointers now,
6197 to avoid GCC warning.
6198 (Duplicated user destructor for lookahead): New test. Currently
6199 skipped. It fails on my host but I'm not sure it'll always fail.
6200
6201 2005-09-16 Akim Demaille <akim@epita.fr>
6202
6203 * src/symtab.h (struct symbol): Declare the printer and destructor
6204 as const, to avoid accidental calls to free.
6205 (symbol_destructor_set, symbol_printer_set): Adjust.
6206 * src/symtab.c: Adjust.
6207
6208 2005-09-16 Akim Demaille <akim@epita.fr>
6209
6210 * data/c.m4 (b4_token_enums): New.
6211 (b4_token_defines): Rename as...
6212 (b4_token_enums_defines): this.
6213 (b4_token_defines): New, output only the #defines.
6214 * data/yacc.c, data/glr.c: Adjust.
6215 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6216 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6217 as default values.
6218
6219 2005-09-16 Akim Demaille <akim@epita.fr>
6220
6221 * data/lalr1.cc (yylex_): Remove, inline its code.
6222 (yyreport_syntax_error_): Remove, replaced by...
6223 (yysyntax_error_): this which returns a string and leaves to the
6224 caller the call to the users' error function.
6225 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6226 Move from members of the parser object...
6227 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6228 to local variables of the parse function.
6229
6230 2005-09-16 Akim Demaille <akim@epita.fr>
6231
6232 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6233 since it's in Bison's name space.
6234
6235 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6236
6237 * data/glr.c (yyresolveValue): Add default case to pacify
6238 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6239
6240 * NEWS: Document when yyparse started to return 2.
6241 * doc/bison.texinfo (Parser Function): Document when yyparse
6242 returns 2.
6243
6244 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6245 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6246 changed.
6247 (class position): file_name -> filename (reverting). All uses changed.
6248
6249 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6250
6251 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6252 do anything if $@ exists. This reverts part of the 2005-07-07
6253 patch.
6254
6255 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6256
6257 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6258 contains obsolete information and isn't worth distributing as a
6259 separate file anyway.
6260 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6261 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6262 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6263 (yyparse): Abort if user code uses longjmp to throw an unexpected
6264 value.
6265
6266 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6267
6268 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6269 Suggested by twlevo@xs4all.nl.
6270
6271 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6272 This avoids a diagnostic from gcc -Wswitch-enum.
6273 Problem reported by twlevo@xs4all.nl.
6274
6275 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6276 standards. Use "file name" or "file" or "name", depending on
6277 the context.
6278 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6279 not to hack/foo.tab.c.
6280 (Calc++ Top Level): 2nd arg of main is not const.
6281 * data/glr.c: b4_filename -> b4_file_name.
6282 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6283 All uses changed.
6284 (class position): filename -> file_name. All uses changed.
6285 * data/yacc.c: b4_filename -> b4_file_name.
6286 * lib/bitset.h: filename -> file_name in local vars.
6287 * lib/bitset_stats.c: Likewise.
6288 * src/files.c: Likewise.
6289 * src/scan-skel.l ("@output ".*\n): Likewise.
6290 * src/files.c (file_name_split): Renamed from filename_split.
6291 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6292
6293 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6294
6295 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6296 to accommodate latest gnulib.
6297
6298 * tests/glr-regression.at (Duplicate representation of merged trees):
6299 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6300
6301 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6302 needed.
6303
6304 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6305
6306 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6307 All uses changed. Invoke user destructor after an error during a
6308 split parse (trivial change from Joel E. Denny).
6309
6310 * tests/glr-regression.at
6311 (User destructor after an error during a split parse): New test case.
6312 Problem reported by Joel E. Denny in:
6313 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6314
6315 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6316
6317 * README-cvs: Give URLs for recommended tools.
6318 Mention Gzip version problem, and bootstrapping issues.
6319 Remove troubleshooting section, as it's somewhat obsolete.
6320
6321 * bootstrap (no_cache): New var, to accommodate different wget
6322 variants. Use it instead of '-C off'. Problem reported by
6323 twlevo@xs4all.nl.
6324
6325 * data/glr.c (yydestroyStackItem): New function.
6326 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6327 debugging information. Problem reported by Joel E. Denny.
6328
6329 2005-08-25 Akim Demaille <akim@epita.fr>
6330
6331 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6332
6333 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6334
6335 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6336 Don't invoke destructor on unresolved entries.
6337 * tests/glr-regression.at
6338 (User destructor for unresolved GLR semantic value): New test case.
6339 Problem reported by Joel E. Denny in:
6340 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6341
6342 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6343
6344 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6345 Add strnlen.c.
6346 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6347 lib-prefix.m4, po.m4.
6348
6349 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6350 in yydestruct diagnostic, since it might not be an error.
6351 Problem reported by Joel Denny near end of
6352 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6353 * data/lalr1.cc (yyerturn): Likewise.
6354 * data/yacc.c (yyreturn): Likewise.
6355 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6356
6357 * src/files.c: Remove obsolete FIXME comment.
6358
6359 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6360 with the other templates, and to fix bogus run-on messages such
6361 as the one reported at the end of
6362 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6363 All callers changed to avoid the newline.
6364 (yyprocessOneStack): Output two lines rather than one, to accommodate
6365 the above change. This changes the debug output format slightly.
6366
6367 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6368 reported by Joel E. Denny in
6369 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6370 (trivial change).
6371 * tests/glr-regression.at (Duplicate representation of merged trees):
6372 New test, from Joel E. Denny in:
6373 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6374 * THANKS: Add Joel E. Denny.
6375
6376 * configure.ac (AC_INIT): Bump to 2.0c.
6377
6378 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6379
6380 * NEWS: Version 2.0b.
6381
6382 * Makefile.am (SUBDIRS): Put examples before tests, so that
6383 "make check" doesn't finish with "All 1 tests passed".
6384
6385 * tests/regression.at (Token definitions): Don't rely on
6386 AT_PARSER_CHECK for data that contains backslashes. It currently
6387 uses 'echo', and 'echo' isn't portable if its argument contains
6388 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6389 that the byte '\0xff' is not printable in the C locale; it is,
6390 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6391 not printable, so use '\0x81' to test.
6392
6393 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6394 version of GCC, since the macro is used with non-GCC compilers.
6395
6396 Fix core dump reported by Pablo De Napoli in
6397 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6398 * tests/regression.at (Invalid inputs with {}): New test.
6399 * src/parse-gram.y (token_name): Translate type before using
6400 it as an index.
6401
6402 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6403 the user's name space. All uses changed to __attribute__
6404 ((__unused__)).
6405 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6406 Add __attribute__ ((__noreturn__)).
6407
6408 * etc/clcommit: Remove. We weren't using it, and it failed
6409 "make maintainer-distcheck".
6410 * Makefile.maint: Merge from coreutils.
6411 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6412 (syntax-check-rules): Change list of rules as described below.
6413 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6414 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6415 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6416 (sc_trailing_space): New rules.
6417 (sc_xalloc_h_in_src): Remove.
6418 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6419 (sc_space_tab, sc_error_exit_success, sc_changelog):
6420 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6421 (makefile-check, po-check, author_mark_check):
6422 (makefile_path_separator_check, copyright-check):
6423 Use grep -n, to make it easier to find violations.
6424 Use CVS_LIST and CVS_LIST_EXCEPT.
6425 (header_regexp, h_re): Remove.
6426 (dd_c): New macro.
6427 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6428 (my-distcheck): Use more-modern GCC flags.
6429 (signatures, %.asc): Remove.
6430 (rel-files, announcement): Remove signatures.
6431 Restore old updating code, even though we don't use it, so
6432 that we're the same as coreutils.
6433 (alpha, beta, major): Depend on news-date-check.
6434 Make the upload commands.
6435
6436 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6437 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6438 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6439 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6440 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6441 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6442 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6443 * tests/sets.at: Likewise.
6444
6445 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6446 we comment out the Autoconf version number.
6447 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6448 it's error-prone and "make maintainer-distcheck" rejects it.
6449
6450 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6451 Indent calls to "error" to pacify "make maintainer-distcheck",
6452 when the calls are not intended to be translated.
6453 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6454
6455 * src/Makefile.am (DEFS): Use +=, to pacify
6456 "make maintainer-distcheck".
6457 (bison_SOURCES): Add scan-skel.h.
6458 (sc_tight_scope): New rule, from coreutils.
6459
6460 * src/files.c (src_extension, header_extension):
6461 Now static, not extern.
6462 * src/getargs.c (short_options): Likewise.
6463 * src/muscle_tab.c (muscle_table): Likewise.
6464 * src/parse-gram.y (current_class, current_type, current_prec):
6465 Likewise.
6466 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6467 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6468 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6469 void, to avoid warning when NLS is disabled.
6470 * src/output.c: Include scan-skel.h.
6471 (scan_skel): Remove decl, since scan-skel.h does this.
6472 (output_skeleton):
6473 Indent calls to "error" to pacify "make maintainer-distcheck".
6474 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6475 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6476 "make maintainer-distcheck".
6477 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6478 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6479 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6480 (skel_lex_destroy, scan_skel): Move these decls to...
6481 * src/scan-skel.h: New file.
6482 * src/uniqstr.c (uniqstr_assert):
6483 Indent calls to "error" to pacify "make maintainer-distcheck".
6484
6485 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6486 not @VAR@.
6487
6488 * tests/torture.at: Revamp to avoid misuse of atoi that
6489 "make maintainer-distcheck" complained about.
6490
6491 * examples/extexi (message): Don't print a message more than once,
6492 and omit line-number decoration that makes Emacs compile think
6493 that informative messages are worth worrying about.
6494
6495 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6496
6497 * configure.ac: Update version number.
6498
6499 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6500 accidentally.
6501 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6502 autogenerated by the maintainer.
6503 * examples/calc++/.cvsignore: Add *.yy.
6504
6505 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6506 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6507 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6508
6509 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6510
6511 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6512 from maintainer-distcheck about casting the argument of 'free'.
6513
6514 * NEWS: Mention recent yytname changes.
6515 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6516
6517 * bootstrap: For translations that have not yet been upgraded to
6518 the new runtime-po domain, prime the pump by extracting the
6519 relevant strings from the obsolete translations. This code can be
6520 removed once the bison-runtime domain has been translated by each
6521 team.
6522
6523 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6524 now that token names are already quoted.
6525
6526 Fix problem reported by Anthony Heading.
6527 * data/glr.c (YYTOKEN_TABLE): New macro.
6528 (yytname): Define if YYTOKEN_TABLE.
6529 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6530 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6531 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6532 * src/output.c (prepare_symbols): Output token_table_flag.
6533
6534 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6535
6536 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6537 again if the first call fails.
6538
6539 * data/glr.c (yytnamerr): New function.
6540 (yyreportSyntaxError): Use it to dequote most string literals.
6541 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6542 with other skeletons. All uses changed.
6543 (yytnameerr_): New function.
6544 (yyreport_syntax_error): Use it to dequote most string literals.
6545 * data/yacc.c (yytnamerr): New function.
6546 (yyerrlab): Use it to decode most string literals.
6547 * doc/bison.texinfo (Decl Summary, Calling Convention):
6548 Clarify quoting convention of yytname.
6549 * src/output.c (prepare_symbols): Quote all names. This undoes
6550 the 2005-04-17 change, which is now accomplished (mostly) via
6551 changes in the parsers as described above.
6552 * tests/regression.at (Token definitions, Web2c Actions):
6553 Undo most 2005-04-17 change here, too.
6554
6555 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6556
6557 Fix more problems reported by twlevo@xs4all.nl.
6558 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6559 remove trailing spaces. This loses the exit status of ./types,
6560 and isn't needed since ./types shouldn't be emitting trailing
6561 spaces.
6562 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6563 as the stack isn't valid in that case.
6564
6565 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6566 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6567 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6568 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6569 is used.
6570 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6571 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6572 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6573 Likewise.
6574
6575 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6576 overly-picky compilers that reject 'char *foo = "bar";'.
6577
6578 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6579 to FILE * parameter, not to stderr. This fixes a typo introduced
6580 in the 2005-07-12 change.
6581
6582 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6583 warnings from GCC 4.
6584
6585 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6586 (yyglrShiftDefer, yysplitStack):
6587 Remove unused parameters b4_pure_formals. All uses changed.
6588 (yyglrShift): Remove unused parameters b4_user_formals.
6589 All uses changed.
6590 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6591
6592 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6593
6594 Destructor cleanups and regularization among the three skeletons.
6595 * NEWS: Document the behavior changes.
6596 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6597 stack before failing, as the cleanup code will do it for us now.
6598 * data/lalr1.cc (yyerrlab): Likewise.
6599 * data/glr.c (yyparse): Pop everything off the stack before
6600 freeing it, so that destructors get called properly.
6601 * data/lalr1.cc (yyreturn): Likewise.
6602 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6603 This is more consistent.
6604 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6605 why destructors might be called. 1.875 -> 2.1.
6606 (Destructor Decl, Decl Summary, Table of Symbols):
6607 Some English-language cleanups for %destructor.
6608 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6609 Add output line for destructor of start symbol.
6610 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6611 because of that same extra output line.
6612
6613 * NEWS: Document minor wording changes in diagnostics of
6614 Bison-generated parsers.
6615 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6616 Remove unused formals. All uses changed.
6617 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6618 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6619 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6620 Rename yyoverflowab to yyexhaustedlab.
6621 When memory exhaustion occurs during syntax-error reporting,
6622 report it separately rather than in a single diagnostic; this
6623 eases translation.
6624 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6625 (Memory Exhausted): Renamed from Parser Stack Overflow.
6626 Revamp wording slightly to prefer "memory exhaustion".
6627 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6628
6629 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6630
6631 Add i18n support to the GLR skeleton. Partially fix the C++
6632 skeleton; a C++ expert needs to finish this. Remove debugging
6633 msgids; there's little point to having them translated, since they
6634 can be understood only by someone who can read the
6635 (English-language) source code.
6636
6637 Generate runtime-po/bison-runtime.pot automatically, so that we
6638 don't have to worry about garbage getting in that file. We'll
6639 make sure after the next official release that old msgids don't
6640 get lost. See
6641 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6642
6643 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6644 Now auto-generated.
6645 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6646 Fix typos in explanations of the runtime file.
6647 * bootstrap: Change gettext keyword from YYI18N to YY_.
6648 Use standard Makefile.in.in in runtime-po, since we'll arrange
6649 for backward-compatible bison-runtime.po files in a different way.
6650 * data/glr.c (YY_): New macro, from yacc.c.
6651 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6652 Translate messages intended for users.
6653 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6654 the wording in the other skeletons. We don't know that the memory
6655 is virtual.
6656 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6657 Use same method that yacc.c uses.
6658 Don't translate debugging messages.
6659 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6660 it doesn't work (yet), and requires C++ expertise to fix.
6661 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6662 Move defn to a more logical place, to be consistent with other
6663 skeletons.
6664 Don't translate debugging messages.
6665 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6666 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6667 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6668 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6669
6670 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6671 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6672 void, not int.
6673 * tests/glr-regression.at (Badly Collapsed GLR States):
6674 Likewise.
6675 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6676 yylex should return 0 at EOF rather than aborting.
6677
6678 Improve tests for stack overflow in GLR parser.
6679 Problem reported by twlevo@xs4all.nl.
6680 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6681 All uses removed.
6682 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6683 can handle the problem.
6684 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6685 (yyparse): New local variable yyresult to record the result.
6686 Use result of setjmp to set it, rather than storing itinto
6687 struct.
6688 (yyDone): Remove label.
6689 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6690 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6691 if YYABORT is used).
6692 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6693 yyparse status; put status > 1 into diagnostic.
6694 Check that status==2 works.
6695 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6696 Use exit status 3 for failure to open (which shouldn't happen).
6697
6698 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6699
6700 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6701 1 on syntax error; just let yyparse do its thing.
6702 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6703 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6704 (Exploding the Stack Size with Alloca):
6705 (Exploding the Stack Size with Malloc):
6706 Expect exit status 2, not 1, since the parser is supposed to blow
6707 its stack. Problem reported by twlevo@xs4all.nl.
6708
6709 * data/glr.c (yyparse): Don't assume that the initial calls
6710 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6711 Print a stack-overflow message and fail instead.
6712 Initialize the line-number information before creating the stack,
6713 so that the stack-overflow message can report line zero safely.
6714
6715 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6716
6717 Fix problems reported by twlevo@xs4all.nl.
6718 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6719 (yyuserMerge): Provide a default case if b4_mergers is empty.
6720 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6721 * tests/glr-regression.at
6722 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6723 Add casts to pacify C++ compilers.
6724 * tests/glr-regression.at (Improper merging of GLR delayed action
6725 sets): Declare yylex before using it.
6726 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6727 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6728 test for valgrind; valgrind is independent of g++.
6729 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6730 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6731 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6732 Use a destructor, so that we can expand the stack. Change
6733 YYSTYPE to char * so that we can free it. Cast result of malloc.
6734
6735 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6736
6737 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6738 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6739
6740 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6741
6742 * PACKAGING: New file, suggested by Bruno Haible and taken from
6743 similar wording in gettext's PACKAGING file.
6744 * NEWS: Mention PACKAGING.
6745 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6746
6747 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6748
6749 * NEWS: Document recent i18n improvements.
6750 * bootstrap: Get runtime translations into runtime-po.
6751 Create runtime-po files automatically, if possible.
6752 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6753 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6754 does not infringe on the user's name space.
6755 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6756 * doc/bison.texinfo (Internationalization): Revamp the English
6757 and Texinfo syntax a bit, to try to make it clearer.
6758 (Bison Options, Option Cross Key): Mention --print-localedir.
6759 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6760 YYENABLE_NLS. Quote a bit more.
6761 * runtime-po/.cvsignore: New file.
6762 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6763 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6764 * runtime-po/quot.sed: Likewise.
6765 * runtime-po/boldquot.sed: Likewise.
6766 * runtime-po/en@quot.header: Likewise.
6767 * runtime-po/en@boldquot.header: Likewise.
6768 * runtime-po/insert-header.sin: Likewise.
6769 * runtime-po/remove-potcdate.sin: Likewise.
6770 * runtime-po/Makevars: Likewise.
6771 * runtime-po/LINGUAS: Likewise.
6772 * runtime-po/de.po: Likewise; we will rely on the translation project
6773 to maintain this, so "bootstrap" should get it.
6774 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6775 its value.
6776 * src/main.c (main): Bind the bison-runtime domain, too.
6777
6778 2005-07-12 Bruno Haible <bruno@clisp.org>
6779
6780 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6781 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6782 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6783 * runtime-po: New directory.
6784 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6785 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6786 * runtime-po/Rules-quot: New file, copied from po/.
6787 * runtime-po/quot.sed: Likewise.
6788 * runtime-po/boldquot.sed: Likewise.
6789 * runtime-po/en@quot.header: Likewise.
6790 * runtime-po/en@boldquot.header: Likewise.
6791 * runtime-po/insert-header.sin: Likewise.
6792 * runtime-po/remove-potcdate.sin: Likewise.
6793 * runtime-po/Makevars: New file.
6794 * runtime-po/POTFILES.in: New file.
6795 * runtime-po/LINGUAS: New file.
6796 * runtime-po/bison-runtime.pot: New file.
6797 * runtime-po/de.po: New file.
6798 * m4/bison.m4: New file.
6799 * Makefile.am (SUBDIRS): Add runtime-po.
6800 (aclocaldir, aclocal_DATA): New variables.
6801 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6802 Define aclocaldir.
6803 * src/getargs.c (usage): Document --print-localedir option.
6804 (PRINT_LOCALEDIR_OPTION): New enum item.
6805 (long_options): Add --print-localedir option.
6806 (getargs): Handle --print-localedir option.
6807 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6808 (Internationalization): New section.
6809
6810 2005-07-12 Akim Demaille <akim@epita.fr>
6811
6812 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6813 for consistency with the rest of the code.
6814 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6815 Add separators.
6816
6817 2005-07-12 Akim Demaille <akim@epita.fr>
6818
6819 * src/parse-gram.y: Use %printer instead of YYPRINT.
6820
6821 2005-07-12 Akim Demaille <akim@epita.fr>
6822
6823 * src/symtab.h, src/symtab.c (symbol_print): New.
6824 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6825 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6826
6827 2005-07-12 Akim Demaille <akim@epita.fr>
6828
6829 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6830 b4_at_dollar and b4_dollar_dollar.
6831
6832 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6833
6834 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6835 and Pennello's paper.
6836
6837 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6838
6839 * data/yacc.c (yyparse): Undo previous patch. Instead,
6840 set yylsp[0] and yyvsp[0] only if the initial action
6841 sets yylloc and yylval, respectively.
6842
6843 * data/yacc.c (yyparse): In the initial action, set
6844 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6845 This avoids the use of undefined variables if the initial
6846 action does not set yylloc and/or yylval.
6847
6848 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6849
6850 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6851 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6852 Remove from CVS. These files are automatically generated.
6853 * examples/extexi: Clarify that this file is now part of Bison,
6854 not GNU M4, and that it works with any POSIX-compatible Awk.
6855 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6856 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6857 so that we also get calc++-parser.yy. Geneate it.
6858 Use $(AWK), not gawk, since any conforming Awk will do.
6859 Put comment before action, since older 'make' can't handle comment
6860 in action.
6861 $(BUILT_SOURCES): List all built sources, not just some of them.
6862 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6863 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6864 $($(calc_sources_generated)): Remove unnecessary test for existence
6865 of target. (This had a shell syntax error anyway; a stray "x".)
6866 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6867 calc++-parser.yy.
6868 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6869
6870 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6871 implied by the other modules.
6872
6873 2005-07-06 Akim Demaille <akim@epita.fr>
6874
6875 Bind examples/calc++ to the package.
6876 * examples/calc++/Makefile: Remove, replaced by...
6877 * examples/calc++/Makefile.am: ... this new file.
6878 * examples/calc++/test: Remove input.
6879 * examples/calc++/compile: Remove.
6880 * examples/Makefile.am: New.
6881 * configure.ac, Makefile.am: Adjust.
6882 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6883
6884 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6885
6886 * data/glr.c (yyFail): Drastically simplify; since the format argument
6887 never had any % directives, we can simply pass it to yyerror.
6888 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6889 be modified later, as that is the usual style in glr.c.
6890 Problems reported by Paul Hilfinger.
6891
6892 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6893 and size overflow errors.
6894 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6895 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6896 (YYSIZEMAX): New macro.
6897 (yystpcpy): New function, taken from yacc.c.
6898 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6899 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6900 so that we don't have to maintain their signatures.
6901 (yyFail): Check for buffer overflow, by using vsnprintf rather
6902 than vsprintf. Allocate a bigger buffer if possible.
6903 Report an error if buffer allocation fails.
6904 (yyStackOverflow): New function.
6905 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6906 the initialization was successful. It might fail if storage was
6907 exhausted.
6908 (yyexpandGLRStack): Add more checks for storage allocation failure.
6909 Use yyStackOverflow to report failures.
6910 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6911 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6912 Don't assume stack number fits in int.
6913 (yysplitStack): Check for storage allocation failure.
6914 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
6915 can print diagnostics on storage allocation failure. All callers
6916 changed.
6917 (yyresolveValue): Use yybool for boolean.
6918 (yyreportSyntaxError): Check for size-calculation overflow.
6919 This code is taken from yacc.c.
6920 (yyparse): Check for storage allocation errors when allocating
6921 the initial stack.
6922
6923 2005-07-05 Akim Demaille <akim@epita.fr>
6924
6925 Extract calc++ from the documentation.
6926 * doc/bison.texinfo (Calc++): Add the extraction marks.
6927 * examples/extexi: New, from the aborted GNU Programming 2E.
6928 Separate the different paragraph of a file with empty lines.
6929 * examples/Makefile: Use it to extract the whole calc++ example.
6930
6931 2005-06-24 Akim Demaille <akim@epita.fr>
6932
6933 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
6934 class typedefs.
6935
6936 2005-06-22 Akim Demaille <akim@epita.fr>
6937
6938 * doc/bison.texinfo (C++ Language Interface): First stab.
6939 (C++ Parsers): Remove.
6940
6941 2005-06-22 Akim Demaille <akim@epita.fr>
6942
6943 * data/lalr1.cc (yylex_): Honor %lex-param.
6944
6945 2005-06-22 Akim Demaille <akim@epita.fr>
6946
6947 Start a set of simple examples.
6948 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
6949 * examples/calc++/calc++-driver.hh,
6950 * examples/calc++/calc++-parser.yy,
6951 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
6952 * examples/calc++/compile, examples/calc++/test: New.
6953
6954 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
6955
6956 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
6957 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
6958 which stems from the 2005-05-27 patch.
6959
6960 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
6961
6962 * data/glr.c: Modify treatment of unused parameters to permit use
6963 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
6964
6965 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
6966
6967 Fix infringement on user name space reported by Janos Zoltan Szabo.
6968 * data/yacc.c (yyparse): strlen -> yystrlen.
6969
6970 2005-05-30 Akim Demaille <akim@epita.fr>
6971
6972 * data/lalr1.cc (_): New.
6973 Translate the various messages.
6974
6975 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
6976
6977 Fix infringement on user name space reported by Bruno Haible.
6978 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
6979 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
6980 the user's name space.
6981 (alloca): Include <stdlib.h> to get it, if it's not built in.
6982 (YYMALLOC, YYFREE): Define only if needed.
6983 (malloc, free): Declare, but only if needed, as this infringes on
6984 the user name space.
6985
6986 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
6987
6988 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
6989 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
6990 with %d format.
6991 * lib/ebitset.c (min, max): Undef before defining.
6992 * lib/vbitset.c (min, max): Likewise.
6993 * lib/subpipe.c (create_subpipe): Save local variables in case
6994 vfork clobbers them.
6995
6996 2005-05-24 Bruno Haible <bruno@clisp.org>
6997
6998 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
6999 error message syntax used by gcc-4.0.
7000
7001 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7002
7003 * README: Mention m4 1.4.3. Remove obsolete advice about
7004 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7005
7006 * bootstrap: Remove workaround for problem I encountered with
7007 gettext 0.14.1; it seems to be fixed now.
7008
7009 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7010
7011 * NEWS: Version 2.0a.
7012
7013 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7014 the previous change.
7015
7016 Various maintainer cleanups.
7017 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7018 conftest*, for benefit of CVS commands run at the same time as
7019 "configure". Add build-aux, since "bootstrap" now creates it and
7020 its subfiles.
7021 * Makefile.cfg (move_if_change): Remove.
7022 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7023 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7024 (po_repo, do-po-update, po-update, wget_files, get-targets):
7025 (config.guess-url_prefix, config.sub-url_prefix):
7026 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7027 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7028 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7029 Remove.
7030 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7031 this is now the recommended name.
7032 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7033 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7034 ylwrap. These files now go into build-aux.
7035 * config/move-if-change: Remove.
7036 * config/prev-version.txt: Bump from 1.75 to 2.0.
7037
7038 * bootstrap: Add stdio-safer, unistd-safer modules.
7039 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7040 we don't need it).
7041 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7042 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7043 * lib/subpipe.c: Include "unistd-safer.h".
7044 (create_subpipe): Make sure all the newly-created
7045 file descriptors are > 2, so that diagnostics don't
7046 get sent down them (which might cause Bison to hang, in theory).
7047 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7048 * src/files.c (xfopen): Use fopen_safer, not fopen.
7049
7050 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7051 yesterday's yacc.c fix.
7052
7053 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7054
7055 * data/glr.c, data/lalr1.cc: Update copyright date.
7056
7057 Fix a destructor bug reported by Wolfgang Spraul in
7058 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7059 * data/yacc.c (yyabortlab): Don't call destructor, and
7060 don't set yychar to EMPTY.
7061 (yyoverflowlab): Don't call destructor.
7062 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7063 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7064 since we no longer output the message "discarding lookahead token
7065 end of input ()".
7066
7067 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7068
7069 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7070 fix a small glitch in debugging output.
7071 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7072 after YY_SYMBOL_PRINT where needed.
7073
7074 (struct yyGLRState): Add some comments.
7075 (struct yySemanticOption): Add some comments.
7076 (union yyGLRStackItem): Add comment.
7077
7078 (yymergeOptionSets): Correct this to properly perform the union,
7079 avoiding infinite reported by Michael Rosien.
7080 Update comment.
7081
7082 * tests/glr-regression.at: Add test for GLR merging error reported
7083 by M. Rosien.
7084
7085 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7086
7087 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7088 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7089 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7090 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7091 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7092 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7093 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7094 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7095 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7096 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7097 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7098 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7099 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7100 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7101 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7102 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7103 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7104 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7105 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7106 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7107 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7108 src/output.h, src/parse-gram.c, src/parse-gram.h,
7109 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7110 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7111 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7112 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7113 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7114 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7115 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7116 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7117 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7118 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7119 tests/reduce.at, tests/regression.at, tests/sets.at,
7120 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7121 Update FSF postal mail address.
7122
7123 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7124
7125 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7126 Problem reported by Ralf Menzel.
7127
7128 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7129
7130 * tests/actions.at: Test that stack overflow invokes destructors.
7131 From Marcus Holland-Moritz.
7132 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7133 from here....
7134 (yyreturn): to here. That way, destructors are called properly
7135 even if the stack overflows, or the user calls YYACCEPT or
7136 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7137 (yyoverflowlab): Destroy the lookahead.
7138
7139 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7140
7141 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7142
7143 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7144
7145 * NEWS: Bison-generated C parsers no longer quote literal strings
7146 associated with tokens.
7147 * src/output.c (prepare_symbols): Don't escape strings,
7148 since users don't want to see C escapes.
7149 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7150 in diagnostics.
7151 * tests/input.at (Torturing the Scanner): Likewise.
7152 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7153
7154 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7155
7156 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7157 the data size is known to be too small and we can't increase it.
7158 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7159
7160 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7161
7162 * src/parse-gram.y: Include quotearg.h.
7163 (string_as_id): Quote $1 before using it as a key, since the
7164 lexer no longer quotes it for us.
7165 (string_content): Don't strip quotes, since lexer no longer
7166 quotes it for us.
7167 * src/scan-gram.l: Include quotearg.h.
7168 ("\""): Omit quote.
7169 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7170 a key, since the rest of the lexer doesn't quote it.
7171 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7172 * tests/regression.at (Token definitions): Check for backslashes
7173 in token strings.
7174
7175 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7176 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7177 (yyparse): Revamp code to generate long syntax error message, to
7178 make it easier to translate, and to avoid problems with arithmetic
7179 overflow. Change "virtual memory" to "memory" in diagnostic, since
7180 we don't know whether the memory is virtual.
7181
7182 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7183
7184 * NEWS: Bison-generated C parsers now use the _ macro to
7185 translate strings.
7186 * data/yacc.c (_) [!defined _]: New macro.
7187 All English strings wrapped inside this macro.
7188 * doc/bison.texinfo (Bison Parser): Document _.
7189 * po/POTFILES.in: Include src/parse-gram.c, since it now
7190 includes translateable strings that parse-gram.y doesn't.
7191
7192 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7193
7194 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7195 reverting the 2004-10-11 change to this function.
7196 (symbol_check_alias_consistency): Don't call symbol_type_set
7197 if the type name is already correct.
7198 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7199
7200 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7201
7202 * tests/regression.at (Token definitions): Don't use a token named
7203 c, as that generates a "#define c ..." that runs afoul of buggy
7204 stdlib.h that uses the identifier c as a member of struct
7205 drand48_data. Problem reported by Horst Wente.
7206
7207 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7208
7209 * bootstrap: Change translation URL from
7210 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7211 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7212 redirection glitches. Problem reported by twlevo@xs4all.nl.
7213
7214 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7215
7216 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7217 after operands; POSIX says this isn't portable for the c99 command.
7218
7219 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7220
7221 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7222 immediately if a data overrun has occurred; this may help us track
7223 down what may be a spurious failure on MacOS.
7224
7225 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7226
7227 Respond to problems reported by twlevo@xs4all.nl.
7228
7229 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7230
7231 * src/vcg.h: Comment fix.
7232 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7233 (G_CMAX): Change to -1 instead of INT_MAX.
7234
7235 * data/yacc.c (yyparse): Omit spaces before #line.
7236
7237 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7238
7239 * src/tables.c (state_number_to_vector_number): Put it inside an
7240 "#if 0", since it's not currently used. Problem reported by
7241 Roland McGrath.
7242
7243 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7244
7245 * src/output.c (escaped_output): Renamed from
7246 escaped_file_name_output, since we now use it for symbol tags as
7247 well. All uses changed.
7248 (symbol_destructors_output, symbol_printers_output):
7249 Escape symbol tags too.
7250 Problem reported by Matyas Forstner in
7251 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7252
7253 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7254 not needed.
7255 * src/output.c (user_actions_output, token_definitions_output,
7256 symbol_destructors_output, symbol_printers_output): Likewise.
7257 * src/reader.c (prologue_augment): Likewise.
7258 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7259
7260 * src/vcg.c (output_edge): Don't quote linestyle arg.
7261 Problem reported by twlevo@xs4all.nl.
7262
7263 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7264
7265 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7266 example, reported by Derek M Jones. Also, make the example even
7267 more outrageous, to better illustrate how bad the problem is.
7268
7269 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7270
7271 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7272 putsym. Typo reported by Sebastian Piping.
7273
7274 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7275
7276 * doc/bison.texinfo (Language and Grammar): some -> same
7277 (Epilogue): int he -> in the
7278 Typos reported by Sebastian Piping via Justin Pence.
7279
7280 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7281
7282 * tests/glr-regression.at (Improper handling of embedded actions
7283 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7284 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7285 with dollar signs in test names.
7286 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7287 for a similar reason.
7288
7289 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7290
7291 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7292 wants to redefine G_VIEW.
7293
7294 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7295
7296 * src/vcg.c (get_view_str): Remove case for normal_view.
7297 Problem reported by twlevo@xs4all.nl.
7298
7299 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7300
7301 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7302 Problem reported by twlevo@xs4all.nl.
7303
7304 * doc/bison.texinfo: Change @dircategory from "GNU programming
7305 tools" to "Software development". Requested by Richard Stallman
7306 via Karl Berry.
7307
7308 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7309
7310 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7311 Problem reported by twlevo@xs4all.nl.
7312
7313 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7314
7315 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7316 keyword; it's not needed with modern compilers, and it doesn't
7317 affect correctness with older compilers. Suggested by
7318 twlevo@xs4all.nl.
7319
7320 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7321
7322 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7323 gcc -Wswitch-default.
7324 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7325 * data/yacc.c (yyparse): Likewise.
7326
7327 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7328
7329 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7330 already. Let config.h define any nonstandard values.
7331
7332 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7333
7334 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7335 for the benefit of slower hosts. Problem reported by
7336 Nelson H. F. Beebe.
7337
7338 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7339
7340 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7341 being defined and not used.
7342 * data/lalr1.cc (yyparse): Likewise.
7343 Use "if (false)" rather than "if (0)".
7344
7345 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7346
7347 * TODO: Mention that we should allow NUL bytes in tokens.
7348
7349 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7350
7351 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7352 Problem reported by Hans Aberg.
7353
7354 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7355
7356 * src/getargs.c (version): Happy new year; update overall
7357 program copyright date from 2004 to 2005.
7358
7359 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7360 Problem reported by Hans Aberg.
7361 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7362 (Output file names.): Add a test for the case when standard output
7363 is closed.
7364
7365 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7366
7367 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7368 to fix an oversight in the Bison 2.0 manual.
7369
7370 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7371
7372 * NEWS: Version 2.0. Reformat the existing news items since
7373 1.875, so that related items are grouped together.
7374 * configure.ac (AC_INIT): Bump version to 2.0.
7375 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7376
7377 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7378 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7379 otherwise, we're not testing alloca. Unfortunately there's no
7380 simple way to consult HAVE_ALLOCA here.
7381
7382 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7383 for yymsg, too.
7384
7385 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7386 hand. This avoids a warning about comparing int to size_t when
7387 GCC warnings are enabled.
7388
7389 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7390
7391 * NEWS: Bison-generated parsers no longer default to using the
7392 alloca function (when available) to extend the parser stack, due
7393 to widespread problems in unchecked stack-overflow detection.
7394 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7395 responsibility to set it to a positive value. This lets the user
7396 specify a value that is not a preprocessor constant.
7397 * data/yacc.c (YYMAXDEPTH): Likewise.
7398 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7399 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7400 to be a compile-time constant. However, explain the constraints on it.
7401 Also, explain the constraints on YYINITDEPTH.
7402 (Table of Symbols): Explain that alloca is no longer the default.
7403 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7404 to 1.
7405
7406 * doc/bison.texinfo (Location Default Action): Mention that n must
7407 be zero when k is zero. Suggested by Frank Heckenbach.
7408
7409 2004-12-22 Akim Demaille <akim@epita.fr>
7410
7411 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7412 (parser::state_type, parser::semantic_type, parser::location_type):
7413 Private, not public.
7414 (parser::parse): Return ints, not bool.
7415 Returning a bool introduces a problem: 0 corresponds to false, and
7416 it seems weird to return false on success. Returning true changes
7417 the conventions for yyparse.
7418 Alternatively we could return void and send an exception.
7419 There is no clear consensus (yet?).
7420 (state_stack, semantic_stack, location_stack): Rename as...
7421 (state_stack_type, semantic_stack_type, location_stack_type): these.
7422 Private, not public.
7423 * tests/c++.at: New.
7424 * tests/testsuite.at, tests/Makefile.am: Adjust.
7425
7426 2004-12-21 Akim Demaille <akim@epita.fr>
7427
7428 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7429
7430 2004-12-21 Akim Demaille <akim@epita.fr>
7431
7432 Don't impose std::string for filenames.
7433
7434 * data/lalr1.cc (b4_filename_type): New.
7435 (position::filename): Use it.
7436 (parser.hh): Move the inclusion of stack.hh and location.hh below
7437 the user code, so that needed headers for the filename type can be
7438 included first.
7439 Forward declare them before the user code.
7440 * tests/Makefile.am (check-local, installcheck-local): Pass
7441 TESTSUITEFLAGS to the TESTSUITE.
7442
7443 2004-12-20 Akim Demaille <akim@epita.fr>
7444
7445 Use more STL like names: my_class instead of MyClass.
7446
7447 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7448 (SemanticStack, SemanticType, StateStack, StateType)
7449 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7450 (Parser::value): Rename as...
7451 (location_stack, location_type, rhs_number_type, semantic_stack)
7452 (semantic_type, state_stack, state_type, token_number_type, stack)
7453 (slice, traits, parser::yylloc, parser::yylval): these.
7454
7455 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7456
7457 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7458
7459 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7460 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7461
7462 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7463
7464 Remove uses of 'short int' and 'unsigned short int'. This raises
7465 some arbitrary limits. It uses more memory but nowadays that's
7466 not much of an issue.
7467
7468 This change does not affect the generated parsers; that's a different
7469 task, as some users will want to conserve memory there.
7470
7471 Ideally we should use size_t to represent all object counts, and
7472 something like ptrdiff_t to represent signed differences of object
7473 counts; but that will require more code-cleanup than I have the
7474 time to do right now.
7475
7476 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7477 Use size_t, not int or short int, to count objects.
7478 * src/closure.c (nritemset, closure): Likewise.
7479 * src/closure.h (nritemset, closure): Likewise.
7480 * src/nullable.c (nullable_compute): Likewise.
7481 * src/print.c (print_core): Likewise.
7482 * src/print_graph.c (print_core): Likewise.
7483 * src/state.c (state_compare, state_hash): Likewise.
7484 * src/state.h (struct state): Likewise.
7485 * src/tables.c (default_goto, goto_actions): Likewise.
7486
7487 * src/gram.h (rule_number, rule): Use int, not short int.
7488 * src/output.c (prepare_rules): Likewise.
7489 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7490 errs, reductions): Likewise.
7491 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7492 Likewise.
7493 * src/tables.c (vector_number, tally, action_number,
7494 ACTION_NUMBER_MINIMUM): Likewise.
7495 * src/output.c (muscle_insert_short_int_table): Remove.
7496
7497 2004-12-17 Akim Demaille <akim@epita.fr>
7498
7499 * data/lalr1.cc: Extensive Doxygenation.
7500 (error_): Rename as...
7501 (error): this, since it is visible to the user.
7502 Adjust callers.
7503 (Parser::message): Now an automatic variable from...
7504 (Parser::yyreport_syntax_error_): here.
7505 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7506 Parser::error.
7507 * tests/input.at: Escape $.
7508
7509 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7510
7511 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7512 Parenthesize rhs to avoid obscure problems with mistakes like
7513 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7514 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7515 b4_rhs_location): Likewise.
7516 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7517 b4_rhs_location): Likewise.
7518
7519 2004-12-16 Akim Demaille <akim@epita.fr>
7520
7521 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7522 yacc.c: be sure to stay within yycheck_.
7523 * tests/actions.at: Re-enable C++ tests.
7524
7525 2004-12-16 Akim Demaille <akim@epita.fr>
7526
7527 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7528 real.
7529
7530 2004-12-16 Akim Demaille <akim@epita.fr>
7531
7532 Use #define to handle the %name-prefix.
7533
7534 * data/glr.c, data/yacc.c: Comment changes.
7535 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7536 so that one can refer to yylex in the parser file, and have it
7537 renamed, as is the case with other skeletons.
7538
7539 2004-12-16 Akim Demaille <akim@epita.fr>
7540
7541 Move lalr1.cc internals into yy*.
7542
7543 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7544 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7545 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7546 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7547 (empty_, final_, terror_, errcode_, ntokens_)
7548 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7549 (looka_, ilooka_, error_range_, nerrs_):
7550 Rename as...
7551 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7552 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7553 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7554 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7555 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7556 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7557 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7558 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7559 these.
7560
7561 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7562
7563 Fix some problems reported by twlevo at xs4all.
7564 * src/symtab.c (symbol_new): Report an error if the input grammar
7565 contains too many symbols. This is better than calling abort() later.
7566 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7567 (struct node, struct graph):
7568 Rename member expand to stretch. All uses changed.
7569 (struct graph): Remove member layoutalgorithm. All uses removed.
7570 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7571 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7572 All uses changed.
7573 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7574
7575 2004-12-15 Akim Demaille <akim@epita.fr>
7576
7577 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7578 Add more Doxygen comments.
7579 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7580 (report_syntax_error_, translate_): Rename as...
7581 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7582 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7583
7584 2004-12-15 Akim Demaille <akim@epita.fr>
7585
7586 * data/lalr1.cc (lex_): Rename as...
7587 (yylex_): this.
7588 Move the trace here.
7589 Take the %name-prefix into account.
7590 Reported by Alexandre Duret-Lutz.
7591
7592 2004-12-15 Akim Demaille <akim@epita.fr>
7593
7594 Simplify the C++ parser constructor.
7595
7596 * data/lalr1.cc (debug_): Rename as...
7597 (yydebug_): so that the parser's internals are always in the yy*
7598 pseudo namespace.
7599 Adjust uses.
7600 (b4_parse_param_decl): Remove the leading comma as it is now only
7601 called as unique argument list.
7602 (Parser::Parser): Remove the constructor accepting a location and
7603 an initial debugging level.
7604 Remove from the other ctor the argument for the debugging level.
7605 (debug_level_type, debug_level, set_debug_level): New.
7606
7607 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7608 constructor calls.
7609
7610 2004-12-15 Akim Demaille <akim@epita.fr>
7611
7612 Remove b4_root related material: failure experiment
7613 (which goal was to allow to derive from a class).
7614
7615 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7616 definitions and uses.
7617
7618 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7619
7620 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7621 not 2, since it's not portable to subtract 1 from the start of an
7622 array. The new item 0 is never set or used. All uses changed.
7623
7624 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7625 the default definition of YYLLOC_DEFAULT. Problem reported
7626 by Frank Heckenbach.
7627
7628 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7629
7630 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7631 the normal case and one for the error case. Just use the
7632 first one uniformly. Problem reported by Frank Heckenbach.
7633 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7634 use exactly the same macro in both places.
7635 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7636 so that the normal-case YYRHSLOC works for the error case too.
7637 All uses changed.
7638 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7639 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7640 * doc/bison.texinfo (Location Default Action): Don't claim that
7641 we have an array of locations. Use the same macro for both glr
7642 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7643 the index is 0.
7644
7645 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7646
7647 * HACKING: Update email addresses to send announcements to.
7648
7649 * configure.ac (AC_INIT): Bump version to 1.875f.
7650
7651 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7652
7653 * NEWS: Version 1.875e.
7654 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7655
7656 * src/scan-skel.l: Include "complain.h", for "fatal".
7657
7658 * src/relation.h (relation_print, relation_digraph):
7659 Relation sizes are of type relation_node, not size_t (this is
7660 merely a doc fix, since the two types are equivalent).
7661 (relation_transpose): Relation sizes are of type relation_node,
7662 not int.
7663 * src/relation.c: Likewise.
7664 (top, infinity): Now of type relation_node, not int.
7665 (traverse, relation_transpose): Use relation_node, not int.
7666
7667 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7668 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7669 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7670
7671 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7672 specifying whether the test should be skipped. Use it tp
7673 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7674 fail on some hosts, and should be skipped.
7675
7676 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7677
7678 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7679 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7680 unless otherwise specified below.
7681
7682 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7683 to allocate kernel_base, kernel_items, kernel_size, since
7684 they needn't be initialized to 0.
7685 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7686 * src/closure.c (new_closure): Likewise, for itemset.
7687 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7688 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7689 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7690 (build_relations): Likewise for edge, states1, includes.
7691 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7692 * src/reader.c (packgram): Likewise, for ritem, rules.
7693 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7694 * src/relation.c (relation_digraph): Likewise for VERTICES.
7695 (relation_transpose): Likewise for new_R, end_R.
7696 * src/symtab.c (symbols_token_translations_init): Likewise for
7697 token_translations.
7698 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7699 (token_actions): Likewise for yydefact, actrow, conflrow,
7700 conflict_list.
7701 (save_column): Likewise for froms[symno], tos[symno].
7702 (goto_actions): Likewise for state_count.
7703 (pack_table): Likewise for base, pos, check.
7704 (tables_generate): Likewise for width.
7705
7706 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7707 for initial core. Just have a separate core, so we needn't worry
7708 about whether kernel_size and kernel_base are initialized.
7709
7710 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7711 kernel_size, kernel_items): Remove unnecessary initialization.
7712 * src/conflicts.c (conflicts): Likewise.
7713 * src/derives.c (derives): Likewise.
7714 * src/muscle_tablc (muscle_insert): Likewise.
7715 * src/relation.c (relation_digraph): Likewise.
7716 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7717 conflrow, conflict_table, conflict_list, table, check):
7718 Likewise.
7719
7720 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7721 This is because all callers pass unsigned int.
7722 * src/closure.h (new_closure): Likewise.
7723
7724 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7725 (build_relations): Initialize includes[i] in all cases.
7726 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7727 and rules[ruleno].precsym. Initialize members in order.
7728 * src/relation.c (relation_transpose): Always initialize new_R[i]
7729 and end_R[i].
7730 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7731
7732 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7733 conflict_list[0] was always 0, but now it isn't initialized.
7734
7735 * src/table.c (table_grow): When conflict_table grew, the grown
7736 area wasn't cleared. Fix this.
7737
7738 * lib/.cvsignore: Add strdup.c, strdup.h.
7739 * m4/.cvsignore: Add strdup.m4.
7740
7741 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7742
7743 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7744 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7745 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7746 ngotos + 1 without checking for overflow.
7747 (build_relations): Use END_NODE, not -1, to denote end of edges.
7748 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7749 build_relations): Use goto_number, not int, for goto numbers.
7750 * src/tables.c (save_column, default_goto): Likewise.
7751
7752 2004-11-23 Akim Demaille <akim@epita.fr>
7753
7754 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7755 of #defining from yystype.
7756 Don't typedef yystype, C++ does not need it.
7757 This lets it possible to forward declare it as union.
7758
7759 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7760
7761 * bootstrap (gnulib_modules): Add extensions.
7762 Problem reported by Jim Meyering.
7763
7764 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7765
7766 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7767 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7768 src/system.h, src/tables.c: XFREE -> free, to accommodate
7769 recent change to gnulib xalloc.h.
7770 Problem reported by Jim Meyering.
7771
7772 2004-11-17 Akim Demaille <akim@epita.fr>
7773
7774 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7775
7776 2004-11-17 Akim Demaille <akim@epita.fr>,
7777 Alexandre Duret-Lutz <adl@gnu.org>
7778
7779 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7780 changes.
7781 (YYCDEBUG): Adjust.
7782 Use it instead of cdebug_.
7783 (Parser::debug_stream, Parser::set_debug_stream): New.
7784 (Parser::symprint_): Define cdebug_ for temporary backward
7785 compatibility.
7786 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7787 debug_stream ().
7788
7789 2004-11-17 Akim Demaille <akim@epita.fr>
7790
7791 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7792 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7793 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7794 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7795
7796 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7797
7798 * data/glr.c (yyloc_default): Remove; not used.
7799 Problem reported by Frank Heckenbach.
7800
7801 2004-10-25 Akim Demaille <akim@epita.fr>
7802
7803 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7804 Introduce another definition to address simple location arrays.
7805 (yyGLRStack): New member: yyerror_range.
7806 (yyrecoverSyntaxError, yyparse): Update it.
7807 (yyrecoverSyntaxError): Use it when shifting the error token to
7808 have an accurate range, equivalent to the one computed by both
7809 yacc.c and lalr1.cc.
7810 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7811 that column numbers start at column 0, as per GNU Coding
7812 Standards, the others tests, and the doc.
7813 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7814 Adjust to the above change (first column is 0).
7815 And adjust the location of the "<error>", now covering the whole
7816 line.
7817
7818 2004-10-22 Akim Demaille <akim@epita.fr>
7819 and Paul Eggert <eggert@cs.ucla.edu>
7820
7821 Remove some arbitrary limits on goto numbers and relations.
7822 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7823 initial values, since they're never used.
7824 (set_goto_map): ngotos is now unsigned, so test for overflow
7825 by seeing whether it wraps around to zero.
7826 * src/lalr.h (goto_number): Now size_t, not short int.
7827 (GOTO_NUMBER_MAXIMUM): Remove.
7828 * src/relation.c (relation_print, traverse, relation_transpose):
7829 Check for END_NODE rather than looking at sign.
7830 * src/relation.h (END_NODE): New macro.
7831 (relation_node): Now size_t, not short int.
7832
7833 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7834
7835 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7836 keyword, not an identifier. Problem reported by Baron Schwartz in
7837 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7838
7839 2004-10-11 Akim Demaille <akim@epita.fr>
7840
7841 * src/symtab.c (symbol_check_alias_consistency): Also check
7842 type names, destructors, and printers.
7843 Reported by Alexandre Duret-Lutz.
7844 Recode the handling of associativity and precedence in terms
7845 of symbol_precedence_set.
7846 Accept no redeclaration at all, not even equal to the previous
7847 value.
7848 (redeclaration): New.
7849 Use it to factor redeclaration complaints.
7850 (symbol_make_alias): Don't set the type of the alias, let
7851 symbol_check_alias_consistency do it as for other features.
7852 * src/symtab.h (symbol): Add new member prec_location, and
7853 type_location.
7854 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7855 * tests/input.at (Incompatible Aliases): New.
7856
7857 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7858
7859 .cvsignore fixes to accommodate gnulib changes,
7860 and the practice of naming build directories "_build".
7861 * .cvsignore: Add "_*". Sort.
7862 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7863 * m4/.cvsignore: Add "*_gl.m4".
7864
7865 2004-10-06 Akim Demaille <akim@epita.fr>
7866
7867 * src/parse-gram.y (add_param): Fix the truncation of trailing
7868 spaces.
7869
7870 2004-10-05 Akim Demaille <akim@epita.fr>
7871
7872 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7873 whether the reducion was empty or not. This leaves room to
7874 improve the use of YYLLOC_DEFAULT in such a case.
7875 lalr1.cc is still experimental, so changing this is acceptable.
7876 And finally, there are probably not many users who changed the
7877 handling of locations in GLR, so changing is admissible too.
7878
7879 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7880 empty reduction, set @$ to an empty location ending the previously
7881 stacked symbol.
7882 Adjust uses to make sure the code is triggered on empty
7883 reductions.
7884 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7885 expected output: empty reductions have empty locations.
7886
7887 2004-09-29 Akim Demaille <akim@epita.fr>
7888
7889 * data/lalr1.cc: Move towards a more standard C++ coding style
7890 for templates: Class < T > -> Class<T>.
7891
7892 2004-09-29 Akim Demaille <akim@epita.fr>
7893
7894 * data/lalr1.cc: Reinstall the former ctor, for sake of
7895 compatibility, but warn it will be removed.
7896 Move towards a more standard C++ coding style (i.e., type *var ->
7897 type* var).
7898
7899 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7900
7901 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7902 since it's less likely to work if NULs are involved in the future.
7903
7904 2004-09-27 Akim Demaille <akim@epita.fr>
7905
7906 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7907
7908 2004-09-27 Akim Demaille <akim@epita.fr>
7909
7910 * data/lalr1.cc (b4_parse_param_decl_1): New.
7911 (b4_parse_param_decl): Use it to have different names between attribute
7912 and argument names.
7913 (b4_cc_constructor_call): Likewise.
7914
7915 2004-09-24 Akim Demaille <akim@epita.fr>
7916
7917 * src/parse-gram.y (add_param): Strip the leading and trailing
7918 blanks from a formal argument declaration.
7919 (YY_LOCATION_PRINT): New.
7920
7921 2004-09-24 Akim Demaille <akim@epita.fr>
7922
7923 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
7924 after the location.
7925
7926 2004-09-24 Akim Demaille <akim@epita.fr>
7927
7928 * doc/bison.texinfo (Table of Symbols): Sort.
7929
7930 2004-09-21 Akim Demaille <akim@epita.fr>
7931
7932 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
7933 the useless parentheses.
7934 Suggested by Paul Eggert.
7935
7936 2004-09-20 Akim Demaille <akim@epita.fr>
7937
7938 Let the initial-action act on the look-ahead, and use it for the
7939 "initial push" (corresponding to an hypothetical beginning-of-file).
7940 And let lalr1.cc honor %initial-action.
7941
7942 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
7943 example.
7944 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
7945 (Parser::Parser): Remove the ctor that used to initialize it.
7946 (Parser::parse): Like in the other skeletons, issue the "starting
7947 parse" message before any action.
7948 Honor %initial-action.
7949 Initialize the stacks with the lookahead.
7950 * data/yacc.c: Let $$ and @$ in %initial-action designate the
7951 look-ahead.
7952 Push them in the stacks.
7953 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
7954
7955 2004-09-20 Akim Demaille <akim@epita.fr>
7956
7957 * doc/bison.texinfo (Initial Action Decl): New.
7958
7959 2004-09-20 Akim Demaille <akim@epita.fr>
7960
7961 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
7962 clearer criterion to define it.
7963 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
7964 When reducing on an empty RHS, use the latest stacked location as
7965 location.
7966 yylloc is not always available.
7967 * data/glr.c: Likewise.
7968 Also, honor initial-actions.
7969
7970 2004-09-20 Akim Demaille <akim@epita.fr>
7971
7972 * data/yacc.c (YY_LOCATION_PRINT): New.
7973 Define when we know YYLTYPE's structure, i.e., when the default
7974 YYLLOC_DEFAULT is used.
7975 * data/c.m4 (b4_yysymprint_generate): Use it.
7976 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
7977 value of the result.
7978 (error_start_): Replace with...
7979 (error_range_): this location array.
7980 This allows to replace code relying on the implementation of
7981 locations by portable code.
7982 * data/yacc.c (yylerrsp): Replace with...
7983 (yyerror_range): this.
7984 Every time a token is popped, update yyerror_range[0], to have an
7985 accurate location for the error token.
7986 * data/glr.c (YY_LOCATION_PRINT): New.
7987 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
7988 deference a pointer.
7989 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
7990 report the location in %printers.
7991
7992 * src/scan-skel.l: Instead of abort, report error messages to ease
7993 understanding skeleton scanning failures.
7994
7995 2004-09-16 Akim Demaille <akim@epita.fr>
7996
7997 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
7998 (iterator, const_iterator): these, to be more in the C++ spirit.
7999 Also, return reverse iterators so that when displaying the stack
8000 we display its bottom first.
8001 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8002 from yacc.c.
8003 We should probably use vector here though.
8004
8005 2004-09-16 Akim Demaille <akim@epita.fr>
8006
8007 Have more complete shift traces.
8008
8009 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8010 to report Shifts instead of ad hoc YYDPRINTF invocations,
8011 including for the error token.
8012 * data/lalr1.cc (symprint_): Output the location.
8013 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8014 output the location within the %printer.
8015 Activate GLR tests, at least to make sure they compile properly.
8016 They still don't pass though.
8017 * tests/calc.at: Adjust expect verbose output, since now "Entering
8018 state..." is on a different line than the "Shifting" message.
8019
8020 2004-09-08 Akim Demaille <akim@epita.fr>
8021
8022 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8023 Bison directive from the Bison file to the invocation of this
8024 macro, so that these directives are passed to
8025 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8026 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8027 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8028 the extra Bison directives instead of the whole series.
8029 Change the grammar so that there are recoverable errors, and
8030 unrecoverable errors. Now we can have the parser give up before
8031 consuming the whole input. As a result we now can observe that
8032 the lookahead is freed when needed.
8033 Change the parser source to parse argv[1] instead of a hard coded
8034 string.
8035 Simplify yylex, and give a value and location to EOF.
8036 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8037 passed directives already coded in the file.
8038 Add some tests to check the location of "error".
8039 For some tests, the C++ parser is correct, and not yacc.c.
8040 For other tests, they provide different, but unsatisfying, values,
8041 so keep the C++ value so that at least one parser is "correct"
8042 according to the test suite.
8043 (Actions after errors): Remove, this is subsumed by the
8044 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8045
8046 2004-09-06 Akim Demaille <akim@epita.fr>
8047
8048 * data/lalr1.cc: Adjust the indentation of the labels.
8049 (Parser::pop): New.
8050 Use it.
8051
8052 2004-09-06 Akim Demaille <akim@epita.fr>
8053
8054 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8055 argument, an informative message.
8056 Call YY_SYMBOL_PRINT.
8057 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8058 * data/lalr1.cc (destruct_): Likewise.
8059 In addition, no longer depend on b4_yysymprint_generate and
8060 b4_yydestruct_generate to generate these functions, do it "by
8061 hand".
8062
8063 2004-09-03 Akim Demaille <akim@epita.fr>
8064
8065 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8066 invoked, yydestruct the lookahead.
8067 * tests/calc.at (Calculator $1): Update the expected lengths of
8068 traces: there is an added line for the discarded lookahead.
8069 * doc/bison.texinfo (Destructor Decl): Some rewording.
8070 Define "discarded" symbols.
8071
8072 2004-09-02 Akim Demaille <akim@epita.fr>
8073
8074 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8075
8076 2004-09-02 Akim Demaille <akim@epita.fr>
8077
8078 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8079 (YYDSYMPRINTF): Rename as...
8080 (YY_SYMBOL_PRINT): this.
8081 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8082 two.
8083 Use it instead of direct symprint_ calls.
8084 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8085 one.
8086
8087 2004-09-02 Akim Demaille <akim@epita.fr>
8088
8089 * data/lalr1.cc (b4_yysymprint_generate): New.
8090 (symprint_): New member function, defined when YYDEBUG.
8091 Use it consistently instead of token/nterm debugging output by
8092 hand.
8093 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8094 %printer calls to use cdebug_ when using lalr1.cc.
8095
8096 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8097
8098 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8099 with #ifdef YYDEBUG.
8100
8101 2004-08-26 Akim Demaille <akim@epita.fr>
8102
8103 * doc/bison.texinfo (Implementing Loops): Rename as...
8104 (Implementing Gotos/Loops): this.
8105
8106 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8107
8108 Adjust to latest gnulib.
8109 * bootstrap (gnulib_modules): Add xalloc-die.
8110 Set LC_ALL=C so that file names sort consistently.
8111 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8112 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8113 uintmax_t.m4, ulonglong.m4.
8114 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8115 po.m4 since we are now using _gl.m4 instead.
8116
8117 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8118
8119 * src/scan-action.l: Remove. Scanning of semantic actions is
8120 handled in scan-gram.l.
8121
8122 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8123
8124 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8125
8126 * src/location.h (struct): The file member is a uniqstr.
8127 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8128
8129 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8130
8131 Fix bug with non-%union parsers that have printers or destructors,
8132 which led to a Bison core dump. Reported by Peter Fales in
8133 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
8134
8135 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8136 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8137 not to our own type.
8138 * src/output.c (symbol_destructors_output, symbol_printers_output):
8139 Don't assume %union.
8140 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8141 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8142 UNION-FLAG. All callers changed.
8143 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8144 Use type char, not unsigned int, when declaring an array of char;
8145 this lets us remove a cast.
8146 (Printers and Destructors): Add non-%union test cases.
8147
8148 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8149
8150 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8151 GLR writeups. E.g., avoid frenchspacing and the future tense,
8152 change "lookahead" to "look-ahead", and change "wrt" to "with
8153 respect to".
8154
8155 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8156
8157 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8158 New sections, split off from the GLR Parsers section. Put the new
8159 Simple GLR Parser near the start of the GLR section, for clarity.
8160 Rewrite connective text.
8161
8162 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
8163
8164 * doc/bison.texinfo (Simple GLR Parsers): New section.
8165
8166 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8167
8168 * NEWS, TODO, doc/bison.texinfo:
8169 Use "look-ahead" instead of "lookahead", to be consistent.
8170 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8171 while we're fixing "look-ahead".
8172 * src/conflicts.c (shift_set): Renamed from shiftset.
8173 (look_ahead_set): Renamed from lookaheadset.
8174 * src/print.c: Likewise.
8175 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8176 name for "lookahead".
8177 (report_types, usage): Likewise.
8178 * src/getargs.h (report_look_ahead_tokens): Renamed from
8179 report_lookaheads.
8180 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8181 compute_lookaheads.
8182 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8183 (look_ahead_tokens_print): Renamed from lookaheads_print.
8184 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8185 state_rule_lookaheads_print.
8186 * src/state.h: Likewise.
8187 (reductions.look_ahead_tokens): Renamed from lookaheads.
8188 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8189 AT_DATA_LOOKAHEADS_GRAMMAR.
8190
8191 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8192
8193 * README: Update location of patched M4 distribution.
8194
8195 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8196
8197 Don't assume the C++ compiler takes the same arguments as the C compiler
8198 (trivial change).
8199 * configure.ac (O0CXXFLAGS): New var.
8200 * tests/atlocal.in (CXXFLAGS): Use it.
8201
8202 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8203
8204 Fix some "make check" problems with C++ reported by
8205 Albert Chin-A-Young for Tru64 C++ in this thread:
8206 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8207
8208 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8209 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8210 Output to a .cc file for C++, not to a .c file.
8211 * tests/calc.at (AT_CHECK_CALC): Likewise.
8212 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8213 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8214
8215 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8216
8217 * tests/calc.at, tests/actions.at: Workaround for SGI
8218 C++ compiler. (trivial change)
8219
8220 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8221
8222 Spent a few hours checking out which prerequisite versions the
8223 current sources actually require. I went all the way back to
8224 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8225 a seemingly endless set of combinations of versions more recent
8226 than that. The bottom line is that the current sources require
8227 fairly recent versions of the build tools, and it'll be some work
8228 to change this.
8229 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8230 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8231 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8232 Add comments explaining why those particular versions are
8233 currently needed.
8234
8235 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8236 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
8237 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
8238
8239 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8240 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8241
8242 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8243
8244 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8245 0.11.5. Suggested by Bruno Haible.
8246 * bootstrap: Remove gettext version checking.
8247
8248 * doc/bison.texinfo (Decl Summary): Also mention that %union
8249 can depend on prerequisite types. Problem reported by Tim
8250 Van Holder.
8251
8252 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8253
8254 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8255 * README-alpha: Don't tell people not to package this.
8256
8257 * bootstrap: Don't assume $(...) works; use `...` instead.
8258 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8259 gettext better.
8260
8261 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8262 put into the -d output file, and mention what to do if YYSTYPE is
8263 defined as a macro.
8264
8265 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8266
8267 Undo change made earlier today: it caused autopoint to not bring
8268 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8269 autopoint's.
8270
8271 * bootstrap: Check that gettext version matches what's in
8272 configure.ac. Warn users to ignore robots.txt ERROR 404.
8273 * bootstrap: Undo today's earlier change (logged below).
8274 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8275
8276 The gettext version checking is causing more trouble than it's
8277 curing; remove it. Problem reported by Paul Hilfinger.
8278
8279 * bootstrap: Issue a warning that one can expect a message
8280 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8281 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8282
8283 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8284
8285 Ensure that the C++ compiler used for testing actually works on a
8286 simple test program; if not, skip the C++-related tests. Problem
8287 reported by Vin Shelton in:
8288 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8289
8290 * m4/cxx.m4: New file.
8291 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8292 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8293 * tests/local.at (AT_COMPILE_CXX): Use it.
8294
8295 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8296
8297 * data/glr.c (yylloc): Output this macro even if locations are not
8298 being generated, as the GLR parser needs it even in that case.
8299 Problem reported by Troy A. Johnson
8300 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8301
8302 * configure.ac (AC_INIT): Update to 1.875e.
8303
8304 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8305
8306 * NEWS: Version 1.875d.
8307 * configure.ac (AC_INIT): Likewise.
8308 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8309
8310 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8311 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8312 lalr1.cc runs afoul of the first, and the last two are no longer
8313 supported by GCC 3.4.0.
8314 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8315 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8316
8317 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8318
8319 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8320 unsigned int, for compatibility with latest gnulib hash module.
8321 * src/state.c (state_hash, state_hasher): Likewise.
8322 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8323 * src/uniqstr.c (hash_uniqstr): Likewise.
8324
8325 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8326
8327 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8328
8329 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8330 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8331 character and string literals.
8332 (unexpected_end): New function.
8333 (unexpected_eof): Use it.
8334 (unexpected_newline): New function.
8335 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8336 actions.
8337
8338 * NEWS: Document %expect-rr.
8339
8340 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8341 Fix typo by replacing $1 with $option.
8342 Remove more 'intl'-related files.
8343 Don't DEFUN AM_INTL_SUBDIR twice.
8344
8345 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8346 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8347 strtoul.c.
8348 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8349 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8350 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8351 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8352 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8353 * src/.cvsignore: Add *.output.
8354
8355 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8356 gets copied to the output file.
8357
8358 2004-04-28 Paul Eggert <eggert@twinsun.com>
8359
8360 Get files from the gnulib and po repositories, instead of relying
8361 on them being in our CVS. Upgrade to latest versions of gnulib
8362 and Automake.
8363
8364 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8365 * bootstrap: Bootstrap from gnulib and po repositories.
8366 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8367 * README-cvs: Document these changes. Remove version numbers from
8368 mentions of build tools, since they change so often. Mention Flex.
8369
8370 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8371 (gl_USE_SYSTEM_EXTENSIONS): Add.
8372 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8373 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
8374 does this for us.
8375 (AC_ISC_POSIX): Remove; we no longer support this
8376 ancient OS, as it gets in the way of latest Autoconf & gnulib.
8377 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8378 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8379 Do not check for C89 headers, except for locale.h which is used
8380 by the Yacc library and must port to K&R hosts.
8381 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8382 Do not check for C89 functions, except for setlocale which is
8383 used by the Yacc library.
8384 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8385 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8386 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8387 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8388 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8389 AM_GNU_GETTEXT): Remove; now done by:
8390 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8391 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8392 for us.
8393
8394 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8395 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8396 Define to empty, as gnulib.mk will do the rest for us.
8397 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8398 for us.
8399 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8400 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8401
8402 * src/files.c: Include gnulib's xstrndup.h.
8403
8404 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8405 (REALLOC): Use xnrealloc, for likewise.
8406 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8407 (strnlen, memrchr): Remove decls; functions no longer used.
8408 Include <stpcpy.h>.
8409
8410 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8411 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8412 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8413 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8414 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8415 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8416 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8417 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8418 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8419 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8420 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8421 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8422 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8423 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8424 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8425 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8426 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8427 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8428 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8429 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8430 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8431 Remove, as these files are now generated automatically
8432 by bootstrap or automake.
8433
8434 * po/ChangeLog: Remove: all but one entry was a duplicate
8435 of this file, and I moved that 2000-11-02 entry here.
8436
8437 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8438 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8439 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8440 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8441 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8442 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8443 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8444 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8445 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8446 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8447 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8448 xstrndup.h.
8449 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8450 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8451 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8452 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8453 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8454 * src/.cvsignore: Remove *_.c.
8455
8456
8457 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8458 support it. (The latest stable gzip doesn't.)
8459
8460 2004-04-27 Paul Eggert <eggert@twinsun.com>
8461
8462 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8463 case, as stos_ is now used by destructors due to the 2004-02-09
8464 change.
8465
8466 Remove more K&R C support.
8467 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8468 * lib/subpipe.c (errno): Remove decl.
8469 Include <stdlib.h> unconditionally.
8470 (EXIT_FAILURE): Remove macro.
8471 * src/complain.c (vfprintf, strerror): Remove.
8472 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8473 unconditionally.
8474 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8475 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8476 (strchr, strspn, memchr): Remove decls.
8477 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8478 unconditionally. Do not declare perror.
8479 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8480 unconditionally.
8481
8482 * src/complain.c (_): Remove useless defn, as system.h defines this.
8483
8484 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8485 with latest obstack.h.
8486 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8487 to procedure types, as obstack.h now does that for us.
8488 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8489
8490 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8491 so that this include file can stand alone.
8492 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8493 does this now. Include subpipe.h first after config.h, to
8494 test whether it can stand alone.
8495
8496 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8497 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8498 unused declaration.
8499
8500 * tests/synclines.at (%union synch line): Put a dummy member in
8501 the union, because empty unions aren't allowed in C. Caught
8502 by GCC 3.4.0.
8503
8504 2004-04-13 Jim Meyering <jim@meyering.net>
8505
8506 * src/conflicts.c (conflicts_print): Correct format string typo:
8507 use `%%' to produce literal `%'. (trivial change)
8508
8509 2004-03-30 Paul Eggert <eggert@twinsun.com>
8510
8511 * src/getargs.c (version): Update copyright year to 2004.
8512
8513 * data/c.m4 (b4_int_type): Use 'short int' rather than
8514 'short', and similarly for 'long', 'unsigned', etc.
8515 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8516 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8517 yy_yypstack, yydumpstack): Likewise.
8518 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8519 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8520 Likewise.
8521 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8522 yy_stack_print, yyparse): Likewise.
8523 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8524 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8525 * lib/bitset.c (bitset_print): Likewise.
8526 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8527 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8528 * lib/bitsetv.c (bitsetv_dump): Likewise.
8529 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8530 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8531 Likewise.
8532 * src/LR0.c (allocate_itemsets): Likewise.
8533 * src/gram.h (rule_number, rule): Likewise.
8534 * src/lalr.h (goto_number): Likewise.
8535 * src/nullable.c (nullable_compute): Likewise.
8536 * src/output.c (prepare_rules): Likewise.
8537 * src/relation.c (relation_print, relation_digraph): Likewise.
8538 * src/relation.h (relation_node): Likewise.
8539 * src/state.h (state_number, transitions, errs, reductions,
8540 struct state): Likewise.
8541 * src/symtab.h (symbol_number, struct symbol): Likewise.
8542 * src/tables.c (vector_number, tally, action_number,
8543 default_goto, goto_actions): Likewise.
8544 * tests/existing.at (GNU Cim Grammar): Likewise.
8545 * tests/regression.at (Web2c Actions): Likewise.
8546
8547 * src/output.c (muscle_insert_short_int_table): Renamed from
8548 muscle_insert_short_table. All uses changed.
8549
8550 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8551
8552 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8553 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8554 Add %expect-rr rule.
8555
8556 * src/scan-gram.l: Recognize %expect-rr.
8557
8558 * src/conflicts.h (expected_sr_conflicts): Rename from
8559 expected_conflicts.
8560 (expected_rr_conflicts): Declare.
8561
8562 * src/conflicts.c (expected_sr_conflicts): Rename from
8563 expected_conflicts.
8564 (expected_rr_conflicts): Define.
8565 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8566 for GLR parsers.
8567 Use expected_sr_conflicts in place of expected_conflicts.
8568 Warn if expected_rr_conflicts used in non-GLR parser.
8569
8570 * doc/bison.texinfo: Add documentation for %expect-rr.
8571
8572 2004-03-08 Paul Eggert <eggert@gnu.org>
8573
8574 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8575 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8576
8577 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8578 in lalr1.cc.
8579 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8580 * src/scan-gram.l (scan_integer): New function.
8581 ({int}): Use it.
8582 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8583 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8584 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8585 Say "long int", not "long", for uniformity with GNU style.
8586
8587 2004-02-25 Paul Eggert <eggert@twinsun.com>
8588
8589 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8590 compilers. This fixes a problem with Intel's C++ compiler being
8591 chatty, reported by Guido Trentalancia in
8592 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8593
8594 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8595
8596 Support %destructor and merge error locations in lalr1.cc.
8597
8598 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8599 (Parser::stos_): Define unconditionally.
8600 (Parser::destruct_): New method. Generate its body with
8601 b4_yydestruct_generate.
8602 (Parser::error_start_): New attribute.
8603 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8604 token which are discarded.
8605 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8606 error_start_ when erroneous token are discarded.
8607 (Parser::parse) <yyerrlab1>: Compute the location of the error
8608 token so that it covers all the discarded tokens.
8609 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8610 it can be called with `%skeleton "lalr1.cc"', and do that.
8611
8612 2004-02-02 Paul Eggert <eggert@twinsun.com>
8613
8614 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8615 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8616 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8617 There's no need to mention top_builddir since Automake does that
8618 for us.
8619 (INCLUDES): Remove, as Automake says it's obsolescent.
8620 Contents migrated into AM_CPPFLAGS as described above.
8621 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8622
8623 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8624
8625 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8626 (yyreportSyntaxError): Handle case where lookahead token is
8627 YYEMPTY.
8628
8629 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8630
8631 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8632 resulting parsers are compilable with C++.
8633
8634 2003-12-23 Paul Eggert <eggert@twinsun.com>
8635
8636 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8637 * src/output.c (output_skeleton): Rename local var.
8638 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8639 Bison tokens, as this runs afoul of the 2003-10-07 change that
8640 disallowed NUL bytes in character constants or string literals.
8641
8642 * tests/local.at: Require Autoconf 2.59's Autotest.
8643 * tests/testsuite.at: Don't include local.at, since we now assume
8644 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8645 including it.
8646 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8647 multiple inclusion warnings.
8648
8649 2003-12-02 Akim Demaille <akim@epita.fr>
8650
8651 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8652 conditions.
8653 From Bruno Haible.
8654
8655 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8656
8657 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8658
8659 2003-10-07 Paul Eggert <eggert@twinsun.com>
8660
8661 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8662 if testsuite doesn't exist.
8663
8664 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8665 literals, unfortunately.
8666 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8667 Complain about NUL bytes in character constants or string literals.
8668
8669 2003-10-05 Paul Eggert <eggert@twinsun.com>
8670
8671 * NEWS: Don't document %no-default-prec, as it's still
8672 too experimental.
8673 * doc/bison.texinfo: Document %no-default-prec only if
8674 the defaultprec flag is set. Normally it's not.
8675
8676 2003-10-04 Paul Eggert <eggert@twinsun.com>
8677
8678 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8679 non-modifiable lvalue, instead of a modifiable one.
8680 * doc/bison.texinfo (Actions): Document that $$ can
8681 be assigned to. Do not claim that $$ and $N are
8682 array element references: user code should not rely on this.
8683
8684 2003-10-01 Paul Eggert <eggert@twinsun.com>
8685
8686 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8687 (grammar_declaration): Use it.
8688 * src/scan-gram.l: New token %no-default-prec.
8689 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8690 * NEWS, doc/bison.texinfo: Document the above.
8691
8692 2003-10-01 Akim Demaille <akim@epita.fr>
8693
8694 VCG no longer supports long_straight_phase.
8695
8696 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8697 * src/print_graph.c (print_graph): Adjust.
8698
8699 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
8700 and Paul Eggert <eggert@twinsun.com>
8701
8702 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8703 Table of Symbols): Document %default-prec.
8704 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8705 (grammar_declaration): Set default_prec on %default-prec.
8706 * src/scan-gram.l (%default-prec): New token.
8707 * src/reader.h (default_prec): New flag.
8708 * src/reader.c: Likewise.
8709 (packgram): Handle it.
8710 * tests/conflicts.at (%default-prec without %prec,
8711 %default-prec with %prec, %default-prec 1): New tests.
8712
8713 2003-09-30 Paul Eggert <eggert@twinsun.com>
8714
8715 * tests/testsuite.at: Include local.at, not input.at, fixing
8716 a typo in the 2003-08-25 patch.
8717
8718 2003-08-27 Akim Demaille <akim@epita.fr>
8719
8720 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8721 GCC warnings.
8722
8723 2003-08-26 Akim Demaille <akim@epita.fr>
8724
8725 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8726 "<\#" to avoid magic from Gnus when posting parts of this script.
8727
8728 2003-08-26 Akim Demaille <akim@epita.fr>
8729
8730 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8731 (Parser::parse): here.
8732 Adjust: nerrs and errstatus is now replaced by...
8733 (Parser::nerrs_, Parser::errstatus_): New.
8734
8735 2003-08-25 Akim Demaille <akim@epita.fr>
8736
8737 * config/announce-gen, Makefile.cfg: New.
8738 * Makefile.am: Adjust.
8739 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8740 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8741
8742 2003-08-25 Akim Demaille <akim@epita.fr>
8743
8744 When reducing initial empty rules, Bison parser read an initial
8745 location that is not defined. This results in garbage, and that
8746 affects Bison's own parser. Therefore we need (i) to extend Bison
8747 to support a means to initialize this location, and (ii) to use
8748 this CVS Bison to fix CVS Bison's parser.
8749
8750 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8751 with...
8752 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8753 * src/parse-gram.y: Adjust.
8754 (%initial-action): New.
8755 (%error-verbose): Since we require CVS Bison, there is no reason
8756 not to use it.
8757 * src/scan-gram.l: Adjust.
8758 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8759 * data/yacc.c (yyparse): Use b4_initial_action.
8760
8761 2003-08-25 Akim Demaille <akim@epita.fr>
8762
8763 * doc/bison.texinfo: Don't promote stdout for error messages.
8764
8765 2003-08-25 Akim Demaille <akim@epita.fr>
8766
8767 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8768 From Alexandre Duret-Lutz.
8769
8770 2003-08-25 Akim Demaille <akim@epita.fr>
8771
8772 Version 1.875c.
8773
8774 2003-08-25 Akim Demaille <akim@epita.fr>
8775
8776 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8777 Use them.
8778
8779 2003-08-25 Akim Demaille <akim@epita.fr>
8780
8781 * data/lalr1.cc (Parser::reduce_print_): New.
8782 Use it.
8783
8784 2003-08-25 Akim Demaille <akim@epita.fr>
8785
8786 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8787 error recovery loops. This patch is based on
8788 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8789 Also, augment the similarity between lalr1.cc and yacc.c.
8790 Note: the locations of error recovery rules are not correct yet.
8791
8792 * data/lalr1.cc: Comment changes to augment the similarity between
8793 lalr1.cc and yacc.c.
8794 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8795 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8796 yyerrlab), when hitting EOF, pop the whole stack here instead of
8797 merely falling thru the default error handling mechanism.
8798 (yyerrorlab): New label, with the old contents of YYERROR,
8799 plus the following change: pop the stack of rhs corresponding
8800 to the production that invoked YYERROR. That is how Yacc
8801 behaves (required by POSIX).
8802 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8803 fail.
8804
8805 2003-08-25 Akim Demaille <akim@epita.fr>
8806
8807 Tune local.at so that people can "autom4te -l autotest calc.at -o
8808 calc" for instance, to extract a sub test suite.
8809
8810 * tests/testsuite.at: Move the initialization, Autotest version
8811 requirement, and AT_TESTED invocation into...
8812 * tests/local.at: here.
8813 * tests/testsuite.at: Include it for compatibility with Autoconf
8814 2.57.
8815 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8816 be ignore.
8817
8818 2003-08-04 Paul Eggert <eggert@twinsun.com>
8819
8820 Rework code slightly to avoid gcc -Wtraditional warnings.
8821 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8822 The returned value is now stored in *YY0. All callers changed.
8823 * src/output.c (merge_output): Adjust to the above change.
8824
8825 2003-07-26 Paul Eggert <eggert@twinsun.com>
8826
8827 * data/glr.c (YYASSERT): New macro.
8828 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8829 yyresolveStates, yyprocessOneStack):
8830 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8831 Derived from a suggestion by Frank Heckenbach.
8832
8833 2003-07-25 Paul Eggert <eggert@twinsun.com>
8834
8835 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8836 for portability to K&R C (after ansi2knr, presumably). See
8837 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8838 by Frank Heckenbach, though I have omitted the structure-initialization
8839 part of his glr-knr.diff patch since I recall that the Portable
8840 C Compiler didn't require that change.
8841
8842 Let the user specify how to allocate and free memory.
8843 Derived from a suggestion by Frank Heckenbach in
8844 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8845 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8846 All uses of free, malloc, realloc changed to use these macros,
8847 and unnecessary casts removed.
8848 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8849
8850 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8851
8852 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8853 use s.empty() rather than s == "" to test for empty string; see
8854 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8855 (trivial change)
8856
8857 2003-06-25 Akim Demaille <akim@epita.fr>
8858
8859 * config/depcomp, config/install-sh: Update from masters.
8860
8861 2003-06-20 Paul Eggert <eggert@twinsun.com>
8862
8863 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8864 and return properly parenthesized result.
8865 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8866 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8867 Remove unnecessary parentheses from uses.
8868 * doc/bison.texinfo (Location Default Action): Describe the
8869 conventions for parentheses.
8870
8871 2003-06-19 Paul Eggert <eggert@twinsun.com>
8872
8873 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8874 yyreportTree): Do not assume that size_t is the same width as int,
8875 when printing sizes. Print sizes using an unsigned format.
8876 Problem reported by Frank Heckenbach in
8877 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8878
8879 Port to Forte Developer 7 C compiler.
8880 * data/glr.c (struct YYLTYPE): If locations are not being used,
8881 declare a single dummy member, as empty structs do not conform
8882 to the C standard.
8883 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8884 the Forte Developer 7 C compiler complains that end-of-loop
8885 code is not reached.
8886
8887 2003-06-17 Paul Eggert <eggert@twinsun.com>
8888
8889 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8890 avoid warnings from picky compilers about redefinition of PARAMS.
8891
8892 2003-06-17 Paul Eggert <eggert@twinsun.com>
8893
8894 Version 1.875b.
8895
8896 * NEWS: Document 1.875b.
8897
8898 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8899 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8900 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8901 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8902 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8903 per recent gettext manual's suggestion.
8904 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8905 Use prototypes, not old-style definitions.
8906 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8907 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8908 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8909 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8910 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8911 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8912 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8913 vbitset_or_and_cmp, vbitset_copy): Likewise.
8914
8915 * lib/libiberty.h: Do not include config.h; that's the includer's job.
8916 Do not include <stdlib.h>.
8917 (PARAMS): Define unconditionally for C89.
8918 (ATTRIBUTE_NORETURN): Remove.
8919 (ATTRIBUTE_UNUSED): Define unconditionally.
8920
8921 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
8922 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8923 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
8924 * lib/vbitset.c, lib/vbitset.h: New files.
8925 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
8926 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
8927 from libbitset.
8928
8929 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
8930 `How Can I Reset @code{yyparse}', since texinfo does not allow
8931 arbitrary @ in node names.
8932
8933 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
8934 shouldn't be needed according to the gettext 0.12.1 documentation
8935 but which seem to be needed anyway: codeset.m4 glibc21.m4
8936 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8937 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
8938 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
8939
8940 * lib/.cvsignore: Add stdbool.h.
8941 * m4/.cvsignore: Add nls.m4, po.m4.
8942
8943 Upgrade to CVS gnulib.
8944 * stdbool_.h: File renamed from stdbool.h.in.
8945 * configure.ac (AM_STDBOOL_H): Invoke this instead of
8946 AC_HEADER_STDBOOL.
8947 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
8948 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
8949 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
8950 (MOSTLYCLEANFILES): New var.
8951 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
8952 (stdbool.h): New rule.
8953 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
8954 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
8955 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
8956 m4/quote.m4: Upgrade to today's gnulib.
8957
8958 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
8959 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
8960 the tests right now.
8961 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
8962 yyerror are declared before use; C99 requires this.
8963
8964 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8965
8966 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
8967 first.
8968 (yyrecoverSyntaxError): Correct the logic for setting and testing
8969 yyerrState.
8970 Correct comment on handling EOF.
8971 Allow states with only a default reduction, rather than failing
8972 (I can't quite reconstruct why these were not allowed before).
8973
8974 Fixes to avoid problem that $-N rules in GLR parsers can cause
8975 buffer overruns, corrupting state.
8976
8977 * src/output.c (prepare_rules): Output max_left_semantic_context
8978 definition.
8979 * src/reader.h (max_left_semantic_context): New variable declaration.
8980 * src/scan-gram.l (max_left_semantic_context): Define.
8981 (handle_action_dollar): Update max_left_semantic_context.
8982 * data/glr.c (YYMAXLEFT): New definition.
8983 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
8984 (yyresolveAction): Ditto.
8985
8986 Fixes to problems with location handling in GLR parsers reported by
8987 Frank Heckenbach (2003/06/05).
8988
8989 * data/glr.c (YYLTYPE): Make trivial if locations not used.
8990 (YYRHSLOC): Add parentheses, and define only if locations used.
8991 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
8992 locations not used.
8993 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
8994 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8995
8996 * tests/cxx-type.at: Exercise location information; update tests
8997 to differentiate output with and without locations.
8998 Remove forward declarations of yylex and yyerror---caused errors
8999 because default YYLTYPE not yet defined.
9000 Change semantic actions to compute strings, rather than printing
9001 them directly (to test proper passing of semantics values). Change
9002 output to prefix notation and update test data and expected results.
9003 (yylex): Track locations.
9004 (stmtMerge): Return value rather than printing, and include arguments
9005 in value.
9006
9007 2003-06-03 Paul Eggert <eggert@twinsun.com>
9008
9009 Avoid warnings generated by GCC 2.95.4 when Bison is
9010 configured with --enable-gcc-warnings.
9011 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9012 yy::]b4_parser_class_name[::translate_,
9013 yy::Stack::operator[] (unsigned),
9014 yy::Stack::operator[] (unsigned) const,
9015 yy::Slice::operator[] (unsigned),
9016 yy::Slice::operator[] (unsigned) const):
9017 Rename local vars to avoid warnings.
9018 * tests/glr-regression.at (Improper handling of embedded actions
9019 and $-N in GLR parsers): Remove unused local variable from yylex.
9020 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9021 (void) as arg when not pure, since we now assume C89 when building
9022 Bison. Pacify GCC by using parameter.
9023
9024 2003-06-02 Paul Eggert <eggert@twinsun.com>
9025
9026 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9027 yy::Location::lines, yy::Location::columns): Rename arguments
9028 to avoid shadowing; this removes a warning generated by GCC 3.3.
9029
9030 2003-06-01 Paul Eggert <eggert@twinsun.com>
9031
9032 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9033 to g++, as GCC 3.3 complains if you do it.
9034 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9035 everything that WARNING_CFLAGS has, except omit warnings
9036 not suitable for C++.
9037 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9038 * tests/atlocal.in (CXXFLAGS): New var.
9039 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9040
9041 Fix a GLR parser bug I reported in February; see
9042 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
9043 The problem was that GLR parsers did not conform to the C standard,
9044 because actions like { $1 = $2 + $3; } expanded to expressions
9045 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9046 to a local variable. The C standard says that expressions
9047 like (var = f ()) + (var = f ()) have undefined behavior.
9048 Another problem was that GCC sometimes issues warnings that
9049 yyfill and its parameters are unused.
9050
9051 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9052 as possibly unused.
9053 (yyfill): New function.
9054 (YYFILL): Use it.
9055 (yyuserAction): Change type of yynormal to bool, so that it matches
9056 the new yyfill signature. Mark it as possibly unused.
9057
9058
9059 Follow up on a bug I reported in February, where a Bison-generated
9060 parser can loop. Provide a test case and a fix for yacc.c. I
9061 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9062 The original bug report is in:
9063 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
9064
9065 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9066 macro's size was becoming unwieldy.
9067 (yyerrlab): Do not discard an empty lookahead symbol, as this
9068 might destroy garbage.
9069 (yyerrorlab): New label, with the old contents of YYERROR,
9070 plus the following change: pop the stack of rhs corresponding
9071 to the production that invoked YYERROR. That is how Yacc
9072 behaves, and POSIX requires this behavior.
9073 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9074 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9075 Define 'alarm' to do nothing if unistd.h is not available.
9076 Add a new rule "exp: '-' error;" to test the above change to
9077 data/yacc.c. Use 'alarm' to abort any test taking longer than
9078 10 seconds, as it's probably looping.
9079 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9080 Also, the new yacc.c generates two fewer diagnostics for an
9081 existing test.
9082
9083 2003-05-24 Paul Eggert <eggert@twinsun.com>
9084
9085 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9086 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9087 This fixes a problem reported by John Bowman when the Compaq/HP
9088 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9089 -ansi -Wall -gall).
9090 * data/yacc.c (union yyalloc): Likewise.
9091 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
9092
9093 Switch from 'int' to 'bool' where that makes sense.
9094
9095 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9096 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9097 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9098 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9099 Return or accept bool, not int. All callers changed.
9100 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9101 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9102 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9103 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9104 bitset_or_and_cmp_): Likewise.
9105 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9106 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9107 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9108 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9109 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9110 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9111 bitset_stats_or_and_cmp): Likewise.
9112 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9113 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9114 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9115 ebitset_xor_cmp): Likewise.
9116 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9117 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9118 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9119 lbitset_xor_cmp): Likewise.
9120 * lib/bbitset.h: Include <stdbool.h>.
9121 (struct bitset_vtable): The following members now return bool, not
9122 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9123 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9124 or_and_cmp).
9125 * src/conflicts.c (count_rr_conflicts): Likewise.
9126 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9127 All uses changed.
9128 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9129 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9130 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9131 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9132 graph_flag): Likewise.
9133 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9134 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9135 graph_flag): Likewise.
9136 * src/output.c (error_verbose): Likewise.
9137 * src/output.h (error_verbose): Likewise.
9138 * src/reader.c (start_flag, typed): Likewise.
9139 * src/reader.h (typed): Likewise.
9140 * src/getargs.c (LOCATIONS_OPTION): New constant.
9141 (long_options, getargs): Use it.
9142 * src/lalr.c (build_relations): Use bool, not int.
9143 * src/nullable.c (nullable_compute): Likewise.
9144 * src/print.c (print_reductions): Likewise.
9145 * src/tables.c (action_row, pack_vector): Likewise.
9146 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9147 * src/output.c (prepare): Use it.
9148 * src/output.c (token_definitions_output,
9149 symbol_destructors_output, symbol_destructors_output): Use string,
9150 not boolean integer, to keep track of whether to output separator.
9151 * src/print_graph.c (print_core): Likewise.
9152 * src/state.c (state_rule_lookaheads_print): Likewise.
9153
9154 * config/install-sh: Sync from automake 1.7.5.
9155
9156 2003-05-14 Paul Eggert <eggert@twinsun.com>
9157
9158 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9159 semicolon after a grammar declaration, in the interest of possible
9160 future changes to the Bison input language.
9161 Do not allow a stray semicolon at the start of the grammar.
9162 (rhses.1): Allow one or more semicolons after any rule, including
9163 just before "|" as required by POSIX.
9164 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9165 grammar.
9166
9167 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9168
9169 %parse-param support for lalr1.cc.
9170
9171 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9172 b4_cc_constructor_calls, b4_cc_constructor_call,
9173 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9174 definitions.
9175 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9176 parse-param arguments.
9177 (yy::b4_parser_class_name): Declare instance variables to
9178 hold parse-param arguments.
9179 * tests/calc.at: s/value/semantic_value/ because value clashes
9180 with a member of yy::b4_parser_class_name. Adjust C++ code
9181 to handle %parse-param. Enable %parse-param test in C++.
9182
9183 2003-05-12 Paul Eggert <eggert@twinsun.com>
9184
9185 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9186 English a bit. Fix fclose typo. Change "const char" to "char
9187 const", and use ANSI C rather than K&R for "main". Suggest
9188 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9189 and suggest yy_switch_to_buffer.
9190
9191 2003-05-05 Paul Eggert <eggert@twinsun.com>
9192
9193 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9194 C89. This avoids a diagnostic on compilers that define __STDC__
9195 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
9196 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9197
9198 2003-05-03 Paul Eggert <eggert@twinsun.com>
9199
9200 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9201 Do not overrun array bounds.
9202 This should fix a bug reported today by Olatunji Oluwabukunmi in
9203 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
9204
9205 2003-04-29 Akim Demaille <akim@epita.fr>
9206
9207 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9208 * src/getargs.c, src/getargs.h: here, as bool, not int.
9209 (nondeterministic_parser): New.
9210 * src/parse-gram.y, src/scan-gram.l: Support
9211 %nondeterministic-parser.
9212 * src/output.c (prepare): Use nondeterministic_parser instead
9213 of glr_parser where appropriate.
9214 * src/tables.c (conflict_row, action_row, save_row)
9215 (token_actions, token_actions, pack_vector): Ditto.
9216
9217 2003-04-29 Akim Demaille <akim@epita.fr>
9218
9219 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9220
9221 2003-04-29 Akim Demaille <akim@epita.fr>
9222
9223 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9224 with %pure-parser and %locations to exercise the patch from Yakov
9225 Markovitch below.
9226
9227 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9228
9229 * data/yacc.c: (b4_lex_param): Corrected for the case where
9230 %lex-param is provided and %pure-parser isn't.
9231
9232 2003-04-27 Paul Eggert <eggert@twinsun.com>
9233
9234 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
9235 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
9236 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9237 if it is not defined.
9238 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9239
9240 2003-04-26 Paul Eggert <eggert@twinsun.com>
9241
9242 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9243 Declare to be of type suitable for the ninf value itself, not of
9244 type suitable for the corresponding table, since the latter might
9245 be unsigned but the ninf value might be negative. This fixes a
9246 bug reported by Alexandre Duret-Lutz in
9247 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
9248
9249 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9250 invokes it. We shouldn't invoke it twice because it will attempt
9251 to put error.o in the archive twice. This fixes a glitch reported
9252 by Martin Mokrejs in
9253 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9254
9255 2003-04-21 Paul Eggert <eggert@twinsun.com>
9256
9257 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9258 to gnulib.
9259
9260 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9261
9262 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9263 Fix obvious typo that results in uncompilable GLR parsers
9264 when both %pure-parser and %locations are used. (trivial change)
9265
9266 2003-04-17 Paul Eggert <eggert@twinsun.com>
9267
9268 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9269 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9270 Do not insert the expected token via unput, as this runs afoul
9271 of a POSIX-compatibility bug in flex 2.5.31.
9272 All uses changed to BEGIN the parent state,
9273 since we no longer insert the expected token via unput.
9274 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9275 that is no longer emitted after the above change.
9276
9277 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9278 the first one. This change is from Paul Hilfinger, and it fixes
9279 regression reported by Werner Lemberg in
9280 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9281
9282 (resolve_sr_conflict): Don't invoke state_errs_set
9283 unless one or more tokens have been explicitly made errors.
9284 Otherwise, the above change causes Bison to abort.
9285
9286 * tests/existing.at (GNU pic Grammar): New test case, taken from
9287 Lemberg's email.
9288
9289 2003-03-31 Akim Demaille <akim@epita.fr>
9290
9291 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9292
9293 2003-03-31 Akim Demaille <akim@epita.fr>
9294
9295 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9296 output.
9297
9298 2003-03-31 Akim Demaille <akim@epita.fr>
9299
9300 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9301 From Paul Hilfinger.
9302
9303 2003-03-29 Akim Demaille <akim@epita.fr>
9304
9305 * m4/error.m4: Do not put under dynamic conditions some code which
9306 expansion is under static control.
9307
9308 2003-03-29 Akim Demaille <akim@epita.fr>
9309
9310 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9311
9312 2003-03-29 Akim Demaille <akim@epita.fr>
9313
9314 * doc/bison.texinfo (Strings are Destroyed): New.
9315
9316 2003-03-13 Paul Eggert <eggert@twinsun.com>
9317
9318 * .cvsignore: Add configure.lineno.
9319 * src/.cvsignore: Add yacc.
9320 * tests/.cvsignore: Add testsuite.log.
9321 * doc/fdl.texi: Sync with latest FSF version.
9322
9323 2003-03-12 Paul Eggert <eggert@twinsun.com>
9324
9325 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9326 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9327 cursor, instead of leaving it undefined. This fixes a bug
9328 reported by Tim Van Holder in
9329 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9330 * tests/input.at (Torturing the Scanner): Test the scanner on
9331 an empty input file, which was Tim Van Holder's test case.
9332
9333 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9334 <sys/resource.h> can be included, include sys/time.h and
9335 sys/times.h first, if available. This works around the SunOS
9336 4.1.4 porting bug reported by Bruce Becker in
9337 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
9338
9339 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9340 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9341 AC_HEADER_SYS_WAIT.
9342
9343 Merge changes from gnulib. This was prompted because the CVS
9344 snapshot didn't build on Solaris 7 due to strnlen problems.
9345
9346 These changes need to be merged back into gnulib:
9347 * lib/hash.c: Include <stdbool.h> unconditionally.
9348 * m4/onceonly.m4 (m4_quote): New macro.
9349 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9350 Quote AC_FOREACH variable-expansions properly.
9351 The 2003-01-03 obstack.h change also needs merging.
9352 {end of changes requiring merging}
9353
9354 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9355 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9356 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9357 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9358 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9359 New files, imported from gnulib.
9360 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9361 above.
9362
9363 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9364 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9365 gnulib sources.
9366
9367 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9368 Add.
9369 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9370 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9371 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9372 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9373 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9374 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9375 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9376 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9377 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9378 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9379 (jm_PREREQ_ARGMATCH): Remove.
9380 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9381 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9382
9383 * src/system.h: Include <stdbool.h> unconditionally.
9384
9385 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9386 assuming at least C89 in the bitset code for some time now.
9387
9388 2003-03-03 Akim Demaille <akim@epita.fr>
9389
9390 * ro.po: New.
9391
9392 2003-03-02 Akim Demaille <akim@epita.fr>
9393
9394 * doc/bison.texinfo (Table of Symbols): Reactivate the
9395 documentation for %lex-param, and %parse-param.
9396
9397 2003-03-02 Akim Demaille <akim@epita.fr>
9398
9399 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9400 generate verbose error messages.
9401 Use the number of tokens as an upper bound in yytname, as it
9402 cannot be a non terminal.
9403
9404 2003-03-02 Akim Demaille <akim@epita.fr>
9405
9406 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9407 message.
9408
9409 2003-03-02 Akim Demaille <akim@epita.fr>
9410
9411 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9412 Use them to exercise yycheck overrun.
9413 Based on Andrew Suffield's grammar.
9414
9415 2003-03-02 Akim Demaille <akim@epita.fr>
9416
9417 Create tests/local.at for Bison generic testing macros.
9418
9419 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9420 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9421 This new file.
9422 * tests/calc.at (AT_CHECK_CALC): Adjust.
9423 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9424 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9425 * tests/local.at: here.
9426 (AT_COMPILE_CXX): Tags the tests using it as c++.
9427 Ignore the test if CXX is not functional.
9428
9429 2003-03-01 Paul Eggert <eggert@twinsun.com>
9430
9431 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9432 not loc->end, since loc->end might contain garbage and this leads
9433 to undefined behavior on some platforms.
9434 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9435 depend on *loc, so that the reader doesn't give the the false
9436 impression that *loc is initialized.
9437 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9438 does not survive the return.
9439
9440 2003-03-01 Akim Demaille <akim@epita.fr>
9441
9442 * src/scan-gram.l (code_start): Always initialize it when entering
9443 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9444 yylex invocation. An alternative would be making it static, but
9445 then it starts with the second %%'s beginning, instead of its end.
9446
9447 2003-02-28 Paul Eggert <eggert@twinsun.com>
9448
9449 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9450 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9451 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9452
9453 2003-02-26 Paul Eggert <eggert@twinsun.com>
9454
9455 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9456 Remove Sequent/Pyramid discussion (nobody uses them any more).
9457 Merge VMS and MS-DOS discussion; these ports may well be dead
9458 but let's keep mentioning them for now. Put <> around email
9459 addresses. Add copyright notice.
9460
9461 2003-02-24 Paul Eggert <eggert@twinsun.com>
9462
9463 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9464 to avoid collision with flex use of yylineno.
9465 Problem reported by Bruce Lilly in
9466 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9467 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9468 * data/yacc.c (yy_reduce_print): Likewise.
9469
9470 * config/depcomp: Sync with Automake 1.7.3.
9471
9472 2003-02-21 Akim Demaille <akim@epita.fr>
9473
9474 * data/lalr1.cc: Use temporary variables instead of casts to
9475 change integer types.
9476 Suggested by Paul Eggert.
9477
9478 2003-02-21 Akim Demaille <akim@epita.fr>
9479
9480 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9481 to avoid confusions with lalr1.cc's notion of Position.
9482 Suggested by Paul Eggert.
9483
9484 2003-02-20 Akim Demaille <akim@epita.fr>
9485
9486 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9487 before initial_columns.
9488 (location.hh): Use consistent variable names when defining the
9489 operator<<.
9490 Use "last" so that we subtract from Positions, not from unsigned.
9491
9492 2003-02-20 Akim Demaille <akim@epita.fr>
9493
9494 * data/lalr1.cc (position.hh): New subfile, including the extended
9495 and Doxygen'ed documentation of class Position.
9496 (location.hh): Use it.
9497 Document a` la Doxygen.
9498 With the help of Benoit Perrot.
9499
9500 2003-02-20 Akim Demaille <akim@epita.fr>
9501
9502 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9503 AT_YACC_IF.
9504 Redefine AT_YYERROR_SEES_LOC_IF using it.
9505 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9506 not defined.
9507 Don't use the location in yy::Parser::error_ and
9508 yy::Parser::print_ when not %locations.
9509 Activate more lalr1.cc tests.
9510
9511 2003-02-19 Akim Demaille <akim@epita.fr>
9512
9513 * data/lalr1.cc: When displaying a line number, be sure to make it
9514 an int.
9515
9516 2003-02-19 Akim Demaille <akim@epita.fr>
9517
9518 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9519 Remove, useless.
9520 (YYABORT, YYACCEPT, YYERROR): New.
9521 * tests/calc.at: Renable the lalr1.cc test.
9522
9523 2003-02-19 Akim Demaille <akim@epita.fr>
9524
9525 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9526 error recovery, mixing with/without pops and discarding of the
9527 lookahead.
9528 Exercise YYERROR.
9529 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9530
9531 2003-02-17 Paul Eggert <eggert@twinsun.com>
9532
9533 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9534 * tests/testsuite.at (AT_COMPILE): Use them.
9535 This fixes the testsuite problem reported by Robert Lentz in
9536 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9537
9538 2003-02-12 Paul Eggert <eggert@twinsun.com>
9539
9540 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9541 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9542 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9543 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9544 Check for malloc failure, for consistency with yacc.c.
9545 (yytname_size): Remove, for consistency with yacc.c.
9546
9547 The bug still remains in data/lalr1.cc, as I didn't have time
9548 to fix it there.
9549
9550 2003-02-06 Akim Demaille <akim@epita.fr>
9551
9552 * configure.ac (GXX): Rename as...
9553 (CXX): this, to keep the original Autoconf semantics.
9554 Require 2.57.
9555 * data/lalr1.cc: Fix b4_copyright invocations.
9556 If YYDEBUG is not defined, don't depend upon name_ being defined.
9557 (location.hh): Include string and iostream.
9558 (Position::filename): New member.
9559 (Position::Position ()): New.
9560 (operator<< (Position)): New.
9561 (operator- (Position, int)): New.
9562 (Location::first, Location::last): Rename as...
9563 (Location::begin, Location::end): these, to mock the conventional
9564 iterator names.
9565 (operator<< (Location)): New.
9566 * tests/atlocal.in (CXX): New.
9567 * tests/testsuite.at (AT_COMPILE_CXX): New.
9568 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9569 locations in a more synthetic way.
9570 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9571 lalr1.cc is used.
9572 Adjust the C locations to match those from Emacs: first column is
9573 column 0.
9574 Change all the expected results.
9575 Conform to the GCS: simplify the locations when applicable.
9576 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9577 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9578 these CPP macros with the m4 macros new defined by...
9579 (AT_CHECK_PUSHDEFS): this, i.e.:
9580 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9581 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9582 New macros.
9583 (AT_CHECK_POPDEFS): Undefine them.
9584 (AT_CHECK_CALC_LALR1_CC): New.
9585 Use it for the first lalr1.cc test.
9586
9587 2003-02-04 Akim Demaille <akim@epita.fr>
9588
9589 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9590 Location as is defined.
9591
9592 2003-02-04 Akim Demaille <akim@epita.fr>
9593
9594 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9595 name_ being defined.
9596
9597 2003-02-03 Paul Eggert <eggert@twinsun.com>
9598
9599 * src/gram.h (start_symbol): Remove unused decl.
9600
9601 Use more-consistent naming conventions for local vars.
9602
9603 * src/derives.c (derives_compute): Change type of local var from
9604 int to rule_number.
9605 * src/gram.c (grammar_rules_partial_print): Likewise.
9606 * src/print.c (print_core): Likewise.
9607 * src/reduce.c (reduce_grammar_tables): Likewise.
9608
9609 * src/gram.c (grammar_dump): Change name of item_number *
9610 local var from r to rp.
9611 * src/nullable.c (nullable_compute): Likewise.
9612
9613 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9614
9615 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9616 for symbol or symbol_number var.
9617 * src/reader.c (grammar_start_symbol_set): Likewise.
9618 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9619 Likewise.
9620 * src/state.c (transitions_to): Likewise.
9621 * src/state.h: Likewise.
9622 * src/tables.c (symbol_number_to_vector_number): Likewise.
9623
9624 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9625 char * var.
9626
9627 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9628 var.
9629
9630 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9631 var.
9632
9633 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9634 Use str, not s, for char * var. Use ch, not c, for character var.
9635 Use size for size var.
9636
9637 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9638 char * var.
9639 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9640 uniqstr var.
9641 * src/uniqstr.h: Likewise.
9642
9643 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9644 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9645 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9646 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9647 param to have same name as that of enum, so that we don't use
9648 "s" to stand for a non-state.
9649
9650 2003-02-02 Akim Demaille <akim@epita.fr>
9651
9652 * src/scan-skel.l: Scan more than one inert character per yylex
9653 invocation.
9654
9655 2003-02-01 Paul Eggert <eggert@twinsun.com>
9656
9657 Version 1.875a.
9658
9659 * po/LINGUAS: Add ms.
9660
9661 2003-01-30 Akim Demaille <akim@epita.fr>
9662
9663 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9664
9665 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9666
9667 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9668 of $1.
9669
9670 Changes in response to error report by S. Eken: GLR mode does not
9671 handle negative $ indices or $ indices in embedded rules correctly.
9672 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9673
9674 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9675 (b4_rhs_location): Ditto.
9676 (yyfill): New function to copy from stack tree into array
9677 incrementally.
9678 (yyuserAction): Modify to allow incremental move of semantic values
9679 to rhs array when in GLR mode.
9680 Define YYFILL to use in user-defined actions to fill semantic array
9681 as needed.
9682 Remove dummy use of yystack, as there is now a guaranteed use.
9683 (yydoAction): Modify to allow incremental move of semantic values
9684 to rhs array when in GLR mode.
9685 (yyresolveAction): Ditto.
9686 (yyglrShiftDefer): Update comment.
9687 (yyresolveStates): Use X == NULL for pointers, not !X.
9688 (yyglrReduce): Ditto.
9689 (yydoAction): Ditto
9690
9691 * tests/glr-regr1.at: Rename to ...
9692 * tests/glr-regression.at: Add new regression test for the problems
9693 described above (adapted from S. Eken).
9694 Update copyright notice.
9695 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9696 * tests/Makefile.am: Ditto.
9697
9698 2003-01-28 Paul Eggert <eggert@twinsun.com>
9699
9700 * data/lalr1.cc: Do not use @output_header_name@ unless
9701 b4_defines_flag is set. This fixes two bugs reported by
9702 Tim Van Holder in
9703 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9704 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9705
9706 2003-01-21 Paul Eggert <eggert@twinsun.com>
9707
9708 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9709 we don't need to worry about yyerrlab1 being reported as an
9710 "unused label" by non-GCC C compilers. The downside is that if
9711 locations are used then a couple of statements are duplicated each
9712 time YYERROR is invoked, but the upside is that the warnings
9713 should vanish.
9714 (yyerrlab1): Move code to YERROR.
9715 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9716 This reverts some of the 2002-12-27 change.
9717
9718 2003-01-17 Paul Eggert <eggert@twinsun.com>
9719
9720 * src/output.c (symbol_printers_output): Fix typo that led
9721 to core dump. Problem reported by Antonio Rus in
9722 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9723
9724 2003-01-13 Akim Demaille <akim@epita.fr>,
9725 Quoc Peyrot <chojin@lrde.epita.fr>,
9726 Robert Anisko <anisko_r@lrde.epita.fr>
9727
9728 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9729 when the stacks contain one element, as the loop would otherwise
9730 free the last state, and then use the top state (the one we just
9731 popped). This means that the initial elements will not be freed
9732 explicitly, as is the case in yacc.c; it is not a problem, as
9733 these elements have fake values.
9734
9735 2003-01-11 Paul Eggert <eggert@twinsun.com>
9736
9737 * NEWS: %expect-violations are now just warnings, reverting
9738 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9739 bootstrapping problem reported by Matthias Klose; see
9740 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9741 * src/conflicts.c (conflicts_print): Likewise.
9742 * tests/conflicts.at (%expect not enough, %expect too much,
9743 %expect with reduce conflicts): Likewise.
9744 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9745 that the warning is enabled if the number of conflicts changes
9746 (not necessarily increases).
9747
9748 * src/getargs.c (version): Update copyright year.
9749
9750 2003-01-09 Akim Demaille <akim@epita.fr>
9751
9752 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9753
9754 2003-01-08 Paul Eggert <eggert@twinsun.com>
9755
9756 * Makefile.maint (WGETFLAGS):
9757 New macro, containing "-C off" to disable proxy caches.
9758 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9759 (rel-check): Use $(WGET) instead of wget.
9760
9761 2003-01-06 Paul Eggert <eggert@twinsun.com>
9762
9763 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9764 the GLR paper of Scott, Johnstone and Hussain.
9765
9766 2003-01-04 Paul Eggert <eggert@twinsun.com>
9767
9768 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9769 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9770 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9771 (EXTRA_LIBRARIES): New var, for liby.a.
9772 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9773 (EXTRA_SCRIPTS): New var, for yacc.
9774
9775 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9776 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9777 Problem reported by Nelson H. F. Beebe.
9778
9779 2003-01-03 Paul Eggert <eggert@twinsun.com>
9780
9781 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9782 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9783 when compiling Bison 1.875's `bitset bset = obstack_alloc
9784 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9785
9786 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9787 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9788 grow to a huge size with typical invocation.
9789
9790 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9791 Use the pattern recommended by Autoconf 2.57, except also protect
9792 against double-definition.
9793 * src/system.h: Likewise.
9794 Portability issues reported by Nelson H. F. Beebe.
9795
9796 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9797 All uses changed. Provide a definition in both C and C++.
9798 (yytrue, yyfalse): Define even if defined (__cplusplus).
9799
9800 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9801 Reported by Nelson H. F. Beebe.
9802
9803 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9804
9805 2003-01-02 Paul Eggert <eggert@twinsun.com>
9806
9807 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9808 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9809 Bug reported by Nelson H. F. Beebe.
9810
9811 2003-01-01 Paul Eggert <eggert@twinsun.com>
9812
9813 * Version 1.875.
9814
9815 2002-12-30 Paul Eggert <eggert@twinsun.com>
9816
9817 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9818 Moved here from...
9819 (<INITIAL>","): Here. This causes stray "," to be treated
9820 more uniformly.
9821
9822 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9823 last brace in braced code when not in Yacc mode, for compatibility
9824 with Bison 1.35. This resurrects the 2001-12-15 patch to
9825 src/reader.c.
9826
9827 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9828 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9829
9830 2002-12-28 Paul Eggert <eggert@twinsun.com>
9831
9832 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9833 that of SYM's type. This fixes Debian bug 168069, reported by
9834 Thomas Olsson.
9835
9836 2002-12-28 Paul Eggert <eggert@twinsun.com>
9837
9838 Version 1.75f.
9839
9840 Switch back to the Yacc style of conflict reports, undoing some
9841 of the 2002-07-30 change.
9842 * doc/bison.texinfo (Understanding): Use Yacc style for
9843 conflict reports. Also, use new way of locating rules.
9844 * src/conflicts.c (conflict_report):
9845 Renamed from conflict_report_yacc, removing the old
9846 'conflict_report'. Translate the entire conflict report at once,
9847 so that we don't assume that "," has the same interpretation in
9848 all languages.
9849 (conflicts_output): Use Yacc-style conflict report for each state,
9850 instead of our more-complicated style.
9851 (conflicts_print): Use Yacc-style conflict report, except print
9852 the input file name when not emulating Yacc.
9853 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9854 Conflicted Reduction, %expect not enough, %expect too much,
9855 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9856 * tests/existing.at (GNU Cim Grammar): Likewise.
9857 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9858
9859 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9860 fatal): Don't invoke fflush; it's not needed and it might even be
9861 harmful for stdout, as stdout might not be open.
9862 * src/reduce.c (reduce_print): Likewise.
9863
9864 2002-12-27 Paul Eggert <eggert@twinsun.com>
9865
9866 Fix a bug where error locations were not being recorded correctly.
9867 This problem was originally reported by Paul Hilfinger in
9868 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9869
9870 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9871 top of the location stack's error locations.
9872 (yyerrlab): Set it. When discarding a token, push its location
9873 onto yylerrsp so that we don't lose track of the error's end.
9874 (yyerrlab1): Now is only the target of YYERROR, so that we can
9875 properly record the location of the action that failed. For GCC
9876 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9877 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9878 (yyerrlab2): New label, which yyerrlab now falls through to.
9879 Compute the error's location by applying YYLLOC_DEFAULT to
9880 the locations of all the symbols that went into the error.
9881 * doc/bison.texinfo (Location Default Action): Mention that
9882 YYLLOC_DEFAULT is also invoked for syntax errors.
9883 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9884 Error locations include the locations of all the tokens that were
9885 discarded, not just the last token.
9886
9887 2002-12-26 Paul Eggert <eggert@twinsun.com>
9888
9889 * src/files.c: Include quote.h.
9890 (compute_output_file_names): Warn if we detect conflicting
9891 outputs to the same file. This should catch the misunderstanding
9892 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9893
9894 * src/conflicts.c (conflicts_print): If the user specifies
9895 "%expect N", report an error if there are any reduce/reduce
9896 conflicts. This is what the manual says should happen.
9897 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9898 * tests/conflicts.at (%expect with reduce conflicts): New test.
9899
9900 Don't use m4_include on relative file names, as it doesn't work as
9901 desired if there happens to be a file with that name under ".".
9902
9903 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9904 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9905 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9906 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9907 * src/output.c (output_skeleton): Use full path names when
9908 specifying a file to include; don't rely on include path, as
9909 it's unreliable when the working file contains a file with
9910 that name.
9911
9912 2002-12-25 Paul Eggert <eggert@twinsun.com>
9913
9914 Remove obsolete references to bison.simple and bison.hairy.
9915 Problem mentioned by Aubin Mahe in
9916 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
9917 * data/glr.c: Comment fix.
9918 * doc/bison.1: Remove references. Also, mention "yacc".
9919
9920 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
9921 with -g option.
9922
9923 * src/parse-gram.y (declaration): Use enum "report_states" rather
9924 than its numeric value 1.
9925
9926 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
9927 opening a new one. This fixes Debian bug 165349, reported by
9928 Bruce Stephens.
9929
9930 2002-12-24 Paul Eggert <eggert@twinsun.com>
9931
9932 Version 1.75e.
9933
9934 * Makefile.maint (cvs-update): Don't assume that the shell
9935 supports $(...), as Solaris sh doesn't.
9936
9937 * src/parse-gram.y (lloc_default): Remove test for empty
9938 nonterminals at the end, since it didn't change the result.
9939
9940 2002-12-24 Paul Eggert <eggert@twinsun.com>
9941
9942 If the user does not define YYSTYPE as a macro, Bison now declares it
9943 using typedef instead of defining it as a macro. POSIX requires this.
9944 For consistency, YYLTYPE is also declared instead of defined.
9945
9946 %union directives can now have a tag before the `{', e.g., the
9947 directive `%union foo {...}' now generates the C code
9948 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
9949 The default union tag is `YYSTYPE', for compatibility with Solaris 9
9950 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
9951 instead of `yyltype'.
9952
9953 `yystype' and `yyltype' are now obsolescent macros instead of being
9954 typedefs or tags; they are no longer documented and will be
9955 withdrawn in a future release.
9956
9957 * data/glr.c (b4_location_type): Remove.
9958 (YYSTYPE): Renamed from yystype.
9959 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
9960 (struct YYLTYPE): Renamed from struct yyltype.
9961 (YYLTYPE): Renamed from yyltype.
9962 (yyltype, yystype): New (and obsolescent) macros,
9963 for backward compatibility.
9964 * data/yacc.c: Likewise.
9965
9966 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
9967 does not specify a union tag. This is for compatibility with
9968 Solaris 9 yacc.
9969
9970 * src/parse-gram.y (add_param): 2nd arg is now char * not char
9971 const *, since it is now modified by stripping surrounding { }.
9972 (current_braced_code): Remove.
9973 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
9974 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
9975 trailing " {...}". Now of type <chars>.
9976 (grammar_declaration): Adjust to bundled tokens.
9977 (code_content): Remove; stripping is now done by add_param.
9978 (print_token_value): Print contents of bundled tokens.
9979 (token_name): New function.
9980
9981 * src/reader.h (braced_code, current_braced_code): Remove.
9982 (token_name): New decl.
9983
9984 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
9985 token_type, not braced_code code_kind. All uses changed.
9986 (SC_PRE_CODE): New state, for scanning after a keyword that
9987 has (or usually has) an immediately-following braced code.
9988 (token_type): New local var, to keep track of which token type
9989 to return when scanning braced code.
9990 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
9991 <INITIAL>"%parse-param", <INITIAL>"%printer",
9992 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
9993 instead of returning a token type immediately.
9994 (<INITIAL>"{"): Set token type.
9995 (<SC_BRACED_CODE>"}"): Use it.
9996 (handle_action_dollar, handle_action_at): Now returns bool
9997 indicating success. Fail if ! current_rule; this prevents a core dump.
9998 (handle_symbol_code_dollar, handle_symbol_code_at):
9999 Remove; merge body into caller.
10000 (handle_dollar, handle_at): Complain in invalid contexts.
10001
10002 * NEWS, doc/bison.texinfo: Document the above.
10003 * NEWS: Fix years and program names in copyright notice.
10004
10005 2002-12-17 Paul Eggert <eggert@twinsun.com>
10006
10007 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10008 Reporting, Table of Symbols): Omit mentions of %lex-param and
10009 %parse-param from the documentation for now.
10010
10011 2002-12-15 Paul Eggert <eggert@twinsun.com>
10012
10013 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10014 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10015 lookahead symbol, and which sets yychar in parser actions) and it
10016 disagreed with the Bison documentation. Bug
10017 reported by Andrew Walrond.
10018
10019 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10020 as the caller now does that.
10021 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10022 (YYEMPTY): Parenthesize right hand side, since others use it.
10023 (yyparse): Don't assume that our generated code is the only code
10024 that sets yychar.
10025
10026 2002-12-13 Paul Eggert <eggert@twinsun.com>
10027
10028 Version 1.75d.
10029
10030 POSIX requires a "yacc" command.
10031 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10032 (MOSTLYCLEANFILES): Add yacc.
10033 (yacc): New rule.
10034 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
10035 as an alias for bison y.
10036
10037 * po/LINGUAS: Add da.
10038
10039 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10040 problem with latest <getopt.h>.
10041 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10042
10043 * doc/fdl.texi: Upgrade to 1.2.
10044 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10045 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10046 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10047 gnulib.
10048 * config/install-sh: Sync with autotools.
10049
10050 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
10051 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10052 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10053 locations are requested.
10054 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10055 locations are requested.
10056
10057 2002-12-12 Paul Eggert <eggert@twinsun.com>
10058
10059 Remove unportable casts and storage allocation tricks.
10060 While we're at it, remove almost all casts, since they
10061 usually aren't needed and are a sign of trouble.
10062
10063 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10064
10065 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10066 the pointer DSET returned by malloc; this isn't portable.
10067 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10068 Similarly for DERIVES.
10069 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10070 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10071 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10072
10073 * src/derives.c (derives_compute): Do not bother invoking
10074 int_of_rule_number, since rule numbers are integers.
10075
10076 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10077 rather than XMALLOC (char, N).
10078
10079 * src/files.c (filename_split): Rewrite to avoid cast.
10080
10081 * src/gram.h (symbol_number_as_item_number,
10082 item_number_as_symbol_number, rule_number_as_item_number,
10083 item_number_as_rule_number):
10084 Now inline functions rather than macros, to avoid casts.
10085 * src/state.h (state_number_as_int): Likewise.
10086 * src/tables.c (state_number_to_vector_number,
10087 symbol_number_to_vector_number): Likewise.
10088
10089 * src/gram.h (int_of_rule_number): Remove; no longer used.
10090
10091 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10092 since the resulting storage is always stored into.
10093
10094 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10095 where it's needed.
10096
10097 * src/muscle_tab.c (muscle_m4_output):
10098 Now inline. Return bool, not int.
10099 * src/state.c (state_compare): Likewise.
10100 * src/symtab.c (symbol_check_defined,
10101 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10102 hash_compare_symbol, hash_symbol):
10103 Likewise.
10104 * src/uniqstr.c (uniqstr_print): Likewise.
10105 * src/muscle_tab.c (muscle_m4_output_processor):
10106 New function, to avoid casts.
10107 * src/state.c (state_comparator, stage_hasher): Likewise.
10108 * src/symtab.c (symbol_check_defined_processor,
10109 symbol_check_alias_consistency_processor, symbol_pack_processor,
10110 symbol_translation_processor, hash_symbol_comparator,
10111 hash_symbol_hasher): Likewise.
10112 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10113 * src/muscle_tab.c (muscles_m4_output):
10114 Use new functions instead of casting old functions unportably.
10115 * src/state.c (state_hash_new): Likewise.
10116 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10117 symbols_token_translations_init):
10118 Likewise.
10119 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10120
10121 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10122 var instead of casting to long, to avoid casts.
10123 (prepare_states): Use MALLOC rather than alloca, so that we don't
10124 have to worry about alloca.
10125 * src/state.c (state_hash_lookup): Likewise.
10126
10127 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10128 local var instead of casting to unsigned char, to avoid casts.
10129
10130 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10131 STATE_ALLOC): Remove.
10132 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10133 rather than calloc, and use offsetof to avoid allocating slightly
10134 too much storage.
10135 (state_new): Initialize all members.
10136
10137 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10138
10139 * src/symtab.c (symbol_free): Remove; unused.
10140 (symbol_get): Remove cast in lhs of assignment.
10141 (symbols_do): Now static. Accept generic arguments, not
10142 hashing-related ones.
10143
10144 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10145 (symbol_processor): Remove.
10146 (symbols_do): Remove decl; now static.
10147
10148 * src/system.h (alloca): Remove; decl no longer needed.
10149 (<stddef.h>): Include, for offsetof.
10150 (<inttypes.>, <stdint.h>): Include if available.
10151 (uintptr_t): New type, if system lacks it.
10152 (CALLOC, MALLOC, REALLOC): New macros.
10153 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10154 new macros.
10155
10156 * src/tables.c (table_size): Now int, to pacify GCC.
10157 (table_grow, table_ninf_remap): Use signed table size.
10158 (save_row): Don't bother initializing locals when not needed.
10159 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10160 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10161
10162 * src/vcg.h: Correct misspellings.
10163
10164 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10165
10166
10167 * src/getargs.c (getargs): Don't assume EOF == -1.
10168
10169 2002-12-09 Paul Eggert <eggert@twinsun.com>
10170
10171 Change identifier spellings to avoid collisions with names
10172 that are reserved by POSIX.
10173
10174 Don't use names ending in _t, since POSIX reserves them.
10175 For consistency, remove _e and _s endings -- they're weren't
10176 needed to remove ambiguity. All uses changed.
10177 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10178 turn was just renamed from struniq_t.
10179 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10180 which in turn was just renamed from struniq_processor_t.
10181 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10182 in turn was renamed from hash_compare_struniq_t.
10183 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10184 (state_list): Renamed from state_list_t.
10185 * src/assoc.h (assoc): Renamed from assoc_t.
10186 * src/conflicts.c (enum conflict_resolution): Renamed from
10187 enum conflict_resolution_e.
10188 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10189 (rule_list): Renamed from rule_list_t.
10190 * src/getargs.h (enum trace): Renamed from enum trace_e.
10191 (enum report): Renamed from enum report_e.
10192 * src/gram.h (item_number): Renamed from item_number_t.
10193 (rule_number): Renamed from rule_number_t.
10194 (struct rule_s): Remove the "rule_s" part; not used.
10195 (rule): Renamed from rule_t.
10196 (rule_filter): Renamed from rule_filter_t.
10197 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10198 (goto_list): Renamed from goto_list_t.
10199 * src/lalr.h (goto_number): Renamed from goto_number_t.
10200 * src/location.h (location): Renamed from location_t.
10201 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10202 and moved here from:
10203 * src/muscle_tab.h (muscle_entry_t): here.
10204 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10205 (rule_list): Renamed from rule_list_t.
10206 * src/print_graph.c (static_graph): Renamed from graph.
10207 * src/reader.h (braced_code): Renamed from braced_code_t.
10208 Remove brace_code_e tag.
10209 * src/relation.h (relation_node): Renamed from relation_node_t.
10210 (relation_nodes): Renamed from relation_nodes_t.
10211 (relation): Renamed from relation_t.
10212 * src/state.h (state_number): Renamed from state_number_t.
10213 (struct state): Renamed from struct state_s.
10214 (state): Renamed from state_t.
10215 (transitions): Renamed from transitions_t. Unused (and
10216 misspelled) transtion_s tag removed.
10217 (errs): Renamed from errs_t. Unused errs_s tag removed.
10218 (reductions): Renamed from reductions_t. Unused tag
10219 reductions_s removed.
10220 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10221 (struct symbol_list): Renamed from struct symbol_list_s.
10222 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10223 (struct symbol): Renamed from struct symbol_s.
10224 (symbol): Renamed from symbol_t.
10225 * src/tables.c (vector_number): Renamed from vector_number_t.
10226 (action_number): Renamed from action_t.
10227 * src/tables.h (base_number): Renamed from base_t.
10228 * src/vcg.h (enum color): Renamed from enum color_e.
10229 (enum textmode): Renamed from enum textmode_e.
10230 (enum shape): Renamed from enum shape_e.
10231 (struct colorentry): Renamed from struct colorentry_s.
10232 (struct classname): Renamed from struct classname_s.
10233 (struct infoname): Renamed from struct infoname_s.
10234 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10235 (enum decision): Renamed from enum decision_e.
10236 (enum orientation): Renamed from enum orientation_e.
10237 (enum alignment): Renamed from enum alignment_e.
10238 (enum arrow_mode): Renamed from enum arrow_mode_e.
10239 (enum crossing_type): Renamed from enum crossing_type_e.
10240 (enum view): Renamed from enum view_e.
10241 (struct node): Renamed from struct node_s.
10242 (node): Renamed from node_t.
10243 (enum linestyle): Renamed from enum linestyle_e.
10244 (enum arrowstyle): Renamed from enum arrowstyle_e.
10245 (struct edge): Renamed from struct edge.
10246 (edge): Renamed from edge_t.
10247 (struct graph): Renamed from struct graph_s.
10248 (graph): Renamed from graph_t.
10249 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10250 Rename value_t -> value.
10251 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10252 value_t_as_yystype -> value_as_yystype.
10253
10254 Don't include <errno.h> in the mainstream code, since it
10255 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10256 * lib/get-errno.c, lib/get-errno.h: New files.
10257 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10258 get-errno.c.
10259 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10260 * src/output.c (output_skeleton): Likewise.
10261 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10262 instead of errno.
10263 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10264 Likewise.
10265 (handle_action_dollar, handle_action_at): Likewise.
10266 * src/system.h: Do not include <errno.h>.
10267 (TAB_EXT): Renamed from EXT_TAB.
10268 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10269
10270 Avoid str[a-z]*, since <string.h> reserves that name space.
10271 Change all instances of "struniq" in names to "uniqstr", and
10272 likewise for "STRUNIQ" and "UNIQSTR".
10273 * src/uniqstr.c: Renamed from src/struniq.c.
10274 * src/uniqstr.h: Renamed from src/struniq.h.
10275 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10276 * src/files.c (strsuffix): Remove; unused.
10277 (concat2): Renamed from stringappend. Now static.
10278 * src/files.h (strsuffix, stringappend): Remove; unused.
10279 * src/parse-gram.y (<chars>): Renamed from <string>.
10280 (<uniqstr>): Renamed from <struniq>.
10281 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10282 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10283 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10284 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10285 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10286 (N_EXPAND): Renamed from N_STRETCH.
10287
10288 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10289 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10290 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10291 Remove; unused.
10292 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10293 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10294 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10295 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10296 (BASE_MAXIMUM): Renamed from BASE_MAX.
10297 (BASE_MINIMUM): Renamed from BASE_MIN.
10298 (ACTION_MAX): Remove; unused.
10299 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10300 Unnecessary casts removed from above defines.
10301
10302
10303 Fix misspelling in names.
10304 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10305 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10306 G_NODE_ALIGNEMENT.
10307
10308
10309 * lib/timevar.c (timevar_report): Renamed from time_report,
10310 for consistency with other names.
10311 * lib/timevar.h (timevar_report): New decl.
10312 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10313
10314
10315 Sort include-file uses.
10316
10317 Reorder all include files under src to be in the order "system.h".
10318 then the ../lib include files in angle brackets (alphabetized),
10319 then the . include files in double-quotes (alphabetized). Fix
10320 dependency breakages encountered in this process, as follows:
10321 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10322 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10323 * src/state.h: Include "symtab.h".
10324
10325 2002-12-08 Paul Eggert <eggert@twinsun.com>
10326
10327 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10328 since this causes problems when __file__ contains character
10329 sequences like "@" that are treated specially by src/scan-skel.l.
10330 Instead, just use the file's basename. This fixes the bug
10331 reported by Martin Mokrejs in
10332 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10333
10334 2002-12-06 Paul Eggert <eggert@twinsun.com>
10335
10336 Add support for rules that do not have trailing semicolons, as
10337 POSIX requires. Improve the quality of locations in Bison
10338 diagnostics.
10339
10340 * src/location.c: Include <quotearg.h>.
10341 (empty_location): Now const.
10342 (location_print): New function. Follow the recommendation of the
10343 GNU Coding Standards for locations that span file boundaries.
10344 * src/location.h: Do not include <quotearg.h>; no longer needed.
10345 (boundary): New type.
10346 (location_t): Use it. This allows locations to span file boundaries.
10347 All member uses changed: file -> start.file or end.file (as needed),
10348 first_line -> start.line, first_column -> start.column,
10349 last_line -> end.line, last_column -> end.column.
10350 (equal_boundaries): New function.
10351 (LOCATION_RESET, LOCATION_STEP): Remove.
10352 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10353 (empty_location): Now const.
10354 (location_print): New decl.
10355 * src/parse-gram.y (lloc_default): New function, which handles
10356 empty locations more accurately.
10357 (YYLLOC_DEFAULT): Use it.
10358 (%token COLON): Remove.
10359 (%token ID_COLON): New token.
10360 (rules): Use it.
10361 (declarations, rules): Remove trailing semicolon.
10362 (declaration, rules_or_grammar_declaration):
10363 Allow empty (";") declaration.
10364 (symbol_def): Remove empty actions; no longer needed.
10365 (rules_or_grammar_declaration): Remove trailing semicolon.
10366 (semi_colon.opt): Remove.
10367 * src/reader.h: Include location.h.
10368 (scanner_cursor): New decl.
10369 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10370 rolling our own.
10371 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10372 of *loc.
10373 (STEP): Remove. No longer needed, now that adjust_location does
10374 the work. All uses removed.
10375 (scanner_cursor): New var.
10376 (adjust_location): Renamed from extend_location. It now sets
10377 *loc and adjusts the scanner cursor. All uses changed.
10378 Don't bother testing for CR.
10379 (handle_syncline): Remove location arg; now updates scanner cursor.
10380 All callers changed.
10381 (unexpected_end_of_file): Now accepts start boundary of token or
10382 comment, not location. All callers changed. Update scanner cursor,
10383 not the location.
10384 (SC_AFTER_IDENTIFIER): New state.
10385 (context_state): Renamed from c_context. All uses changed.
10386 (id_loc, code_start, token_start): New local vars.
10387 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10388 processing of Yacc white space and equivalents here.
10389 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10390 instead of returning ID immediately, since we need to search for
10391 a subsequent colon.
10392 (<INITIAL>"'", "\""): Save token_start.
10393 (<INITIAL>"%{", "{", "%%"): Save code_start.
10394 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10395 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10396 BEGIN context_state at end, not INITIAL.
10397 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10398 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10399 Return correct token start.
10400 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10401 the start of a character, string or multiline comment is found.
10402 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10403 Reduction): Adjust reported locations to match the more-precise
10404 results now expected.
10405 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10406 * tests/reduce.at (Useless Rules, Reduced Automaton,
10407 Underivable Rules): Likewise.
10408 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10409 or "|"' now that so many other tokens are allowed by the new grammar.
10410
10411 * src/complain.h (current_file): Remove duplicate decl;
10412 current_file is now owned by files.h.
10413 * src/complain.c, src/scan-gram.l: Include files.h.
10414
10415 2002-12-06 Paul Eggert <eggert@twinsun.com>
10416
10417 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10418 promotes to int; it might be unsigned int.
10419 * data/yacc.c (yy_reduce_print): Likewise.
10420
10421 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10422 be #defined in the prologue, not in the Bison declarations.
10423 This fixes Debian Bug 102878, reported by Shaul Karl.
10424
10425 2002-12-02 Paul Eggert <eggert@twinsun.com>
10426
10427 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10428 * lib/strtoul.c: New file, from gnulib.
10429 This fixes a porting bug reported by Peter Klein in
10430 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10431
10432 2002-11-30 Paul Eggert <eggert@twinsun.com>
10433
10434 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10435 and put only a forward declaration in the prologue. This is for
10436 consistency with the other scanner helper functions.
10437
10438 Type clashes now generate warnings, not errors, since it
10439 appears that POSIX may allow some grammars with type clashes.
10440 * src/reader.c (grammar_current_rule_check): Warn about
10441 type clashes instead of complaining.
10442 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10443
10444 Add Yacc library, since POSIX requires it.
10445 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10446 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10447 * lib/main.c, lib/yyerror.c: New files.
10448
10449 gram_error can be static; it need not be extern.
10450 * src/reader.h (gram_error): Remove decl.
10451 * src/parse-gram.y (gram_error): Now static. Add static decl.
10452 (print_token_value): Omit parameter names from forward decl,
10453 for consistency.
10454
10455 2002-11-29 Paul Eggert <eggert@twinsun.com>
10456
10457 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10458 be declared before being used. E.g., one should typically
10459 declare them in the prologue. Use GNU coding style in examples.
10460 Put "const" consistently after the type it modifies. Mention
10461 that C99 supports "inline". Mention that yyerror traditionally
10462 returns "int".
10463
10464 %parse-param and %lex-param now take just one argument, the
10465 declaration; the argument name is deduced from the declaration.
10466
10467 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10468 Reporting, Table of Symbols): Document this.
10469 * src/parse-gram.y (add_param): New function.
10470 (COMMA): Remove.
10471 (declaration): Implement new rule for %parse-param and %lex-param.
10472 * src/scan-gram.l: "," now elicits a warning, rather than being
10473 a token; this is more compatible with byacc.
10474 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10475
10476 2002-11-27 Paul Eggert <eggert@twinsun.com>
10477
10478 Rename identifiers to avoid real and potential collisions.
10479
10480 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10481 to avoid collision with lex macro described by Bruce Lilly in
10482 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10483 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10484 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10485 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10486 All uses changed.
10487 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10488 The name "yycontrol" violates the name space rules, and this stuff
10489 wasn't being used anyway.
10490 (input): Remove action; this stuff wasn't being used.
10491 (gram_error): Rename local variable yylloc -> loc.
10492 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10493 (YY_DECL): Don't use "yy" at start of local variables.
10494 All uses changed, e.g., yylloc -> loc.
10495 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10496 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10497 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10498 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10499
10500 * src/parse-gram.y (gram_error): loc is now const *.
10501 * src/reader.h (gram_error): Likewise.
10502
10503 2002-11-24 Paul Eggert <eggert@twinsun.com>
10504
10505 Version 1.75c.
10506
10507 * tests/actions.at (Actions after errors): Use an output format
10508 more similar to that of the Printers and Destructors test.
10509 Test the position of the ';' token too.
10510 (Printers and Destructors): Likewise.
10511 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10512 unnecessarily alarming people when the test fails.
10513
10514 * data/yacc.c (yyerrlab1): Move this label down, so that the
10515 parser does not discard the lookahead token if the user code
10516 invokes YYERROR. This change is required for POSIX conformance.
10517
10518 * lib/error.c: Sync with gnulib.
10519
10520 2002-11-22 Paul Eggert <eggert@twinsun.com>
10521
10522 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10523 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10524 * lib/xmalloc.c: Likewise.
10525
10526 2002-11-20 Paul Eggert <eggert@twinsun.com>
10527
10528 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10529
10530 2002-11-20 Paul Eggert <eggert@twinsun.com>
10531
10532 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10533 should use `if (! x) abort ();' rather than `assert (x);', and
10534 anyway it's one less thing to worry about configuring.
10535
10536 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10537 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10538 and replace all instances of assert with abort.
10539 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10540 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10541
10542 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10543 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10544 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10545 hash_find_entry, hash_rehash, hash_insert): Likewise.
10546 * src/conflicts.c (resolve_sr_conflict): Likewise.
10547 * src/lalr.c (set_goto_map, map_goto): Likewise.
10548 * src/nullable.c (nullable_compute): Likewise.
10549 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10550 * src/reader.c (packgram, reader): Likewise.
10551 * src/state.c (state_new, state_free, state_transitions_set,
10552 state_reduction_find): Likewise.
10553 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10554 symbol_pack): Likewise.
10555 * src/tables.c (conflict_row, pack_vector): Likewise.
10556 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10557 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10558 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10559 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10560
10561 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10562 (ARGMATCH_CONSTRAINT): New macro.
10563 (ARGMATCH_ASSERT): Use it.
10564
10565 * src/system.h (verify): New macro.
10566 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10567 rather than assert.
10568 * src/tables.c (tables_generate): Likewise.
10569
10570 * src/struniq.c (struniq_assert): Now returns void, and aborts
10571 if the assertion is false.
10572 (struniq_assert_p): Remove.
10573 * src/struniq.h: Likewise.
10574
10575 2002-11-18 Paul Eggert <eggert@twinsun.com>
10576
10577 * data/glr.c (yygetLRActions): Replace `yyindex' with
10578 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10579 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10580 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10581
10582 2002-11-18 Akim Demaille <akim@epita.fr>
10583
10584 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10585 space.
10586 From Tim Van Holder.
10587
10588 2002-11-17 Paul Eggert <eggert@twinsun.com>
10589
10590 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10591 to "SyntaxError" for consistency with my 2002-11-15 change.
10592
10593 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10594 not define to {}, since this breaks the common use of `YYDPRINTF
10595 ((...));' if a single statement is desired (e.g. before `else').
10596 Work around GCC warnings by surrounding corresponding calls with
10597 {} if needed.
10598 (yyhasResolvedValue): Remove unused function.
10599 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10600 loop body.
10601 (yyreportSyntaxError): Renamed from yyreportParseError.
10602 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10603 All uses changed.
10604 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10605 extern when possible. Remove unused initializations.
10606
10607 2002-11-16 Akim Demaille <akim@epita.fr>
10608
10609 Augment the similarity between GLR and LALR traces.
10610
10611 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10612 (YY_REDUCE_PRINT): New.
10613 (yyparse): Use them.
10614 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10615 YYDPRINT here.
10616 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10617 state reached after the reduction/recovery, since...
10618 (yyparse, yyprocessOneStack): Report the state we are entering in.
10619
10620 2002-11-16 Akim Demaille <akim@epita.fr>
10621
10622 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10623 Add support for --trace=skeleton.
10624 * src/scan-skel.l: %option debug.
10625 Scan strings of non-@ or \n instead of character by character.
10626 (scan_skel): Handle trace_skeleton.
10627 (QPUTS): New.
10628 (@output_parser_name@, @output_header_name@): ``Restore'' their
10629 support (used to be M4 macros).
10630 * data/yacc.c: Quote larger chunks, a la glr.c.
10631 * data/lalr1.cc: Likewise.
10632 The header guards are no longer available, so use some other
10633 string than `YYLSP_NEEDED'.
10634
10635 2002-11-16 Akim Demaille <akim@epita.fr>
10636
10637 Make the ``Printers and Destructors'' test more verbose, taking
10638 `yacc.c''s behavior as (possibly wrong) reference.
10639
10640 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10641 instead of fprint on stdout.
10642 Set and report the last_line of the symbols.
10643 Consistently display values and locations.
10644
10645 2002-11-16 Paul Eggert <eggert@twinsun.com>
10646
10647 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10648
10649 2002-11-15 Paul Eggert <eggert@twinsun.com>
10650
10651 * tests/actions.at (Actions after errors): New test case.
10652
10653 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10654 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10655 tests/action.at, tests/calc.at, tests/conflicts.at,
10656 tests/cxx-type.at, tests/regression.at:
10657 "parse error" -> "syntax error" for POSIX compatibility.
10658 "parsing stack overflow..." -> "parser stack overflow" so
10659 that code matches Bison documentation.
10660
10661 2002-11-15 Akim Demaille <akim@epita.fr>
10662
10663 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10664 take two BRACED_CODE, not two string_content.
10665 Free the scanner's obstack when we are done.
10666 (code_content): New.
10667 * tests/calc.at: Adjust.
10668 * doc/bison.texinfo: Adjust.
10669 Also, make sure to include the `,' for these declarations.
10670
10671 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10672
10673 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10674 definition; avoids potential autoreconf problems.
10675
10676 2002-11-15 Akim Demaille <akim@epita.fr>
10677
10678 Always check the value returned by yyparse.
10679
10680 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10681 returned by yyparse.
10682 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10683 Adjust calls.
10684 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10685 returned by yyparse.
10686
10687 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10688
10689 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10690 on input.at test.
10691
10692 2002-11-14 Paul Eggert <eggert@twinsun.com>
10693
10694 * src/output.c (output_skeleton): Call xfopen instead of
10695 duplicating xfopen's body.
10696
10697 Fix bugs reported by Nelson H. F. Beebe in
10698 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10699
10700 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10701 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10702 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10703 file twice in the grammar, as an extra check.
10704
10705 * tests/input.at (Torturing the Scanner): Surround the
10706 backslash-newline tests with "#if 0", to make it less likely that
10707 we'll run into compiler bugs. Bring back solitary \ inside
10708 comment, but add a closing comment to work around HP C bug. Don't
10709 test backslash-newline in C character constant.
10710
10711 2002-11-14 Akim Demaille <akim@epita.fr>
10712
10713 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10714 status of the compiler.
10715 Calling `exit 1' is no longer needed.
10716 Reported by Nelson H. F. Beebe.
10717
10718 2002-11-14 Akim Demaille <akim@epita.fr>
10719
10720 * tests/atlocal.in (CPPFLAGS): We have config.h.
10721 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10722 New.
10723 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10724 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10725 * tests/regression.at, tests/torture.at: Use them for all the
10726 grammars that are to be compiled.
10727 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10728 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10729 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10730
10731 2002-11-14 Akim Demaille <akim@epita.fr>
10732
10733 * doc/bison.texinfo: Various formatting changes (alignments in
10734 samples, additional @group/@end group, GCS in samples.
10735 Use @deffn instead of simple @table to define the directives,
10736 macros, variables etc.
10737
10738 2002-11-13 Paul Eggert <eggert@twinsun.com>
10739
10740 Fix some bugs reported by Albert Chin-A-Young in
10741 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10742
10743 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10744 -o c"; the HP C compiler chatters during compilation.
10745 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10746 * tests/headers.at (export YYLTYPE): Likewise.
10747
10748 * tests/input.at (Torturing the Scanner): Remove lines containing
10749 solitary backslashes, as they tickle a bug in the HP C compiler.
10750
10751 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10752 comments, since they're not portable. Use GNU coding style.
10753
10754 2002-11-13 Akim Demaille <akim@epita.fr>
10755
10756 * data/yacc.c: Leave bigger chunks of quoted text.
10757 (YYDSYMPRINTF): New.
10758 Use it to report symbol activities.
10759 * data/glr.c (YYDSYMPRINTF): New.
10760 Use it.
10761
10762 2002-11-12 Paul Eggert <eggert@twinsun.com>
10763
10764 Version 1.75b.
10765
10766 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10767 (yyglrReduce): Return yyok, not 0.
10768 This should avoid the enumerated-type warnings reported
10769 by Nelson H. F. Beebe in
10770 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10771
10772 * lib/bbitset.h (BITSET_INLINE): Remove.
10773 * lib/bitset.h [! BITSET_INLINE]: Remove.
10774 (bitset_set, bitset_reset, bitset_test): Rename local vars
10775 to avoid shadowing warnings by GCC.
10776
10777 * data/glr.c (inline): Remove #define. It's the user's
10778 responsibility to #define it away, just like 'const'.
10779 This fixes one of the bugs reported by Nelson H. F. Beebe in
10780 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10781
10782 * Makefile.maint (po-check): Scan .l and .y files instead of the
10783 .c and the .h files that they generate. This fixes the bug
10784 reported by Tim Van Holder in:
10785 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10786 Look for N_ as well as for _. Try to avoid matching #define for
10787 N_ and _.
10788 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10789 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10790 * src/scan-gram.l: Revamp regular expressions so that " and '
10791 do not confuse xgettext.
10792
10793 * src/struniq.h (struniq_new): Do not declare the return type
10794 to be 'const'; this violates the C standard.
10795 * src/struniq.c (struniq_new): Likewise.
10796
10797 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10798
10799 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10800 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10801 linker.
10802
10803 2002-11-12 Akim Demaille <akim@epita.fr>
10804
10805 * Makefile.maint: Sync with Autoconf:
10806 (local_updates): New.
10807
10808 2002-11-12 Akim Demaille <akim@epita.fr>
10809
10810 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10811
10812 2002-11-12 Akim Demaille <akim@epita.fr>
10813
10814 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10815 locations.
10816
10817 2002-11-12 Akim Demaille <akim@epita.fr>
10818
10819 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10820 not yyvalue.
10821
10822 2002-11-12 Akim Demaille <akim@epita.fr>
10823
10824 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10825 Use it to test the GLR parser.
10826
10827 2002-11-12 Akim Demaille <akim@epita.fr>
10828
10829 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10830 defines it.
10831 * data/glr.c (yystos): New.
10832 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10833 (YYDSYMPRINT): New.
10834 (yyval): Don't define it, it is handled via M4.
10835 (yyrecoverParseError): Free verbosely the discarded symbols.
10836 * data/yacc.c (yysymprint): Remove, rather...
10837 (b4_yysymprint_generate): invoke.
10838 * data/c.m4 (b4_yysymprint_generate): New.
10839 Accept pointers as arguments, as opposed to the version from
10840 yacc.c.
10841 (b4_yydestruct_generate): Likewise.
10842 * tests/cations.at (Printers and Destructors): Use Bison directives
10843 instead of CPP macros.
10844 Don't rely on internal details.
10845
10846 2002-11-12 Akim Demaille <akim@epita.fr>
10847
10848 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10849 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10850 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10851 it against YYEMPTY and so forth), work on yytoken (i.e., set
10852 it to YYEMPTY etc.).
10853 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10854 (b4_symbol_actions): Remove.
10855 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10856 for 0, end-of-input.
10857
10858 2002-11-12 Akim Demaille <akim@epita.fr>
10859
10860 * doc/bison.texinfo (Destructor Decl): New.
10861
10862 2002-11-12 Akim Demaille <akim@epita.fr>
10863
10864 * src/tables.c (tables_generate): Use free for pointers that
10865 cannot be NULL, not XFREE.
10866 (pack_vector): Use assert, not fatal, for bound violations.
10867 * src/state.c (state_new): Likewise.
10868 * src/reader.c (reader): Likewise.
10869 * src/lalr.c (set_goto_map): Likewise.
10870 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10871 the file name.
10872
10873 2002-11-12 Akim Demaille <akim@epita.fr>
10874
10875 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10876 Restore.
10877 * src/scan-gram.l (last_string): Is global to the file, not to
10878 yylex.
10879 * src/parse-gram.y (input): Don't append the epilogue here,
10880 (epilogue.opt): do it here, and free the scanner's obstack.
10881 * src/reader.c (epilogue_set): Rename as...
10882 (epilogue_augment): this.
10883 * data/c.m4 (b4_epilogue): Defaults to empty.
10884
10885 2002-11-12 Akim Demaille <akim@epita.fr>
10886
10887 * src/getargs.c (long_options): Remove duplicates.
10888 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10889 Remove.
10890 * doc/bison.rnh: Remove.
10891 * doc/bison.texinfo (VMS Invocation): Remove.
10892
10893 2002-11-12 Akim Demaille <akim@epita.fr>
10894
10895 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10896 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10897
10898 Use struniq for symbols.
10899
10900 * src/symtab.h (symbol_t): The tag member is a struniq.
10901 (symbol_type_set): Adjust.
10902 * src/symtab.c (symbol_new): Takes a struniq.
10903 (symbol_free): Don't free the tag member.
10904 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10905 (hash_compare_symbol, hash_symbol): these.
10906 Use the fact that tags as struniqs.
10907 (symbol_get): Use struniq_new.
10908 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10909 Returns a strniq.
10910 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10911 and type members are struniqs.
10912 * src/reader.c (get_merge_function)
10913 (grammar_current_rule_merge_set): Adjust.
10914 (TYPE, current_type): Are struniq.
10915
10916 Use struniq for file names.
10917
10918 * src/files.h, src/files.c (infile): Split into...
10919 (grammar_file, current_file): these.
10920 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
10921 * src/reduce.c (reduce_print): Likewise.
10922 * src/getargs.c (getargs): Likewise.
10923 * src/complain.h, src/complain.c: Likewise.
10924 * src/main.c (main): Call struniqs_new early enough to use it for
10925 file names.
10926 Don't free the input file name.
10927
10928 2002-11-12 Akim Demaille <akim@epita.fr>
10929
10930 * src/symtab.c (symbol_free): Remove dead deactivated code:
10931 type_name are properly removed.
10932 Don't use XFREE to free items that cannot be NULL.
10933 * src/struniq.h, src/struniq.c: New.
10934 * src/main.c (main): Initialize/free struniqs.
10935 * src/parse-gram.y (%union): Add astruniq member.
10936 (yyprint): Adjust.
10937 * src/scan-gram.l (<{tag}>): Return a struniq.
10938 Free the obstack bit that used to store it.
10939 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
10940
10941 2002-11-11 Paul Eggert <eggert@twinsun.com>
10942
10943 Revamp to fix many (but not all) of the C- and M4-related quoting
10944 problems. Among other things, this fixes the Bison bug reported
10945 by Jan Hubicka when processing the Bash grammar; see:
10946 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
10947
10948 Use new @ escapes consistently. Represent brackets with @{ and @}
10949 rather than @<:@ and @:>@, since this works a bit better with dumb
10950 editors like vi. Represent @ with @@, since @ is now consistently
10951 an escape. Use @oline@ and @ofile@ rather than __oline__ and
10952 __ofile__, to avoid unexpected expansions. Similarly, use @output
10953 rather than #output.
10954
10955 * data/c.m4 (b4_copyright): Omit file name from comment, since
10956 the file name could contain "*/".
10957 (b4_synclines_flag): Don't quote the 2nd argument; it should already
10958 be quoted. All uses changed.
10959
10960 * data/glr.c: Use new @ escapes consistently.
10961 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
10962 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
10963 Remove, since they couldn't handle arbitrary characters in file
10964 names.
10965 * data/lalr1.cc: Likewise.
10966 * data/yacc.c: Likewise.
10967
10968 * src/files.c (output_infix): Remove; all uses removed.
10969 * src/files.h: Likewise.
10970
10971 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
10972 mishandled funny characters in file names, and anyway it isn't
10973 needed any more.
10974 * data/yacc.c: Likewise.
10975 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
10976
10977 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
10978 * data/yacc.c: Likewise.
10979
10980 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
10981 strings now.
10982 (muscle_init): Quote filename as a C string.
10983 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
10984 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
10985 * src/output.c (escaped_file_name_output): New function.
10986 (prepare_symbols): Quote tokens for M4.
10987 (prepare): Don't insert output_infix, output_prefix,
10988 output_parser_name, output_header_name; this is now down by scan-skel.
10989 Insert skeleton as a C string.
10990
10991 * src/output.c (user_actions_output, symbol_destructors_output,
10992 symbol_printers_output): Quote filenames for C and M4.
10993 * src/reader.c (prologue_augment, epilogue_set): Likewise.
10994
10995 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
10996 escapes other than \\ and \'; this simplifies the code.
10997 (<SC_STRING>): Likewise, for \\ and \".
10998 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
10999 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11000 Use new escapes @{ and @} for [ and ].
11001
11002 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11003 them with auto vars.
11004 Switch to new escape scheme, where @ is the escape character uniformly.
11005 Abort if a stray escape character is found. Avoid unbounded input
11006 buffer when parsing non-escaped text.
11007
11008 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11009 __oline__, #output, $@, and @{ do not have unintended meanings.
11010
11011 2002-11-09 Paul Eggert <eggert@twinsun.com>
11012
11013 Fix the test failure due to GCC warnings described in
11014 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
11015 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11016 evaluate to 0 if it's impossible for NINF to be in the respective
11017 table.
11018 (yygetLRActions, yyrecoverParseError): Use them.
11019
11020 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11021 counted in the token inserted at end of file. Now takes
11022 location_t *, not location_t, so that the location can be
11023 adjusted. All uses changed.
11024
11025 * tests/regression.at (Invalid inputs): Adjust wording in
11026 diagnostic to match the new behavior.
11027
11028 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11029 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11030 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11031 abort ();'. This reduces the runtime of the "Many lookaheads"
11032 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11033 GCC 3.2.
11034
11035 2002-11-07 Paul Eggert <eggert@twinsun.com>
11036
11037 * src/parse-gram.y (CHARACTER): Remove unused token.
11038 All uses removed.
11039
11040 * src/scan-gram.l: Remove stack option. We no longer use the
11041 stack, since the stack was never deeper than 1; instead, use the
11042 new auto var c_context to record the stacked value.
11043
11044 Remove nounput option. At an unexpected end of file, we now unput
11045 the minimal input necessary to end cleanly; this simplifies the
11046 code.
11047
11048 Avoid unbounded token sizes where this is easy.
11049
11050 (unexpected_end_of_file): New function.
11051 Use it to systematize the error message on unexpected EOF.
11052 (last-string): Now auto, not static.
11053 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11054 (scanner_last_string_free): Remove; not used.
11055 (percent_percent_count): Move decl to just before use.
11056 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11057 not the (never otherwised-used) CHARACTER.
11058
11059 2002-11-07 Akim Demaille <akim@epita.fr>
11060
11061 Let yyerror always receive the msg as last argument, so that
11062 yyerror can be variadic.
11063
11064 * data/yacc.c (b4_yyerror_args): New.
11065 Use it when calling yyerror.
11066 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11067 Use it when calling yyerror.
11068 * doc/bison.texinfo (Error Reporting): Adjust.
11069 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11070 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11071
11072 2002-11-06 Akim Demaille <akim@epita.fr>
11073
11074 #line should have quoted strings.
11075 Ideally, this should be done by m4_quotearg.
11076
11077 * src/scan-skel.l: Include quotearg.h.
11078 Quote __ofile__.
11079 * src/output.c (symbol_printers_output)
11080 (symbol_destructors_output): Quote the file name.
11081
11082 2002-11-06 Akim Demaille <akim@epita.fr>
11083
11084 * tests/regression.at (Invalid inputs): Adjust to the recent
11085 messages.
11086
11087 2002-11-06 Akim Demaille <akim@epita.fr>
11088
11089 Restore --no-lines.
11090 Reported by Jim Kent.
11091
11092 * data/c.m4 (b4_syncline): New.
11093 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11094 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11095 * src/output.c (user_actions_output): Likewise.
11096 (prepare): Define 'b4_synclines_flag'.
11097 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
11098
11099 2002-11-06 Akim Demaille <akim@epita.fr>
11100
11101 * src/main.c (main): Free `infile'.
11102 * src/scan-gram.l (handle_syncline): New.
11103 Recognize `#line'.
11104 * src/output.c (user_actions_output, symbol_destructors_output)
11105 (symbol_printers_output): Use the location's file name, not
11106 infile.
11107 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11108
11109 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11110
11111 * src/tables.c (matching_state): Don't allow states to match if
11112 either has GLR conflict entries.
11113
11114 2002-11-05 Paul Eggert <eggert@twinsun.com>
11115
11116 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11117 "integer out of range" rather than "invalid value".
11118 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11119 accordingly.
11120
11121 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11122 Also, remove one static variable in the scanner.
11123
11124 * src/scan-gram.l (braces_level): Now auto, not static.
11125 Initialize to zero if the compiler is being picky.
11126 (INITIAL): Clear braces_level instead of incrementing it.
11127 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11128 as POSIX 1003.1-2001 requires.
11129 * src/system.h (IF_LINT): New macro, taken from coreutils.
11130 * configure.ac: Define "lint" if --enable-gcc-warnings.
11131
11132 2002-11-05 Akim Demaille <akim@epita.fr>
11133
11134 * src/scan-gram.l: When it starts with `%', complain about the
11135 whole directive, not just that `invalid character: %'.
11136
11137 2002-11-04 Akim Demaille <akim@epita.fr>
11138
11139 * Makefile.maint: Update from Autoconf.
11140 (update, cvs-update, po-update, do-po-update): New.
11141
11142 2002-11-04 Akim Demaille <akim@epita.fr>
11143
11144 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11145 and yyerror.
11146 Have yyerror `use' its arguments.
11147 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11148 returns true when location & yacc & pure & parse-param.
11149 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11150
11151 2002-11-04 Akim Demaille <akim@epita.fr>
11152
11153 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11154 clashes.
11155 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11156 font-lock-mode.
11157 Use complain_at.
11158 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11159 slot 0.
11160
11161 2002-11-03 Paul Eggert <eggert@twinsun.com>
11162
11163 * src/reader.c (get_merge_function, grammar_current_rule_check):
11164 Use consistent diagnostics for reporting type name clashes.
11165 Quote the types with <>, for consistency with Yacc.
11166 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11167
11168 2002-11-03 Akim Demaille <akim@epita.fr>
11169
11170 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11171 New.
11172 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11173 (b4_parse_param): Remove.
11174 Use b4_identification.
11175 Propagate b4_pure_args where needed to pass them to yyerror.
11176 * data/glr.m4 (b4_parse_param): Remove.
11177 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11178 (b4_lpure_formals): New.
11179 Use b4_identification.
11180 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11181 b4_user_formals and b4_user_args.
11182 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11183 (yyreportAmbiguity): When using a pure parser, also need
11184 the location, and the parse-params.
11185 Adjust callers.
11186 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11187 When using a pure parser, also need the parse-params.
11188 Adjust callers.
11189 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11190 (%pure-parser + %parse-param) LALR and GLR parsers.
11191 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11192 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11193 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11194 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11195 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11196 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11197 * doc/bison.texinfo: Untabify the whole file.
11198 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11199 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11200 (Error Reporting): Adjust to these new directives.
11201 Document %error-verbose, deprecate YYERROR_VERBOSE.
11202
11203 2002-11-03 Akim Demaille <akim@epita.fr>
11204
11205 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11206 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11207 command line options.
11208 * tests/cxx-type.at: Formatting changes.
11209
11210 2002-11-03 Paul Eggert <eggert@twinsun.com>
11211
11212 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11213 to count columns correctly, and to check for invalid inputs.
11214
11215 Use mbsnwidth to count columns correctly. Account for tabs, too.
11216 Include mbswidth.h.
11217 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11218 (extend_location): New function.
11219 (YY_LINES): Remove.
11220
11221 Handle CRLF in C code rather than in Lex code.
11222 (YY_INPUT): New macro.
11223 (no_cr_read): New function.
11224
11225 Scan UCNs, even though we don't fully handle them yet.
11226 (convert_ucn_to_byte): New function.
11227
11228 Handle backslash-newline correctly in C code.
11229 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11230 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11231 all uses changed.
11232 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11233 Use {splice} wherever C allows backslash-newline.
11234 YY_STEP after space, newline, vertical-tab.
11235 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
11236
11237 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11238
11239 ({int}, handle_action_dollar, handle_action_at): Check for integer
11240 overflow.
11241
11242 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11243
11244 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11245 as well as \000. Check for UCHAR_MAX, not 255.
11246 Allow \x with an arbitrary positive number of digits, as in C.
11247 Check for overflow here.
11248 Allow \? and UCNs, for compatibility with C.
11249
11250 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11251 with quote slot used by complain_at.
11252
11253 * tests/input.at: Add tests for backslash-newline, m4 quotes
11254 in symbols, long literals, and funny escapes in strings.
11255
11256 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11257 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11258 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11259 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11260 * m4/mbswidth.m4: New file, from GNU coreutils.
11261
11262 * doc/bison.texinfo (Grammar Outline): Document // comments.
11263 (Symbols): Document that trigraphs have no special meaning in Bison,
11264 nor is backslash-newline allowed.
11265 (Actions): Document that trigraphs have no special meaning.
11266
11267 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11268 no longer used.
11269
11270 2002-11-02 Paul Eggert <eggert@twinsun.com>
11271
11272 * src/reader.c: Don't include quote.h; not needed.
11273 (get_merge_function): Reword warning to be consistent with
11274 type clash diagnostic in grammar_current_rule_check.
11275
11276 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11277 bug in trigraph handling.
11278
11279 * src/output.c (prepare_symbols): When printing token names,
11280 escape "[" as "@<:@" and likewise for "]".
11281
11282 * src/system.h (errno): Remove declaration, as we are now
11283 assuming C89 or better, and C89 guarantees errno.
11284
11285 2002-10-30 Paul Eggert <eggert@twinsun.com>
11286
11287 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11288 Check for close failures.
11289 * src/files.h (xfclose): Return void, not int, since it always
11290 returned zero.
11291 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11292 indicates one.
11293 * src/output.c (output_skeleton): Use xfclose rather than fclose
11294 and ferror. xfclose now checks ferror.
11295
11296 * data/glr.c (YYLEFTMOST_STATE): Remove.
11297 (yyreportTree): Use a stack-based leftmost state. This avoids
11298 our continuing battles with bogus warnings about initializers.
11299
11300 2002-10-30 Akim Demaille <akim@epita.fr>
11301
11302 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11303 #if.
11304
11305 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11306
11307 * tests/glr-regr1.at: New test for reported regressions.
11308 * tests/testsuite.at: Add glr-regr1.at test.
11309 * tests/Makefile.am: Add glr-regr1.at test.
11310
11311 2002-10-24 Paul Eggert <eggert@twinsun.com>
11312
11313 Version 1.75a.
11314
11315 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11316 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11317 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11318 Don't assume strdup exists; POSIX says its an XSI extension.
11319 Check for buffer overflow on input.
11320
11321 2002-10-24 Akim Demaille <akim@epita.fr>
11322
11323 * src/output.c (output_skeleton): Don't disable M4sugar comments
11324 too soon: it results in comments being expanded.
11325 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11326 first output.
11327
11328 2002-10-24 Akim Demaille <akim@epita.fr>
11329
11330 * data/yacc.c (m4_int_type): New.
11331 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11332 char' as only yacc.c wants K&R portability.
11333 * data/glr.c (yysigned_char): Remove.
11334 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11335 Reported by Quoc Peyrot.
11336
11337 2002-10-23 Paul Eggert <eggert@twinsun.com>
11338
11339 * src/main.c (main): With --trace=time, report times even if a
11340 non-fatal error occurs. Formerly, the times were reported in some
11341 such cases but not in others.
11342 * src/reader.c (reader): Just return if a complaint has been issued,
11343 instead of exiting, so that 'main' can report times.
11344
11345 2002-10-22 Akim Demaille <akim@epita.fr>
11346
11347 * src/system.h: Include sys/types.
11348 Reported by Bert Deknuydt.
11349
11350 2002-10-23 Paul Eggert <eggert@twinsun.com>
11351
11352 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11353 Suggested by Art Haas.
11354
11355 2002-10-22 Paul Eggert <eggert@twinsun.com>
11356
11357 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11358 decl; not needed any more.
11359 * src/main.c (main): Use return to exit, undoing yesterday's change.
11360 The last OS that we could find where this wouldn't work is
11361 SunOS 3.5, and that's too old to worry about now.
11362
11363 * data/glr.c (struct yyltype): Define members even when not
11364 doing locations. This is more consistent with yacc.c, and it
11365 works around the following bug reports:
11366 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11367 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
11368
11369 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11370 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11371 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11372
11373 2002-10-22 Akim Demaille <akim@epita.fr>
11374
11375 * data/README: New.
11376
11377 2002-10-21 Paul Eggert <eggert@twinsun.com>
11378
11379 Be consistent about 'bool'; the old code used an enum in one
11380 module and an int in another, and this violates the C standard.
11381 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11382 * configure.ac (AC_HEADER_STDBOOL): Add.
11383 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11384 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11385 * src/symtab.c (hash_compare_symbol_t): Likewise.
11386 * src/system.h (bool, false, true): Use a definition consistent
11387 with ../lib/hash.c. All uses changed.
11388
11389 * src/complain.c (warning_issued): Renamed from warn_message_count,
11390 so that we needn't worry about integer overflow (!).
11391 Now of type bool. All uses changed.
11392 (complaint_issued): Renamed from complain_message_count; likewise.
11393
11394 * src/main.c (main): Use exit to exit with failure.
11395
11396 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11397 rather than 1 and 0.
11398 * src/main.c (main): Likewise.
11399 * src/getargs.c (getargs): Likewise.
11400 * src/reader.c (reader): Likewise.
11401
11402 * src/getarg.c (getargs): Remove duplicate code for
11403 "Try `bison --help'".
11404
11405 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11406 What was that "2" for?
11407
11408 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11409 * src/getargs.c (usage): Likewise.
11410
11411 * src/getargs.c (getargs): When there are too few operands, report
11412 the last one. When there are too many, report the first extra
11413 one. This is how diffutils does it.
11414
11415 2002-10-20 Paul Eggert <eggert@twinsun.com>
11416
11417 Remove K&R vestiges.
11418 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11419 * src/complain.c (VA_START): Remove. Assume prototypes.
11420 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11421 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11422 fatal): Assume prototypes.
11423 * src/complain.h: Assume prototypes.
11424 * src/system.h (PARAMS): Remove.
11425 Include <limits.h> unconditionally, since it's guaranteeed even
11426 for a freestanding C89 compiler.
11427 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11428 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11429
11430 2002-10-20 Akim Demaille <akim@epita.fr>
11431
11432 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11433 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11434 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11435 (yyresolveStates, yyresolveAction, yyresolveStack)
11436 (yyprocessOneStack): Use them.
11437 (yy_reduce_print): New.
11438 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11439
11440 2002-10-20 Akim Demaille <akim@epita.fr>
11441
11442 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11443 arguments and output `void'.
11444 (b4_c_function): Rename as...
11445 (b4_c_function_def): this.
11446 (b4_c_function_decl, b4_c_ansi_function_def)
11447 (b4_c_ansi_function_decl): New.
11448 Change the interpretation of the arguments: before `int, foo', now
11449 `int foo, foo'.
11450 * data/yacc.c (yyparse): Prototype and define thanks to these.
11451 Adjust b4_c_function_def uses.
11452 * data/glr.c (yyparse): Likewise, but ANSI only.
11453
11454 2002-10-20 Akim Demaille <akim@epita.fr>
11455
11456 * src/output.c (prepare): Move the definition of `tokens_number',
11457 `nterms_number', `undef_token_number', `user_token_number_max'
11458 to...
11459 (prepare_tokens): Here.
11460 (prepare_tokens): Rename as...
11461 (prepare_symbols): this.
11462 (prepare): Move the definition of `rules_number' to...
11463 (prepare_rules): here.
11464 (prepare): Move the definition of `last', `final_state_number',
11465 `states_number' to...
11466 (prepare_states): here.
11467 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11468
11469 2002-10-20 Akim Demaille <akim@epita.fr>
11470
11471 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11472
11473 2002-10-20 Akim Demaille <akim@epita.fr>
11474
11475 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11476 * data/c.m4: here.
11477
11478 2002-10-20 Akim Demaille <akim@epita.fr>
11479
11480 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11481 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11482 `pair'.
11483 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11484 `name' to...
11485 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11486 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11487 These.
11488
11489 2002-10-19 Paul Eggert <eggert@twinsun.com>
11490
11491 Do not create a temporary file, as that involves security and
11492 cleanup headaches. Instead, use a pair of pipes.
11493 Derived from a suggestion by Florian Krohm.
11494 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11495 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11496 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11497 (BISON_PREREQ_SUBPIPE): Add.
11498 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11499 Add subpipe.h, subpipe.c.
11500 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11501 * po/POTFILES.in: Add lib/subpipe.c.
11502 * src/output.c: Include "subpipe.h".
11503 (m4_invoke): Remove decl.
11504 (scan_skel): New decl.
11505 (output_skeleton): Use pipe rather than temporary file for m4 input.
11506 Check that m4sugar.m4 is readable, to avoid deadlock.
11507 Check for pipe I/O error.
11508 * src/scan-skel.l (readpipe): Remove decl.
11509 (scan_skel): New function, to be used in place of m4_invoke.
11510 Read from stream rather than file.
11511
11512 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11513 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11514 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11515 this generates a more-accurate value anyway.
11516
11517 * lib/timevar.c (timervar_accumulate): Rename locals to
11518 avoid confusion with similarly-named more-global.
11519 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11520
11521 * src/output.c (prepare): Use xstrdup to convert char const *
11522 to char *, to avoid GCC warning.
11523
11524 2002-10-19 Akim Demaille <akim@epita.fr>
11525
11526 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11527 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11528 Use them to have `calc.y' ready for %pure-parser.
11529 * data/yacc.c (YYLEX): Pass a yylex return type to
11530 b4_c_function_call.
11531
11532 2002-10-19 Akim Demaille <akim@epita.fr>
11533
11534 Prototype support of %lex-param and %parse-param.
11535
11536 * src/parse-gram.y: Add the definition of the %lex-param and
11537 %parse-param tokens, plus their rules.
11538 Drop the `_' version of %glr-parser.
11539 Add the "," token.
11540 * src/scan-gram.l (INITIAL): Scan them.
11541 * src/muscle_tab.c: Comment changes.
11542 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11543 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11544 (muscle_entry_s): The `value' member is no longer const.
11545 Adjust all dependencies.
11546 * src/muscle_tab.c (muscle_init): Adjust: use
11547 MUSCLE_INSERT_STRING.
11548 Initialize the obstack earlier.
11549 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11550 (muscle_pair_list_grow): New.
11551 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11552 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11553 * tests/calc.at: Use %locations, not --locations.
11554 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11555
11556 2002-10-19 Akim Demaille <akim@epita.fr>
11557
11558 * src/getargs.c (usage): Take status as argument and exit
11559 accordingly.
11560 Report the traditional `Try ... --help' message when status != 0.
11561 (usage, version): Don't take a FILE * as arg, it is pointless.
11562 (getargs): When there is an incorrect number of arguments, make it
11563 an error, and report it GNUlically thanks to `usage ()'.
11564
11565 2002-10-18 Paul Eggert <eggert@twinsun.com>
11566
11567 * data/glr.c (yyreportParseError): Don't assume that sprintf
11568 yields the length of the printed string, as this is not true
11569 on SunOS 4.1.4. Reported by Peter Klein.
11570
11571 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11572 * tests/conflicts.at (%nonassoc and eof): Likewise.
11573 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11574
11575 2002-10-17 Akim Demaille <akim@epita.fr>
11576
11577 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11578 * src/getargs.c (trace_types, trace_args): Adjust.
11579 * src/reader.c (grammar_current_rule_prec_set)
11580 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11581 Standardize error messages.
11582 And s/@prec/%prec/!
11583 (reader): Use trace_flag to enable scanner/parser debugging,
11584 instead of an adhoc scheme.
11585 * src/scan-gram.l: Remove trailing debugging code.
11586
11587 2002-10-16 Paul Eggert <eggert@twinsun.com>
11588
11589 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11590 MUSCLE_TAB_H.
11591
11592 * NEWS: Officially drop support for building Bison with K&R C,
11593 since it didn't work anyway and it's not worth worrying about.
11594 * Makefile.maint (wget_files): Remove ansi2knr.c.
11595 (ansi2knr.c-url_prefix): Remove.
11596 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11597 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11598 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11599
11600 2002-10-15 Paul Eggert <eggert@twinsun.com>
11601
11602 Stop using the "enum_" trick for K&R-style function definitions;
11603 it confused me, and I was the author! Instead, assume that people
11604 who want to use K&R C compilers (when using these modules in GCC,
11605 perhaps?) will run ansi2knr.
11606
11607 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11608 All uses of "enum_" changed to "enum ".
11609 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11610 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11611
11612 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11613 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11614 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11615 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11616 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11617 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11618 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11619 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11620 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11621 Use function prototypes; this removes the need for declaring
11622 static functions simply to provide their prototypes.
11623 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11624 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11625 bitset_count_, bitset_create, bitset_dump, bitset_first,
11626 bitset_free, bitset_init, bitset_last, bitset_next,
11627 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11628 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11629 bitset_print, bitset_release_memory, bitset_toggle_,
11630 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11631 debug_bitset): Likewise.
11632 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11633 * lib/bitset_stats.c (bitset_log_histogram_print,
11634 bitset_percent_histogram_print, bitset_stats_and,
11635 bitset_stats_and_cmp, bitset_stats_and_or,
11636 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11637 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11638 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11639 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11640 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11641 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11642 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11643 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11644 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11645 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11646 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11647 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11648 bitset_stats_zero): Likewise.
11649 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11650 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11651 bitsetv_dump, debug_bitsetv): Likewise.
11652 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11653 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11654 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11655 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11656 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11657 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11658 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11659 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11660 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11661 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11662 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11663 Likewise.
11664 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11665 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11666 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11667 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11668 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11669 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11670 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11671 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11672 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11673 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11674 lbitset_xor_cmp, lbitset_zero): Likewise.
11675
11676 2002-10-14 Akim Demaille <akim@epita.fr>
11677
11678 Version 1.75.
11679
11680 2002-10-14 Akim Demaille <akim@epita.fr>
11681
11682 * tests/Makefile.am (maintainer-check-posix): New.
11683
11684 2002-10-14 Akim Demaille <akim@epita.fr>
11685
11686 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11687 member.
11688
11689 2002-10-14 Akim Demaille <akim@epita.fr>
11690
11691 * src/tables.c (table_ninf_remap): base -> tab.
11692 Reported by Matt Rosing.
11693
11694 2002-10-14 Paul Eggert <eggert@twinsun.com>
11695
11696 * tests/action.at, tests/calc.at, tests/conflicts.at,
11697 tests/cxx-type.at, tests/headers.at, tests/input.at,
11698 tests/regression.at, tests/synclines.at, tests/torture.at:
11699 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11700 so that the tests still work even if POSIXLY_CORRECT is set.
11701 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11702
11703 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11704 for portability to K&R hosts. Fix typo: signed char is guaranteed
11705 only to 127, not to 128.
11706 * data/glr.c (yysigned_char): New type.
11707 * data/yacc.c (yysigned_char): Likewise.
11708 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11709
11710 2002-10-13 Paul Eggert <eggert@twinsun.com>
11711
11712 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11713 true due to limited range of data type" warning from GCC.
11714
11715 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11716 by wrapping enum yytokentype's definition inside #ifndef
11717 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11718
11719 2002-10-13 Akim Demaille <akim@epita.fr>
11720
11721 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11722 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11723
11724 2002-10-13 Akim Demaille <akim@epita.fr>
11725
11726 * Makefile.maint: Update from Autoconf 2.54.
11727 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11728
11729 2002-10-13 Akim Demaille <akim@epita.fr>
11730
11731 * src/print.c (print_state): Separate the list of solved conflicts
11732 from the other items.
11733 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11734
11735 2002-10-13 Akim Demaille <akim@epita.fr>
11736
11737 Let nondeterministic skeletons be usable with deterministic
11738 tables.
11739
11740 With the patch, GAWK compiled by GCC without -O2 passes its test
11741 suite using a GLR parser driven by LALR tables. It fails with -O2
11742 because `struct stat' gives two different answers on my machine:
11743 88 (definition of an auto var) and later 96 (memset on this var).
11744 Hence the stack is badly corrumpted. The headers inclusion is to
11745 blame: if I move the awk.h inclusion before GLR's system header
11746 inclusion, the two struct stat have the same size.
11747
11748 * src/tables.c (pack_table): Always create conflict_table.
11749 (token_actions): Always create conflict_list.
11750 * data/glr.c (YYFLAG): Remove, unused.
11751
11752 2002-10-13 Akim Demaille <akim@epita.fr>
11753
11754 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11755 (O0FLAGS): New.
11756 (VALGRIND, GXX): New.
11757 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11758 * tests/bison.in: Run $PREBISON a pre-command.
11759 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11760 (maintainer-check-g++): New.
11761 * Makefile.am (maintainer-check): New.
11762
11763 2002-10-13 Akim Demaille <akim@epita.fr>
11764
11765 * data/glr.c: Formatting changes.
11766 Tweak some trace messages to match yacc.c's.
11767
11768 2002-10-13 Akim Demaille <akim@epita.fr>
11769
11770 GLR parsers sometimes raise parse errors instead of performing the
11771 default reduction.
11772 Reported by Charles-Henry de Boysson.
11773
11774 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11775 check the length of the traces when %glr.
11776 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11777 GLR's traces.
11778 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11779 Test GLR parsers.
11780 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11781 (yyltype): Remove the yy prefix from the member names.
11782 (yytable): Complete its comment.
11783 (yygetLRActions): Map error action number from YYTABLE from
11784 YYTABLE_NINF to 0.
11785 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11786 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11787 not satisfying as we could compare an YYACTION computed from
11788 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11789 only value for error actions.
11790 (yyreportParseError): In verbose parse error messages, don't issue
11791 `error' in the list of expected tokens.
11792 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11793 next action to perform to match glr.c's decoding.
11794 (yytable): Complete its comment.
11795
11796 2002-10-13 Paul Eggert <eggert@twinsun.com>
11797
11798 Fix problem reported by Henrik Grubbstroem in
11799 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11800 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11801 because the Bison parser reads the second action before reducing
11802 the first one.
11803 * src/scan-gram.l (rule_length): New static var.
11804 Use it to keep track of the rule length in the scanner, since
11805 we can't expect the parser to be in lock-step sync with the scanner.
11806 (handle_action_dollar, handle_action_at): Use this var.
11807 * tests/actions.at (Exotic Dollars): Test for the problem.
11808
11809 2002-10-12 Paul Eggert <eggert@twinsun.com>
11810
11811 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11812 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11813 Include <sys/time.h> when checking for clock_t and struct tms.
11814 Use same include order as source.
11815 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11816 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11817
11818 * lib/timevar.c: Update copyright date and clarify comments.
11819 (get_time) [IN_GCC]: Keep the GCC version for reference.
11820
11821 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11822 GCC version as of today, then merge Bison's changes.
11823 Change "GCC" to "Bison" in copyright notice. timevar.def's
11824 author is Akim, so change that too.
11825
11826 * src/reader.c (grammar_current_rule_check):
11827 Don't worry about the default action if $$ is untyped.
11828 Prevents bogus warnings reported by Jim Gifford in
11829 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11830
11831 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11832 * data/glr.c, data/lalr1.cc, data/yacc.c:
11833 Output token definitions before the first part of user declarations.
11834 Fixes compatibility problem reported by Jim Gifford for kbd in
11835 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11836
11837 2002-10-11 Paul Eggert <eggert@twinsun.com>
11838
11839 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11840 (yyparse): here. This undoes some of the 2002-07-25 change.
11841 Compatibility problem reported by Ralf S. Engelschall with
11842 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11843
11844 2002-10-11 Akim Demaille <akim@epita.fr>
11845
11846 * tests/regression.at Characters Escapes): New.
11847 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11848 characters.
11849 Reported by Jan Nieuwenhuizen.
11850
11851 2002-10-11 Akim Demaille <akim@epita.fr>
11852
11853 * po/id.po: New.
11854
11855 2002-10-10 Paul Eggert <eggert@twinsun.com>
11856
11857 Portability fixes for bitsets; this also avoids several GCC
11858 warnings.
11859
11860 * lib/abitset.c: Include <stddef.h>, for offsetof.
11861 * lib/lbitset.c: Likewise.
11862
11863 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11864 properly for vectors of objects. Do not assume that adding a
11865 header size to a multiple of a word size yields a value that is
11866 properly aligned for the whole union.
11867 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11868
11869 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11870 unique names for structures.
11871 * lib/ebitset.c (ebitset_bytes): Likewise.
11872 * lib/lbitset.c (lbitset_bytes): Likewise.
11873
11874 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11875 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11876 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11877 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11878 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11879 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11880 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11881 to improve the type-checking that GCC can do.
11882 * lib/bitset.c (bitset_op4_cmp): Likewise.
11883 * lib/bitset_stats.c (bitset_stats_count,
11884 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11885 bitset_stats_copy, bitset_stats_disjoint_p,
11886 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11887 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11888 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11889 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11890 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11891 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11892 bitset_stats_or_and_cmp): Likewise.
11893 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11894 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11895 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11896 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11897
11898 * lib/abitset.h: Include bitset.h, not bbitset.h.
11899 * lib/ebitset.h: Likewise.
11900 * lib/lbitset.h: Likewise.
11901
11902 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11903 All instances of parameters of type enum bitset_opts are now of
11904 type enum_bitset_opts, to conform to the C Standard, and similarly
11905 for enum_bitset_type.
11906 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11907 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11908
11909 Do not use "struct bitset_struct" to mean different things in
11910 different modules. Not only is this confusing, it violates
11911 the C Standard, which requires that structure types in different
11912 modules must be compatible if one is to be passed to the other.
11913 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11914 All instances of "struct bitset_struct *" replaced with "bitset".
11915 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
11916 (union bitset_union, struct abitset_struct, struct ebitset_struct,
11917 struct lbitset_struct, struct bitset_stats_struct): New types.
11918 All uses of struct bitset_struct changed to union bitset_union,
11919 etc.
11920 * lib/abitset.c (struct abitset_struct, abitset,
11921 struct bitset_struct): Remove.
11922 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
11923 struct bitset_struct): Remove.
11924 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
11925 bitset_struct): Remove.
11926 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
11927 Likewise.
11928
11929 Do not call a function of type T using a call that assumes the
11930 function is of a different type U. Standard C requires that a
11931 function must be called with a type that is compatible with its
11932 definition.
11933 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11934 New decls.
11935 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
11936 New functions.
11937 * lib/ebitset.c (PFV): Remove.
11938 * lib/lbitset.c (PFV): Likewise.
11939 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
11940 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
11941 decls.
11942 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
11943 (ebitset_vtable): Use them.
11944 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
11945 lbitset_xor): New functions.
11946 (lbitset_vtable): Use them.
11947
11948 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
11949 Declare.
11950
11951 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
11952 GCC warning.
11953 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
11954 Use offsetof, for simplicity.
11955
11956 2002-10-06 Paul Eggert <eggert@twinsun.com>
11957
11958 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
11959 the same width as int. This reapplies a hunk of the 2002-08-12 patch
11960 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
11961 which was inadvertently undone by the 2002-09-30 patch.
11962 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
11963 the same width as int.
11964
11965 2002-10-04 Paul Eggert <eggert@twinsun.com>
11966
11967 Version 1.50.
11968
11969 * configure.ac (AC_INIT), NEWS: Increment version number.
11970
11971 * doc/bison.texinfo: Minor spelling, grammar, and white space
11972 fixes.
11973 (Symbols): Mention that any negative value returned from yylex
11974 signifies end-of-input. Warn about negative chars. Mention
11975 the portable Standard C character set.
11976
11977 The GNU coding standard says CFLAGS and YFLAGS are reserved
11978 for the installer to set.
11979 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
11980 * src/Makefile.am (AM_CFLAGS): Likewise.
11981 (AM_YFLAGS): Renamed from YFLAGS.
11982
11983 Fix some MAX and MIN problems.
11984 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
11985 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
11986 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
11987 * src/reader.c (reader): Use it.
11988
11989 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
11990 POSIX 1003.1-2001 has removed fgrep.
11991
11992 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
11993
11994 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
11995 interpreted as signed.
11996 * lib/ebitset.c (ebitset_list): Fix bug.
11997
11998 2002-10-01 Paul Eggert <eggert@twinsun.com>
11999
12000 More fixes for 64-bit hosts and large bitsets.
12001
12002 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12003 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12004 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12005 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12006 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12007 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12008 bitset_count_): Likewise.
12009 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12010 bitset_first, bitset_last): Likewise.
12011 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12012 bitset_stats_list_reverse, bitset_stats_size,
12013 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12014 Likewise.
12015 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12016 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12017 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12018 bitsetv_reflexive_transitive_closure): Likewise.
12019 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12020 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12021 Likewise.
12022 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12023 Likewise.
12024
12025 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12026 Use size_t, not unsigned int, to count bytes.
12027 * lib/abitset.h (abitset_bytes): Likewise.
12028 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12029 Likewise.
12030 * lib/bitset.h (bitset_bytes): Likewise.
12031 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12032 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12033 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12034 * lib/ebitset.c (ebitset_bytes): Likewise.
12035 * lib/ebitset.h (ebitset_bytes): Likewise.
12036 * lib/lbitset.c (lbitset_bytes): Likewise.
12037 * lib/lbitset.h (lbitset_bytes): Likewise.
12038
12039 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12040 abitset_subset_p, abitset_disjoint_p, abitset_and,
12041 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12042 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12043 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12044 abitset_or_and, abitset_or_and_cmp):
12045 Use bitset_windex instead of unsigned int.
12046 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12047 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12048 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12049 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12050 Likewise.
12051 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
12052
12053 * lib/bitset.c (bitset_print):
12054 Use proper printf formats for widths of integer types.
12055 * lib/bitset_stats.c (bitset_percent_histogram_print,
12056 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12057 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12058 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12059 * lib/lbitset.c (lbitset_bytes): Likewise.
12060
12061 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12062 BITSET_SIZE_MAX): New macros.
12063 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12064 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12065 to BITSET_WINDEX_MAX.
12066
12067 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12068 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12069 since we now return the bitset_bindex type (not int).
12070
12071 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12072 when computing sizes.
12073 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12074
12075 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12076 and avoid cast to unsigned.
12077
12078 2002-09-30 Akim Demaille <akim@epita.fr>
12079
12080 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12081 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12082 Updates from Michael Hayes.
12083
12084 2002-09-30 Art Haas <ahaas@neosoft.com>
12085
12086 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12087 invocations.
12088 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12089 defined.
12090
12091 2002-09-27 Akim Demaille <akim@epita.fr>
12092
12093 Version 1.49c.
12094
12095 2002-09-27 Akim Demaille <akim@epita.fr>
12096
12097 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12098 (Because of AC_LIBSOURCE).
12099
12100 2002-09-27 Akim Demaille <akim@epita.fr>
12101
12102 Playing with Autoscan.
12103
12104 * configure.ac: Remove the old LIBOBJ tweaks.
12105 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12106 * lib/strrchr.c: New.
12107 * lib/strtol.c: New, from the Coreutils 4.5.1.
12108
12109 2002-09-27 Akim Demaille <akim@epita.fr>
12110
12111 Playing with Autoscan.
12112
12113 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12114 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12115 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12116 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12117 Coreutils 4.5.1.
12118
12119 2002-09-24 Akim Demaille <akim@epita.fr>
12120
12121 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12122 (Frequently Asked Questions, Parser Stack Overflow): New.
12123
12124 2002-09-13 Akim Demaille <akim@epita.fr>
12125
12126 Playing with autoscan.
12127
12128 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12129 * src/files.c (skeleton_find): Remove, unused.
12130 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12131 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12132
12133 2002-09-13 Akim Demaille <akim@epita.fr>
12134
12135 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12136 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12137
12138 2002-09-13 Akim Demaille <akim@epita.fr>
12139
12140 * configure.ac: Require 2.54.
12141 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12142 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12143 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12144 Remove, provided by Autoconf macros.
12145
12146 2002-09-12 Akim Demaille <akim@epita.fr>
12147
12148 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12149
12150 2002-09-12 Akim Demaille <akim@epita.fr>
12151
12152 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12153 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12154 Reported by Martin Mokrejs.
12155
12156 2002-09-10 Akim Demaille <akim@epita.fr>
12157
12158 * src/parse-gram.y: Associate a human readable string to each
12159 token type.
12160 * tests/regression.at (Invalid inputs): Adjust.
12161
12162 2002-09-10 Gary V. Vaughan <gary@gnu.org>
12163
12164 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12165 with an Autoconf-2.5x style configure.ac.
12166
12167 2002-09-06 Paul Eggert <eggert@twinsun.com>
12168
12169 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12170 exception applies only to yacc.c. This is a modification of a
12171 patch originally suggested by Akim Demaille.
12172
12173 2002-09-06 Akim Demaille <akim@epita.fr>
12174
12175 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12176 here to...
12177 * data/yacc.c: here.
12178
12179 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12180 LocationType.
12181 (b4_ltype): Default to yy::Location from location.hh.
12182
12183 2002-09-04 Jim Meyering <jim@meyering.net>
12184
12185 * data/yacc.c: Guard the declaration of yytoknum also with
12186 `#ifdef YYPRINT', so it is declared only when used.
12187
12188 2002-09-04 Akim Demaille <akim@epita.fr>
12189
12190 * configure.in: Rename as...
12191 * configure.ac: this.
12192 Bump to 1.49c.
12193
12194 2002-09-04 Akim Demaille <akim@epita.fr>
12195
12196 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12197 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12198 translate maintainer only messages.
12199
12200 2002-08-12 Paul Eggert <eggert@twinsun.com>
12201
12202 Version 1.49b.
12203
12204 * Makefile.am (SUBDIRS): Remove intl.
12205 (DISTCLEANFILES): Remove.
12206 * NEWS: Mention that GNU M4 is now required. Clarify what is
12207 meant by "larger grammars". Mention the pt_BR translation.
12208 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12209 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12210 Bump version from 0.11.2 to 0.11.5.
12211 (BISON_PREREQ_STAGE): Remove.
12212 (AM_GNU_GETTEXT): Use external gettext.
12213 (AC_OUTPUT): Remove intl/Makefile.
12214
12215 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12216
12217 * data/glr.c: Include string.h, for strlen.
12218 (yyreportParseError): Use size_t for yysize.
12219 (yy_yypstack): No longer nested inside yypstates, as nested
12220 functions are not portable. Do not assume size_t is the
12221 same width as int.
12222 (yypstates): Do not assume that ptrdiff_t is the same width
12223 as int, and similarly for yyposn and YYINDEX.
12224
12225 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12226
12227 * lib/Makefile.am (INCLUDES): Do not include from the intl
12228 directory, which has been removed.
12229 * src/Makefile.am (INCLUDES): Likewise.
12230
12231 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12232 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12233 New vars.
12234
12235 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12236 * tests/Makefile.am (EXTRA_DIST): Likewise.
12237
12238 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12239 Do not assume that bitset_windex is the same width as unsigned.
12240
12241 * lib/abitset.c (abitset_unused_clear): Do not assume that
12242 bitset_word is the same width as int.
12243 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12244 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12245 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12246 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12247 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12248
12249 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12250 portability to one's complement hosts!).
12251 * lib/ebitset.c (ebitset_op1): Likewise.
12252 * lib/lbitset.c (lbitset_op1): Likewise.
12253
12254 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12255 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12256 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12257 Sync with fileutils.
12258 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12259 lib/gettext.h: Sync with diffutils.
12260
12261 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12262 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12263
12264 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12265 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12266 check for void *.
12267
12268 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12269 size_t; the old version tried to do this but casted improperly.
12270 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12271 (bitset_test): Now returns int, not unsigned long.
12272
12273 * lib/bitset_stats.c: Include "gettext.h".
12274 (_): New macro.
12275 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12276 name locals "index", as it generates unnecessary warnings on some
12277 hosts that have an "index" function.
12278
12279 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12280 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12281 they need translation.
12282 * src/LR0.c (state_list_append, new_itemsets, get_state,
12283 append_states, generate_states): Likewise.
12284 * src/assoc.c (assoc_to_string): Likewise.
12285 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12286 * src/gram.c (grammar_dump): Likewise.
12287 * src/injections.c (injections_compute): Likewise.
12288 * src/lalr.c (lookaheads_print): Likewise.
12289 * src/relation.c (relation_transpose): Likewise.
12290 * src/scan-gram.l: Likewise.
12291 * src/tables.c (table_grow, pack_vector): Likewise.
12292
12293 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12294 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12295 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12296 * m4/mbstate_t.m4: Sync with fileutils.
12297 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12298
12299 * po/LINGUAS: Add pt_BR.
12300 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12301 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12302 lib/timevar.c.
12303 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12304 manual recommends.
12305 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12306
12307 * src/complain.c (strerror_r): Remove decl; not needed.
12308 (strerror): Use same pattern as ../lib/error.c.
12309
12310 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12311
12312 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12313
12314 * src/main.c (main): Cast result of bindtextdomain and textdomain
12315 to void, to avoid a GCC warning when --disable-nls is in effect.
12316
12317 * src/scan-gram.l: Use strings rather than escapes when possible,
12318 to minimize the number of warnings from xgettext.
12319 (handle_action_dollar, handle_action_at): Don't use isdigit,
12320 as it mishandles negative chars and it may not work as expected
12321 outside the C locale.
12322
12323 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12324 this is a GCC extension and is not portable to other compilers.
12325
12326 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12327 Do not include <ctype.h>; no longer needed.
12328 Do not include <malloc.h>; no longer needed (and generates
12329 warnings on OpenBSD 3.0).
12330
12331 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12332 it's not portable.
12333
12334 * tests/regression.at: Do not use 'cc -c input.c -o input';
12335 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12336
12337 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12338 exit status as failure, not just exit status 1. Sun C exits
12339 with status 2 sometimes.
12340
12341 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12342 Use it for the two large tests.
12343
12344 2002-08-02 Akim Demaille <akim@epita.fr>
12345
12346 * src/conflicts.c (conflicts_output): Don't output rules never
12347 reduced here, since anyway that computation doesn't work.
12348 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12349 (rule_useless_p, rule_never_reduced_p): New.
12350 (grammar_rules_partial_print): Use a filter instead of a range.
12351 Display the title only if needed.
12352 (grammar_rules_print): Adjust.
12353 (grammar_rules_never_reduced_report): New.
12354 * src/tables.c (action_row): Move the computation of rules never
12355 reduced to...
12356 (token_actions): here.
12357 * src/main.c (main): Make the parser before making the report, so
12358 that rules never reduced are computed.
12359 Call grammar_rules_never_reduced_report.
12360 * src/print.c (print_results): Report rules never reduced.
12361 * tests/conflicts.at, tests/reduce.at: Adjust.
12362
12363 2002-08-01 Akim Demaille <akim@epita.fr>
12364
12365 Instead of attaching lookaheads and duplicating the rules being
12366 reduced by a state, attach the lookaheads to the reductions.
12367
12368 * src/state.h (state_t): Remove the `lookaheads',
12369 `lookaheads_rule' member.
12370 (reductions_t): Add a `lookaheads' member.
12371 Use a regular array for the `rules'.
12372 * src/state.c (reductions_new): Initialize the lookaheads member
12373 to 0.
12374 (state_rule_lookaheads_print): Adjust.
12375 * src/state.h, src/state.c (state_reductions_find): New.
12376 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12377 (count_rr_conflicts): Adjust.
12378 * src/lalr.c (LArule): Remove.
12379 (add_lookback_edge): Adjust.
12380 (state_lookaheads_count): New.
12381 (states_lookaheads_initialize): Merge into...
12382 (initialize_LA): this.
12383 (lalr_free): Adjust.
12384 * src/main.c (main): Don't free nullable and derives too early: it
12385 is used by --verbose.
12386 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12387
12388 2002-08-01 Akim Demaille <akim@epita.fr>
12389
12390 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12391 `rule_number_t**'.
12392 (set_derives, free_derives): Rename as...
12393 (derives_compute, derives_free): this.
12394 Adjust all dependencies.
12395 * src/nullable.c (set_nullable, free_nullable): Rename as...
12396 (nullable_compute, nullable_free): these.
12397 (rule_list_t): Store rule_t *, not rule_number_t.
12398 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12399 pointers, instead of their numbers.
12400 * src/main.c (main): Call nullable_free, and derives_free earlier,
12401 as they were lo longer used.
12402
12403 2002-08-01 Akim Demaille <akim@epita.fr>
12404
12405 * lib/timevar.c (get_time): Include children time.
12406 * src/lalr.h (LA, LArule): Don't export them: used with the
12407 state_t.
12408 * src/lalr.c (LA, LArule): Static.
12409 * src/lalr.h, src/lalr.c (lalr_free): New.
12410 * src/main.c (main): Call it.
12411 * src/tables.c (pack_vector): Check whether loc is >= to the
12412 table_size, not >.
12413 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12414 (tables_generate): do it, since that's also it which allocates
12415 them.
12416 Don't free LA and LArule, main does.
12417
12418 2002-07-31 Akim Demaille <akim@epita.fr>
12419
12420 Separate parser tables computation and output.
12421
12422 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12423 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12424 (yydefgoto, yydefact, high): Move to...
12425 * src/tables.h, src/tables.c: here.
12426 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12427 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12428 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12429 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12430 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12431 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12432 (action_row, save_row, token_actions, save_column, default_goto)
12433 (goto_actions, sort_actions, matching_state, pack_vector)
12434 (table_ninf_remap, pack_table, prepare_actions): Move to...
12435 * src/tables.c: here.
12436 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12437 * src/output.c (token_actions, output_base, output_conflicts)
12438 (output_check): Merge into...
12439 (prepare_actions): this.
12440 (actions_output): Rename as...
12441 (user_actions_output): this.
12442 * src/main.c (main): Call tables_generate and tables_free.
12443
12444 2002-07-31 Akim Demaille <akim@epita.fr>
12445
12446 Steal GCC's --time-report support.
12447
12448 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12449 stolen/adjusted from GCC.
12450 * m4/stage.m4: Remove time related checks.
12451 * m4/timevar.m4: New.
12452 * configure.in: Adjust.
12453 * src/system.h: Adjust to using timevar.h.
12454 * src/getargs.h, src/getargs.c: Support trace_time for
12455 --trace=time.
12456 * src/main.c (stage): Remove.
12457 (main): Replace `stage' invocations with timevar calls.
12458 * src/output.c: Insert pertinent timevar calls.
12459
12460 2002-07-31 Akim Demaille <akim@epita.fr>
12461
12462 Let --trace have arguments.
12463
12464 * src/getargs.h (enum trace_e): New.
12465 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12466 (long_options, short_options): --trace/-T takes an optional
12467 argument.
12468 Change all the uses of trace_flag to reflect the new flags.
12469 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12470
12471 Strengthen `stage' portability.
12472
12473 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12474 * configure.in: Use it.
12475 Don't check for malloc.h and sys/times.h.
12476 * src/system.h: Include them when appropriate.
12477 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12478 times and struct tms are available.
12479
12480 2002-07-30 Akim Demaille <akim@epita.fr>
12481
12482 In verbose parse error message, don't report `error' as an
12483 expected token.
12484 * tests/actions.at (Printers and Destructors): Adjust.
12485 * tests/calc.at (Calculator $1): Adjust.
12486 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12487 error message, do not report the parser accepts the error token in
12488 that state.
12489
12490 2002-07-30 Akim Demaille <akim@epita.fr>
12491
12492 Normalize conflict related messages.
12493
12494 * src/complain.h, src/complain.c (warn, complain): New.
12495 * src/conflicts.c (conflicts_print): Use them.
12496 (conflict_report_yacc): New, extracted from...
12497 (conflicts_print): here.
12498 * tests/conflicts.at, tests/existing.at: Adjust.
12499
12500 2002-07-30 Akim Demaille <akim@epita.fr>
12501
12502 Report rules which are never reduced by the parser: those hidden
12503 by conflicts.
12504
12505 * src/LR0.c (save_reductions): Don't make the final state too
12506 different: save its reduction (accept) instead of having a state
12507 without any action (no shift or goto, no reduce).
12508 Note: the final state is now a ``regular'' state, i.e., the
12509 parsers now contain `reduce 0' as default reduction.
12510 Nevertheless, since they decide to `accept' when yystate =
12511 final_state, they still will not reduce rule 0.
12512 * src/print.c (print_actions, print_reduction): Adjust.
12513 * src/output.c (action_row): Track reduced rules.
12514 (token_actions): Report rules never reduced.
12515 * tests/conflicts.at, tests/regression.at: Adjust.
12516
12517 2002-07-30 Akim Demaille <akim@epita.fr>
12518
12519 `stage' was accidently included in a previous patch.
12520 Initiate its autoconfiscation.
12521
12522 * configure.in: Look for malloc.h and sys/times.h.
12523 * src/main.c (stage): Adjust.
12524 Report only when trace_flag.
12525
12526 2002-07-29 Akim Demaille <akim@epita.fr>
12527
12528 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12529 state_number_t.
12530 (errs_t): symbol_t*, not symbol_number_t.
12531 (reductions_t): rule_t*, not rule_number_t.
12532 (FOR_EACH_SHIFT): New.
12533 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12534 * src/print.c, src/print_graph.c: Adjust.
12535
12536 2002-07-29 Akim Demaille <akim@epita.fr>
12537
12538 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12539
12540 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12541 (endtoken, accept): these.
12542 * src/reader.c (reader): Set endtoken's default tag to "$end".
12543 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12544 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12545 Adjust.
12546
12547 2002-07-29 Akim Demaille <akim@epita.fr>
12548
12549 * src/reduce.c (reduce_grammar): When the language is empty,
12550 complain about the start symbol, not the axiom.
12551 Use its location.
12552 * tests/reduce.at (Empty Language): New.
12553
12554 2002-07-26 Akim Demaille <akim@epita.fr>
12555
12556 * src/reader.h, src/reader.c (gram_error): ... can't get
12557 yycontrol without making too strong assumptions on the parser
12558 itself.
12559 * src/output.c (prepare_tokens): Use the real 0th value of
12560 token_translations instead of `0'.
12561 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12562 visible here.
12563 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12564 for the time being: %locations ought to provide it to yyerror.
12565
12566 2002-07-25 Akim Demaille <akim@epita.fr>
12567
12568 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12569 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12570 * tests/regression.at (Web2c Actions): Adjust.
12571
12572 2002-07-25 Akim Demaille <akim@epita.fr>
12573
12574 Stop storing rules from 1 to nrules + 1.
12575
12576 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12577 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12578 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12579 Iterate from 0 to nrules.
12580 Use rule_number_as_item_number and item_number_as_rule_number.
12581 Adjust to `derive' now containing possibly 0.
12582 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12583 Handle the `- 1' part in rule numbers from/to item numbers.
12584 * src/conflicts.c (log_resolution): Fix the message which reversed
12585 shift and reduce.
12586 * src/output.c (action_row): Initialize default_rule to -1.
12587 (token_actions): Adjust.
12588 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12589 expected output.
12590 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12591
12592 2002-07-25 Akim Demaille <akim@epita.fr>
12593
12594 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12595 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12596 (b4_c_knr_arg_decl): New.
12597 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12598 yyreport_parse_error.
12599
12600 2002-07-25 Akim Demaille <akim@epita.fr>
12601
12602 * data/yacc.c (yyreport_parse_error): New, extracted from...
12603 (yyparse): here.
12604 (yydestruct, yysymprint): Move above yyparse.
12605 Be K&R compliant.
12606
12607 2002-07-25 Akim Demaille <akim@epita.fr>
12608
12609 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12610 replace...
12611 (b4_sint_type, b4_uint_type): these.
12612 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12613 * tests/regression.at (Web2c Actions): Adjust.
12614
12615 2002-07-25 Akim Demaille <akim@epita.fr>
12616
12617 * src/gram.h (TIEM_NUMBER_MAX): New.
12618 (item_number_of_rule_number, rule_number_of_item_number): Rename
12619 as...
12620 (rule_number_as_item_number, item_number_as_rule_number): these.
12621 Adjust dependencies.
12622 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12623 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12624 (symbol_number_to_vector_number): New.
12625 (order): Of vector_number_t* type.
12626 (base_t, BASE_MAX, BASE_MIN): New.
12627 (froms, tos, width, pos, check): Of base_t type.
12628 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12629 (actrow): Of action_number_t type.
12630 (conflrow): Of unsigned int type.
12631 (table_ninf, base_ninf): New.
12632 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12633 (muscle_insert_int_table, muscle_insert_base_table)
12634 (muscle_insert_rule_number_table): New.
12635 (prepare_tokens): Output `toknum' as int_table.
12636 (action_row): Returns a rule_number_t.
12637 Use ACTION_MIN, not SHRT_MIN.
12638 (token_actions): yydefact is rule_number_t*.
12639 (table_ninf_remap): New.
12640 (pack_table): Use it for `base' and `table'.
12641 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12642 replaced with...
12643 (YYPACT_NINF, YYTABLE_NINF): these.
12644 (yypact, yytable): Compute their types instead of hard-coded
12645 `short'.
12646 * tests/regression.at (Web2c Actions): Adjust.
12647
12648 2002-07-19 Akim Demaille <akim@epita.fr>
12649
12650 * src/scan-gram.l (id): Can start with an underscore.
12651
12652 2002-07-16 Akim Demaille <akim@epita.fr>
12653
12654 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12655 Adjust all former `associativity' dependencies.
12656 * src/symtab.c (symbol_new): Default associativity is `undef', not
12657 `right'.
12658 (symbol_check_alias_consistence): Adjust.
12659
12660 2002-07-09 Akim Demaille <akim@epita.fr>
12661
12662 * doc/bison.texinfo: Properly set the ``header'' part.
12663 Use @dircategory ``GNU programming tools'' as per Texinfo's
12664 documentation.
12665 Use @copying.
12666
12667 2002-07-09 Akim Demaille <akim@epita.fr>
12668
12669 * lib/quotearg.h: Protect against multiple inclusions.
12670 * src/location.h (location_t): Add a `file' member.
12671 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12672 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12673 `error_one_per_line' support.
12674
12675 2002-07-09 Akim Demaille <akim@epita.fr>
12676
12677 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12678 * src/reader.c (lineno): Remove.
12679 Adjust all dependencies.
12680 (get_merge_function): Take a location and use complain_at.
12681 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12682 * tests/regression.at (Invalid inputs, Mixing %token styles):
12683 Adjust.
12684
12685 2002-07-09 Akim Demaille <akim@epita.fr>
12686
12687 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12688 recovery rule, and forbid extensions when --yacc.
12689 (gram_error): Use complain_at.
12690 * src/reader.c (reader): Exit if there were parse errors.
12691
12692 2002-07-09 Akim Demaille <akim@epita.fr>
12693
12694 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12695 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12696 Reported by R Blake <blakers@mac.com>.
12697
12698 2002-07-09 Akim Demaille <akim@epita.fr>
12699
12700 * data/yacc.c: Output the copyright notive in the header.
12701
12702 2002-07-03 Akim Demaille <akim@epita.fr>
12703
12704 * src/output.c (froms, tos): Are state_number_t.
12705 (save_column): sp, sp1, and sp2 are state_number_t.
12706 (prepare): Rename `final' as `final_state_number', `nnts' as
12707 `nterms_number', `nrules' as `rules_number', `nstates' as
12708 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12709 unused.
12710 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12711 * data/lalr1.cc (nsym_): Remove, unused.
12712
12713 2002-07-03 Akim Demaille <akim@epita.fr>
12714
12715 * src/lalr.h, src/lalr.c (goto_number_t): New.
12716 * src/lalr.c (goto_list_t): New.
12717 Propagate them.
12718 * src/nullable.c (rule_list_t): New.
12719 Propagate.
12720 * src/types.h: Remove.
12721
12722 2002-07-03 Akim Demaille <akim@epita.fr>
12723
12724 * src/closure.c (print_fderives): Use rule_rhs_print.
12725 * src/derives.c (print_derives): Use rule_rhs_print.
12726 (rule_list_t): New, replaces `shorts'.
12727 (set_derives): Add comments.
12728 * tests/sets.at (Nullable, Firsts): Adjust.
12729
12730 2002-07-03 Akim Demaille <akim@epita.fr>
12731
12732 * src/output.c (prepare_actions): Free `tally' and `width'.
12733 (prepare_actions): Allocate and free `order'.
12734 * src/symtab.c (symbols_free): Free `symbols'.
12735 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12736 * src/output.c (m4_invoke): Move to...
12737 * src/scan-skel.l: here.
12738 (<<EOF>>): Close yyout, and free its name.
12739
12740 2002-07-03 Akim Demaille <akim@epita.fr>
12741
12742 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12743
12744 * src/LR0.c (new_state): Merge into...
12745 (state_list_append): this.
12746 (new_states): Merge into...
12747 (generate_states): here.
12748 (set_states): Don't ensure a proper `errs' state member here, do it...
12749 * src/conflicts.c (conflicts_solve): here.
12750 * src/state.h, src/state.c: Comment changes.
12751 (state_t): Rename member `shifts' as `transitions'.
12752 Adjust all dependencies.
12753 (errs_new): For consistency, also take the values as argument.
12754 (errs_dup): Remove.
12755 (state_errs_set): New.
12756 (state_reductions_set, state_transitions_set): Assert that no
12757 previous value was assigned.
12758 (state_free): New.
12759 (states_free): Use it.
12760 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12761 temporary storage: use `errs' and `nerrs' as elsewhere.
12762 (set_conflicts): Allocate and free this `errs'.
12763
12764 2002-07-02 Akim Demaille <akim@epita.fr>
12765
12766 * lib/libiberty.h: New.
12767 * lib: Update the bitset implementation from upstream.
12768 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12769 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12770 * src/main.c: Adjust bitset stats calls.
12771
12772 2002-07-01 Paul Eggert <eggert@twinsun.com>
12773
12774 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12775 char, so that negative chars don't collide with $.
12776
12777 2002-06-30 Akim Demaille <akim@epita.fr>
12778
12779 Have the GLR tests be `warning' checked, and fix the warnings.
12780
12781 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12782 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12783 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12784 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12785 (yyaddDeferredAction): static.
12786 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12787 (yyreportParseError): yyprefix is const.
12788 yytokenp is used only when verbose.
12789 (yy__GNUC__): Replace with __GNUC__.
12790 (yypdumpstack): yyi is size_t.
12791 (yypreference): Un-yy local variables and arguments, to avoid
12792 clashes with `yyr1'. Anyway, we are not in the user name space.
12793 (yytname_size): be an int, as is compared with ints.
12794 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12795 Use them.
12796 * tests/cxx-gram.at: Use quotation to protect $1.
12797 Use AT_COMPILE to enable warnings hunts.
12798 Prototype yylex and yyerror.
12799 `Use' argc.
12800 Include `string.h', not `strings.h'.
12801 Produce and prototype stmtMerge only when used.
12802 yylex takes a location.
12803
12804 2002-06-30 Akim Demaille <akim@epita.fr>
12805
12806 We spend a lot of time in quotearg, in particular when --verbose.
12807
12808 * src/symtab.c (symbol_get): Store a quoted version of the key.
12809 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12810 Adjust all callers.
12811
12812 2002-06-30 Akim Demaille <akim@epita.fr>
12813
12814 * src/state.h (reductions_t): Rename member `nreds' as num.
12815 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12816 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12817
12818 2002-06-30 Akim Demaille <akim@epita.fr>
12819
12820 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12821 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12822 (shifts_to): Rename as...
12823 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12824 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12825 (TRANSITION_IS_DISABLED, transitions_to): these.
12826
12827 2002-06-30 Akim Demaille <akim@epita.fr>
12828
12829 * src/print.c (print_shifts, print_gotos): Merge into...
12830 (print_transitions): this.
12831 (print_transitions, print_errs, print_reductions): Align the
12832 lookaheads columns.
12833 (print_core, print_transitions, print_errs, print_state,
12834 print_grammar): Output empty lines separator before, not after.
12835 (state_default_rule_compute): Rename as...
12836 (state_default_rule): this.
12837 * tests/conflicts.at (Defaulted Conflicted Reduction),
12838 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12839 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12840
12841 2002-06-30 Akim Demaille <akim@epita.fr>
12842
12843 Display items as we display rules.
12844
12845 * src/gram.h, src/gram.c (rule_lhs_print): New.
12846 * src/gram.c (grammar_rules_partial_print): Use it.
12847 * src/print.c (print_core): Likewise.
12848 * tests/conflicts.at (Defaulted Conflicted Reduction),
12849 (Unresolved SR Conflicts): Adjust.
12850 (Unresolved SR Conflicts): Adjust and rename as...
12851 (Resolved SR Conflicts): this, as was meant.
12852 * tests/regression.at (Web2c Report): Adjust.
12853
12854 2002-06-30 Akim Demaille <akim@epita.fr>
12855
12856 * src/print.c (state_default_rule_compute): New, extracted from...
12857 (print_reductions): here.
12858 Pessimize, but clarify the code.
12859 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12860
12861 2002-06-30 Akim Demaille <akim@epita.fr>
12862
12863 * src/output.c (action_row): Let default_rule be always a rule
12864 number.
12865
12866 2002-06-30 Akim Demaille <akim@epita.fr>
12867
12868 * src/closure.c (print_firsts, print_fderives, closure):
12869 Use BITSET_EXECUTE.
12870 * src/lalr.c (lookaheads_print): Likewise.
12871 * src/state.c (state_rule_lookaheads_print): Likewise.
12872 * src/print_graph.c (print_core): Likewise.
12873 * src/print.c (print_reductions): Likewise.
12874 * src/output.c (action_row): Likewise.
12875 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12876
12877 2002-06-30 Akim Demaille <akim@epita.fr>
12878
12879 * src/print_graph.c: Use report_flag.
12880
12881 2002-06-30 Akim Demaille <akim@epita.fr>
12882
12883 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12884 to...
12885 * src/relation.h, src/relation.c (traverse, relation_digraph)
12886 (relation_print, relation_transpose): New.
12887
12888 2002-06-30 Akim Demaille <akim@epita.fr>
12889
12890 * src/state.h, src/state.c (shifts_to): New.
12891 * src/lalr.c (build_relations): Use it.
12892
12893 2002-06-30 Akim Demaille <akim@epita.fr>
12894
12895 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12896 (item_number_of_rule_number, rule_number_of_item_number): New.
12897 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12898 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12899 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12900 Propagate their use.
12901 Much remains to be done, in particular wrt `shorts' from types.h.
12902
12903 2002-06-30 Akim Demaille <akim@epita.fr>
12904
12905 * src/symtab.c (symbol_new): Initialize the `printer' member.
12906
12907 2002-06-30 Akim Demaille <akim@epita.fr>
12908
12909 * src/LR0.c (save_reductions): Remove, replaced by...
12910 * src/state.h, src/state.c (state_reductions_set): New.
12911 (reductions, errs): Rename as...
12912 (reductions_t, errs_t): these.
12913 Adjust all dependencies.
12914
12915 2002-06-30 Akim Demaille <akim@epita.fr>
12916
12917 * src/LR0.c (state_list_t, state_list_append): New.
12918 (first_state, last_state): Now symbol_list_t.
12919 (this_state): Remove.
12920 (new_itemsets, append_states, save_reductions): Take a state_t as
12921 argument.
12922 (set_states, generate_states): Adjust.
12923 (save_shifts): Remove, replaced by...
12924 * src/state.h, src/state.c (state_shifts_set): New.
12925 (shifts): Rename as...
12926 (shifts_t): this.
12927 Adjust all dependencies.
12928 * src/state.h (state_t): Remove the `next' member.
12929
12930 2002-06-30 Akim Demaille <akim@epita.fr>
12931
12932 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
12933 escaped in slot 0.
12934
12935 2002-06-30 Akim Demaille <akim@epita.fr>
12936
12937 Use hash.h for the state hash table.
12938
12939 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
12940 (allocate_storage): Use state_hash_new.
12941 (free_storage): Use state_hash_free.
12942 (new_state, get_state): Adjust.
12943 * src/lalr.h, src/lalr.c (states): Move to...
12944 * src/states.h (state_t): Remove the `link' member, no longer
12945 used.
12946 * src/states.h, src/states.c: here.
12947 (state_hash_new, state_hash_free, state_hash_lookup)
12948 (state_hash_insert, states_free): New.
12949 * src/states.c (state_table, state_compare, state_hash): New.
12950 * src/output.c (output_actions): Do not free states now, since we
12951 still need to know the final_state number in `prepare', called
12952 afterwards. Do it...
12953 * src/main.c (main): here: call states_free after `output'.
12954
12955 2002-06-30 Akim Demaille <akim@epita.fr>
12956
12957 * src/state.h, src/state.c (state_new): New, extracted from...
12958 * src/LR0.c (new_state): here.
12959 * src/state.h (STATE_ALLOC): Move to...
12960 * src/state.c: here.
12961 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
12962 * src/state.h, src/state.c: here.
12963
12964 2002-06-30 Akim Demaille <akim@epita.fr>
12965
12966 * src/reader.c (gensym): Rename as...
12967 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
12968 (getsym): Rename as...
12969 (symbol_get): this.
12970
12971 2002-06-30 Akim Demaille <akim@epita.fr>
12972
12973 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
12974 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
12975 * src/output.c, src/print.c, src/print_graph.c: Propagate.
12976 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
12977
12978 2002-06-30 Akim Demaille <akim@epita.fr>
12979
12980 Make the test suite pass with warnings checked.
12981
12982 * tests/actions.at (Printers and Destructors): Improve.
12983 Avoid unsigned vs. signed issues.
12984 * tests/calc.at: Don't exercise the scanner here, do it...
12985 * tests/input.at (Torturing the Scanner): here.
12986
12987 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12988
12989 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
12990 reorganize first lines parallel to yacc.c.
12991
12992 2002-06-28 Akim Demaille <akim@epita.fr>
12993
12994 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
12995 (b4_token_enum, b4_token_defines): New, factored from...
12996 * data/lalr1.cc, data/yacc.c, glr.c: here.
12997
12998 2002-06-28 Akim Demaille <akim@epita.fr>
12999
13000 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13001 unused variables.
13002 * src/output.c (merger_output): static.
13003
13004 2002-06-28 Akim Demaille <akim@epita.fr>
13005
13006 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
13007 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13008 pacify GCC.
13009 * src/output.c (save_row): Initialize all the variables to pacify GCC.
13010
13011 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13012
13013 Accumulated changelog for new GLR parsing features.
13014
13015 * src/conflicts.c (count_total_conflicts): Change name to
13016 conflicts_total_count.
13017 * src/conflicts.h: Ditto.
13018 * src/output.c (token_actions): Use the new name.
13019 (output_conflicts): Change conflp => conflict_list_heads, and
13020 confl => conflict_list for better readability.
13021 * data/glr.c: Use the new names.
13022 * NEWS: Add self to GLR announcement.
13023
13024 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13025
13026 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13027 Akim Demaille.
13028
13029 * data/bison.glr: Change name to glr.c
13030 * data/glr.c: Renamed from bison.glr.
13031 * data/Makefile.am: Add glr.c
13032
13033 * src/getargs.c:
13034
13035 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
13036 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
13037
13038 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13039
13040 * data/bison.glr: Be sure to restore the
13041 current #line when returning to the skeleton contents after having
13042 exposed the input file's #line.
13043
13044 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13045
13046 * data/bison.glr: Bring up to date with changes to bison.simple.
13047
13048 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13049
13050 * data/bison.glr: Correct definitions that use b4_prefix.
13051 Various reformatting.
13052 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13053 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13054 yytokenp argument; now part of stack.
13055 (yychar): Define to behave as documented.
13056 (yyclearin): Ditto.
13057
13058 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13059
13060 * src/reader.h: Add declaration for free_merger_functions.
13061
13062 * src/reader.c (merge_functions): New variable.
13063 (get_merge_function): New function.
13064 (free_merger_functions): New function.
13065 (readgram): Check for %prec that is not followed by a symbol.
13066 Handle %dprec and %merge declarations.
13067 (packgram): Initialize dprec and merger fields in rules array.
13068
13069 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13070 conflict_list_cnt, conflict_list_free): New variables.
13071 (table_grow): Also grow conflict_table.
13072 (prepare_rules): Output dprec and merger tables.
13073 (conflict_row): New function.
13074 (action_row): Output conflict lists for GLR parser. Don't use
13075 default reduction in conflicted states for GLR parser so that there
13076 are spaces for the conflict lists.
13077 (save_row): Also save conflict information.
13078 (token_actions): Allocate conflict list.
13079 (merger_output): New function.
13080 (pack_vector): Pack conflict table, too.
13081 (output_conflicts): New function to output yyconflp and yyconfl.
13082 (output_check): Allocate conflict_tos.
13083 (output_actions): Output conflict tables, also.
13084 (output_skeleton): Output b4_mergers definition.
13085 (prepare): Output b4_max_rhs_length definition.
13086 Use 'bison.glr' as default skeleton for GLR parsers.
13087
13088 * src/gram.c (glr_parser): New flag.
13089 (grammar_free): Call free_merger_functions.
13090
13091 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13092 all pairs of conflicting reductions, rather than just all tokens
13093 causing conflicts. Needed to size conflict tables.
13094 (conflicts_output): Modify call to count_rr_conflicts for new
13095 interface.
13096 (conflicts_print): Ditto.
13097 (count_total_conflicts): New function.
13098
13099 * src/reader.h (merger_list): New type.
13100 (merge_functions): New variable.
13101
13102 * src/lex.h (tok_dprec, tok_merge): New token types.
13103
13104 * src/gram.h (rule_s): Add dprec and merger fields.
13105 (glr_parser): New flag.
13106
13107 * src/conflicts.h (count_total_conflicts): New function.
13108
13109 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13110
13111 * doc/bison.texinfo (Generalized LR Parsing): New section.
13112 (GLR Parsers): New section.
13113 (Language and Grammar): Mention GLR parsing.
13114 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13115 Correct typo ("tge" -> "the").
13116
13117 * data/bison.glr: New skeleton for GLR parsing.
13118
13119 * tests/cxx-gram.at: New tests for GLR parsing.
13120
13121 * tests/testsuite.at: Include cxx-gram.at.
13122
13123 * tests/Makefile.am: Add cxx-gram.at.
13124
13125 * src/parse-gram.y:
13126
13127 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13128
13129 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
13130
13131 2002-06-27 Akim Demaille <akim@epita.fr>
13132
13133 * src/options.h, src/options.c: Remove.
13134 * src/getargs.c (short_options, long_options): New.
13135
13136 2002-06-27 Akim Demaille <akim@epita.fr>
13137
13138 * data/bison.simple, data/bison.c++: Rename as...
13139 * data/yacc.c, data/lalr1.cc: these.
13140 * doc/bison.texinfo (Environment Variables): Remove.
13141
13142 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13143
13144 * src/getargs.c (report_argmatch): Initialize strtok().
13145
13146 2002-06-20 Akim Demaille <akim@epita.fr>
13147
13148 * data/bison.simple (b4_symbol_actions): New, replaces...
13149 (b4_symbol_destructor, b4_symbol_printer): these.
13150 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13151 user token numbers.
13152
13153 2002-06-20 Akim Demaille <akim@epita.fr>
13154
13155 * data/bison.simple (yydestructor): Rename as...
13156 (yydestruct): this.
13157
13158 2002-06-20 Akim Demaille <akim@epita.fr>
13159
13160 * src/symtab.h, src/symtab.c (symbol_type_set)
13161 (symbol_destructor_set, symbol_precedence_set): The location is
13162 the last argument.
13163 Adjust all callers.
13164
13165 2002-06-20 Akim Demaille <akim@epita.fr>
13166
13167 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13168 internals.
13169 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13170 Takes a location.
13171 * src/symtab.h, src/symtab.c (symbol_class_set)
13172 (symbol_user_token_number_set): Likewise.
13173 Adjust all callers.
13174 Promote complain_at.
13175 * tests/input.at (Type Clashes): Adjust.
13176
13177 2002-06-20 Akim Demaille <akim@epita.fr>
13178
13179 * data/bison.simple (YYLEX): Fix the declaration when
13180 %pure-parser.
13181
13182 2002-06-20 Akim Demaille <akim@epita.fr>
13183
13184 * data/bison.simple (yysymprint): Don't print the token number,
13185 just its name.
13186 * tests/actions.at (Destructors): Rename as...
13187 (Printers and Destructors): this.
13188 Also exercise %printer.
13189
13190 2002-06-20 Akim Demaille <akim@epita.fr>
13191
13192 * data/bison.simple (YYDSYMPRINT): New.
13193 Use it to remove many of the #if YYDEBUG/if (yydebug).
13194
13195 2002-06-20 Akim Demaille <akim@epita.fr>
13196
13197 * src/symtab.h, src/symtab.c (symbol_t): printer and
13198 printer_location are new members.
13199 (symbol_printer_set): New.
13200 * src/parse-gram.y (PERCENT_PRINTER): New token.
13201 Handle its associated rule.
13202 * src/scan-gram.l: Adjust.
13203 (handle_destructor_at, handle_destructor_dollar): Rename as...
13204 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13205 * src/output.c (symbol_printers_output): New.
13206 (output_skeleton): Call it.
13207 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13208 since there are already many grammar files with a user `yyprint'.
13209 Replace the calls to YYPRINT to calls to yysymprint.
13210 * tests/calc.at: Adjust.
13211 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13212 taking advantage of parser very internal details (stack size!).
13213
13214 2002-06-20 Akim Demaille <akim@epita.fr>
13215
13216 * src/scan-gram.l: Complete the scanner with the missing patterns
13217 to pacify Flex.
13218 Use `quote' and `symbol_tag_get' where appropriate.
13219
13220 2002-06-19 Akim Demaille <akim@epita.fr>
13221
13222 * tests/actions.at (Destructors): Augment to test locations.
13223 * data/bison.simple (yydestructor): Pass it the current location
13224 if locations are enabled.
13225 Prototype only when __STDC__ or C++.
13226 Change the argument names to move into the yy name space: there is
13227 user code here.
13228
13229 2002-06-19 Akim Demaille <akim@epita.fr>
13230
13231 * data/bison.simple (b4_pure_if): New.
13232 Use it instead of #ifdef YYPURE.
13233
13234 2002-06-19 Akim Demaille <akim@epita.fr>
13235
13236 * data/bison.simple (b4_location_if): New.
13237 Use it instead of #ifdef YYLSP_NEEDED.
13238
13239 2002-06-19 Akim Demaille <akim@epita.fr>
13240
13241 Prepare @$ in %destructor, but currently don't bind it in the
13242 skeleton, as %location use is not cleaned up yet.
13243
13244 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13245 (handle_action_at): New.
13246 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13247 a braced_code_t and a location as additional arguments.
13248 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13249 unquote one when outputting `b4_dollar_dollar'.
13250 Adjust callers.
13251 * data/bison.simple (b4_eval): Remove.
13252 (b4_symbol_destructor): Adjust.
13253 * tests/input.at (Invalid @n): Adjust.
13254
13255 2002-06-19 Zack Weinberg <zack@codesourcery.com>
13256
13257 * doc/bison.texinfo: Document ability to have multiple
13258 prologue sections.
13259
13260 2002-06-18 Akim Demaille <akim@epita.fr>
13261
13262 * src/files.c (compute_base_names): When computing the output file
13263 names from the input file name, strip the directory part.
13264
13265 2002-06-18 Akim Demaille <akim@epita.fr>
13266
13267 * data/bison.simple.new: Comment changes.
13268 Reported by Andreas Schwab.
13269
13270 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13271
13272 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13273 there are no `label `yyoverflowlab' defined but not used' warnings
13274 when yyoverflow is defined.
13275
13276 2002-06-18 Akim Demaille <akim@epita.fr>
13277
13278 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13279 new member.
13280 (symbol_destructor_set): Adjust.
13281 * src/output.c (symbol_destructors_output): Output the destructor
13282 locations.
13283 Output the symbol name.
13284 * data/bison.simple (b4_symbol_destructor): Adjust.
13285
13286 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13287 and Akim Demaille <akim@epita.fr>
13288
13289 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13290 what's left on the stack when the error recovery hits EOF.
13291 * tests/actions.at (Destructors): Complete to exercise this case.
13292
13293 2002-06-17 Akim Demaille <akim@epita.fr>
13294
13295 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13296 arguments is really empty, not only equal to `[]'.
13297 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13298 member.
13299 (symbol_destructor_set): New.
13300 * src/output.c (symbol_destructors_output): New.
13301 * src/reader.h (brace_code_t, current_braced_code): New.
13302 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13303 (handle_dollar): Rename as...
13304 (handle_action_dollar): this.
13305 (handle_destructor_dollar): New.
13306 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13307 (grammar_declaration): Use it.
13308 * data/bison.simple (yystos): Is always defined.
13309 (yydestructor): New.
13310 * tests/actions.at (Destructors): New.
13311 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13312
13313 2002-06-17 Akim Demaille <akim@epita.fr>
13314
13315 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13316 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13317 rule_length only when needed.
13318 * src/output.c (actions_output, token_definitions_output): Output
13319 the full M4 block.
13320 * src/symtab.c: Don't access directly to the symbol tag, use
13321 symbol_tag_get.
13322 * src/parse-gram.y: Use symbol_list_free.
13323
13324 2002-06-17 Akim Demaille <akim@epita.fr>
13325
13326 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13327 (symbol_list_prepend, get_type_name): Move to...
13328 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13329 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13330 Adjust all callers.
13331 (symbol_list_free): New.
13332 * src/scan-gram.l (handle_dollar): Takes a location.
13333 * tests/input.at (Invalid $n): Adjust.
13334
13335 2002-06-17 Akim Demaille <akim@epita.fr>
13336
13337 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13338 (symbol_list_prepend): New.
13339 * src/parse-gram.y (%union): `list' is a new member.
13340 (symbols.1): New, replaces...
13341 (terms_to_prec.1, nterms_to_type.1): these.
13342 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13343 Take a location as additional argument.
13344 Adjust all callers.
13345
13346 2002-06-15 Akim Demaille <akim@epita.fr>
13347
13348 * src/parse-gram.y: Move %token in the declaration section so that
13349 we don't depend upon CVS Bison.
13350
13351 2002-06-15 Akim Demaille <akim@epita.fr>
13352
13353 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13354 * src/print.c (print_core): Use it.
13355
13356 2002-06-15 Akim Demaille <akim@epita.fr>
13357
13358 * src/conflicts.c (log_resolution): Accept the rule involved in
13359 the sr conflicts instead of the lookahead number that points to
13360 that rule.
13361 (flush_reduce): Accept the current lookahead vector as argument,
13362 instead of the index in LA.
13363 (resolve_sr_conflict): Accept the current number of lookahead
13364 bitset to consider for the STATE, instead of the index in LA.
13365 (set_conflicts): Adjust.
13366 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13367
13368 2002-06-15 Akim Demaille <akim@epita.fr>
13369
13370 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13371 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13372 Adjust all dependencies.
13373 * src/lalr.c (initialize_lookaheads): Split into...
13374 (states_lookaheads_count, states_lookaheads_initialize): these.
13375 (lalr): Adjust.
13376
13377 2002-06-15 Akim Demaille <akim@epita.fr>
13378
13379 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13380 out of...
13381 (grammar_rules_print): here.
13382 * src/reduce.c (reduce_output): Use it.
13383 * tests/reduce.at (Useless Rules, Reduced Automaton)
13384 (Underivable Rules): Adjust.
13385
13386 2002-06-15 Akim Demaille <akim@epita.fr>
13387
13388 Copy BYacc's nice way to report the grammar.
13389
13390 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13391 New.
13392 Don't print the rules' location, it is confusing and useless.
13393 (rule_print): Use grammar_rhs_print.
13394 * src/print.c (print_grammar): Use grammar_rules_print.
13395
13396 2002-06-15 Akim Demaille <akim@epita.fr>
13397
13398 Complete and rationalize `useless thing' warnings.
13399
13400 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13401 (symbol_tag_print): New.
13402 Use them everywhere in place of accessing directly the tag member.
13403 * src/gram.h, src/gram.c (rule_print): New.
13404 Use it where a rule used to be printed `by hand'.
13405 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13406 (reduce_grammar_tables): Report the useless rules.
13407 (reduce_print): Useless things are a warning, not an error.
13408 Report it as such.
13409 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13410 (Reduced Automaton, Underivable Rules): Adjust.
13411 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13412 * tests/conflicts.at (Unresolved SR Conflicts)
13413 (Solved SR Conflicts): Adjust.
13414
13415 2002-06-15 Akim Demaille <akim@epita.fr>
13416
13417 Let symbols have a location.
13418
13419 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13420 (getsym): Adjust.
13421 Adjust all callers.
13422 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13423 Use location_t, not int.
13424 * src/symtab.c (symbol_check_defined): Take advantage of the
13425 location.
13426 * tests/regression.at (Invalid inputs): Adjust.
13427
13428 2002-06-15 Akim Demaille <akim@epita.fr>
13429
13430 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13431 (input): Don't try to initialize yylloc here, do it in the
13432 scanner.
13433 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13434 * src/gram.h (rule_t): Change line and action_line into location
13435 and action_location, of location_t type.
13436 Adjust all dependencies.
13437 * src/location.h, src/location.c (empty_location): New.
13438 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13439 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13440 (grammar_current_rule_symbol_append)
13441 (grammar_current_rule_action_append): Expect a location as argument.
13442 * src/reader.c (grammar_midrule_action): Adjust to attach an
13443 action's location as dummy symbol location.
13444 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13445 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13446 the line numbers.
13447
13448 2002-06-14 Akim Demaille <akim@epita.fr>
13449
13450 Grammar declarations may be found in the grammar section.
13451
13452 * src/parse-gram.y (rules_or_grammar_declaration): New.
13453 (declarations): Each declaration may end with a semicolon, not
13454 just...
13455 (grammar_declaration): `"%union"'.
13456 (grammar): Branch to rules_or_grammar_declaration.
13457
13458 2002-06-14 Akim Demaille <akim@epita.fr>
13459
13460 * src/main.c (main): Invoke scanner_free.
13461
13462 2002-06-14 Akim Demaille <akim@epita.fr>
13463
13464 * src/output.c (m4_invoke): Extracted from...
13465 (output_skeleton): here.
13466 Free tempfile.
13467
13468 2002-06-14 Akim Demaille <akim@epita.fr>
13469
13470 * src/parse-gram.y (directives, directive, gram)
13471 (grammar_directives, precedence_directives, precedence_directive):
13472 Rename as...
13473 (declarations, declaration, grammar, grammar_declaration)
13474 (precedence_declaration, precedence_declarator): these.
13475 (symbol_declaration): New.
13476
13477 2002-06-14 Akim Demaille <akim@epita.fr>
13478
13479 * src/files.c (action_obstack): Remove, unused.
13480 (output_obstack): Remove it, and all its dependencies, as it is no
13481 longer needed.
13482 * src/reader.c (epilogue_set): Build the epilogue in the
13483 muscle_obstack.
13484 * src/output.h, src/output.c (muscle_obstack): Move to...
13485 * src/muscle_tab.h, src/muscle_tab.h: here.
13486 (muscle_init): Initialize muscle_obstack.
13487 (muscle_free): New.
13488 * src/main.c (main): Call it.
13489
13490 2002-06-14 Akim Demaille <akim@epita.fr>
13491
13492 * src/location.h: New, extracted from...
13493 * src/reader.h: here.
13494 * src/Makefile.am (noinst_HEADERS): Merge into
13495 (bison_SOURCES): this.
13496 Add location.h.
13497 * src/parse-gram.y: Use location_t instead of Bison's.
13498 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13499 Use location_t instead of ints.
13500
13501 2002-06-14 Akim Demaille <akim@epita.fr>
13502
13503 * data/bison.simple, data/bison.c++: Be sure to restore the
13504 current #line when returning to the skeleton contents after having
13505 exposed the input file's #line.
13506
13507 2002-06-12 Akim Demaille <akim@epita.fr>
13508
13509 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13510 eager.
13511 * tests/actions.at (Exotic Dollars): New.
13512
13513 2002-06-12 Akim Demaille <akim@epita.fr>
13514
13515 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13516 ['"/] too eagerly.
13517 * tests/input.at (Torturing the Scanner): New.
13518
13519 2002-06-11 Akim Demaille <akim@epita.fr>
13520
13521 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13522 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13523 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13524 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13525 * src/reader.c (reader): Use it.
13526
13527 2002-06-11 Akim Demaille <akim@epita.fr>
13528
13529 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13530 Adjust all callers.
13531 (scanner_last_string_free): New.
13532
13533 2002-06-11 Akim Demaille <akim@epita.fr>
13534
13535 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13536 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13537 (last_string, YY_OBS_FREE): New.
13538 Use them when returning an ID.
13539
13540 2002-06-11 Akim Demaille <akim@epita.fr>
13541
13542 Have Bison grammars parsed by a Bison grammar.
13543
13544 * src/reader.c, src/reader.h (prologue_augment): New.
13545 * src/reader.c (copy_definition): Remove.
13546
13547 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13548 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13549 (grammar_current_rule_prec_set, grammar_current_rule_check)
13550 (grammar_current_rule_symbol_append)
13551 (grammar_current_rule_action_append): Export.
13552 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13553 (symbol_list_action_append): Remove.
13554 Hook the routines from reader.
13555 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13556 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13557
13558 * src/reader.c (read_declarations): Remove, unused.
13559
13560 * src/parse-gram.y: Handle the epilogue.
13561 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13562 (grammar_start_symbol_set): this.
13563 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13564 * src/reader.c (readgram): Remove, unused.
13565 (reader): Adjust to insert eoftoken and axiom where appropriate.
13566
13567 * src/reader.c (copy_dollar): Replace with...
13568 * src/scan-gram.h (handle_dollar): this.
13569 * src/parse-gram.y: Remove `%thong'.
13570
13571 * src/reader.c (copy_at): Replace with...
13572 * src/scan-gram.h (handle_at): this.
13573
13574 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13575 New.
13576
13577 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13578 time being.
13579
13580 * src/reader.h, src/reader.c (grammar_rule_end): New.
13581
13582 * src/parse.y (current_type, current_class): New.
13583 Implement `%nterm', `%token' support.
13584 Merge `%term' into `%token'.
13585 (string_as_id): New.
13586 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13587 type name.
13588
13589 * src/parse-gram.y: Be sure to handle properly the beginning of
13590 rules.
13591
13592 * src/parse-gram.y: Handle %type.
13593 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13594
13595 * src/parse-gram.y: More directives support.
13596 * src/options.c: No longer handle source directives.
13597
13598 * src/parse-gram.y: Fix %output.
13599
13600 * src/parse-gram.y: Handle %union.
13601 Use the prologue locations.
13602 * src/reader.c (parse_union_decl): Remove.
13603
13604 * src/reader.h, src/reader.c (epilogue_set): New.
13605 * src/parse-gram.y: Use it.
13606
13607 * data/bison.simple, data/bison.c++: b4_stype is now either not
13608 defined, then default to int, or to the contents of %union,
13609 without `union' itself.
13610 Adjust.
13611 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13612
13613 * src/output.c (actions_output): Don't output braces, as they are
13614 already handled by the scanner.
13615
13616 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13617 characters to themselves.
13618
13619 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13620 that the epilogue has a proper #line.
13621
13622 * src/parse-gram.y: Handle precedence/associativity.
13623
13624 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13625 a terminal.
13626 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13627 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13628 at all to define terminals that cannot be emitted.
13629
13630 * src/scan-gram.l: Escape M4 characters.
13631
13632 * src/scan-gram.l: Working properly with escapes in user
13633 strings/characters.
13634
13635 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13636 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13637 grammar.
13638 Use more modest sizes, as for the time being the parser does not
13639 release memory, and therefore the process swallows a huge amount
13640 of memory.
13641
13642 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13643 stricter %token grammar.
13644
13645 * src/symtab.h (associativity): Add `undef_assoc'.
13646 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13647 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13648
13649 * tests/regression.at (Invalid %directive): Remove, as it is now
13650 meaningless.
13651 (Invalid inputs): Adjust to the new error messages.
13652 (Token definitions): The new grammar doesn't allow too many
13653 eccentricities.
13654
13655 * src/lex.h, src/lex.c: Remove.
13656 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13657 (copy_character, copy_string2, copy_string, copy_identifier)
13658 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13659 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13660 (parse_action): Remove.
13661 * po/POTFILES.in: Adjust.
13662
13663 2002-06-11 Akim Demaille <akim@epita.fr>
13664
13665 * src/reader.c (parse_action): Don't store directly into the
13666 rule's action member: return the action as a string.
13667 Don't require `rule_length' as an argument: compute it.
13668 (grammar_current_rule_symbol_append)
13669 (grammar_current_rule_action_append): New, eved out from
13670 (readgram): here.
13671 Remove `action_flag', `rulelength', unused now.
13672
13673 2002-06-11 Akim Demaille <akim@epita.fr>
13674
13675 * src/reader.c (grammar_current_rule_prec_set).
13676 (grammar_current_rule_check): New, eved out from...
13677 (readgram): here.
13678 Remove `xaction', `first_rhs': useless.
13679 * tests/input.at (Type clashes): New.
13680 * tests/existing.at (GNU Cim Grammar): Adjust.
13681
13682 2002-06-11 Akim Demaille <akim@epita.fr>
13683
13684 * src/reader.c (grammar_midrule_action): New, Eved out from
13685 (readgram): here.
13686
13687 2002-06-11 Akim Demaille <akim@epita.fr>
13688
13689 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13690 New.
13691 (readgram): Use them as replacement of inlined code, crule and
13692 crule1.
13693
13694 2002-06-11 Akim Demaille <akim@epita.fr>
13695
13696 * src/reader.c (grammar_end, grammar_symbol_append): New.
13697 (readgram): Use them.
13698 Make the use of `p' as local as possible.
13699
13700 2002-06-10 Akim Demaille <akim@epita.fr>
13701
13702 GCJ's parser requires the tokens to be defined before the prologue.
13703
13704 * data/bison.simple: Output the token definition before the user's
13705 prologue.
13706 * tests/regression.at (Braces parsing, Duplicate string)
13707 (Mixing %token styles): Check the output from bison.
13708 (Early token definitions): New.
13709
13710 2002-06-10 Akim Demaille <akim@epita.fr>
13711
13712 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13713 assigning twice the same user number to a token, so that we can
13714 use it in...
13715 * src/lex.c (lex): here.
13716 Also use `symbol_class_set' instead of hand written code.
13717 * src/reader.c (parse_assoc_decl): Likewise.
13718
13719 2002-06-10 Akim Demaille <akim@epita.fr>
13720
13721 * src/symtab.c, src/symtab.c (symbol_class_set)
13722 (symbol_user_token_number_set): New.
13723 * src/reader.c (parse_token_decl): Use them.
13724 Use a switch instead of ifs.
13725 Use a single argument.
13726
13727 2002-06-10 Akim Demaille <akim@epita.fr>
13728
13729 Remove `%thong' support as it is undocumented, unused, duplicates
13730 `%token's job, and creates useless e-mail traffic with people who
13731 want to know what it is, why it is undocumented, unused, and
13732 duplicates `%token's job.
13733
13734 * src/reader.c (parse_thong_decl): Remove.
13735 * src/options.c (option_table): Remove "thong".
13736 * src/lex.h (tok_thong): Remove.
13737
13738 2002-06-10 Akim Demaille <akim@epita.fr>
13739
13740 * src/symtab.c, src/symtab.c (symbol_type_set)
13741 (symbol_precedence_set): New.
13742 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13743 (value_components_used): Remove, unused.
13744
13745 2002-06-09 Akim Demaille <akim@epita.fr>
13746
13747 Move symbols handling code out of the reader.
13748
13749 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13750 (axiom): Move to...
13751 * src/symtab.h, src/symtab.c: here.
13752
13753 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13754 * src/reader.c (startval): Rename as...
13755 * src/symtab.h, src/symtab.c (startsymbol): this.
13756 * src/reader.c: Adjust.
13757
13758 * src/reader.c (symbol_check_defined, symbol_make_alias)
13759 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13760 (token_translations_init)
13761 Move to...
13762 * src/symtab.c: here.
13763 * src/reader.c (packsymbols): Move to...
13764 * src/symtab.h, src/symtab.c (symbols_pack): here.
13765 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13766 argument.
13767
13768 2002-06-03 Akim Demaille <akim@epita.fr>
13769
13770 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13771 then statements.
13772
13773 2002-06-03 Akim Demaille <akim@epita.fr>
13774
13775 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13776 structs with non literals.
13777 * src/scan-skel.l: never-interactive.
13778 * src/conflicts.c (enum conflict_resolution_e): No trailing
13779 comma.
13780 * src/getargs.c (usage): Split long literal strings.
13781 Reported by Hans Aberg.
13782
13783 2002-05-28 Akim Demaille <akim@epita.fr>
13784
13785 * data/bison.c++: Use C++ ostreams.
13786 (cdebug_): New member.
13787
13788 2002-05-28 Akim Demaille <akim@epita.fr>
13789
13790 * src/output.c (output_skeleton): Be sure to allocate enough room
13791 for `/' _and_ for `\0' in full_skeleton.
13792
13793 2002-05-28 Akim Demaille <akim@epita.fr>
13794
13795 * data/bison.c++: Catch up with bison.simple:
13796 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13797 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13798 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13799 and popping traces.
13800
13801 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13802
13803 * src/output.c (output_skeleton): Put an explicit path in front of
13804 the skeleton file name, rather than relying on the -I directory,
13805 to partially alleviate effects of having a skeleton file lying around
13806 in the current directory.
13807
13808 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13809
13810 * src/conflicts.c (log_resolution): Correct typo:
13811 obstack_printf should be obstack_fgrow1.
13812
13813 2002-05-26 Akim Demaille <akim@epita.fr>
13814
13815 * src/state.h (state_t): `solved_conflicts' is a new member.
13816 * src/LR0.c (new_state): Set it to 0.
13817 * src/conflicts.h, src/conflicts.c (print_conflicts)
13818 (free_conflicts, solve_conflicts): Rename as...
13819 (conflicts_print, conflicts_free, conflicts_solve): these.
13820 Adjust callers.
13821 * src/conflicts.c (enum conflict_resolution_e)
13822 (solved_conflicts_obstack): New, used by...
13823 (log_resolution): this.
13824 Adjust to attach the conflict resolution to each state.
13825 Complete the description with the precedence/associativity
13826 information.
13827 (resolve_sr_conflict): Adjust.
13828 * src/print.c (print_state): Output its solved_conflicts.
13829 * tests/conflicts.at (Unresolved SR Conflicts)
13830 (Solved SR Conflicts): Exercise --report=all.
13831
13832 2002-05-26 Akim Demaille <akim@epita.fr>
13833
13834 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13835 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13836 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13837 (token_number_t, item_number_as_token_number)
13838 (token_number_as_item_number, muscle_insert_token_number_table):
13839 Rename as...
13840 (symbol_number_t, item_number_as_symbol_number)
13841 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13842 these, since it is more appropriate.
13843
13844 2002-05-26 Akim Demaille <akim@epita.fr>
13845
13846 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13847 `Error:' lines.
13848 * data/bison.simple (yystos) [YYDEBUG]: New.
13849 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13850 error recovery.
13851 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13852
13853 2002-05-25 Akim Demaille <akim@epita.fr>
13854
13855 * doc/bison.texinfo (Debugging): Split into...
13856 (Tracing): this new section, its former contents, and...
13857 (Understanding): this new section.
13858 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13859 by...
13860 (report_flag): this.
13861 Adjust all dependencies.
13862 (report_args, report_types, report_argmatch): New.
13863 (usage, getargs): Report/support -r, --report.
13864 * src/options.h
13865 (struct option_table_struct): Rename as..,
13866 (struct option_table_s): this.
13867 Rename the `set_flag' member to `flag' to match with getopt_long's
13868 struct.
13869 * src/options.c (option_table): Split verbose into an entry for
13870 %verbose, and another for --verbose.
13871 Support --report/-r, so remove -r from the obsolete --raw.
13872 * src/print.c: Attach full item sets and lookaheads reports to
13873 report_flag instead of trace_flag.
13874 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13875
13876 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13877 and Paul Eggert <eggert@twinsun.com>
13878
13879 * data/bison.simple (yyparse): Correct error handling to conform to
13880 POSIX and yacc. Specifically, after syntax error is discovered,
13881 do not reduce further before shifting the error token.
13882 Clean up the code a bit by removing the labels yyerrdefault,
13883 yyerrhandle, yyerrpop.
13884 * NEWS: Document the above.
13885
13886 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13887
13888 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13889 type; it isn't always big enough, since it doesn't necessarily
13890 include non-terminals.
13891 (yytranslate): Expand definition of yy_token_number_type, so that
13892 the latter can be removed.
13893 (yy_token_number_type): Remove, only one use.
13894 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13895 don't use TokenNumberType as element type.
13896
13897 * tests/regression.at: Modify expected output to agree with change
13898 to yyr1 and yytranslate.
13899
13900 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13901
13902 * src/reader.c (parse_action): Use copy_character instead of
13903 obstack_1grow.
13904
13905 2002-05-13 Akim Demaille <akim@epita.fr>
13906
13907 * tests/regression.at (Token definitions): Prototype yylex and
13908 yyerror.
13909
13910 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13911
13912 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
13913 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13914 32-bit arithmetic.
13915 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
13916
13917 2002-05-07 Akim Demaille <akim@epita.fr>
13918
13919 * tests/synclines.at: Be sure to prototype yylex and yyerror to
13920 avoid GCC warnings.
13921
13922 2002-05-07 Akim Demaille <akim@epita.fr>
13923
13924 Kill GCC warnings.
13925
13926 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
13927 over the RHS of each rule.
13928 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
13929 * src/state.h (state_t): Member `nitems' is unsigned short.
13930 * src/LR0.c (get_state): Adjust.
13931 * src/reader.c (packgram): Likewise.
13932 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
13933 `Type'.
13934 (muscle_insert_int_table): Remove, unused.
13935 (prepare_rules): Remove `max'.
13936
13937 2002-05-06 Akim Demaille <akim@epita.fr>
13938
13939 * src/closure.c (print_firsts): Display of the symbol tags.
13940 (bitmatrix_print): Move to...
13941 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
13942 here.
13943 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
13944
13945 2002-05-06 Akim Demaille <akim@epita.fr>
13946
13947 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
13948 hash_do_for_each.
13949
13950 2002-05-06 Akim Demaille <akim@epita.fr>
13951
13952 * src/LR0.c (new_state, get_state): Instead of using the global
13953 `kernel_size' and `kernel_base', have two new arguments:
13954 `core_size' and `core'.
13955 Adjust callers.
13956
13957 2002-05-06 Akim Demaille <akim@epita.fr>
13958
13959 * src/reader.c (packgram): No longer end `ritem' with a 0
13960 sentinel: it is not used.
13961
13962 2002-05-05 Akim Demaille <akim@epita.fr>
13963
13964 New experimental feature: display the lookaheads in the report and
13965 graph.
13966
13967 * src/print (print_core): When --trace-flag, display the rules
13968 lookaheads.
13969 * src/print_graph.c (print_core): Likewise.
13970 Swap the arguments.
13971 Adjust caller.
13972
13973 2002-05-05 Akim Demaille <akim@epita.fr>
13974
13975 * tests/torture.at (Many lookaheads): New test.
13976
13977 2002-05-05 Akim Demaille <akim@epita.fr>
13978
13979 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
13980 (GENERATE_MUSCLE_INSERT_TABLE): this.
13981 (output_int_table, output_unsigned_int_table, output_short_table)
13982 (output_token_number_table, output_item_number_table): Replace with...
13983 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
13984 (muscle_insert_short_table, muscle_insert_token_number_table)
13985 (muscle_insert_item_number_table): these.
13986 Adjust all callers.
13987 (prepare_tokens): Don't free `translations', since...
13988 * src/reader.h, src/reader.c (grammar_free): do it.
13989 Move to...
13990 * src/gram.h, src/gram.c (grammar_free): here.
13991 * data/bison.simple, data/bison.c++: b4_token_number_max is now
13992 b4_translate_max.
13993
13994 2002-05-05 Akim Demaille <akim@epita.fr>
13995
13996 * src/output.c (output_unsigned_int_table): New.
13997 (prepare_rules): `i' is unsigned.
13998 `prhs', `rline', `r2' are unsigned int.
13999 Rename muscle `rhs_number_max' as `rhs_max'.
14000 Output muscles `prhs_max', `rline_max', and `r2_max'.
14001 Free rline and r1.
14002 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14003 to compute types instead of constant types.
14004 * tests/regression.at (Web2c Actions): Adjust.
14005
14006 2002-05-04 Akim Demaille <akim@epita.fr>
14007
14008 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14009 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14010 Adjust dependencies.
14011 * src/output.c (token_definitions_output): Be sure not to output a
14012 `#define 'a'' when fed with `%token 'a' "a"'.
14013 * tests/regression.at (Token definitions): New.
14014
14015 2002-05-03 Paul Eggert <eggert@twinsun.com>
14016
14017 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14018 for K&R C.
14019
14020 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14021
14022 * Makefile.am (SUBDIRS): Remove intl.
14023 (EXTRA_DIST): Add config/config.rpath.
14024
14025 2002-05-03 Akim Demaille <akim@epita.fr>
14026
14027 * data/bison.simple (m4_if): Don't output empty enums.
14028 And actually, output valid enum definitions :(.
14029
14030 2002-05-03 Akim Demaille <akim@epita.fr>
14031
14032 * configure.bat: Remove, completely obsolete.
14033 * Makefile.am (EXTRA_DIST): Adjust.
14034 Don't distribute config.rpath...
14035 * config/Makefile.am (EXTRA_DIST): Do it.
14036
14037 2002-05-03 Akim Demaille <akim@epita.fr>
14038
14039 * configure.in (GETTEXT_VERSION): New.
14040 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14041
14042 2002-05-03 Akim Demaille <akim@epita.fr>
14043
14044 * data/bison.simple (b4_token_enum): New.
14045 (b4_token_defines): Use it to output tokens both as #define and
14046 enums.
14047 Suggested by Paul Eggert.
14048 * src/output.c (token_definitions_output): Don't output spurious
14049 white spaces.
14050
14051 2002-05-03 Akim Demaille <akim@epita.fr>
14052
14053 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14054
14055 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
14056
14057 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14058 Update the stack class, give a try to deque as the default container.
14059
14060 2002-05-02 Akim Demaille <akim@epita.fr>
14061
14062 * data/bison.simple (yyparse): Do not implement @$ = @1.
14063 (YYLLOC_DEFAULT): Adjust to do it.
14064 * doc/bison.texinfo (Location Default Action): Fix.
14065
14066 2002-05-02 Akim Demaille <akim@epita.fr>
14067
14068 * src/reader.c (parse_braces): Merge into...
14069 (parse_action): this.
14070
14071 2002-05-02 Akim Demaille <akim@epita.fr>
14072
14073 * configure.in (ALL_LINGUAS): Remove.
14074 * po/LINGUAS, hr.po: New.
14075
14076 2002-05-02 Akim Demaille <akim@epita.fr>
14077
14078 Remove the so called hairy (semantic) parsers.
14079
14080 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14081 * src/gram.h, src/gram.c (semantic_parser): Remove.
14082 (rule_t): Remove the guard and guard_line members.
14083 * src/lex.h (token_t): remove tok_guard.
14084 * src/options.c (option_table): Remove %guard and %semantic_parser
14085 support.
14086 * src/output.c, src/output.h (guards_output): Remove.
14087 (prepare): Adjust.
14088 (token_definitions_output): Don't output the `T'
14089 tokens (???).
14090 (output_skeleton): Don't output the guards.
14091 * src/files.c, src/files.c (attrsfile): Remove.
14092 * src/reader.c (symbol_list): Remove the guard and guard_line
14093 members.
14094 Adjust dependencies.
14095 (parse_guard): Remove.
14096 * data/bison.hairy: Remove.
14097 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14098 BISON_HAIRY.
14099
14100 2002-05-02 Akim Demaille <akim@epita.fr>
14101
14102 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14103 (parse_guard): Rename the formal argument `stack_offset' as
14104 `rule_length', which is more readable.
14105 Adjust callers.
14106 (copy_at, copy_dollar): Instead of outputting the hard coded
14107 values of $$, $n and so forth, output invocation to b4_lhs_value,
14108 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
14109 Note: this patch partially drops `semantic-parser' support: it
14110 always does `rule_length - n', where semantic parsers ought to
14111 always use `-n'.
14112 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14113 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14114
14115 2002-05-02 Akim Demaille <akim@epita.fr>
14116
14117 * configure.in (AC_INIT): Bump to 1.49b.
14118 (AM_INIT_AUTOMAKE): Short invocation.
14119
14120 2002-05-02 Akim Demaille <akim@epita.fr>
14121
14122 Version 1.49a.
14123
14124 2002-05-01 Akim Demaille <akim@epita.fr>
14125
14126 * src/skeleton.h: Remove.
14127
14128 2002-05-01 Akim Demaille <akim@epita.fr>
14129
14130 * src/skeleton.h: Fix the #endif.
14131 Reported by Magnus Fromreide.
14132
14133 2002-04-26 Paul Eggert <eggert@twinsun.com>
14134
14135 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14136 Define if we define YYSTYPE and YYLTYPE, respectively.
14137 (YYCOPY): Fix [] quoting problem in the non-GCC case.
14138
14139 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
14140
14141 * src/scan-skel.l: Postprocess quadrigraphs.
14142
14143 * src/reader.c (copy_character): New function, used to output
14144 single characters while replacing `[' and `]' with quadrigraphs, to
14145 avoid troubles with M4 quotes.
14146 (copy_comment): Output characters with copy_character.
14147 (read_additionnal_code): Likewise.
14148 (copy_string2): Likewise.
14149 (copy_definition): Likewise.
14150
14151 * tests/calc.at: Exercise M4 quoting.
14152
14153 2002-04-25 Akim Demaille <akim@epita.fr>
14154
14155 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14156 between `!' and the command.
14157 Reported by Paul Eggert.
14158
14159 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
14160
14161 * tests/calc.at: Exercise prologue splitting.
14162
14163 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14164 `b4_post_prologue' instead of `b4_prologue'.
14165
14166 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14167 muscles.
14168 (output): Free pre_prologue_obstack and post_prologue_obstack.
14169 * src/files.h, src/files.c (attrs_obstack): Remove.
14170 (pre_prologue_obstack, post_prologue_obstack): New.
14171 * src/reader.c (copy_definition): Add a parameter to specify the
14172 obstack to fill, instead of using attrs_obstack unconditionally.
14173 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14174 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14175
14176 2002-04-23 Paul Eggert <eggert@twinsun.com>
14177
14178 * data/bison.simple: Remove unnecessary commentary and white
14179 space differences from 1_29-branch.
14180 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14181
14182 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14183 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14184 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14185 constructors or destructors.
14186
14187 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14188
14189 2002-04-23 Akim Demaille <akim@epita.fr>
14190
14191 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14192 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14193 location with columns.
14194 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14195 All reported by Paul Eggert.
14196
14197 2002-04-22 Akim Demaille <akim@epita.fr>
14198
14199 * src/reduce.c (dump_grammar): Move to...
14200 * src/gram.h, src/gram.c (grammar_dump): here.
14201 Be sure to separate long item numbers.
14202 Don't read the members of a rule's prec if its nil.
14203
14204 2002-04-22 Akim Demaille <akim@epita.fr>
14205
14206 * src/output.c (table_size, table_grow): New.
14207 (MAXTABLE): Remove, replace uses with table_size.
14208 (pack_vector): Instead of dying when the table is too big, grow it.
14209
14210 2002-04-22 Akim Demaille <akim@epita.fr>
14211
14212 * data/bison.simple (yyr1): Its type is that of a token number.
14213 * data/bison.c++ (r1_): Likewise.
14214 * tests/regression.at (Web2c Actions): Adjust.
14215
14216 2002-04-22 Akim Demaille <akim@epita.fr>
14217
14218 * src/reader.c (token_translations_init): 256 is now the default
14219 value for the error token, i.e., it will be assigned another
14220 number if the user assigned 256 to one of her tokens.
14221 (reader): Don't force 256 to error.
14222 * doc/bison.texinfo (Symbols): Adjust.
14223 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14224 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14225 etc. instead of 10, 20, 30 (which was used to `jump' over error
14226 (256) and undefined (2)).
14227
14228 2002-04-22 Akim Demaille <akim@epita.fr>
14229
14230 Propagate more token_number_t.
14231
14232 * src/gram.h (token_number_as_item_number)
14233 (item_number_as_token_number): New.
14234 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14235 Use it to create output_item_number_table and
14236 output_token_number_table.
14237 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14238 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14239 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14240 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14241
14242 2002-04-22 Akim Demaille <akim@epita.fr>
14243
14244 * src/output.h, src/output.c (get_lines_number): Remove.
14245
14246 2002-04-19 Akim Demaille <akim@epita.fr>
14247
14248 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14249 as Lex/Flex'.
14250 (Debugging): More details about enabling the debugging features.
14251 (Table of Symbols): Describe $$, $n, @$, and @n.
14252 Suggested by Tim Josling.
14253
14254 2002-04-19 Akim Demaille <akim@epita.fr>
14255
14256 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14257
14258 2002-04-10 Akim Demaille <akim@epita.fr>
14259
14260 * src/system.h: Rely on HAVE_LIMITS_H.
14261 Suggested by Paul Eggert.
14262
14263 2002-04-09 Akim Demaille <akim@epita.fr>
14264
14265 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14266 full stderr, and strip it according to the bison options, instead
14267 of composing the error message from different bits.
14268 This makes it easier to check for several error messages.
14269 Adjust all the invocations.
14270 Add an invocation exercising the error token.
14271 Add an invocation demonstrating a stupid error message.
14272 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14273 Adjust the tests.
14274 Error message are for stderr, not stdout.
14275
14276 2002-04-09 Akim Demaille <akim@epita.fr>
14277
14278 * src/gram.h, src/gram.c (error_token_number): Remove, use
14279 errtoken->number.
14280 * src/reader.c (reader): Don't specify the user token number (2)
14281 for $undefined, as it uselessly prevents using it.
14282 * src/gram.h (token_number_t): Move to...
14283 * src/symtab.h: here.
14284 (state_t.number): Is a token_number_t.
14285 * src/print.c, src/reader.c: Use undeftoken->number instead of
14286 hard coded 2.
14287 (Even though this 2 is not the same as above: the number of the
14288 undeftoken remains being 2, it is its user token number which
14289 might not be 2).
14290 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14291 `user_token_number_max'.
14292 Output `undef_token_number'.
14293 * data/bison.simple, data/bison.c++: Use them.
14294 Be sure to map invalid yylex return values to
14295 `undef_token_number'. This saves us from gratuitous SEGV.
14296
14297 * tests/conflicts.at (Solved SR Conflicts)
14298 (Unresolved SR Conflicts): Adjust.
14299 * tests/regression.at (Web2c Actions): Adjust.
14300
14301 2002-04-08 Akim Demaille <akim@epita.fr>
14302
14303 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14304 Adding #line.
14305 Remove the duplicate `typedefs'.
14306 (RhsNumberType): Fix the declaration and various other typos.
14307 Use __ofile__.
14308 * data/bison.simple: Use __ofile__.
14309 * src/scan-skel.l: Handle __ofile__.
14310
14311 2002-04-08 Akim Demaille <akim@epita.fr>
14312
14313 * src/gram.h (item_number_t): New, the type of item numbers in
14314 RITEM. Note that it must be able to code symbol numbers as
14315 positive number, and the negation of rule numbers as negative
14316 numbers.
14317 Adjust all dependencies (pretty many).
14318 * src/reduce.c (rule): Remove this `short *' pointer: use
14319 item_number_t.
14320 * src/system.h (MINSHORT, MAXSHORT): Remove.
14321 Include `limits.h'.
14322 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14323 (shortcpy): Remove.
14324 (MAXTABLE): Move to...
14325 * src/output.c (MAXTABLE): here.
14326 (prepare_rules): Use output_int_table to output rhs.
14327 * data/bison.simple, data/bison.c++: Adjust.
14328 * tests/torture.at (Big triangle): Move the limit from 254 to
14329 500.
14330 * tests/regression.at (Web2c Actions): Ajust.
14331
14332 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14333 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14334 passes, but produces negative #line number, once fixed, GCC is
14335 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14336 C), it passes.
14337 * src/state.h (state_h): Code input lines on ints, not shorts.
14338
14339 2002-04-08 Akim Demaille <akim@epita.fr>
14340
14341 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14342 and then the grammar.
14343
14344 2002-04-08 Akim Demaille <akim@epita.fr>
14345
14346 * src/system.h: No longer using strndup.
14347
14348 2002-04-07 Akim Demaille <akim@epita.fr>
14349
14350 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14351 * src/output.c (output_table_data): Return the longest number.
14352 (prepare_tokens): Output `token_number_max').
14353 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14354 New.
14355 Use them to define yy_token_number_type/TokenNumberType.
14356 Use this type for yytranslate.
14357 * tests/torture.at (Big triangle): Push the limit from 124 to
14358 253.
14359 * tests/regression.at (Web2c Actions): Adjust.
14360
14361 2002-04-07 Akim Demaille <akim@epita.fr>
14362
14363 * tests/torture.at (Big triangle): New.
14364 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14365 * tests/existing.at: here.
14366
14367 2002-04-07 Akim Demaille <akim@epita.fr>
14368
14369 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14370 nritems.
14371 Adjust dependencies.
14372
14373 2002-04-07 Akim Demaille <akim@epita.fr>
14374
14375 * src/reader.c: Normalize increments to prefix form.
14376
14377 2002-04-07 Akim Demaille <akim@epita.fr>
14378
14379 * src/reader.c, symtab.c: Remove debugging code.
14380
14381 2002-04-07 Akim Demaille <akim@epita.fr>
14382
14383 Rename all the `bucket's as `symbol_t'.
14384
14385 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14386 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14387 * src/symtab.c, src/symtab.h (bucket): Rename as...
14388 (symbol_t): this.
14389 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14390 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14391 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14392 (buckets_new, buckets_free, buckets_do): Rename as...
14393 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14394 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14395 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14396 (symbols_new, symbols_free, symbols_do): these.
14397
14398 2002-04-07 Akim Demaille <akim@epita.fr>
14399
14400 Use lib/hash for the symbol table.
14401
14402 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14403 EOF.
14404 * src/lex.c (lex): Set the `number' member of new terminals.
14405 * src/reader.c (bucket_check_defined, bucket_make_alias)
14406 (bucket_check_alias_consistence, bucket_translation): New.
14407 (reader, grammar_free, readgram, token_translations_init)
14408 (packsymbols): Adjust.
14409 (reader): Number the predefined tokens.
14410 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14411 for predefined tokens.
14412 * src/symtab.h (bucket): Remove all the hash table related
14413 members.
14414 * src/symtab.c (symtab): Replace by...
14415 (bucket_table): this.
14416 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14417 (buckets_new, buckets_do): New.
14418
14419 2002-04-07 Akim Demaille <akim@epita.fr>
14420
14421 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14422 (start_symbol, max_user_token_number, semantic_parser)
14423 (error_token_number): Initialize.
14424 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14425 Initialize.
14426 (reader): Don't.
14427 (errtoken, eoftoken, undeftoken, axiom): Extern.
14428
14429 2002-04-07 Akim Demaille <akim@epita.fr>
14430
14431 * src/gram.h (rule_s): prec and precsym are now pointers
14432 to the bucket giving the priority/associativity.
14433 Member `associativity' removed: useless.
14434 * src/reduce.c, src/conflicts.c: Adjust.
14435
14436 2002-04-07 Akim Demaille <akim@epita.fr>
14437
14438 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14439 Properly escape the symbols' TAG when outputting them.
14440
14441 2002-04-07 Akim Demaille <akim@epita.fr>
14442
14443 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14444
14445 2002-04-07 Akim Demaille <akim@epita.fr>
14446
14447 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14448 (LArule): this, which is an array to rule_t*.
14449 * src/print.c, src/conflicts.c: Adjust.
14450
14451 2002-04-07 Akim Demaille <akim@epita.fr>
14452
14453 * src/gram.h (rule_t): Rename `number' as `user_number'.
14454 `number' is a new member.
14455 Adjust dependencies.
14456 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14457
14458 2002-04-07 Akim Demaille <akim@epita.fr>
14459
14460 As a result of the previous patch, it is no longer needed
14461 to reorder ritem itself.
14462
14463 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14464
14465 2002-04-07 Akim Demaille <akim@epita.fr>
14466
14467 Be sure never to walk through RITEMS, but use only data related to
14468 the rules themselves. RITEMS should be banished.
14469
14470 * src/output.c (output_token_translations): Rename as...
14471 (prepare_tokens): this.
14472 In addition to `translate', prepare the muscles `tname' and
14473 `toknum', which were handled by...
14474 (output_rule_data): this.
14475 Remove, and move the remainder of its outputs into...
14476 (prepare_rules): this new routines, which also merges content from
14477 (output_gram): this.
14478 (prepare_rules): Be sure never to walk through RITEMS.
14479 (output_stos): Rename as...
14480 (prepare_stos): this.
14481 (output): Always invoke prepare_states, after all, just don't use it
14482 in the output if you don't need it.
14483
14484 2002-04-07 Akim Demaille <akim@epita.fr>
14485
14486 * src/LR0.c (new_state): Display `nstates' as the name of the
14487 newly created state.
14488 Adjust to initialize first_state and last_state if needed.
14489 Be sure to distinguish the initial from the final state.
14490 (new_states): Create the itemset of the initial state, and use
14491 new_state.
14492 * src/closure.c (closure): Now that the initial state has its
14493 items properly set, there is no need for a special case when
14494 creating `ruleset'.
14495
14496 As a result, now the rule 0, reducing to $axiom, is visible in the
14497 outputs. Adjust the test suite.
14498
14499 * tests/conflicts.at (Solved SR Conflicts)
14500 (Unresolved SR Conflicts): Adjust.
14501 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14502 * tests/conflicts.at (S/R in initial): New.
14503
14504 2002-04-07 Akim Demaille <akim@epita.fr>
14505
14506 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14507 the RHS of the rules.
14508 * src/output.c (output_gram): Likewise.
14509
14510 2002-04-07 Akim Demaille <akim@epita.fr>
14511
14512 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14513 bucket.
14514 Adjust all dependencies.
14515 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14516 `number' of the buckets too.
14517 * src/gram.h: Include `symtab.h'.
14518 (associativity): Move to...
14519 * src/symtab.h: here.
14520 No longer include `gram.h'.
14521
14522 2002-04-07 Akim Demaille <akim@epita.fr>
14523
14524 * src/gram.h, src/gram.c (rules_rhs_length): New.
14525 (ritem_longest_rhs): Use it.
14526 * src/gram.h (rule_t): `number' is a new member.
14527 * src/reader.c (packgram): Set it.
14528 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14529 the end of `rules', and count them out of `nrules'.
14530 (reduce_output, dump_grammar): Adjust.
14531 * src/print.c (print_grammar): It is no longer needed to check for
14532 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14533 * tests/reduce.at (Reduced Automaton): New test.
14534
14535 2002-04-07 Akim Demaille <akim@epita.fr>
14536
14537 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14538 lacking `+ 1' to nrules, Bison reported as useless a token if it
14539 was used solely to set the precedence of the last rule...
14540
14541 2002-04-07 Akim Demaille <akim@epita.fr>
14542
14543 * data/bison.c++, data/bison.simple: Don't output the current file
14544 name in #line, to avoid useless diffs between two identical
14545 outputs under different names.
14546
14547 2002-04-07 Akim Demaille <akim@epita.fr>
14548
14549 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14550 Normalize loops to using `< nrules + 1', not `<= nrules'.
14551
14552 2002-04-07 Akim Demaille <akim@epita.fr>
14553
14554 * TODO: Update.
14555
14556 2002-04-07 Akim Demaille <akim@epita.fr>
14557
14558 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14559 bucket.value as bucket.number.
14560
14561 2002-04-07 Akim Demaille <akim@epita.fr>
14562
14563 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14564 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14565 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14566 RHS, instead of being an index in RITEMS.
14567
14568 2002-04-04 Paul Eggert <eggert@twinsun.com>
14569
14570 * doc/bison.texinfo: Update copyright date.
14571 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14572 (Symbols): Warn about running Bison in one character set,
14573 but compiling and/or running in an incompatible one.
14574 Warn about character code 256, too.
14575
14576 2002-04-03 Paul Eggert <eggert@twinsun.com>
14577
14578 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14579 YYERROR_VERBOSE is nonzero, not whether it is defined.
14580
14581 Merge changes from bison-1_29-branch.
14582
14583 2002-03-20 Paul Eggert <eggert@twinsun.com>
14584
14585 Merge fixes from Debian bison_1.34-1.diff.
14586
14587 * configure.in (AC_PREREQ): 2.53.
14588
14589 2002-03-20 Akim Demaille <akim@epita.fr>
14590
14591 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14592
14593 2002-03-19 Paul Eggert <eggert@twinsun.com>
14594
14595 * src/bison.simple (YYCOPY): New macro.
14596 (YYSTACK_RELOCATE): Use it.
14597 Remove Type arg; no longer needed. All callers changed.
14598 (yymemcpy): Remove; no longer needed.
14599
14600 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14601 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14602
14603 2002-03-19 Akim Demaille <akim@epita.fr>
14604
14605 Test and fix the #line outputs.
14606
14607 * tests/atlocal.at (GCC): New.
14608 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14609 (Prologue synch line, %union synch line, Postprologue synch line)
14610 (Action synch line, Epilogue synch line): New tests.
14611 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14612 * data/bison.simple, data/bison.c++: Use it.
14613
14614 2002-03-19 Akim Demaille <akim@epita.fr>
14615
14616 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14617 (Solved SR Conflicts, %expect not enough, %expect right)
14618 (%expect too much): Move to...
14619 * tests/conflicts.at: this new file.
14620
14621 2002-03-19 Akim Demaille <akim@epita.fr>
14622
14623 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14624 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14625 that we can move to enums for instance.
14626 * src/output.c (token_definitions_output): Output a list of
14627 `token-name, token-number' instead of the #define.
14628 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14629
14630 2002-03-14 Akim Demaille <akim@epita.fr>
14631
14632 Use Gettext 0.11.1.
14633
14634 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
14635
14636 * data/bison.c++: Make the user able to add members to the generated
14637 parser by subclassing.
14638
14639 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
14640
14641 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14642 a character.
14643 Reported by Nicolas Tisserand and Nicolas Burrus.
14644
14645 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14646
14647 * src/reader.c: Warn about lacking semi-colons, do not complain.
14648
14649 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14650
14651 * data/bison.c++: Remove a debug line.
14652
14653 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14654
14655 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14656 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14657 provide a default implementation.
14658
14659 2002-03-04 Akim Demaille <akim@epita.fr>
14660
14661 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14662 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14663 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14664 * tests/semantic.at (Parsing Guards): Similarly.
14665 * src/reader.at (readgram): Complain if the last rule is not ended
14666 with a semi-colon.
14667
14668 2002-03-04 Akim Demaille <akim@epita.fr>
14669
14670 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14671 * src/closure.c: here.
14672 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14673 RTC.
14674 * src/warshall.h, src/warshall.c: Remove.
14675 * tests/sets.at (Broken Closure): Adjust.
14676
14677 2002-03-04 Akim Demaille <akim@epita.fr>
14678
14679 * src/output.c (output_skeleton): tempdir is const.
14680 bytes_read is unused.
14681
14682 2002-03-04 Akim Demaille <akim@epita.fr>
14683
14684 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14685 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14686 Update.
14687 From Michael Hayes.
14688
14689 2002-03-04 Akim Demaille <akim@epita.fr>
14690
14691 * src/closure.c (closure): `r' is unused.
14692
14693 2002-03-04 Akim Demaille <akim@epita.fr>
14694
14695 * tests/sets.at (Broken Closure): Add the ending `;'.
14696 * src/reader.at (readgram): Complain if a rule is not ended with a
14697 semi-colon.
14698
14699 2002-03-04 Akim Demaille <akim@epita.fr>
14700
14701 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14702 (count_sr_conflicts): Use bitset_count.
14703 * src/reduce.c (inaccessable_symbols): Ditto.
14704 (bits_size): Remove.
14705 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14706
14707 2002-03-04 Akim Demaille <akim@epita.fr>
14708
14709 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14710 * src/reduce.c: Remove the `bitset_zero's following the
14711 `bitset_create's, as now it is performed by the latter.
14712
14713 2002-03-04 Akim Demaille <akim@epita.fr>
14714
14715 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14716 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14717 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14718 latest sources from Michael.
14719
14720 2002-03-04 Akim Demaille <akim@epita.fr>
14721
14722 * src/output.c (output): Don't free the grammar.
14723 * src/reader.c (grammar_free): New.
14724 * src/main.c (main): Call it and don't free symtab here.
14725
14726 2002-03-04 Akim Demaille <akim@epita.fr>
14727
14728 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14729 before returning.
14730 Reported by Benoit Perrot.
14731
14732 2002-03-04 Akim Demaille <akim@epita.fr>
14733
14734 Use bitset operations when possible, not loops over bits.
14735
14736 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14737 bitset_or.
14738 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14739 * src/reduce.c (useless_nonterminals): Formatting changes.
14740 * src/warshall.c (TC): Use bitset_or.
14741
14742 2002-03-04 Akim Demaille <akim@epita.fr>
14743
14744 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14745 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14746 Ditto.
14747
14748 2002-03-04 Akim Demaille <akim@epita.fr>
14749
14750 * src/lalr.c (F): Now a bitset*.
14751 Adjust all dependencies.
14752
14753 2002-03-04 Akim Demaille <akim@epita.fr>
14754
14755 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14756 Adjust all dependencies.
14757
14758 2002-03-04 Akim Demaille <akim@epita.fr>
14759
14760 * src/L0.c, src/LR0.h (nstates): Be size_t.
14761 Adjust comparisons (signed vs unsigned).
14762 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14763 bitset*.
14764 Adjust all dependencies.
14765
14766 2002-03-04 Akim Demaille <akim@epita.fr>
14767
14768 * src/closure.c (firsts): Now, also a bitset.
14769 Adjust all dependencies.
14770 (varsetsize): Remove, now unused.
14771 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14772
14773 2002-03-04 Akim Demaille <akim@epita.fr>
14774
14775 * src/print.c: Convert to use bitset.h, not hand coded iterations
14776 over ints.
14777
14778 2002-03-04 Akim Demaille <akim@epita.fr>
14779
14780 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14781
14782 2002-03-04 Akim Demaille <akim@epita.fr>
14783
14784 * src/closure.c (ruleset): Be a bitset.
14785 (rulesetsize): Remove.
14786
14787 2002-03-04 Akim Demaille <akim@epita.fr>
14788
14789 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14790 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14791 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14792 * src/closure.c (fderives): Be an array of bitsets.
14793
14794 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
14795
14796 * data/bison.c++: Merge the two generated headers. Insert a copyright
14797 notice in each output file.
14798
14799 2002-02-28 Akim Demaille <akim@epita.fr>
14800
14801 * data/bison.c++: Copy the prologue of bison.simple to fetch
14802 useful M4 definitions, such as b4_header_guard.
14803
14804 2002-02-25 Akim Demaille <akim@epita.fr>
14805
14806 * src/getargs.c (version): Give the name of the authors, and use a
14807 translator friendly scheme for the bgr
14808 copyright notice.
14809
14810 2002-02-25 Akim Demaille <akim@epita.fr>
14811
14812 * src/output.c (header_output): Remove, now handled completely via
14813 M4.
14814
14815 2002-02-25 Akim Demaille <akim@epita.fr>
14816
14817 * m4/m4.m4: New, from CVS Autoconf.
14818 * configure.in: Invoke it.
14819 * src/output.c (output_skeleton): Use its result instead of the
14820 hard coded name.
14821
14822 2002-02-25 Akim Demaille <akim@epita.fr>
14823
14824 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14825 Fileutils 4.1.5.
14826 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14827 * src/output.c (output_skeleton): Use mkstemp to create a real
14828 temporary file.
14829 Move the filling of `skeleton' and its muscle to...
14830 (prepare): here.
14831 (output): Move the definition of the prologue muscle to...
14832 (prepare): here.
14833 * src/system.h (DEFAULT_TMPDIR): New.
14834
14835 2002-02-14 Paul Eggert <eggert@twinsun.com>
14836
14837 Remove the support for C++ namespace cleanliness; it was
14838 causing more problems than it was curing, since it didn't work
14839 properly on some nonstandard C++ compilers. This can wait
14840 for a proper C++ parser.
14841
14842 * NEWS: Document this.
14843 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14844 of C++, as it's treated like C now.
14845 * src/bison.simple (YYSTD): Remove.
14846 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14847 Treat C++ just like Standard C instead of trying to support
14848 namespace cleanliness.
14849
14850 2002-02-14 Akim Demaille <akim@epita.fr>
14851
14852 * tests/regression.at (else): Adjust to Andreas' change.
14853
14854 2002-02-14 Akim Demaille <akim@epita.fr>
14855
14856 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14857
14858 2002-02-13 Andreas Schwab <schwab@suse.de>
14859
14860 * src/output.c (output_rule_data): Don't output NULL, it might
14861 not be defined yet.
14862
14863 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
14864
14865 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14866 (Copyright notice): Update.
14867
14868 2002-02-11 Akim Demaille <akim@epita.fr>
14869
14870 * tests/regression.at (%nonassoc and eof): Don't include
14871 nonportable headers.
14872
14873 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
14874
14875 * data/bison.c++: Correct error recovery. Make the user able to
14876 initialize the starting location.
14877
14878 2002-02-07 Akim Demaille <akim@epita.fr>
14879
14880 * tests/input.at: New.
14881
14882 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14883
14884 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14885 more consistent when naming methods and variables. Put preprocessor
14886 directives around tables only needed for debugging.
14887
14888 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14889
14890 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14891 C++ parsers.
14892 (yy::b4_name::parse): Use print_.
14893
14894 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14895
14896 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14897
14898 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14899
14900 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14901 C++ parsers.
14902 (yy::b4_name::parse): Build verbose error messages, and use error_.
14903
14904 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14905
14906 * data/bison.c++: Fix m4 quoting in comments.
14907
14908 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
14909
14910 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14911 not expanded by m4.
14912
14913 2002-02-05 Akim Demaille <akim@epita.fr>
14914
14915 * data/bison.c++: Adjust to the M4 back end.
14916 More is certainly needed.
14917
14918 2002-02-05 Akim Demaille <akim@epita.fr>
14919
14920 Give a try to M4 as a back end.
14921
14922 * lib/readpipe.c: New, from wdiff.
14923 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
14924 BISON_HAIRY.
14925 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
14926 specific values. Now it is m4 that performs the lookup.
14927 * src/parse-skel.y: Remove.
14928 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
14929 * src/output.c (actions_output, guards_output)
14930 (token_definitions_output): No longer keeps track of the output
14931 line number, hence remove the second argument.
14932 (guards_output): Check against the guard member of a rule, not the
14933 action member.
14934 Adjust callers.
14935 (output_skeleton): Don't look for the skeleton location, let m4 do
14936 that.
14937 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
14938 file will be used.
14939 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
14940 (prepare): Given that for the time being changesyntax is not
14941 usable in M4, rename the muscles using `-' to `_'.
14942 Define `defines_flag', `output_parser_name' and `output_header_name'.
14943 * src/output.h (actions_output, guards_output)
14944 (token_definitions_output): Adjust prototypes.
14945 * src/scan-skel.l: Instead of scanning the skeletons, it now
14946 processes the output of m4: `__oline__' and `#output'.
14947 * data/bison.simple: Adjust to be used by M4(sugar).
14948 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
14949 to date.
14950 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
14951 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
14952 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
14953 shamelessly stolen from CVS Autoconf.
14954
14955 2002-02-05 Akim Demaille <akim@epita.fr>
14956
14957 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
14958 * configure.in: Check for the declarations of free and malloc.
14959 * src/muscle_tab.c: Adjust.
14960
14961 2002-02-05 Akim Demaille <akim@epita.fr>
14962
14963 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
14964 which have no values.
14965
14966 2002-02-05 Akim Demaille <akim@epita.fr>
14967
14968 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
14969 * data/: here.
14970
14971 2002-01-29 Paul Eggert <eggert@twinsun.com>
14972
14973 * src/bison.simple (YYSIZE_T): Do not define merely because
14974 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
14975 On some platforms, <alloca.h> does not declare YYSTD (size_t).
14976
14977 2002-01-27 Akim Demaille <akim@epita.fr>
14978
14979 Fix `%nonassoc and eof'.
14980
14981 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
14982 which were not properly copied! Replace
14983 memcpy (res->errs, src->errs, src->nerrs);
14984 with
14985 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
14986 !!!
14987 * tests/regression.at (%nonassoc and eof): Adjust to newest
14988 Autotest: `.' is not in the PATH.
14989
14990 2002-01-27 Akim Demaille <akim@epita.fr>
14991
14992 * tests/sets.at (AT_EXTRACT_SETS): New.
14993 (Nullable): Use it.
14994 (Firsts): New.
14995
14996 2002-01-26 Akim Demaille <akim@epita.fr>
14997
14998 * tests/actions.at, tests/calc.at, tests/headers.at,
14999 * tests/torture.at: Adjust to the newest Autotest which no longer
15000 forces `.' in the PATH.
15001
15002 2002-01-25 Akim Demaille <akim@epita.fr>
15003
15004 * tests/regression.at (%nonassoc and eof): New.
15005 Suggested by Robert Anisko.
15006
15007 2002-01-24 Akim Demaille <akim@epita.fr>
15008
15009 Bison dumps core when trying to complain about broken input files.
15010 Reported by Cris van Pelt.
15011
15012 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15013 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15014 into...
15015 (Invalid inputs): Strengthen: exercise parse_percent_token.
15016
15017 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
15018
15019 * src/Makefile.am: Add bison.c++.
15020 * src/bison.c++: New skeleton.
15021
15022 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
15023
15024 * po/it.po: New.
15025
15026 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15027
15028 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15029
15030 2002-01-20 Marc Autret <marc@gnu.org>
15031
15032 * src/files.c (compute_output_file_names): Fix
15033
15034 2002-01-20 Marc Autret <marc@gnu.org>
15035
15036 * tests/output.at: New test.
15037 * src/files.c (compute_base_names): Don't map extensions when
15038 the YACC flag is set, use defaults.
15039 Reported by Evgeny Stambulchik.
15040
15041 2002-01-20 Marc Autret <marc@gnu.org>
15042
15043 * src/system.h: Need to define __attribute__ away for non-GCC
15044 compilers as well (i.e., the vendor C compiler).
15045 Suggested by Albert Chin-A-Young.
15046
15047 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15048
15049 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15050 canonical definition.
15051 * src/system.h: Use the canonical definition for PARAMS (avoids
15052 a conflict with the macro from lib/hash.h).
15053
15054 2002-01-11 Akim Demaille <akim@epita.fr>
15055
15056 * configure.in: Use AC_FUNC_STRNLEN.
15057 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
15058
15059 2002-01-09 Akim Demaille <akim@epita.fr>
15060
15061 * src/files.c, src/files.h (output_infix): New.
15062 (tab_extension): Remove.
15063 (compute_base_names): Compute the former, drop the latter.
15064 * src/output.c (prepare): Insert the muscles `output-infix', and
15065 `output-suffix'.
15066 * src/parse-skel.y (string, string.1): New.
15067 (section.header): Use it.
15068 (section.yacc): Remove.
15069 (prefix): Remove too.
15070 * src/scan-skel.l: Adjust.
15071 * src/bison.simple, src/bison.hairy: Adjust.
15072
15073 2002-01-09 Akim Demaille <akim@epita.fr>
15074
15075 * configure.in (WERROR_CFLAGS): Compute it.
15076 * src/Makefile.am (CFLAGS): Pass it.
15077 * tests/atlocal.in (CFLAGS): Idem.
15078 * src/files.c: Fix a few warnings.
15079 (get_extension_index): Remove, unused.
15080
15081 2002-01-08 Akim Demaille <akim@epita.fr>
15082
15083 * src/getargs.c (AS_FILE_NAME): New.
15084 (getargs): Use it to convert DOSish file names.
15085 * src/files.c (base_name): Rename as full_base_name to avoid
15086 clashes with `base_name ()'.
15087 (filename_split): New.
15088 (compute_base_names): N-th rewrite, using filename_split.
15089
15090 2002-01-08 Akim Demaille <akim@epita.fr>
15091
15092 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15093 New, stolen from the Fileutils 4.1.
15094 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15095 * configure.in: Check for the presence of memrchr, and of its
15096 prototype.
15097
15098 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15099
15100 * lib/hash.h (__P): Added definition for this macro.
15101 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15102 BUILT_SOURCES, to ensure they are generated first.
15103 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15104 %error-verbose to allow bootstrapping with bison 1.30x.
15105
15106 2002-01-06 Akim Demaille <akim@epita.fr>
15107
15108 * src/reader.c (parse_braces): Don't fetch the next char, the
15109 convention is to fetch on entry.
15110 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15111 'switch' without a following semicolon.
15112 * tests/regression.at (braces parsing): New.
15113
15114 2002-01-06 Akim Demaille <akim@epita.fr>
15115
15116 Bison is dead wrong in its RR conflict reports.
15117
15118 * tests/torture.at (GNU Cim Grammar): New.
15119 * src/conflicts.c (count_rr_conflicts): Fix.
15120
15121 2002-01-06 Akim Demaille <akim@epita.fr>
15122
15123 Creating package.m4 from configure.ac causes too many problems.
15124
15125 * tests/Makefile.am (package.m4): Create it by hand,
15126 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15127
15128 2002-01-06 Akim Demaille <akim@epita.fr>
15129
15130 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15131 skeleton.h.
15132
15133 2002-01-04 Paul Eggert <eggert@twinsun.com>
15134
15135 * doc/bison.texinfo (Debugging):
15136 Remove YYSTDERR; it's no longer defined or used.
15137 Also, s/cstdio.h/cstdio/.
15138
15139 2002-01-03 Akim Demaille <akim@epita.fr>
15140
15141 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15142
15143 2002-01-03 Akim Demaille <akim@epita.fr>
15144
15145 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15146 tracing code to --trace, wait for a better --trace option, with
15147 args.
15148
15149 2002-01-03 Akim Demaille <akim@epita.fr>
15150
15151 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15152 The ISO C++ standard is extremely clear about it: stderr is
15153 considered a macro, not a regular symbol (see table 94 `Header
15154 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15155 Therefore std:: does not apply to it. It still does with fprintf.
15156 Also, s/cstdio.h/cstdio/.
15157
15158 2002-01-03 Akim Demaille <akim@epita.fr>
15159
15160 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15161 for non system headers.
15162
15163 2002-01-02 Akim Demaille <akim@epita.fr>
15164
15165 Equip the skeleton chain with location tracking, runtime trace,
15166 pure parser and scanner.
15167
15168 * src/parse-skel.y: Request a pure parser, locations, and prefix
15169 renaming.
15170 (%union): Having several members with the same type does not help
15171 type mismatches, simplify.
15172 (YYPRINT, yyprint): New.
15173 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15174 (skel_error): this.
15175 Handle locations.
15176 * src/scan-skel.l: Adjust to these changes.
15177 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15178 (LOCATION_PRINT, skel_control_t): New.
15179
15180 2001-12-30 Akim Demaille <akim@epita.fr>
15181
15182 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15183 replace `gb' with BLANKS.
15184 * src/scan-skel.l: Adjust.
15185
15186 2001-12-30 Akim Demaille <akim@epita.fr>
15187
15188 * src/system.h: We don't need nor want bcopy.
15189 Throw away MS-DOS crap: we don't need getpid.
15190 * configure.in: We don't need strndup. It was even causing
15191 problems: because Flex includes the headers *before* us,
15192 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15193 not visible.
15194 * lib/xstrndup.c: New.
15195 * src/scan-skel.l: Use it.
15196 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15197 * src/parse-skel.y: Use %directives instead of #defines.
15198
15199 2001-12-30 Akim Demaille <akim@epita.fr>
15200
15201 * src/skeleton.h: New.
15202 * src/output.c (output_parser, output_master_parser): Remove, dead
15203 code.
15204 * src/output.h (get_lines_number, actions_output, guards_output)
15205 (token_definitions_output): Prototype them.
15206 * src/parse-skel.y: Add the license notice.
15207 Include output.h and skeleton.h.
15208 (process_skeleton): Returns void, and takes a single parameter.
15209 * src/scan-skel.l: Add the license notice.
15210 Include skeleton.h.
15211 Don't use %option yylineno: it seems that then Flex imagines
15212 REJECT has been used, and therefore it won't reallocate its
15213 buffers (which makes no other sense to me than a bug). It results
15214 in warnings for `unused: yy_flex_realloc'.
15215
15216 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
15217
15218 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15219 (MUSCLE_INSERT_PREFIX): ...to there.
15220 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15221 (MUSCLE_INSERT_PREFIX): Move from here...
15222
15223 * src/bison.hairy: Add a section directive. Put braces around muscle
15224 names. This parser skeleton is still broken, but Bison should not
15225 choke on a bad muscle 'syntax'.
15226 * src/bison.simple: Add a section directive. Put braces around muscle
15227 names.
15228
15229 * src/files.h (strsuffix, stringappend): Add declarations.
15230 (tab_extension): Add declaration.
15231 (short_base_name): Add declaration.
15232
15233 * src/files.c (strsuffix, stringappend): No longer static. These
15234 functions are used in the skeleton parser.
15235 (tab_extension): New.
15236 (compute_base_names): Use the computations done in this function
15237 to guess if the generated parsers should have '.tab' in their
15238 names.
15239 (short_base_name): No longer static.
15240
15241 * src/output.c (output_skeleton): New.
15242 (output): Disable call to output_master_parser, and give a try to
15243 a new skeleton handling system.
15244 (guards_output, actions_output): No longer static.
15245 (token_definitions_output, get_lines_number): No longer static.
15246
15247 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15248
15249 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
15250 parse-skel.y.
15251
15252 * src/parse-skel.y: New file.
15253 * src/scan-skel.l: New file.
15254
15255 2001-12-29 Akim Demaille <akim@epita.fr>
15256
15257 %name-prefix is broken.
15258
15259 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15260 Adjust all dependencies.
15261 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15262 %name-prefix.
15263
15264 Renaming yylval but not yylloc is not consistent. Now we do.
15265
15266 * src/bison.simple: Prefix yylloc if used.
15267 * doc/bison.texinfo (Decl Summary): Document that.
15268
15269 2001-12-29 Akim Demaille <akim@epita.fr>
15270
15271 * doc/bison.texinfo: Promote `%long-directive' over
15272 `%long_directive'.
15273 Remove all references to fixed-output-files, yacc is enough.
15274
15275 2001-12-29 Akim Demaille <akim@epita.fr>
15276
15277 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15278 user prologue. These are defaults.
15279 * tests/actions.at (Mid-rule actions): Make sure the user can
15280 define YYDEBUG and YYERROR_VERBOSE.
15281
15282 2001-12-29 Akim Demaille <akim@epita.fr>
15283
15284 * src/output.c (header_output): Don't forget to export YYLTYPE and
15285 yylloc.
15286 * tests/headers.at (export YYLTYPE): New, make sure it does.
15287 * tests/regression.at (%union and --defines, Invalid CPP headers):
15288 Move to...
15289 * tests/headers.at: here.
15290
15291 2001-12-29 Akim Demaille <akim@epita.fr>
15292
15293 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15294
15295 2001-12-29 Akim Demaille <akim@epita.fr>
15296
15297 * tests/actions.at (Mid-rule actions): Output on a single line
15298 instead of several.
15299
15300 2001-12-29 Akim Demaille <akim@epita.fr>
15301
15302 * doc/bison.texinfo: Formatting changes.
15303
15304 2001-12-29 Akim Demaille <akim@epita.fr>
15305
15306 Don't store the token defs in a muscle, just be ready to output it
15307 on command. Now possible via `symbols'. Fixes a memory leak.
15308
15309 * src/output.c (token_definitions_output): New.
15310 (output_parser, header_output): Use it.
15311 * src/reader.c (symbols_save): Remove.
15312
15313 2001-12-29 Akim Demaille <akim@epita.fr>
15314
15315 * src/bison.simple: Do not provide a default for YYSTYPE and
15316 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15317 default.
15318
15319 2001-12-29 Akim Demaille <akim@epita.fr>
15320
15321 Mid-rule actions are simply... ignored!
15322
15323 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15324 the empty-rule associated to the dummy symbol, not to the host
15325 rule.
15326 * tests/actions.at (Mid-rule actions): New.
15327
15328 2001-12-29 Akim Demaille <akim@epita.fr>
15329
15330 Memory leak.
15331
15332 * src/reader.c (reader): Free grammar.
15333
15334 2001-12-29 Akim Demaille <akim@epita.fr>
15335
15336 Memory leak.
15337
15338 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15339 since it allocates it for each state, although only one is needed.
15340 (allocate_storage): Do it here.
15341
15342 2001-12-29 Akim Demaille <akim@epita.fr>
15343
15344 * src/options.h, src/options.c (create_long_option_table): Rename
15345 as...
15346 (long_option_table_new): this, with a clearer prototype.
15347 (percent_table): Remove, unused,
15348 * src/getargs.c (getargs): Adjust.
15349
15350 2001-12-29 Akim Demaille <akim@epita.fr>
15351
15352 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15353 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15354 as states.
15355
15356 2001-12-29 Akim Demaille <akim@epita.fr>
15357
15358 * src/lalr.c (build_relations): Rename `states' as `states1'.
15359 Sorry, I don't understand exactly what it is, no better name...
15360
15361 2001-12-29 Akim Demaille <akim@epita.fr>
15362
15363 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15364 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15365 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15366 as rules.
15367
15368 2001-12-29 Akim Demaille <akim@epita.fr>
15369
15370 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15371 ago.
15372
15373 2001-12-29 Akim Demaille <akim@epita.fr>
15374
15375 * src/reader.c, src/reader.h (user_toknums): Remove.
15376 Adjust all users to use symbols[i]->user_token_number.
15377
15378 2001-12-29 Akim Demaille <akim@epita.fr>
15379
15380 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15381 Adjust all users to use symbols[i]->prec or ->assoc.
15382
15383 2001-12-29 Akim Demaille <akim@epita.fr>
15384
15385 * src/reader.c, src/reader.h (tags): Remove.
15386 Adjust all users to use symbols[i]->tag.
15387
15388 2001-12-29 Akim Demaille <akim@epita.fr>
15389
15390 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15391 and rule_table.
15392 * src/reader.c (packsymbols): Fill this table.
15393 Drop sprec.
15394 * src/conflicts.c (resolve_sr_conflict): Adjust.
15395 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15396 single table.
15397 Use symbols[i]->tag instead of tags[i].
15398
15399 2001-12-29 Akim Demaille <akim@epita.fr>
15400
15401 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15402 In addition, put a comment in there, to replace...
15403 * tests/regression.at (%union and C comments): Remove.
15404
15405 2001-12-29 Akim Demaille <akim@epita.fr>
15406
15407 * tests/regression.at (Web2c Actions): Blindly move the actual
15408 output as expected output. The contents *seem* right to me, but I
15409 can't pretend reading perfectly parser tables... Nonetheless, all
15410 the other tests pass correctly, the table look OK, even though the
15411 presence of `$axiom' is to be noted: AFAICS it is useless (but
15412 harmless).
15413
15414 2001-12-29 Akim Demaille <akim@epita.fr>
15415
15416 * src/reader.c (readgram): Don't add the rule 0 if there were no
15417 rules read. In other words, add it _after_ having performed
15418 grammar sanity checks.
15419 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15420
15421 2001-12-29 Akim Demaille <akim@epita.fr>
15422
15423 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15424 visible, and some states have now a different number.
15425
15426 2001-12-29 Akim Demaille <akim@epita.fr>
15427
15428 * src/reader.c (readgram): Bind the initial rule's lineno to that
15429 of the first rule.
15430 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15431 (Solved SR Conflicts): Adjust rule 0's line number.
15432
15433 2001-12-29 Akim Demaille <akim@epita.fr>
15434
15435 Fix the `GAWK Grammar' failure.
15436
15437 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15438 the reductions of the first state which was mistakenly confused
15439 with the final state because precisely final_state was initialized
15440 to 0.
15441 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15442 now noticed by Bison.
15443 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15444 have a reduction on $default.
15445
15446 2001-12-29 Akim Demaille <akim@epita.fr>
15447
15448 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15449 rule line numbers.
15450 * src/closure.c (print_closure): Likewise.
15451 * src/derives.c (print_derives): Likewise.
15452 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15453 now.
15454
15455 2001-12-29 Akim Demaille <akim@epita.fr>
15456
15457 * src/lalr.c (lookaheads_print): New.
15458 (lalr): Call it when --trace-flag.
15459 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15460 are dumped.
15461
15462 2001-12-29 Akim Demaille <akim@epita.fr>
15463
15464 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15465 when walking through ritem, even via rule->rhs.
15466 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15467 (useful_production, useless_nonterminals): Likewise.
15468 (reduce_grammar_tables): Likewise, plus update nritems.
15469 * src/nullable.c (set_nullable): Likewise.
15470 * src/lalr.c (build_relations): Likewise.
15471 * tests/sets.at (Nullable): Adjust.
15472 Fortunately, now, the $axiom is no longer nullable.
15473
15474 2001-12-29 Akim Demaille <akim@epita.fr>
15475
15476 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15477 the 0-sentinel.
15478 * src/gram.c (ritem_longest_rhs): Likewise.
15479 * src/reduce.c (nonterminals_reduce): Likewise.
15480 * src/print_graph.c (print_graph): Likewise.
15481 * src/output.c (output_rule_data): Likewise.
15482 * src/nullable.c (set_nullable): Likewise.
15483
15484 2001-12-29 Akim Demaille <akim@epita.fr>
15485
15486 * src/output.c: Comment changes.
15487
15488 2001-12-27 Paul Eggert <eggert@twinsun.com>
15489
15490 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15491 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15492 Sparc, as they were causing more porting problems than the
15493 (minor) performance improvement was worth.
15494
15495 Also, catch up with 1.31's YYSTD.
15496
15497 2001-12-27 Akim Demaille <akim@epita.fr>
15498
15499 * src/output.c (output_gram): Rely on nritems, not the
15500 0-sentinel. See below.
15501 Use -1 as separator, not 0.
15502 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15503 Rely on -1 as separator in yyrhs, instead of 0.
15504 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15505 twice `Now at end of input', therefore there are two lines less to
15506 expect.
15507
15508 2001-12-27 Akim Demaille <akim@epita.fr>
15509
15510 * tests/regression.at (Unresolved SR Conflicts):
15511 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15512 below.
15513
15514 2001-12-27 Akim Demaille <akim@epita.fr>
15515
15516 * src/LR0.c (new_state): Recognize the final state by the fact it
15517 is reached by eoftoken.
15518 (insert_start_shifting_state, insert_eof_shifting_state)
15519 (insert_accepting_state, augment_automaton): Remove, since now
15520 these states are automatically computed from the initial state.
15521 (generate_states): Adjust.
15522 * src/print.c: When reporting a rule number to the user, substract
15523 1, so that the axiom rule is rule 0, and the first user rule is 1.
15524 * src/reduce.c: Likewise.
15525 * src/print_graph.c (print_core): For the time being, just as for
15526 the report, depend upon --trace-flags to dump the full set of
15527 items.
15528 * src/reader.c (readgram): Once the grammar read, insert the rule
15529 0: `$axiom: START-SYMBOL $'.
15530 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15531 number of the states has changed (the final state is no longer
15532 necessarily the last), catch up.
15533
15534 2001-12-27 Akim Demaille <akim@epita.fr>
15535
15536 Try to make the use of the eoftoken valid. Given that its value
15537 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15538 is used instead of > 0 where appropriate, (ii), depend upon nritems
15539 instead of the 0-sentinel.
15540
15541 * src/gram.h, src/gram.c (nritems): New.
15542 Expected to be duplication of nitems, but for the time being...
15543 * src/reader.c (packgram): Assert nritems and nitems are equal.
15544 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15545 * src/closure.c (print_closure, print_fderives): Likewise.
15546 * src/gram.c (ritem_print): Likewise.
15547 * src/print.c (print_core, print_grammar): Likewise.
15548 * src/print_graph.c: Likewise.
15549
15550 2001-12-27 Akim Demaille <akim@epita.fr>
15551
15552 * src/main.c (main): If there are complains after grammar
15553 reductions, then output the report anyway if requested, then die.
15554 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15555 * src/reader.c (eoftoken): New.
15556 (parse_token_decl): If the token being defined has value `0', it
15557 is the eoftoken.
15558 (packsymbols): No longer hack `tags' to insert `$' by hand.
15559 Be sure to preserve the value of the eoftoken.
15560 (reader): Make sure eoftoken is defined.
15561 Initialize nsyms to 0: now eoftoken is created just like the others.
15562 * src/print.c (print_grammar): Don't special case the eof token.
15563 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15564 lie anyway, albeit pleasant.
15565 * tests/calc.at: Exercise error messages with eoftoken.
15566 Change the grammar so that empty input is invalid.
15567 Adjust expectations.
15568 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15569
15570 2001-12-27 Akim Demaille <akim@epita.fr>
15571
15572 * configure.in: Check the protos of strchr ans strspn.
15573 Replace strchr if needed.
15574 * src/system.h: Provide the protos of strchr, strspn and memchr if
15575 missing.
15576 * lib/strchr.c: New.
15577 * src/reader.c (symbols_save): Use strchr.
15578
15579 2001-12-27 Akim Demaille <akim@epita.fr>
15580
15581 * src/print.c, src/print_graph.c (escape): New.
15582 Use it to quote the TAGS outputs.
15583 * src/print_graph.c (print_state): Now errors are in red, and
15584 reductions in green.
15585 Prefer high to wide: output the state number on a line of its own.
15586
15587 2001-12-27 Akim Demaille <akim@epita.fr>
15588
15589 * src/state.h, src/state.c (reductions_new): New.
15590 * src/LR0.c (set_state_table): Let all the states have a
15591 `reductions', even if reduced to 0.
15592 (save_reductions): Adjust.
15593 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15594 * src/print.c (print_reductions, print_actions): Adjust.
15595 * src/output.c (action_row): Adjust.
15596
15597 2001-12-27 Akim Demaille <akim@epita.fr>
15598
15599 * src/state.h, src/state.c (errs_new, errs_dup): New.
15600 * src/LR0.c (set_state_table): Let all the states have an errs,
15601 even if reduced to 0.
15602 * src/print.c (print_errs, print_reductions): Adjust.
15603 * src/output.c (output_actions, action_row): Adjust.
15604 * src/conflicts.c (resolve_sr_conflict): Adjust.
15605
15606 2001-12-27 Akim Demaille <akim@epita.fr>
15607
15608 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15609
15610 2001-12-27 Akim Demaille <akim@epita.fr>
15611
15612 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15613 * src/print.c: here.
15614 (lookaheadset, shiftset): New, used as additional storage by
15615 print_reductions.
15616 (print_results): Adjust.
15617 (print_shifts, print_gotos, print_errs): New, extracted from...
15618 (print_actions): here.
15619 * src/print_graph.c (print_actions): Remove dead code.
15620
15621 2001-12-27 Akim Demaille <akim@epita.fr>
15622
15623 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15624 `$n' and `@n'.
15625
15626 2001-12-27 Akim Demaille <akim@epita.fr>
15627
15628 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15629 (build_relations): Adjust.
15630
15631 2001-12-27 Akim Demaille <akim@epita.fr>
15632
15633 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15634 duplication.
15635
15636 2001-12-27 Akim Demaille <akim@epita.fr>
15637
15638 * src/reader.c (packgram): Catch nitems overflows.
15639
15640 2001-12-27 Akim Demaille <akim@epita.fr>
15641
15642 * src/files.c, src/files.h (guard_obstack): Remove.
15643 * src/output.c (output): Adjust.
15644 * src/reader.c (parse_braces): New, factoring...
15645 (copy_action, copy_guard): these two which are renamed as...
15646 (parse_action, parse_guard): these.
15647 As a voluntary consequence, using braces around guards is now
15648 mandatory.
15649
15650 2001-12-27 Akim Demaille <akim@epita.fr>
15651
15652 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15653 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15654 members.
15655 (symbol_list_new): Adjust.
15656 (copy_action): action_line is the first line, not the last.
15657 (copy_guard): Just as for actions, store the `action' only, not
15658 the switch/case/break flesh.
15659 Don't parse the user action that might follow the guard, let...
15660 (readgram): do it, i.e., now, there can be an action after a
15661 guard.
15662 In other words the guard is just explicitly optional.
15663 (packgram): Adjust.
15664 * src/output.c (guards_output): New.
15665 (output_parser): Call it when needed.
15666 (output): Also free the guard and attrs obstacks.
15667 * src/files.c, src/files.h (obstack_save): Remove.
15668 (output_files): Remove.
15669 As a result, if one needs the former `.act' file, using an
15670 appropriate skeleton which requires actions and guards is now
15671 required.
15672 * src/main.c (main): Adjust.
15673 * tests/semantic.at: New.
15674 * tests/regression.at: Use `input.y' as input file name.
15675 Avoid 8+3 problems by requiring input.c when the test needs the
15676 parser.
15677
15678 2001-12-27 Akim Demaille <akim@epita.fr>
15679
15680 * src/reader.c (symbol_list_new): Be sure to initialize all the
15681 fields.
15682
15683 2001-12-27 Akim Demaille <akim@epita.fr>
15684
15685 All the hacks using a final pseudo state are now useless.
15686
15687 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15688 * src/lalr.c (nLA): New.
15689 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15690 instead of lookaheadsp from the pseudo state (nstate + 1).
15691
15692 2001-12-27 Akim Demaille <akim@epita.fr>
15693
15694 * src/output.c (action_row, token_actions): Use a state_t instead
15695 of a integer, and nlookaheads instead of the following state's
15696 lookaheadsp.
15697
15698 2001-12-27 Akim Demaille <akim@epita.fr>
15699
15700 * src/conflicts.c (log_resolution, flush_shift)
15701 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15702 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15703 (conflicts_print, print_reductions): Use a state_t instead of an
15704 integer when referring to a state.
15705 As much as possible, depend upon nlookaheads, instead of the
15706 `lookaheadsp' member of the following state (since lookaheads of
15707 successive states are successive, the difference between state n + 1
15708 and n served as the number of lookaheads for state n).
15709 * src/lalr.c (add_lookback_edge): Likewise.
15710 * src/print.c (print_core, print_actions, print_state)
15711 (print_results): Likewise.
15712 * src/print_graph.c (print_core, print_actions, print_state)
15713 (print_graph): Likewise.
15714 * src/conflicts.h: Adjust.
15715
15716 2001-12-27 Akim Demaille <akim@epita.fr>
15717
15718 * src/bison.hairy: Formatting/comment changes.
15719 ANSIfy.
15720 Remove `register' indications.
15721 Add plenty of `static'.
15722
15723 2001-12-27 Akim Demaille <akim@epita.fr>
15724
15725 * src/output.c (prepare): Drop the muscle `ntbase' which
15726 duplicates ntokens.
15727 * src/bison.simple: Formatting/comment changes.
15728 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15729 is an undocumented synonym.
15730
15731 2001-12-22 Akim Demaille <akim@epita.fr>
15732
15733 * src/output.c (output_table_data): Change the prototype to use
15734 `int' for array ranges: some invocations do pass an int, not a
15735 short.
15736 Reported by Wayne Green.
15737
15738 2001-12-22 Akim Demaille <akim@epita.fr>
15739
15740 Some actions of web2c.y are improperly triggered.
15741 Reported by Mike Castle.
15742
15743 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15744 * tests/regression.at (Web2c): Rename as...
15745 (Web2c Report): this.
15746 (Web2c Actions): New.
15747
15748 2001-12-22 Akim Demaille <akim@epita.fr>
15749
15750 Reductions in web2c.y are improperly reported.
15751 Reported by Mike Castle.
15752
15753 * src/conflicts.c (print_reductions): Fix.
15754 * tests/regression.at (Web2c): New.
15755
15756 2001-12-18 Akim Demaille <akim@epita.fr>
15757
15758 Some host fail on `assert (!"foo")', which expands to
15759 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15760 Reported by Nelson Beebee.
15761
15762 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15763 `#define it_succeeded 0' and `assert (it_succeeded)'.
15764
15765 2001-12-17 Marc Autret <autret_m@epita.fr>
15766
15767 * src/bison.simple: Don't hard code the skeleton line and filename.
15768 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15769 New line counter 'skeleton_line' (skeleton-line muscle).
15770
15771 2001-12-17 Paul Eggert <eggert@twinsun.com>
15772
15773 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15774 YYDEBUG must be defined to a nonzero value.
15775
15776 * src/bison.simple (yytname): Do not assume that the user defines
15777 YYDEBUG to a properly parenthesized expression.
15778
15779 2001-12-17 Akim Demaille <akim@epita.fr>
15780
15781 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15782 nlookaheads is a new member.
15783 Adjust all users.
15784 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15785 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15786 state.
15787
15788 2001-12-17 Akim Demaille <akim@epita.fr>
15789
15790 * src/files.h, src/files.c (open_files, close_files): Remove.
15791 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15792 let...
15793 * src/reader.c (reader): Do it.
15794
15795 2001-12-17 Akim Demaille <akim@epita.fr>
15796
15797 * src/conflicts.c (print_reductions): Formatting changes.
15798
15799 2001-12-17 Akim Demaille <akim@epita.fr>
15800
15801 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15802 (flush_reduce): New.
15803 (resolve_sr_conflict): Adjust.
15804
15805 2001-12-17 Akim Demaille <akim@epita.fr>
15806
15807 * src/output.c (output_obstack): Be static and rename as...
15808 (format_obstack): this, to avoid any confusion with files.c's
15809 output_obstack.
15810 * src/reader.h (muscle_obstack): Move to...
15811 * src/output.h: here, since it's defined in output.c.
15812
15813 2001-12-17 Akim Demaille <akim@epita.fr>
15814
15815 * src/output.c (action_row, save_column, default_goto)
15816 (sort_actions, matching_state, pack_vector): Better variable
15817 locality.
15818
15819 2001-12-17 Akim Demaille <akim@epita.fr>
15820
15821 * src/output.c: Various formatting changes.
15822
15823 2001-12-17 Akim Demaille <akim@epita.fr>
15824
15825 * src/files.c (output_files): Free the output_obstack.
15826 * src/main.c (main): Call print and print_graph conditionally.
15827 * src/print.c (print): Work unconditionally.
15828 * src/print_graph.c (print_graph): Work unconditionally.
15829 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15830
15831 2001-12-16 Marc Autret <autret_m@epita.fr>
15832
15833 * src/output.c (actions_output): Fix. When we use %no-lines,
15834 there is one less line per action.
15835
15836 2001-12-16 Marc Autret <autret_m@epita.fr>
15837
15838 * src/bison.simple: Remove a useless #line directive.
15839 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15840 * src/output.c (get_lines_number): New.
15841 (output_parser): Adjust, now takes care about the lines of a
15842 output muscles.
15843 Fix line numbering.
15844 (actions_output): Computes the number of lines taken by actions.
15845 (output_master_parser): Insert new skeleton which is the name of
15846 the output parser file name.
15847
15848 2001-12-15 Marc Autret <autret_m@epita.fr>
15849
15850 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15851
15852 2001-12-15 Marc Autret <autret_m@epita.fr>
15853
15854 * src/output.c (output_gram): Keep track of the hairy one.
15855
15856 2001-12-15 Akim Demaille <akim@epita.fr>
15857
15858 Make `make distcheck' work.
15859
15860 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15861 system.h which uses libgettext.h.
15862
15863 2001-12-15 Akim Demaille <akim@epita.fr>
15864
15865 * src/nullable.c (set_nullable): Useless rules must be skipped,
15866 otherwise, since we range over their symbols, we might look at a
15867 nonterminal which no longer ``exists'', i.e., it is not counted in
15868 `nvars', hence we overflow our arrays.
15869
15870 2001-12-15 Akim Demaille <akim@epita.fr>
15871
15872 The header can also be produced directly, without any obstack!
15873 Yahoo!
15874
15875 * src/files.c, src/files.h (defines_obstack): Remove.
15876 (compute_header_macro): Global.
15877 (defines_obstack_save): Remove.
15878 * src/reader.c (parse_union_decl): No longer output to
15879 defines_obstack: its content can be found in the `stype' muscle
15880 anyway.
15881 (output_token_translations): Merge into...
15882 (symbols_output): this.
15883 Rename as...
15884 (symbols_save): this.
15885 (reader): Adjust.
15886 * src/output.c (header_output): New.
15887 (output): Call it.
15888
15889 2001-12-15 Akim Demaille <akim@epita.fr>
15890
15891 * src/reader.c (parse_union_decl): Instead of handling two obstack
15892 simultaneously, use one to define the `stype' muscle, and use the
15893 value of the latter to fill defines_obstack.
15894 (copy_comment): Remove.
15895 (copy_comment2): Work for a single obstack.
15896 Rename as...
15897 (copy_comment): this.
15898
15899 2001-12-15 Akim Demaille <akim@epita.fr>
15900
15901 * src/lex.c, src/lex.h (xgetc): No longer static.
15902 * src/reader.c (parse_union_decl): Revamp.
15903
15904 2001-12-15 Akim Demaille <akim@epita.fr>
15905
15906 Still making progress in separating Bison into (i) input, (ii)
15907 process, (iii) output: now we can directly output the parser file
15908 without using table_obstack at all.
15909
15910 * src/files.c, src/files.h (table_obstack): Bye bye.
15911 (parser_file_name): New.
15912 * src/files.c (compute_output_file_names): Compute it.
15913 * src/output.c (actions_output, output_parser)
15914 (output_master_parser): To a file instead of an obstack.
15915
15916 2001-12-15 Akim Demaille <akim@epita.fr>
15917
15918 Attach actions to rules, instead of pre-outputting them to
15919 actions_obstack.
15920
15921 * src/gram.h (rule_t): action and action_line are new members.
15922 * src/reader.c (symbol_list): Likewise.
15923 (copy_action): Save the actions within the rule.
15924 (packgram): Save them in rule_table.
15925 * src/output.c (actions_output): New.
15926 (output_parser): Use it on `%%actions'.
15927 (output_rule_data): Don't free rule_table.
15928 (output): Do it.
15929 (prepare): Don't save the `action' muscle.
15930 * src/bison.simple: s/%%action/%%actions/.
15931
15932 2001-12-15 Akim Demaille <akim@epita.fr>
15933
15934 * src/reader.c (copy_action): When --yacc, don't append a `;'
15935 to the user action: let it fail if lacking.
15936 Suggested by Arnold Robbins and Tom Tromey.
15937
15938 2001-12-14 Akim Demaille <akim@epita.fr>
15939
15940 * src/lex.c (literalchar): Simply return the char you decoded, non
15941 longer mess around with obstacks and int pointers.
15942 Adjust all callers.
15943
15944 2001-12-14 Akim Demaille <akim@epita.fr>
15945
15946 * src/lex.c (literalchar): Don't escape the special characters,
15947 just decode them, and keep them as char (before, eol was output as
15948 the 2 char string `\n' etc.).
15949 * src/output.c (output_rule_data): Use quotearg to output the
15950 token strings.
15951
15952 2001-12-13 Paul Eggert <eggert@twinsun.com>
15953
15954 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
15955 Do not infringe on the global user namespace when using C++.
15956 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
15957 All uses of `fprintf' and `stderr' changed.
15958
15959 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
15960
15961 2001-12-13 Akim Demaille <akim@epita.fr>
15962
15963 The computation of nullable is broken: it doesn't handle empty
15964 RHS's properly.
15965
15966 * tests/torture.at (GNU AWK Grammar): New.
15967 * tests/sets.at (Nullable): New.
15968 * src/nullable.c (set_nullable): Instead of blindly looping over
15969 `ritems', loop over the rules, and then over their rhs's.
15970
15971 Work around Autotest bugs.
15972
15973 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
15974 frame, because Autotest understand lines starting with a `+' as
15975 traces from the shell. Then, they are not processed properly.
15976 Admittedly an Autotest bug, but we don't have time to wait for
15977 Autotest to catch up.
15978 * tests/regression.at (Broken Closure): Adjust to the new table
15979 frames.
15980 Move to...
15981 * tests/sets.at: here.
15982
15983 2001-12-13 Akim Demaille <akim@epita.fr>
15984
15985 * src/closure.c (closure): Use nrules instead of playing tricks
15986 with BITS_PER_WORD.
15987
15988 2001-12-13 Akim Demaille <akim@epita.fr>
15989
15990 * src/print.c (print_actions): Output the handling of `$' as the
15991 traces do: shifting the token EOF. Before EOF was treated as a
15992 nonterminal.
15993 * tests/regression.at: Adjust some tests.
15994 * src/print_graph.c (print_core): Complete the set of items via
15995 closure. The next-to-final and final states are still unsatisfying,
15996 but that's to be addressed elsewhere.
15997 No longer output the rule numbers, but do output the state number.
15998 A single loop for the shifts + gotos is enough, but picked a
15999 distinct color for each.
16000 (print_graph): Initialize and finalize closure.
16001
16002 2001-12-13 Akim Demaille <akim@epita.fr>
16003
16004 * src/reader.c (readgram): Remove dead code, an strip useless
16005 braces.
16006 (get_type): Remove, unused.
16007
16008 2001-12-12 Akim Demaille <akim@epita.fr>
16009
16010 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16011 on that of lib/error.c.
16012
16013 2001-12-12 Akim Demaille <akim@epita.fr>
16014
16015 Some hosts don't like `/' in includes.
16016
16017 * src/system.h: Include libgettext.h without qualifying the path.
16018 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16019 $(top_srcdir).
16020
16021 2001-12-11 Marc Autret <autret_m@epita.fr>
16022
16023 * src/output.c (output_parser): Remove useless muscle.
16024
16025 2001-12-11 Marc Autret <autret_m@epita.fr>
16026
16027 * src/bison.simple: Remove #line just before %%epilogue. It
16028 is now handled in ...
16029 * src/reader.c (read_additionnal_code): Add the output of a
16030 #line for the epilogue.
16031
16032 2001-12-10 Marc Autret <autret_m@epita.fr>
16033
16034 * src/reader.c (copy_definition): Re-use CPP-outed code which
16035 replace precedent remove.
16036 * src/bison.simple: Remove #line before %%prologue because
16037 %%input-line is wrong at this time.
16038
16039 2001-12-10 Marc Autret <autret_m@epita.fr>
16040
16041 * src/reader.c (symbols_output): Clean up.
16042 * src/output.c (output_gram, output): Clean up.
16043
16044 2001-12-10 Akim Demaille <akim@epita.fr>
16045
16046 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16047 * src/LR0.c (set_state_table): here.
16048 * src/lalr.c (lalr): Call it.
16049
16050 2001-12-10 Akim Demaille <akim@epita.fr>
16051
16052 * src/state.h (shifts): Remove the `number' member: shifts are
16053 attached to state, hence no longer need to be labelled with a
16054 state number.
16055
16056 2001-12-10 Akim Demaille <akim@epita.fr>
16057
16058 Now that states have a complete set of members, the linked list of
16059 shifts is useless: just fill directly the state's shifts member.
16060
16061 * src/state.h (shifts): Remove the `next' member.
16062 * src/LR0.c (first_state, last_state): Remove.
16063 Adjust the callers.
16064 (augment_automaton): Don't look for the shifts that must be added
16065 a shift on EOF: it is those of the state we looked for! But now,
16066 since shifts are attached, it is no longer needed to looking
16067 merely by its id: its number.
16068
16069 2001-12-10 Akim Demaille <akim@epita.fr>
16070
16071 * src/LR0.c (augment_automaton): Better variable locality.
16072 Remove an impossible branch: if there is a state corresponding to
16073 the start symbol being shifted, then there is shift for the start
16074 symbol from the initial state.
16075
16076 2001-12-10 Akim Demaille <akim@epita.fr>
16077
16078 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16079 only when appropriate: when insert_start_shifting_state' is not
16080 invoked.
16081 * tests/regression.at (Rule Line Numbers): Adjust.
16082
16083 2001-12-10 Akim Demaille <akim@epita.fr>
16084
16085 * src/LR0.c (augment_automaton): Now that all states have shifts,
16086 merge the two cases addition shifts to the initial state.
16087
16088 2001-12-10 Akim Demaille <akim@epita.fr>
16089
16090 * src/lalr.c (set_state_table): Move to...
16091 * src/LR0.c: here.
16092 * src/lalr.c (lalr): Don't call it...
16093 * src/LR0.c (generate_states): do it.
16094 * src/LR0.h (first_state): Remove, only the table is used.
16095
16096 2001-12-10 Akim Demaille <akim@epita.fr>
16097
16098 * src/LR0.h (first_shift, first_reduction): Remove.
16099 * src/lalr.c: Don't use first_shift: find shifts through the
16100 states.
16101
16102 2001-12-10 Akim Demaille <akim@epita.fr>
16103
16104 * src/LR0.c: Attach shifts to states as soon as they are
16105 computed.
16106 * src/lalr.c (set_state_table): Instead of assigning shifts to
16107 state, just assert that the mapping was properly done.
16108
16109 2001-12-10 Akim Demaille <akim@epita.fr>
16110
16111 * src/LR0.c (insert_start_shift): Rename as...
16112 (insert_start_shifting_state): this.
16113 (insert_eof_shifting_state, insert_accepting_state): New.
16114 (augment_automaton): Adjust.
16115 Better locality of the variables.
16116 When looking if the start_symbol is shifted from the initial
16117 state, using `while (... symbol != start_symbol ...)' sounds
16118 better than `while (... symbol < start_symbol ...)': If fail
16119 to see how the order between symbols could be relevant!
16120
16121 2001-12-10 Akim Demaille <akim@epita.fr>
16122
16123 * src/getargs.h: Don't declare `spec_name_prefix' and
16124 `spec_file_prefix', declared by src/files.h.
16125 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16126 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16127 * src/output.c (prepare): Adjust.
16128 * src/reader.c (symbols_output): Likewise.
16129 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16130
16131 2001-12-10 Akim Demaille <akim@epita.fr>
16132
16133 * src/muscle_tab.c (muscle_init): NULL is a better default than
16134 `"0"'.
16135
16136 2001-12-10 Akim Demaille <akim@epita.fr>
16137
16138 * src/reader.c (reader): Calling symbols_output once is enough.
16139
16140 2001-12-10 Akim Demaille <akim@epita.fr>
16141
16142 Now that states have a complete set of members, the linked list of
16143 reductions is useless: just fill directly the state's reductions
16144 member.
16145
16146 * src/state.h (struct reductions): Remove member `number' and
16147 `next'.
16148 * src/LR0.c (first_reduction, last_reduction): Remove.
16149 (save_reductions): Don't link the new reductions, store them in
16150 this_state.
16151 * src/lalr.c (set_state_table): No need to attach reductions to
16152 states, it's already done.
16153 * src/output.c (output_actions): No longer free the shifts, then
16154 the reductions, then the states: free all the states and their
16155 members.
16156
16157 2001-12-10 Akim Demaille <akim@epita.fr>
16158
16159 * src/options.c (OPTN, DRTV, BOTH): New.
16160 (option_table): Use them.
16161
16162 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16163 the job of system.h.
16164 * src/options.c: Don't include stdio.h and xalloc.h for the same
16165 reasons.
16166
16167 2001-12-10 Akim Demaille <akim@epita.fr>
16168
16169 * src/output.c (output, prepare): Make sure the values of the
16170 muscles `action' and `prologue' are 0-terminated.
16171
16172 2001-12-10 Akim Demaille <akim@epita.fr>
16173
16174 Clean up GCC warnings.
16175
16176 * src/reader.c (copy_action): `buf' is not used.
16177 (parse_skel_decl): Be static.
16178 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16179 * src/options.h (create_long_option_table): Have a real prototype.
16180 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16181 (hash_delete_at): Return const void *.
16182 Adjust casts to preserve the const.
16183
16184 2001-12-10 Akim Demaille <akim@epita.fr>
16185
16186 * configure.in: Require 2.52g.
16187 M4 is not needed, but AUTOM4TE is.
16188 * m4/m4.m4: Remove.
16189 * tests/Makefile.am: Adjust.
16190
16191 2001-12-10 Akim Demaille <akim@epita.fr>
16192
16193 One structure for states is enough, even though theoretically
16194 there are LR(0) states and LALR(1) states.
16195
16196 * src/lalr.h (state_t): Remove.
16197 (state_table): Be state_t **, not state_t *.
16198 * src/state.h (core, CORE_ALLOC): Rename as...
16199 (state_t, STATE_ALLOC): this.
16200 Add the LALR(1) members: shifts, reductions, errs.
16201 * src/LR0.c (state_table): Rename as...
16202 (state_hash): this, to avoid name clashes with the global
16203 `state_table'.
16204 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16205 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16206
16207 2001-12-10 Akim Demaille <akim@epita.fr>
16208
16209 Bison dumps core on bash.y.
16210 Reported by Pascal Bart.
16211
16212 * src/warshall.c (bitmatrix_print): New.
16213 (TC): Use it.
16214 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
16215 j must be the outer loop.
16216 * tests/regression.at (Broken Closure): New.
16217
16218 2001-12-05 Akim Demaille <akim@epita.fr>
16219
16220 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16221 its argument.
16222 Reported by Peter Hamorsky.
16223
16224 2001-12-05 Akim Demaille <akim@epita.fr>
16225
16226 * src/conflicts.c (err_table): Remove.
16227 (resolve_sr_conflict): Adjust.
16228 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16229 Rename as...
16230 (state_t.reductions, state_t.shifts): this.
16231
16232 2001-12-05 Akim Demaille <akim@epita.fr>
16233
16234 * src/reduce.c (reduce_grammar_tables): No longer disable the
16235 removal of useless rules via CPP but via `if (0)', so that the
16236 compiler still check the code is valid.
16237 For instance, it should have noticed `rline' no longer exists: use
16238 the `line' member of rule_t.
16239 * src/gram.c (dummy, rline): Remove, unused.
16240
16241 2001-12-05 Akim Demaille <akim@epita.fr>
16242
16243 * src/output.c (pack_vector): Use assert, not berror.
16244 * src/main.c (berror): Remove, unused.
16245
16246 2001-12-05 Akim Demaille <akim@epita.fr>
16247
16248 New experimental feature: if --verbose --trace output all the
16249 items of a state, not only its kernel.
16250
16251 * src/print.c (print_core): If `trace_flag', then invoke closure
16252 before outputting the items of the state (print_core is no longer
16253 a correct name them).
16254 (print_results): Invoke new_closure/free_closure if needed.
16255
16256 2001-12-05 Akim Demaille <akim@epita.fr>
16257
16258 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16259 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16260 (nitemset): for consistency with the rest of the project.
16261
16262 2001-12-05 Akim Demaille <akim@epita.fr>
16263
16264 * src/closure.c (print_closure): Improve.
16265 (closure): Use it for printing input and output.
16266
16267 2001-12-05 Akim Demaille <akim@epita.fr>
16268
16269 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16270 indexed by nonterminals.
16271
16272 2001-12-05 Akim Demaille <akim@epita.fr>
16273
16274 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16275 what it was!).
16276 * src/warshall.h: Remove accidental duplication of the content.
16277
16278 2001-12-05 Akim Demaille <akim@epita.fr>
16279
16280 * src/closure.c (set_fderives): De-obfuscate.
16281
16282 2001-12-05 Akim Demaille <akim@epita.fr>
16283
16284 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16285
16286 2001-12-05 Akim Demaille <akim@epita.fr>
16287
16288 * src/closure.c (set_firsts): De-obfuscate.
16289
16290 2001-12-05 Akim Demaille <akim@epita.fr>
16291
16292 * src/output.c (action_row): De-obfuscate
16293 using the good o' techniques: arrays not pointers, variable
16294 locality, BITISSET, RESETBIT etc.
16295
16296 2001-12-05 Akim Demaille <akim@epita.fr>
16297
16298 Pessimize the code to simplify it: from now on, all the states
16299 have a valid SHIFTS, which NSHIFTS is possibly 0.
16300
16301 * src/LR0.c (shifts_new): Be global and move to..
16302 * src/state.c, src/state.h: here.
16303 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16304 * src/print_graph: Adjust.
16305
16306 2001-12-05 Akim Demaille <akim@epita.fr>
16307
16308 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16309 * src/conflicts.c: Use it.
16310 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16311 incorrectly ``simplified''.
16312
16313 2001-12-05 Akim Demaille <akim@epita.fr>
16314
16315 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16316 using the good o' techniques: arrays not pointers, variable
16317 locality, BITISSET, RESETBIT etc.
16318
16319 2001-12-05 Akim Demaille <akim@epita.fr>
16320
16321 * src/state.h (SHIFT_SYMBOL): New.
16322 * src/conflicts.c: Use it to deobfuscate.
16323
16324 2001-12-05 Akim Demaille <akim@epita.fr>
16325
16326 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16327 (print_reductions): De-obfuscate using the good o' techniques:
16328 arrays not pointers, variable locality, BITISSET.
16329
16330 2001-12-05 Akim Demaille <akim@epita.fr>
16331
16332 * src/conflicts.c (print_reductions): Arrays, not pointers.
16333 Use BITISSET.
16334
16335 2001-12-05 Akim Demaille <akim@epita.fr>
16336
16337 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16338
16339 2001-12-05 Akim Demaille <akim@epita.fr>
16340
16341 * src/conflicts.c (print_reductions): Improve variable locality.
16342
16343 2001-12-05 Akim Demaille <akim@epita.fr>
16344
16345 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16346
16347 2001-12-05 Akim Demaille <akim@epita.fr>
16348
16349 * src/conflicts.c (print_reductions): Improve variable locality.
16350
16351 2001-12-05 Akim Demaille <akim@epita.fr>
16352
16353 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16354 * src/lalr.c: Use them.
16355
16356 2001-12-05 Akim Demaille <akim@epita.fr>
16357
16358 * src/LR0.c (augment_automaton): Formatting changes.
16359 Better variable locality.
16360
16361 2001-12-05 Akim Demaille <akim@epita.fr>
16362
16363 * src/lalr.c (matrix_print): New.
16364 (transpose): Use it.
16365 Use arrays instead of pointers.
16366
16367 2001-12-05 Akim Demaille <akim@epita.fr>
16368
16369 * src/lalr.c (maxrhs): Move to...
16370 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16371 * src/lalr.c (build_relations): Adjust.
16372
16373 2001-12-05 Akim Demaille <akim@epita.fr>
16374
16375 * src/lalr.c (transpose): Free the memory allocated to the
16376 argument, as it is replaced by the results by the unique caller.
16377 (build_relations): Merely invoke transpose: it handles the memory
16378 deallocation.
16379 Improve variable locality.
16380 Avoid variables used as mere abbreviations.
16381 (compute_lookaheads): Use arrays instead of pointers.
16382
16383 2001-12-05 Akim Demaille <akim@epita.fr>
16384
16385 * src/lalr.c (initialize_F): Improve variable locality.
16386 Avoid variables used as mere abbreviations.
16387
16388 2001-12-05 Akim Demaille <akim@epita.fr>
16389
16390 * src/derives.c (print_derives): Display the ruleno.
16391 * src/lalr.c (initialize_F, transpose): Better variable locality
16392 to improve readability.
16393 Avoid variables used as mere abbreviations.
16394
16395 2001-12-05 Akim Demaille <akim@epita.fr>
16396
16397 * src/lalr.c (traverse): Use arrays instead of pointers.
16398
16399 2001-12-05 Akim Demaille <akim@epita.fr>
16400
16401 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16402 the handling of squeue.
16403 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16404
16405 2001-12-05 Akim Demaille <akim@epita.fr>
16406
16407 Because useless nonterminals are now kept alive (instead of being
16408 `destroyed'), we now sometimes examine them, and store information
16409 related to them. Hence we need to know their number, and adjust
16410 memory allocations.
16411
16412 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16413 static.
16414 * src/LR0.c (allocate_itemsets): The memory allocated to
16415 `symbol_count' was used for two different purpose: once to count
16416 the number of occurrences of each symbol, and later reassigned to
16417 `shift_symbol', containing the symbol that can be shifted from a
16418 given state.
16419 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16420 only, and...
16421 (new_itemsets): Allocate `shift_symbol' here.
16422 (allocate_itemsets): symbol_count includes useless nonterminals.
16423 Make room for them.
16424 (free_storage): Use `free', not `XFREE', for pointers that cannot
16425 be null.
16426
16427 2001-12-05 Akim Demaille <akim@epita.fr>
16428
16429 * src/nullable.c (set_nullable): Deobfuscate the handling of
16430 ritem.
16431 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16432
16433 2001-12-05 Akim Demaille <akim@epita.fr>
16434
16435 * src/gram.c, src/gram.h (ritem_print): New.
16436 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16437 (This useless function was defined only to work around VMS linkers
16438 that can't handle compilation units with variables only).
16439 * src/reduce.c (dump_grammar): Use it to trace the construction of
16440 ritem.
16441
16442 2001-12-04 Paul Eggert <eggert@twinsun.com>
16443
16444 * src/bison.simple (union yyalloc): Change member names
16445 to be the same as the stack names.
16446 (yyparse): yyptr is now union yyalloc *, not char *.
16447 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16448 and may generate better code on some machines.
16449 (yystpcpy): Use prototype if __STDC__ is defined, not just
16450 if __cplusplus is defined.
16451
16452 2001-11-30 Akim Demaille <akim@epita.fr>
16453
16454 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16455 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16456 Gettext doesn't compile cleanly, and dies with -Werror.
16457 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16458 Include WARNING_CFLAGS here.
16459 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16460 before being defined.
16461
16462 2001-11-27 Paul Eggert <eggert@twinsun.com>
16463
16464 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16465 First arg is int, not unsigned.
16466 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16467 (SIZE_MAX, UINT_MAX): New macros.
16468 (quotearg_n_options): Abort if N is negative.
16469 Avoid overflow check on hosts where size_t is 64 bits and int
16470 is 32 bits, as overflow is impossible there.
16471 Fix off-by-one typo that caused unnecessary reallocation.
16472
16473 2001-11-29 Paul Eggert <eggert@twinsun.com>
16474
16475 Name space cleanup in generated parser.
16476
16477 * doc/bison.texinfo (Bison Parser): Discuss system headers
16478 and their effect on the user name space.
16479
16480 * src/bison.simple:
16481 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16482 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16483 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16484
16485 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16486 on user names when possible.
16487
16488 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16489 Simplify test for whather <alloca.h> exists.
16490
16491 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16492
16493 (<stdio.h>): Include if YYDEBUG.
16494
16495 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16496 ! defined (yyoverflow) && ! defined (yymemcpy).
16497
16498 (yymemcpy, yyparse): Rename local variables as needed so that
16499 they all begin with 'yy'.
16500
16501 (yystrlen, yystpcpy): New functions.
16502
16503 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16504 All uses changed.
16505
16506 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16507 instead of relying on string.h functions. Use YYSTACK_ALLOC
16508 and YYSTACK_FREE instead of malloc and free.
16509
16510 2001-11-30 Akim Demaille <akim@epita.fr>
16511
16512 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16513 before their first uses.
16514 (YYBISON, YYPURE): Move to the top of the output.
16515
16516 2001-11-30 Akim Demaille <akim@epita.fr>
16517
16518 * tests/reduce.at (Useless Nonterminals): Fix.
16519
16520 2001-11-30 Akim Demaille <akim@epita.fr>
16521
16522 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16523 if body instead of `;' to pacify GCC's warnings.
16524
16525 2001-11-30 Akim Demaille <akim@epita.fr>
16526
16527 Instead of mapping the LHS of unused rules to -1, keep the LHS
16528 valid, but flag the rules as invalid.
16529
16530 * src/gram.h (rule_t): `useful' is a new member.
16531 * src/print.c (print_grammar): Adjust.
16532 * src/derives.c (set_derives): Likewise.
16533 * src/reader.c (packgram, reduce_output): Likewise.
16534 * src/reduce.c (reduce_grammar_tables): Likewise.
16535 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16536
16537 2001-11-30 Akim Demaille <akim@epita.fr>
16538
16539 * src/reduce.c (reduce_output): Formatting changes.
16540 * src/print.c (print_results, print_grammar): Likewise.
16541 * tests/regression.at (Rule Line Numbers)
16542 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16543
16544 2001-11-30 Akim Demaille <akim@epita.fr>
16545
16546 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16547 useless nonterminals, move them at the end of the symbol arrays.
16548 (reduce_output): Adjust.
16549 * tests/reduce.at (Useless Nonterminals): Adjust.
16550
16551 2001-11-30 Akim Demaille <akim@epita.fr>
16552
16553 * src/reduce.c: Various comment/formatting changes.
16554 (nonterminals_reduce): New, extracted from...
16555 (reduce_grammar_tables): here.
16556 (reduce_grammar): Call nonterminals_reduce.
16557
16558 2001-11-29 Paul Eggert <eggert@twinsun.com>
16559
16560 * src/bison.simple (YYSTACK_REALLOC): Remove.
16561 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16562 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16563 New macros.
16564 (union yyalloc): New type.
16565 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16566 an arbitrary restriction on hosts where size_t is wider than int.
16567
16568 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16569 a parser stack overflow. Allocate just one block of memory for all
16570 three stacks, instead of allocating three blocks; this typically is
16571 faster and reduces fragmentation.
16572
16573 Do not limit the number of items in the stack to a value that fits
16574 in 'int', as this is an arbitrary limit on hosts with 64-bit
16575 size_t and 32-bit int.
16576
16577 2001-11-29 Marc Autret <autret_m@epita.fr>
16578
16579 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16580 of defining YYERROR_VERBOSE.
16581 [AT_DATA]: $4 is now out of C declarations in the prologue.
16582
16583 2001-11-28 Marc Autret <autret_m@epita.fr>
16584
16585 * src/reader.c (parse_dquoted_param): New.
16586 (parse_skel_decl): Use it.
16587 * src/lex.h: Add its prototype.
16588 * src/lex.c (literalchar): Become not static.
16589
16590 2001-11-28 Marc Autret <autret_m@epita.fr>
16591
16592 * src/output.h: And put its extern declaration here.
16593 * src/output.c (error_verbose): Define here.
16594 (prepare): Echo name modification.
16595 * src/getargs.h: Clean its extern declaration.
16596 * src/getargs.c (error_verbose_flag): Remove.
16597 (getargs): Remove case 'e'.
16598 * src/options.c (option_table): 'error-verbose' is now seen as simple
16599 percent option.
16600 Include output.h.
16601
16602 * src/reader.c (read_declarations): Remove case tok_include.
16603 (parse_include_decl): Remove.
16604 * src/lex.h (token_t): Remove tok_include.
16605 * src/options.c (option_table): 'include' is now a simple command line
16606 option.
16607
16608 2001-11-28 Marc Autret <autret_m@epita.fr>
16609
16610 * src/bison.simple: Adjust muscle names.
16611 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16612 * src/output.c (prepare): s/_/-/ for the muscles names.
16613 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16614
16615 2001-11-28 Marc Autret <autret_m@epita.fr>
16616
16617 * src/bison.simple: Fix debug.
16618 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16619
16620 2001-11-28 Akim Demaille <akim@epita.fr>
16621
16622 * src/LR0.c (shifts_new): New.
16623 (save_shifts, insert_start_shift, augment_automaton): Use it.
16624
16625 2001-11-28 Akim Demaille <akim@epita.fr>
16626
16627 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16628 keep ruleno only.
16629
16630 2001-11-28 Akim Demaille <akim@epita.fr>
16631
16632 * src/closure.c (closure): Instead of looping over word in array
16633 then bits in words, loop over bits in array.
16634
16635 2001-11-28 Akim Demaille <akim@epita.fr>
16636
16637 * src/closure.c (closure): No longer optimize the special case
16638 where all the bits of `ruleset[r]' are set to 0, to make the code
16639 clearer.
16640
16641 2001-11-28 Akim Demaille <akim@epita.fr>
16642
16643 * src/closure.c (closure): `r' and `c' are new variables, used to
16644 de-obfuscate accesses to RULESET and CORE.
16645
16646 2001-11-28 Akim Demaille <akim@epita.fr>
16647
16648 * src/reduce.c (reduce_print): Use ngettext.
16649 (dump_grammar): Improve the trace accuracy.
16650
16651 2001-11-28 Akim Demaille <akim@epita.fr>
16652
16653 * src/reduce.c (dump_grammar): Don't translate trace messages.
16654
16655 2001-11-28 Akim Demaille <akim@epita.fr>
16656
16657 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16658 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16659 as all tags are free'ed afterwards.
16660 From Enrico Scholz.
16661
16662 2001-11-27 Paul Eggert <eggert@twinsun.com>
16663
16664 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16665 use alloca when we didn't want to, and vice versa.
16666
16667 2001-11-27 Marc Autret <autret_m@epita.fr>
16668
16669 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16670 initialization.
16671 * src/output.c (prepare): Remove its update.
16672
16673 2001-11-27 Marc Autret <autret_m@epita.fr>
16674
16675 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16676 Use %error-verbose.
16677
16678 2001-11-27 Marc Autret <autret_m@epita.fr>
16679
16680 * src/bison.simple: Remove YYERROR_VERBOSE using.
16681 Use %%error_verbose.
16682 (yyparse): Likewise.
16683 * src/output.c (prepare): Give its final value.
16684 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16685 * src/getargs.h: Add its extern declaration.
16686 * src/getargs.c (error_verbose_flag): New int.
16687 (getargs): Update to catch new case.
16688 * src/options.c (option_table): 'error-verbose' is a new option.
16689 (shortopts): Update.
16690
16691 2001-11-27 Akim Demaille <akim@epita.fr>
16692
16693 * src/system.h: Use intl/libgettext.h.
16694 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16695
16696 2001-11-27 Akim Demaille <akim@epita.fr>
16697
16698 * tests/torture.at (Exploding the Stack Size with Malloc):
16699 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16700
16701 2001-11-27 Akim Demaille <akim@epita.fr>
16702
16703 * src/files.c: Include error.h.
16704 Reported by Hans Aberg.
16705
16706 2001-11-26 Marc Autret <autret_m@epita.fr>
16707
16708 * src/reader.c (parse_include_decl): New, not yet implemented.
16709 (read_declarations): Add case tok_include.
16710 * src/getargs.h (include): Add its extern definition.
16711 * src/getargs.c (include): New const char *.
16712 (getargs): Add case '-I'.
16713 * src/options.c (option_table): Add include as command line and
16714 percent option.
16715 * src/lex.h (token_t): Add tok_include.
16716
16717 2001-11-26 Akim Demaille <akim@epita.fr>
16718
16719 * src/reader.c (readgram): Make sure rules for mid-rule actions
16720 have a lineno equal to that of their host rule.
16721 Reported by Hans Aberg.
16722 * tests/regression.at (Rule Line Numbers): New.
16723
16724 2001-11-26 Akim Demaille <akim@epita.fr>
16725
16726 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16727 size_ts.
16728
16729 2001-11-26 Akim Demaille <akim@epita.fr>
16730
16731 * src/complain.c, src/complain.h (error): Remove, provided by
16732 lib/error.[ch].
16733
16734 2001-11-26 Akim Demaille <akim@epita.fr>
16735
16736 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16737 issue an error message.
16738 * tests/regression.at (Invalid %directive): New.
16739 Reported by Hans Aberg.
16740
16741 2001-11-26 Akim Demaille <akim@epita.fr>
16742
16743 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16744 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16745
16746 2001-11-26 Akim Demaille <akim@epita.fr>
16747
16748 * src/conflicts.c (conflicts_print): Don't complain at all when
16749 there are no reduce/reduce conflicts, and as many shift/reduce
16750 conflicts as expected.
16751 * tests/regression.at (%expect right): Adjust.
16752
16753 2001-11-23 Akim Demaille <akim@epita.fr>
16754
16755 * lib/alloca.c: Update, from fileutils.
16756
16757 2001-11-23 Akim Demaille <akim@epita.fr>
16758
16759 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16760
16761 2001-11-23 Akim Demaille <akim@epita.fr>
16762
16763 * src/system.h: Include alloca.h.
16764 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16765
16766 2001-11-23 Akim Demaille <akim@epita.fr>
16767
16768 * src/print_graph.c (print_actions): Remove `rule', unused.
16769 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16770 pacify GCC's signed < unsigned warnings.
16771 * src/closure.c (itemsetsize): Likewise.
16772 * src/reader.c (symbol_list_new): Static.
16773
16774 2001-11-23 Akim Demaille <akim@epita.fr>
16775
16776 Attaching lineno to buckets is stupid, since only one copy of each
16777 symbol is kept, only the line of the first occurrence is kept too.
16778
16779 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16780 * src/reader.c (rline_allocated): Remove, unused.
16781 (symbol_list): Have a `line' member.
16782 (symbol_list_new): New.
16783 (readgram): Use it.
16784 * src/print.c (print_grammar): Output the rule line numbers.
16785 * tests/regression.at (Solved SR Conflicts)
16786 (Unresolved SR Conflicts): Adjust.
16787 Reported by Hans Aberg.
16788
16789 2001-11-22 Marc Autret <autret_m@epita.fr>
16790
16791 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16792
16793 2001-11-22 Marc Autret <autret_m@epita.fr>
16794
16795 * src/muscle_tab.c (muscle_init): Remove initialization of
16796 skeleton muscle.
16797 * src/output.c (output_master_parser): Do it here.
16798
16799 2001-11-20 Akim Demaille <akim@epita.fr>
16800
16801 * po/sv.po: New.
16802 * configure.in (ALL_LINGUAS): Adjust.
16803 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16804 longer contains strings to translate.
16805
16806 2001-11-19 Akim Demaille <akim@epita.fr>
16807
16808 * src/conflicts.c (conflicts_print): Add a missing \n.
16809
16810 2001-11-19 Akim Demaille <akim@epita.fr>
16811
16812 * src/nullable.c (nullable_print): New.
16813 (set_nullable): Call it when tracing.
16814 Better locality of variables.
16815
16816 2001-11-19 Akim Demaille <akim@epita.fr>
16817
16818 * src/print.c (print_actions): Better locality of variables.
16819
16820 2001-11-19 Akim Demaille <akim@epita.fr>
16821
16822 * src/derives.c (print_derives): Fix and enrich.
16823 * src/closure.c (print_fderives): Likewise.
16824
16825 2001-11-19 Akim Demaille <akim@epita.fr>
16826
16827 * src/closure.c (itemsetend): Remove, replaced with...
16828 (itemsetsize): new.
16829
16830 2001-11-19 Akim Demaille <akim@epita.fr>
16831
16832 * src/LR0.c (kernel_end): Remove, replaced with...
16833 (kernel_size): new.
16834
16835 2001-11-19 Akim Demaille <akim@epita.fr>
16836
16837 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16838 to clarify.
16839
16840 2001-11-19 Akim Demaille <akim@epita.fr>
16841
16842 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16843
16844 2001-11-19 Akim Demaille <akim@epita.fr>
16845
16846 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16847 trace messages.
16848 * src/LR0.c: Likewise.
16849 (allocate_itemsets): Use arrays instead of pointers to clarify.
16850
16851 2001-11-19 Akim Demaille <akim@epita.fr>
16852
16853 * src/getargs.c (statistics_flag): Replace with...
16854 (trace_flag): New.
16855 (longopts): Accept --trace instead of --statistics.
16856 * src/getargs.h, src/options.c: Adjust.
16857 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16858 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16859
16860 2001-11-19 Akim Demaille <akim@epita.fr>
16861
16862 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16863 pointers to clarify the code.
16864 (save_reductions, save_shifts): Factor common parts of alternatives.
16865
16866 2001-11-19 Akim Demaille <akim@epita.fr>
16867
16868 * src/LR0.c (new_state, get_state): Complete TRACE code.
16869 * src/closure.c: Include `reader.h' to get `tags', needed by the
16870 trace code.
16871 Rename the conditional DEBUG as TRACE.
16872 Output consistently TRACEs to stderr, not stdout.
16873 * src/derives.c: Likewise.
16874 * src/reduce.c: (inaccessable_symbols): Using if is better style
16875 than goto.
16876 Use `#if TRACE' instead of `#if 0' for tracing code.
16877
16878 2001-11-19 Akim Demaille <akim@epita.fr>
16879
16880 * src/system.h (LIST_FREE, shortcpy): New.
16881 * src/LR0.c: Use them.
16882 * src/output.c (free_itemsets, free_reductions, free_shifts):
16883 Remove, replaced by LIST_FREE.
16884
16885 2001-11-19 Akim Demaille <akim@epita.fr>
16886
16887 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16888 (REDUCTIONS_ALLOC): New.
16889 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16890 allocation.
16891
16892 2001-11-19 Akim Demaille <akim@epita.fr>
16893
16894 * src/LR0.c (new_state): Complete trace code.
16895 * src/nullable.c (set_nullable): Don't translate traces.
16896
16897 2001-11-19 Akim Demaille <akim@epita.fr>
16898
16899 * src/print_graph.c (print_core): Better locality of variables.
16900 * src/print.c (print_core): Likewise.
16901
16902 2001-11-19 Akim Demaille <akim@epita.fr>
16903
16904 * src/vcg.c: You do the output, so you are responsible of the
16905 handling of VCG syntax, in particular: use quotearg.
16906 * src/print_graph.c: Don't.
16907 (print_actions): Don't output the actions as part of the nodes,
16908 since that's the job of the edges.
16909 (print_state): Don't output by hand: fill the node description,
16910 and ask for its output.
16911
16912 2001-11-19 Akim Demaille <akim@epita.fr>
16913
16914 * src/bison.simple (yyparse): When verbosely reporting an error,
16915 no longer put additional quotes around token names.
16916 * tests/calc.at: Adjust.
16917
16918 2001-11-19 Akim Demaille <akim@epita.fr>
16919
16920 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
16921 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
16922 * src/output.c: Adjust.
16923
16924 2001-11-19 Akim Demaille <akim@epita.fr>
16925
16926 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
16927 (rule_t): this.
16928 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
16929
16930 2001-11-19 Akim Demaille <akim@epita.fr>
16931
16932 * src/gram.h (rule_t): New.
16933 (rule_table): New.
16934 (rrhs, rlhs): Remove, part of state_t.
16935 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
16936 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
16937 * src/reader.c, src/reduce.c: Adjust.
16938
16939 2001-11-19 Akim Demaille <akim@epita.fr>
16940
16941 * src/reader.c (symbols_output): New, extracted from...
16942 (packsymbols): Here.
16943 (reader): Call it.
16944
16945 2001-11-19 Akim Demaille <akim@epita.fr>
16946
16947 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
16948 (maxrhs): this new function.
16949
16950 2001-11-19 Akim Demaille <akim@epita.fr>
16951
16952 * src/lalr.c (F): New macro to access the variable F.
16953 Adjust.
16954
16955 2001-11-19 Akim Demaille <akim@epita.fr>
16956
16957 * src/lalr.h (LA): New macro to access the variable LA.
16958 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16959 * src/lalr.c: Adjust.
16960
16961 2001-11-19 Akim Demaille <akim@epita.fr>
16962
16963 * src/lalr.c (initialize_LA): Only initialize LA. Let...
16964 (set_state_table): handle the `lookaheads' members.
16965
16966 2001-11-19 Akim Demaille <akim@epita.fr>
16967
16968 * src/lalr.h (lookaheads): Removed array, whose contents is now
16969 a member of...
16970 (state_t): this structure.
16971 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16972 Adjust.
16973
16974 2001-11-19 Akim Demaille <akim@epita.fr>
16975
16976 * src/lalr.h (consistent): Removed array, whose contents is now
16977 a member of...
16978 (state_t): this structure.
16979 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16980 Adjust.
16981
16982 2001-11-19 Akim Demaille <akim@epita.fr>
16983
16984 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
16985 contents are now members of...
16986 (state_t): this structure.
16987 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
16988 Adjust.
16989
16990 2001-11-19 Akim Demaille <akim@epita.fr>
16991
16992 * src/lalr.h (state_t): New.
16993 (state_table): Be a state_t * instead of a core **.
16994 (accessing_symbol): Remove, part of state_t.
16995 * src/lalr.c: Adjust.
16996 (set_accessing_symbol): Merge into...
16997 (set_state_table): this.
16998 * src/print_graph.c, src/conflicts.c: Adjust.
16999
17000 2001-11-14 Akim Demaille <akim@epita.fr>
17001
17002 * tests/calc.at, tests/output.at, tests/regression.at,
17003 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17004 now the tests are run in private dirs, therefore AC_CLEANUP and
17005 family can be simplified to 0-ary.
17006 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17007 use abs. path to find config.h.
17008 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17009 stderr, there can be way too much random noise.
17010 Instead pass -Werror to GCC and rely on the exit status.
17011 Reported by Wolfram Wagner.
17012
17013 2001-11-14 Akim Demaille <akim@epita.fr>
17014
17015 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17016 defined only if yyoverflow is defined, to avoid `warning: unused
17017 variable `yyvs1''.
17018 Reported by The Test Suite.
17019
17020 2001-11-14 Akim Demaille <akim@epita.fr>
17021
17022 * src/print.c: Include reduce.h.
17023 Reported by Hans Aberg.
17024
17025 2001-11-14 Akim Demaille <akim@epita.fr>
17026
17027 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17028 Revert a previous patch: these are really const.
17029 * src/conflicts.c (conflict_report): Additional useless pair of
17030 braces to pacify GCC's warnings for `if () if () {} else {}'.
17031 * src/lex.c (parse_percent_token): Replace equal_offset with
17032 arg_offset.
17033 arg is const.
17034 Be sure to strdup `arg' when used, since there is no reason for
17035 token_buffer not to change.
17036
17037 2001-11-14 Akim Demaille <akim@epita.fr>
17038
17039 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17040 definition.
17041 * src/main.c (main): Use them.
17042 Suggested by Hans Aberg.
17043
17044 2001-11-12 Akim Demaille <akim@epita.fr>
17045
17046 * src/system.h (ngettext): Now that we use ngettext, be sure to
17047 provide a default definition when NLS are not used.
17048
17049 2001-11-12 Akim Demaille <akim@epita.fr>
17050
17051 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17052 Use @kbd to denote user input.
17053 (Language and Grammar): ANSIfy the example.
17054 Adjust its layout for info/notinfo.
17055 (Location Tracking Calc): Output error messages to stderr.
17056 Output locations in a more GNUtically correct way.
17057 Fix a couple of Englishos.
17058 Adjust @group/@end group pairs.
17059
17060 2001-11-12 Akim Demaille <akim@epita.fr>
17061
17062 %expect was not functioning at all.
17063
17064 * src/conflicts.c (expected_conflicts): Set to -1.
17065 (conflict_report): Use ngettext.
17066 (conflicts_print): Check %expect and make its violation an error.
17067 * doc/bison.texinfo (Expect Decl): Adjust.
17068 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17069 * tests/regression.at (%expect not enough, %expect right)
17070 (%expect too much): New.
17071
17072 2001-11-12 Akim Demaille <akim@epita.fr>
17073
17074 * tests/regression.at (Conflicts): Rename as...
17075 (Unresolved SR Conflicts): this.
17076 (Solved SR Conflicts): New.
17077
17078 2001-11-12 Akim Demaille <akim@epita.fr>
17079
17080 * src/reduce.c (print_results): Rename as...
17081 (reduce_output): This.
17082 Output to OUT, passed as argument, instead of output_obstack.
17083 (dump_grammar): Likewise.
17084 (reduce_free): New.
17085 Also free V1.
17086 (reduce_grammar): No longer call reduce_output, since...
17087 * src/print.c (print_results): do it.
17088 * src/main.c (main): Call reduce_free;
17089
17090 2001-11-12 Akim Demaille <akim@epita.fr>
17091
17092 * src/conflicts.c (print_reductions): Accept OUT as argument.
17093 Output to it, not to output_obstack.
17094 * src/print.c (print_actions): Adjust.
17095
17096 2001-11-12 Akim Demaille <akim@epita.fr>
17097
17098 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17099 the result instead of using...
17100 (src_total, rrc_total, src_count, rrc_count): Remove.
17101 (any_conflicts): Remove.
17102 (print_conflicts): Split into...
17103 (conflicts_print, conflicts_output): New.
17104 * src/conflicts.h: Adjust.
17105 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
17106 * src/print.c (print_grammar): Issue `\n' between two rules.
17107 * tests/regression.at (Conflicts): New.
17108 Reported by Tom Lane.
17109
17110 2001-11-12 Akim Demaille <akim@epita.fr>
17111
17112 * tests/regression.at (Invalid input): Remove, duplicate with
17113 ``Invalid input: 1''.
17114
17115 2001-11-12 Akim Demaille <akim@epita.fr>
17116
17117 * tests/torture.at (AT_DATA_STACK_TORTURE)
17118 (Exploding the Stack Size with Alloca)
17119 (Exploding the Stack Size with Malloc): New.
17120
17121 2001-11-12 Akim Demaille <akim@epita.fr>
17122
17123 * src/bison.simple (YYSTACK_REALLOC): New.
17124 (yyparse) [!yyoverflow]: Use it and free the old stack.
17125 Reported by Per Allansson.
17126
17127 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
17128
17129 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17130 define CPP macro, which substitute YYSTYPE by yystype.
17131 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17132 with yyltype/YYLTYPE. This allows inclusion of the generated
17133 header within the parser if the compiler, such as GGC, accepts
17134 multiple equivalent #defines.
17135 From Akim.
17136
17137 2001-11-05 Akim Demaille <akim@epita.fr>
17138
17139 * src/reader.c (symbols_output): New, extracted from...
17140 (packsymbols): here.
17141 (reader): Adjust.
17142
17143 2001-11-05 Akim Demaille <akim@epita.fr>
17144
17145 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17146
17147 2001-11-05 Akim Demaille <akim@epita.fr>
17148
17149 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17150 pattern.
17151
17152 2001-11-05 Akim Demaille <akim@epita.fr>
17153
17154 * src/options.h (struct option_table_struct): set_flags is void*.
17155 * src/options.c (longopts): Support `--output' and `%output'.
17156 (usage): Adjust.
17157 * src/lex.h (tok_setopt): Remove, replaced with...
17158 (tok_intopt, tok_stropt): these new guys.
17159 * src/lex.c (getopt.h): Not needed.
17160 (token_buffer, unlexed_token_buffer): Not const.
17161 (percent_table): Promote `-' over `_' in directive names.
17162 Active `%name-prefix', `file-prefix', and `output'.
17163 (parse_percent_token): Accept possible arguments to directives.
17164 Promote `-' over `_' in directive names.
17165
17166 2001-11-04 Akim Demaille <akim@epita.fr>
17167
17168 * doc/bison.texinfo (Decl Summary): Split the list into
17169 `directives for grammars' and `directives for bison'.
17170 Sort'em.
17171 Add description of `%name-prefix', `file-prefix', and `output'.
17172 Promote `-' over `_' in directive names.
17173 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17174 Simplify the description of `--name-prefix'.
17175 Promote `-' over `_' in directive names.
17176 Promote `--output' over `--output-file'.
17177 Fix the description of `--defines'.
17178 * tests/output.at: Exercise %file-prefix and %output.
17179
17180 2001-11-02 Akim Demaille <akim@epita.fr>
17181
17182 * doc/refcard.tex: Update.
17183
17184 2001-11-02 Akim Demaille <akim@epita.fr>
17185
17186 * src/symtab.h (SUNDEF): New.
17187 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17188 stand for `uninitialized', instead of 0.
17189 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17190 * src/lex.c (lex): Adjust.
17191
17192 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17193 Number it 0.
17194 Let yylex return it instead of a plain 0.
17195 Reported by Dick Streefland.
17196
17197 2001-11-02 Akim Demaille <akim@epita.fr>
17198
17199 * tests/regression.at (Mixing %token styles): New test.
17200
17201 2001-11-02 Akim Demaille <akim@epita.fr>
17202
17203 * src/reader.c (parse_thong_decl): Formatting changes.
17204 (token_translations_init): New, extracted from...
17205 (packsymbols): Here.
17206 Adjust.
17207
17208 2001-11-01 Akim Demaille <akim@epita.fr>
17209
17210 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17211 Check that `9foo.y' produces correct cpp guards.
17212 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17213 guards.
17214 Reported by Wwp.
17215
17216 2001-11-01 Akim Demaille <akim@epita.fr>
17217
17218 * tests/regression.at (Invalid input: 2): New.
17219 * src/lex.c (unlexed_token_buffer): New.
17220 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17221 too.
17222 Reported by Wwp.
17223
17224 2001-11-01 Akim Demaille <akim@epita.fr>
17225
17226 * tests/calc.at: Catch up with 1.30.
17227 * configure.in: Bump to 1.49a.
17228 Adjust to newer Autotest.
17229
17230 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
17231
17232 * src/conflicts.c: Move global variables rrc_total and src_total ...
17233 (print_conflicts): here.
17234 * src/output.c (output): Free global variable user_toknums.
17235 * src/lex.c (token_obstack): Become static.
17236
17237 2001-10-18 Akim Demaille <akim@epita.fr>
17238
17239 * tests/atlocal.in (GCC): Add.
17240 * tests/calc.at: s/m4_match/m4_bmatch/.
17241 s/m4_patsubst/m4_bpatsubst/.
17242 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17243 * configure.in: AC_SUBST(GCC).
17244
17245 2001-10-14 Marc Autret <autret_m@epita.fr>
17246
17247 * src/options.c (create_long_option_table): Fix.
17248
17249 2001-10-10 Akim Demaille <akim@epita.fr>
17250
17251 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17252
17253 2001-10-04 Akim Demaille <akim@epita.fr>
17254
17255 * src/reader.c (parse_union_decl): Push the caracters in
17256 union_obstack, not attrs_obstack.
17257
17258 2001-10-04 Akim Demaille <akim@epita.fr>
17259
17260 Merge in the branch 1.29.
17261
17262 * src/reader.c (packsymbols): Use a temporary obstack for
17263 `%%tokendef', since output_stack is already used elsewhere.
17264
17265 2001-10-02 Akim Demaille <akim@epita.fr>
17266
17267 Bump 1.29d.
17268
17269 2001-10-02 Akim Demaille <akim@epita.fr>
17270
17271 Version 1.29c.
17272
17273 2001-10-02 Akim Demaille <akim@epita.fr>
17274
17275 * tests/regression.at (Invalid CPP headers): New.
17276 From Alexander Belopolsky.
17277 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17278
17279 2001-10-02 Akim Demaille <akim@epita.fr>
17280
17281 * tests/regression.at (Invalid input): New.
17282 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17283 Reported by Shura.
17284
17285 2001-10-02 Akim Demaille <akim@epita.fr>
17286
17287 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17288
17289 2001-10-02 Akim Demaille <akim@epita.fr>
17290
17291 * src/output.c (output_parser): Assert `skeleton'.
17292 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17293 systems.
17294 From Shura.
17295
17296 2001-10-01 Marc Autret <autret_m@epita.fr>
17297
17298 * src/lex.h: Echo modifications.
17299 * src/lex.c (unlex): Parameter is now token_t.
17300 From Hans Aberg.
17301
17302 2001-10-01 Marc Autret <autret_m@epita.fr>
17303
17304 * src/main.c: Include lex.h.
17305 From Hans Aberg.
17306
17307 2001-09-29 Akim Demaille <akim@epita.fr>
17308
17309 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17310
17311 2001-09-28 Akim Demaille <akim@epita.fr>
17312
17313 * tests/testsuite.at: Update to newer Autotest.
17314 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17315
17316 2001-09-27 Akim Demaille <akim@epita.fr>
17317
17318 Position independent wrapper.
17319
17320 * tests/bison: Remove.
17321 * tests/bison.in: New.
17322 * configure.in: Adjust.
17323
17324 2001-09-27 Paul Eggert <eggert@twinsun.com>
17325
17326 Port quotearg fixes from tar 1.13.24.
17327
17328 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17329 tm to be declared.
17330 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17331 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17332
17333 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17334 * m4/mbrtowc.m4: New file.
17335 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17336 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17337
17338 2001-09-27 Akim Demaille <akim@epita.fr>
17339
17340 Bump to 1.29c.
17341
17342 2001-09-27 Akim Demaille <akim@epita.fr>
17343
17344 Version 1.29b.
17345
17346 2001-09-25 Akim Demaille <akim@epita.fr>
17347
17348 * src/system.h: Include `xalloc.h'.
17349 Remove it from the C files.
17350 * src/files.c (output_files): Free the obstacks.
17351 * src/lex.c (init_lex): Rename as...
17352 (lex_init): this.
17353 (lex_free): New.
17354 * src/main.c (main): Use it.
17355
17356 2001-09-24 Marc Autret <autret_m@epita.fr>
17357
17358 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17359 to output informations in fout (FILE*).
17360 (open_graph, close_graph): Likewise.
17361 (output_graph, output_edge, output_node): Likewise.
17362 * src/vcg.h: Update function prototypes.
17363 * src/print_graph.c (print_graph): Open output graph file.
17364 (print_actions): Adjust.
17365 * src/files.h: Remove extern declaration.
17366 * src/files.c: Remove graph_obstack declaration.
17367 (open_files): Remove graph_obstack initialization.
17368 (output_files): Remove graph_obstack saving.
17369
17370 2001-09-24 Marc Autret <autret_m@epita.fr>
17371
17372 * src/files.c (compute_output_file_names): Fix.
17373
17374 2001-09-24 Marc Autret <autret_m@epita.fr>,
17375 Akim Demaille <akim@epita.fr>
17376
17377 * src/reader.c (reader): Remove call to free_symtab ().
17378 * src/main.c (main): Call it here.
17379 Include symtab.h.
17380 * src/conflicts.c (initialize_conflicts): Rename as...
17381 (solve_conflicts): this.
17382 * src/print.c (print_core, print_actions, print_state)
17383 (print_grammar): Dump to a file instead a `output_obstack'.
17384 (print_results): Dump `output_obstack', and then proceed with the
17385 FILE *.
17386 * src/files.c (compute_output_file_names, close_files): New.
17387 (output_files): Adjust.
17388 * src/main.c (main): Adjust.
17389
17390 2001-09-23 Marc Autret <autret_m@epita.fr>
17391
17392 * src/files.c (compute_header_macro): Computes header macro name
17393 from spec_defines_file when given.
17394
17395 2001-09-23 Marc Autret <autret_m@epita.fr>
17396
17397 * src/files.c (output_files): Add default extensions.
17398
17399 2001-09-22 Akim Demaille <akim@epita.fr>
17400
17401 * src/conflicts.c (finalize_conflicts): Rename as...
17402 (free_conflicts): this.
17403
17404 2001-09-22 Akim Demaille <akim@epita.fr>
17405
17406 * src/gram.c (gram_free): Rename back as...
17407 (dummy): this.
17408 (output_token_translations): Free `token_translations'.
17409 * src/symtab.c (free_symtab): Free the tag field.
17410
17411 2001-09-22 Akim Demaille <akim@epita.fr>
17412
17413 Remove `translations' as it is always set to true.
17414
17415 * src/gram.h: Adjust.
17416 * src/reader.c (packsymbols, parse_token_decl): Adjust
17417 * src/print.c (print_grammar): Adjust.
17418 * src/output.c (output_token_translations): Adjust.
17419 * src/lex.c (lex): Adjust.
17420 * src/gram.c: Be sure the set pointers to NULL.
17421 (dummy): Rename as...
17422 (gram_free): this.
17423
17424 2001-09-22 Akim Demaille <akim@epita.fr>
17425
17426 * configure.in: Invoke AM_LIB_DMALLOC.
17427 * src/system.h: Use dmalloc.
17428 * src/LR0.c: Be sure to have pointers initialized to NULL.
17429 (allocate_itemsets): Allocate kernel_items only if needed.
17430
17431 2001-09-22 Akim Demaille <akim@epita.fr>
17432
17433 * configure.in: Bump to 1.29b.
17434 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17435 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17436 need xmalloc.c in calc.y.
17437 From Pascal Bart.
17438
17439 2001-09-21 Akim Demaille <akim@epita.fr>
17440
17441 Version 1.29a.
17442 * Makefile.maint, config/config.guess, config/config.sub,
17443 * config/missing: Update from masters.
17444 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17445 upon package.m4.
17446 * configure.in (ALL_LINGUAS): Add `tr'.
17447
17448 2001-09-21 Akim Demaille <akim@epita.fr>
17449
17450 * tests/Makefile.am (package.m4): Move to...
17451 ($(srcdir)/$(TESTSUITE)): here.
17452
17453 2001-09-20 Akim Demaille <akim@epita.fr>
17454
17455 * src/complain.c: No longer try to be standalone: use system.h.
17456 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17457 * src/complain.h: Likewise.
17458 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17459 Remove the unused variable `n'.
17460 From Albert Chin-A-Young.
17461
17462 2001-09-18 Marc Autret <autret_m@epita.fr>
17463
17464 * doc/bison.1: Update.
17465 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17466 descriptions.
17467 (Option Cross Key): Update.
17468 Add --graph.
17469
17470 2001-09-18 Marc Autret <autret_m@epita.fr>
17471
17472 * tests/regression.at: New test (comment in %union).
17473
17474 2001-09-18 Marc Autret <autret_m@epita.fr>
17475
17476 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17477 do that.
17478 Reported by Keith Browne.
17479
17480 2001-09-18 Marc Autret <autret_m@epita.fr>
17481
17482 * tests/output.at: Add tests for --defines and --graph.
17483
17484 2001-09-18 Marc Autret <autret_m@epita.fr>
17485
17486 * tests/output.at: Removes tests of %{header,src}_extension features.
17487
17488 2001-09-18 Akim Demaille <akim@epita.fr>
17489
17490 * tests/Makefile.am (package.m4): New.
17491 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17492 (_AT_CHECK_CALC_ERROR): Likewise.
17493 Factor the `, ' part of verbose error messages.
17494
17495 2001-09-18 Marc Autret <autret_m@epita.fr>
17496
17497 * src/getargs.c (longopts): Declare --defines and --graph as options
17498 with optional arguments.
17499 * src/files.h: Add extern declarations.
17500 * src/files.c (spec_graph_file, spec_defines_file): New.
17501 (output_files): Update.
17502 Remove CPP-outed code.
17503
17504 2001-09-18 Marc Autret <autret_m@epita.fr>
17505
17506 Turn off %{source,header}_extension feature.
17507
17508 * src/files.c (compute_exts_from_gf): Update.
17509 (compute_exts_from_src): Update.
17510 (output_files): CPP-out useless code.
17511 * src/files.h: Remove {header,source}_extension extern declarations.
17512 * src/reader.c (parse_dquoted_param): CPP-out.
17513 (parse_header_extension_decl): Remove.
17514 (parse_source_extension_decl): Remove.
17515 (read_declarations): Remove cases tok_{hdrext,srcext}.
17516 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17517 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17518
17519 2001-09-10 Akim Demaille <akim@epita.fr>
17520
17521 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17522 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17523 (AT_CHECK_OUTPUT): this.
17524 Merely check ls' exit status, its output is useless.
17525
17526 2001-09-10 Akim Demaille <akim@epita.fr>
17527
17528 * tests/calc.at: Use m4_match.
17529 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17530
17531 2001-09-10 Marc Autret <autret_m@epita.fr>,
17532 Akim Demaille <akim@epita.fr>
17533
17534 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17535 enum color_e.
17536 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17537 to `normal'.
17538 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17539 * src/lex.h: Adjust prototype.
17540 (token_t): Add `tok_undef'.
17541 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17542 (parse_percent_token): Now returns token_t.
17543 Add default statement in switch.
17544 (lex): Separate `c' as an input variable, from the token_t result
17545 part.
17546 (unlexed): Is a token_t.
17547
17548 2001-09-10 Akim Demaille <akim@epita.fr>
17549
17550 * configure.in: Bump to 1.29a.
17551
17552 2001-09-07 Akim Demaille <akim@epita.fr>
17553
17554 Version 1.29.
17555
17556 2001-08-30 Akim Demaille <akim@epita.fr>
17557
17558 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17559 * m4/atconfig.m4: Remove.
17560 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17561 * tests/bison: New.
17562 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17563 m4_if, m4_patsubst, and m4_regexp.
17564 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17565 `input' file instead of echo.
17566
17567 2001-08-29 Akim Demaille <akim@epita.fr>
17568
17569 Bump to 1.28e.
17570
17571 2001-08-29 Akim Demaille <akim@epita.fr>
17572
17573 Version 1.28d.
17574
17575 2001-08-29 Paul Eggert <eggert@twinsun.com>
17576
17577 * src/bison.simple (yyparse): Don't take the address of an
17578 item before the start of an array, as that doesn't conform to
17579 the C Standard.
17580
17581 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17582
17583 * doc/bison.texinfo (Location Tracking Calc): New node.
17584
17585 2001-08-29 Paul Eggert <eggert@twinsun.com>
17586
17587 * src/output.c (output): Do not define const, as this now
17588 causes more problems than it cures.
17589
17590 2001-08-29 Akim Demaille <akim@epita.fr>
17591
17592 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17593 the nodes.
17594 Be sure to tag the `detailmenu'.
17595
17596 2001-08-29 Akim Demaille <akim@epita.fr>
17597
17598 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17599 download in a tmp dir.
17600
17601 2001-08-28 Marc Autret <autret_m@epita.fr>
17602
17603 * config/depcomp: New file.
17604
17605 2001-08-28 Marc Autret <autret_m@epita.fr>
17606
17607 * doc/bison.1 (mandoc): Adjust.
17608 From Juan Manuel Guerrero.
17609
17610 2001-08-28 Marc Autret <autret_m@epita.fr>
17611
17612 * src/print_graph.c (print_state): Fix.
17613
17614 2001-08-27 Marc Autret <autret_m@epita.fr>
17615
17616 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17617 char * members.
17618 Echo modifications to the functions prototypes.
17619 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17620
17621 2001-08-27 Marc Autret <autret_m@epita.fr>
17622
17623 * src/vcg.c: Include `xalloc.h'.
17624 (add_colorentry): New.
17625 (add_classname): New.
17626 (add_infoname): New.
17627 * src/vcg.h: Add new prototypes.
17628
17629 2001-08-27 Akim Demaille <akim@epita.fr>
17630
17631 * Makefile.maint: Sync. again with CVS Autoconf.
17632
17633 2001-08-27 Akim Demaille <akim@epita.fr>
17634
17635 * Makefile.maint: Formatting changes.
17636 (po-update, cvs-update, update): New targets.
17637 (AMTAR): Remove.
17638
17639 2001-08-27 Akim Demaille <akim@epita.fr>
17640
17641 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17642 * Makefile.maint: Sync. with CVS Autoconf.
17643
17644 2001-08-27 Marc Autret <autret_m@epita.fr>
17645
17646 * src/vcg.h (struct infoname_s): New.
17647 (struct colorentry_s): New.
17648 (graph_s): New fields {vertical,horizontal}_order in structure.
17649 Add `infoname' field.
17650 Add `colorentry' field;
17651 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17652 (G_HORIZONTAL_ORDER): New.
17653 (G_INFONAME): New.
17654 (G_COLORENTRY): New.
17655 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17656 Add output of `infoname'.
17657 Add output of `colorentry'.
17658
17659 2001-08-27 Marc Autret <autret_m@epita.fr>
17660
17661 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17662 This one shadowed a global parameter.
17663
17664 2001-08-24 Marc Autret <autret_m@epita.fr>
17665
17666 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17667 instead of `unsigned'.
17668 (print_state): Do not call obstack_object_size () in obstack_grow ()
17669 to avoid macro variables shadowing.
17670
17671 2001-08-23 Marc Autret <autret_m@epita.fr>
17672
17673 * src/lex.c (percent_table): Typo: s/naem/name/.
17674 Add graph option.
17675 Normalize new options declarations.
17676
17677 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17678
17679 * tests/suite.at: Exercise %header_extension and %source_extension.
17680
17681 2001-08-16 Marc Autret <autret_m@epita.fr>
17682
17683 * src/reader.c (parse_dquoted_param): New.
17684 (parse_header_extension_decl): Use it.
17685 (parse_source_extension_decl): Likewise.
17686
17687 2001-08-16 Marc Autret <autret_m@epita.fr>
17688
17689 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17690 (get_xxxx_str): Use assert () instead of complain ().
17691 Remove return invokations in default cases.
17692 (get_decision_str): Modify default behaviour. Remove second argument.
17693 Echo modifications on calls.
17694 (output_graph): Fix.
17695
17696 2001-08-16 Marc Autret <autret_m@epita.fr>
17697
17698 * src/getargs.c (usage): Update with ``-g, --graph''.
17699
17700 2001-08-16 Marc Autret <autret_m@epita.fr>
17701
17702 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17703 (Option Cross Key): Likewise.
17704 * doc/bison.1: Update.
17705
17706 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
17707
17708 * src/output.c (output_master_parser): Don't finish action_obstack.
17709 (output_parser): Don't care about the muscle action, here.
17710 (prepare): Copy the action_obstack in the action muscle.
17711 (output): Free action_obstack.
17712
17713 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17714
17715 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17716 will contain `%union' declaration.
17717 (parse_union_decl): Delete #line directive output.
17718 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17719 informations about %union.
17720 (parse_union_decl): Copy the union_obstack in the muscle stype.
17721 * src/bison.simple: Add new #line directive.
17722 Add typdef %%stype YYSTYPE.
17723
17724 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17725
17726 * src/bison.simple: Add new `#line' directive.
17727
17728 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
17729
17730 * src/bison.simple: New `#line' directive.
17731 * src/output.c (output_parser): Support new dynamic muscle input_line.
17732
17733 2001-09-22 Marc Autret <autret_m@epita.fr>
17734
17735 * src/output.c (output_master_parser): New.
17736 (output_parser): Be more re-entrant.
17737
17738 2001-09-21 Marc Autret <autret_m@epita.fr>
17739
17740 * src/reader.c (copy_definition, parse_union_decl): Update and use
17741 `linef' muscle.
17742 (copy_action): Likewise.
17743 Use obstack_1grow ().
17744 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17745
17746 2001-09-21 Marc Autret <autret_m@epita.fr>
17747
17748 * src/options.c (option_table): Adjust.
17749 * src/lex.c (parse_percent_token): Fix.
17750
17751 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17752
17753 * src/options.c (symtab.h): Include it, need by lex.h.
17754
17755 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17756
17757 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17758 is now an option_table_struct*.
17759 (option_strcmp): New function option_strcmp.
17760 (parse_percent_token): Call option_strcmp.
17761 * src/getargs.c (xalloc.h, options.h): Include it.
17762 (getargs): Call create_long_option_table.
17763 (getargs): Free longopts at the end of the function.
17764 (shortopts): Move in options.c.
17765 * src/options.c (create_long_option_table): New function. Convert
17766 information from option_table to option structure.
17767 * src/reader.c (options.h): Include it.
17768
17769 * src/Makefile.am: Adjust.
17770 * src/options.c (option_table): Create from longopts and percent_table.
17771 * src/getargs.c (longopts): Delete.
17772 * src/lex.c (struct percent_table_struct): Delete.
17773 (percent_table): Delete.
17774 (options.h): Include it.
17775 * src/options.c: Create.
17776 * src/options.h: Create.
17777 Declare enum opt_access_e.
17778 Define struct option_table_struct.
17779
17780 2001-09-20 Marc Autret <autret_m@epita.fr>
17781
17782 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17783 sections of Bison.
17784
17785 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
17786
17787 * src/bison.simple: s/%%filename/%%skeleton.
17788 * src/muscle_tab.c (getargs.h): Include it.
17789 (muscle_init): Insert new muscle skeleton.
17790
17791 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
17792
17793 * src/output.c (output_parser): Delete unused variable actions_dumped.
17794
17795 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
17796
17797 * src/output.c (output): Delete call to reader_output_yylsp.
17798 * src/reader.c (reader): Likewise.
17799 * src/reader.h: Delete declaration of reader_output_yylsp.
17800
17801 2001-09-02 Marc Autret <autret_m@epita.fr>
17802
17803 * src/reader.c: Include muscle_tab.h.
17804 (parse_union_decl): Update.
17805 (parse_macro_decl): Rename parse_muscle_decl.
17806 Update to use renamed functions and variable.
17807 (read_declarations, copy_action, read_additionnal_code, : Updated
17808 with correct variables and functions names.
17809 (packsymbols, reader): Likewise.
17810
17811 * src/reader.h (muscle_obstack): Extern declaration update.
17812
17813 * src/output.c: Include muscle_tab.h
17814 In all functions using macro_insert, change by using muscle_insert ().
17815 (macro_obstack): Rename muscle_obstack.
17816 Echo modifications in the whole file.
17817 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17818 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17819 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17820
17821 * src/muscle_tab.h: Update double inclusion macros.
17822 (macro_entry_s): Rename muscle_entry_s.
17823 Update prototypes.
17824
17825 * src/muscle_tab.c: Include muscle_tab.h.
17826 Rename macro_tabble to muscle_table.
17827 (mhash1, mhash2, mcmp): Use muscle_entry.
17828 (macro_init): Rename muscle_init. Update.
17829 (macro_insert): Rename muscle_insert. Update.
17830 (macro_find): Rename muscle_find. Update.
17831
17832 * src/main.c: Include muscle_tab.h.
17833 (main): Call muscle_init ().
17834 * src/Makefile.am (bison_SOURCES): Echo modifications.
17835
17836 2001-09-02 Marc Autret <autret_m@epita.fr>
17837
17838 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17839
17840 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17841
17842 2001-09-02 Marc Autret <autret_m@epita.fr>
17843
17844 * src/macrotab.c, src/macrotab.h: Remove.
17845
17846 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
17847
17848 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17849 filename.
17850
17851 2001-09-01 Marc Autret <autret_m@epita.fr>
17852
17853 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17854 to an explicit value to activate the feature. We do it here.
17855
17856 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17857
17858 * src/output.c (prepare): Delete the `filename' muscule insertion.
17859 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17860 (parse_union_decl): Likewise.
17861 * src/macrotab.c (macro_init): Initialize filename by infile.
17862
17863 2001-08-31 Marc Autret <autret_m@epita.fr>
17864
17865 * src/bison.simple (YYLSP_NEEDED): New definition.
17866 * src/output.c (prepare): Add macro insertion of `locations_flag'
17867
17868 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17869
17870 * src/output.c (prepare): Delete insertion of previous muscles,
17871 and insert the `prefix' muscles.
17872 * src/macrotab.c (macro_init): Likewise.
17873 (macro_init): Initialization prefix directive by `yy'.
17874 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17875 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17876 yylval, yydebug, yyerror, yynerrs and yyparse.
17877 New directive `#define' to substitute yydebug, ... with option
17878 name_prefix.
17879
17880 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17881
17882 * src/main.c (main): Standardize.
17883 * src/output.c (output_table_data, output_parser): Likewise.
17884 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17885
17886 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17887
17888 * src/reader.c (read_additionnal_code): Rename %%user_code to
17889 %%epilogue.
17890 * src/output.c (output): Rename %%declarations to %%prologue.
17891 * src/bison.simple: Echo modifications.
17892
17893 2001-08-31 Marc Autret <autret_m@epita.fr>
17894
17895 * src/reader.c (readgram): CleanUp.
17896 (output_token_defines): Likewise.
17897 (packsymbols): Likewise.
17898 (reader): Likewise.
17899 * src/output.c (output): CPP-out useless code.
17900
17901 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17902
17903 * src/reader.c (reader): Delete obsolete call to function
17904 output_trailers and output_headers.
17905 * src/output.h: Remove obsolete functions prototypes of output_headers
17906 and output_trailers.
17907
17908 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
17909
17910 * src/main.c: Include macrotab.h.
17911 * src/macrotab.h (macro_entry_s): Constify fields.
17912 Adjust functions prototypes.
17913 * src/macrotab.c (macro_insert): Constify key and value.
17914 (macro_find): Constify key.
17915 (macro_insert): Include 'xalloc.h'
17916 (macro_insert): Use XMALLOC.
17917 (macro_find): Constify return value.
17918 * src/output.c (output_table_data): Rename table to table_data.
17919 (output_parser): Constify macro_key, macro_value.
17920
17921 2001-08-30 Marc Autret <autret_m@epita.fr>
17922
17923 * src/reader.c (parse_skel_decl): New.
17924 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
17925 * src/lex.h (token_t): New token `tok_skel'.
17926 * src/lex.c (percent_table): Add skeleton option entry.
17927 Standardize.
17928
17929 2001-08-29 Marc Autret <autret_m@epita.fr>
17930
17931 * src/bison.simple: Add %%user_code directive at the end.
17932 * src/reader.c (read_additionnal_code): New.
17933 (reader): Use it.
17934 * src/output.c (output_program): Remove.
17935 (output): Update.
17936
17937 2001-08-28 Marc Autret <autret_m@epita.fr>
17938
17939 * src/output.c (output_actions): Clean up.
17940 (output_gram): CPP-out useless code.
17941 * src/reader.c (reader): Clean up, CPP-out useless code.
17942
17943 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
17944
17945 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
17946 directive.
17947 * src/bison.simple: Add `%%definitions'.
17948
17949 2001-08-28 Marc Autret <autret_m@epita.fr>
17950
17951 * config/depcomp: New file.
17952
17953 2001-08-27 Paul Eggert <eggert@twinsun.com>
17954
17955 * src/bison.simple (yyparse): Don't take the address of an
17956 item before the start of an array, as that doesn't conform to
17957 the C Standard.
17958
17959 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17960
17961 * src/output.c (output): Remove the initialization of the macro
17962 obstack. It was done too late here.
17963
17964 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
17965 completely wrong.
17966 (reader): Initialize the macro obstack here, since we need it to grow
17967 '%define' directives.
17968
17969 * src/reader.h: Declare the macro obstack as extern.
17970
17971 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
17972
17973 * src/output.c (output_parser): Fix. Store single '%' characters in
17974 the output obstack instead of throwing them away.
17975
17976 2001-08-27 Akim Demaille <akim@epita.fr>
17977
17978 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17979
17980 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17981
17982 * lib/Makefile.am: Adjust.
17983
17984 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17985
17986 * src/bison.simple: Update and add '%%' directives.
17987
17988 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
17989
17990 * src/reader.c (reader): Remove calls to 'output_headers' and
17991 'output_trailers'. Remove some C output.
17992 (readgram): Disable a piece of code that was writing a default
17993 definition for 'YYSTYPE'.
17994 (reader_output_yylsp): Remove.
17995 (packsymbols): Output token defintions to a macro.
17996 (copy_definition): Disable C output.
17997
17998 * src/reader.c (parse_macro_decl): New function used to parse macro
17999 declarations.
18000 (copy_string2): Put the body of copy_string into this new function.
18001 Add a parameter to let the caller choose whether he wants to copy the
18002 string delimiters or not.
18003 (copy_string): Be a simple call to copy_string2 with the last argument
18004 bound to true.
18005 (read_declarations): Add case for macro definition.
18006 (copy_identifier): New.
18007 (parse_macro_decl): Read macro identifiers using copy_identifier
18008 rather than lex.
18009
18010 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18011
18012 * src/output.c (prepare): Add prefixed names.
18013 (output_parser): Output semantic actions.
18014 (output_parser): Fix bug on '%%line' directives.
18015
18016 * src/output.c (output_headers): Remove. The C code printed by this
18017 function should now be in the skeletons.
18018 (output_trailers): Remove.
18019 (output): Disable call to 'reader_output_yylsp'.
18020 (output_rule_data): Do not output tables to the table obstack.
18021
18022 * src/output.c: Remove some C dedicated output.
18023 Improve the use of macro and output obstacks.
18024 (output_defines): Remove.
18025
18026 * src/output.c (output_token_translations): Associate 'translate'
18027 table with a macro. No output to the table obstack.
18028 (output_gram): Same for 'rhs' and 'prhs'.
18029 (output_stos): Same for 'stos'.
18030 (output_rule_data): Same for 'r1' and 'r2'.
18031 (token_actions): Same for 'defact'.
18032 (goto_actions): Same for 'defgoto'.
18033 (output_base): Same for 'pact' and 'pgoto'.
18034 (output_table): Same for 'table'.
18035 (output_check): Same for 'check'.
18036
18037 * src/output.c (output_table_data): New function.
18038 (output_short_table): Remove.
18039 (output_short_or_char_table): Remove.
18040
18041 * src/output.c (output_parser): Replace most of the skeleton copy code
18042 with something new. Skeletons are now processed character by character
18043 rather than line by line, and Bison looks for '%%' macros. This is the
18044 first step in making Bison's output process (a lot) more flexible.
18045 (output_parser): Use the macro table.
18046
18047 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18048
18049 * src/main.c (main): Initialize the macro table.
18050
18051 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18052
18053 * src/lex.c (percent_table): Add tok_define.
18054 * src/lex.h: Add tok_define.
18055
18056 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18057
18058 * src/macrotab.c: New file.
18059 * src/macrotab.h: New file.
18060 * src/Makefile.am: Update.
18061
18062 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18063
18064 * lib/hash.c: New file.
18065 * lib/hash.h: New file.
18066 * lib/Makefile.am: Update.
18067
18068 2001-08-15 Akim Demaille <akim@epita.fr>
18069
18070 Version 1.28c.
18071
18072 2001-08-15 Marc Autret <autret_m@epita.fr>
18073
18074 * src/reader.c (readgram): Indent output macro YYSTYPE.
18075 (packsymbols): Likewise.
18076 (output_token_defines): Likewise.
18077 * src/files.c: Standardize.
18078 (compute_header_macro): New.
18079 (defines_obstack_save): New. Use compute_header_macro.
18080 (output_files): Update. Use defines_obstack_save.
18081
18082 2001-08-15 Akim Demaille <akim@epita.fr>
18083
18084 * doc/bison.texinfo (Table of Symbols): Document
18085 YYSTACK_USE_ALLOCA.
18086
18087 2001-08-15 Akim Demaille <akim@epita.fr>
18088
18089 * missing: Update from CVS Automake.
18090 * config/config.guess, config/config.sub, config/texinfo.tex:
18091 Update from gnu.org.
18092
18093 2001-08-15 Akim Demaille <akim@epita.fr>
18094
18095 * Makefile.maint: Sync with CVS Autoconf.
18096
18097 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
18098
18099 * doc/bison.texinfo: Include GNU Free Documentation License from
18100 `fdl.texi'.
18101 * doc/fdl.texi: Add to package.
18102
18103 2001-08-14 Marc Autret <autret_m@epita.fr>
18104
18105 Turn on %{source,header}_extension features.
18106
18107 * src/lex.c (percent_table): Un-CPP out header_extension and
18108 source_extension.
18109 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
18110 (compute_exts_from_src): Remove conditions. It restores priorities
18111 between options.
18112
18113 2001-08-14 Marc Autret <autret_m@epita.fr>
18114
18115 * src/files.c (compute_base_names): Add extensions computing when
18116 `--file-prefix' used.
18117 Standardize function calls.
18118
18119 2001-08-13 Marc Autret <autret_m@epita.fr>
18120
18121 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
18122 defining it (defined but null disables alloca).
18123
18124 2001-08-13 Marc Autret <autret_m@epita.fr>
18125
18126 * src/bison.simple (_yy_memcpy): CPP reformat.
18127
18128 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
18129
18130 * tests/atconfig.in (CPPFLAGS): Fix.
18131
18132 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
18133
18134 * doc/bison.texinfo: Include GNU General Public License from
18135 `gpl.texi'.
18136 * doc/gpl.texi: Add to package.
18137
18138 2001-08-10 Marc Autret <autret_m@epita.fr>
18139
18140 * src/print_graph.h: Fix.
18141 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18142
18143 2001-08-10 Akim Demaille <akim@epita.fr>
18144
18145 * src/system.h: Provide default declarations for stpcpy, strndup,
18146 and strnlen.
18147
18148 2001-08-10 Robert Anisko <anisko_r@epita.fr>
18149
18150 * doc/bison.texinfo (Locations): Update @$ stuff.
18151
18152 2001-08-09 Robert Anisko <anisko_r@epita.fr>
18153
18154 * src/bison.simple (YYLLOC_DEFAULT): Update.
18155 (yyparse): Adjust.
18156
18157 2001-08-08 Marc Autret <autret_m@epita.fr>
18158
18159 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
18160 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18161 Reported by Fabrice Bauzac.
18162
18163 2001-08-08 Marc Autret <autret_m@epita.fr>
18164
18165 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18166 * src/vcg.c (output_node): Fix.
18167 * src/vcg.h: Cleanup.
18168 * src/print_graph.c: Add comments.
18169 (node_output_size): New global variable. Simplify the formatting of
18170 the VCG graph output.
18171 (print_actions): Unused code is now used. It notifies the final state
18172 and no action states in the VCG graph. It also give the reduce actions.
18173 The `shift and goto' edges are red and the `go to state' edges are
18174 blue.
18175 Get the current node name and node_obstack by argument.
18176 (node_obstack): New variable.
18177 (print_state): Manage node_obstack.
18178 (print_core): Use node_obstack given by argument.
18179 A node is not only computed here but in print_actions also.
18180 (print_graph): CPP out useless code instead of commenting it.
18181
18182 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
18183
18184 * tests/atconfig.in (CPPFLAGS): Fix.
18185
18186 2001-08-07 Akim Demaille <akim@epita.fr>
18187
18188 * src/print_graph.c (quote): New.
18189 (print_core): Use it.
18190
18191 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
18192
18193 * src/vcg.c (complain.h): Include it.
18194 Unepitaize `return' invocations.
18195 [NDEBUG] (main): Remove.
18196 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
18197 * src/files.c (open_files): Initialize graph_obstack.
18198 * src/print_graph.c (print_actions): CPP out useless code.
18199 (print_core): Don't output the last `\n' in labels.
18200 Use `quote'.
18201 * src/files.c (output_files): Output the VCG file.
18202 * src/main.c (main): Invoke print_graph ();
18203
18204 2001-08-06 Marc Autret <autret_m@epita.fr>
18205
18206 Automaton VCG graph output.
18207 Using option ``-g'' or long option ``--graph'', you can generate
18208 a gram_filename.vcg file containing a VCG description of the LALR (1)
18209 automaton of your grammar.
18210
18211 * src/main.c: Call to print_graph() function.
18212 * src/getargs.h: Update.
18213 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18214 (graph_flag): New flag.
18215 (longopts): Update.
18216 (getargs): Add case `g'.
18217 * src/files.c (graph_obstack): New obstack struct.
18218 (open_files): Initialize new obstack.
18219 (output_files): Saves graph_obstack if required.
18220 * src/files.h (graph_obstack): New extern declaration.
18221 * src/Makefile.am: Add new source files.
18222
18223 2001-08-06 Marc Autret <autret_m@epita.fr>
18224
18225 * src/print_graph.c, src/print_graph.h (graph): New.
18226 * src/vcg.h: New file.
18227 * src/vcg.c: New file, VCG graph handling.
18228
18229 2001-08-06 Marc Autret <autret_m@epita.fr>
18230
18231 Add of %source_extension and %header_extension which specify
18232 the source or/and the header output file extension.
18233
18234 * src/files.c (compute_base_names): Remove initialisation of
18235 src_extension and header_extension.
18236 (compute_exts_from_gf): Update.
18237 (compute_exts_from_src): Update.
18238 (output_files): Update.
18239 * src/reader.c (parse_header_extension_decl): New.
18240 (parse_source_extension_decl): New.
18241 (read_declarations): New case statements for the new tokens.
18242 * src/lex.c (percent_table): Add entries for %source_extension
18243 and %header_extension.
18244 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18245
18246 2001-08-06 Marc Autret <autret_m@epita.fr>
18247
18248 * configure.in: Bump to 1.28c.
18249 * doc/bison.texinfo: Texinfo thingies.
18250
18251 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
18252
18253 * tests/atconfig.in (CPPFLAGS): Add.
18254 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18255
18256 2001-08-03 Akim Demaille <akim@epita.fr>
18257
18258 Version 1.28b.
18259
18260 2001-08-03 Akim Demaille <akim@epita.fr>
18261
18262 * tests/Makefile.am (check-local): Ship testsuite.
18263 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18264 Include `string.h'.
18265
18266 2001-08-03 Akim Demaille <akim@epita.fr>
18267
18268 * configure.in: Try using -Wformat when compiling.
18269
18270 2001-08-03 Akim Demaille <akim@epita.fr>
18271
18272 * configure.in: Bump to 1.28b.
18273
18274 2001-08-03 Akim Demaille <akim@epita.fr>
18275
18276 * src/complain.c: Adjust strerror_r portability issues.
18277
18278 2001-08-03 Akim Demaille <akim@epita.fr>
18279
18280 Version 1.28a.
18281
18282 2001-08-03 Akim Demaille <akim@epita.fr>
18283
18284 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18285 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18286 * src/getargs.c: Include complain.h.
18287 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18288 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18289
18290 2001-08-03 Akim Demaille <akim@epita.fr>
18291
18292 * src/reader.c (readgram): Display hidden chars in error messages.
18293
18294 2001-08-03 Akim Demaille <akim@epita.fr>
18295
18296 Update to gettext 0.10.39.
18297
18298 2001-08-03 Akim Demaille <akim@epita.fr>
18299
18300 * lib/strspn.c: New.
18301
18302 2001-08-01 Marc Autret <autret_m@epita.fr>
18303
18304 * doc/bison.texinfo: Update.
18305 * doc/bison.1 (mandoc): Update.
18306 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18307 * src/files.c: Support output files extensions computing.
18308 (src_extension): New static variable.
18309 (header_extension): New static variable.
18310 (tr): New function.
18311 (get_extension_index): New function, gets the index of an extension
18312 filename in a string.
18313 (compute_exts_from_gf): New function, computes extensions from the
18314 grammar file extension.
18315 (compute_exts_from_src): New functions, computes extensions from the
18316 C source file extension, file given by ``-o'' option.
18317 (compute_base_names): Update.
18318 (output_files): Update.
18319
18320 2001-08-01 Robert Anisko <anisko_r@epita.fr>
18321
18322 * doc/bison.texi: Document @$.
18323 (Locations): New section.
18324
18325 2001-07-18 Akim Demaille <akim@epita.fr>
18326
18327 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18328 * config/prev-version.txt, config/move-if-change: New.
18329 * Makefile.am: Adjust.
18330
18331 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
18332
18333 * src/bison.simple (yyparse): Suppress warning `comparaison
18334 between signed and unsigned'.
18335
18336 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
18337
18338 * src/getargs.h (raw_flag): Remove.
18339 * src/getargs.c: Die on `-r'/`--raw'.
18340 * src/lex.c (parse_percent_token): Die on `%raw'.
18341 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18342 * tests/calc.at: Suppress test with option `--raw'.
18343
18344 2001-07-14 Akim Demaille <akim@epita.fr>
18345
18346 * config/: New.
18347 * configure.in: Require Autoconf 2.50.
18348 Update to gettext 0.10.38.
18349
18350 2001-03-16 Akim Demaille <akim@epita.fr>
18351
18352 * doc/bison.texinfo: ANSIfy the examples.
18353
18354 2001-03-16 Akim Demaille <akim@epita.fr>
18355
18356 * getargs.c (skeleton): New variable.
18357 (longopts): --skeleton is a new option.
18358 (shortopts, getargs): -S is a new option.
18359 * getargs.h: Declare skeleton.
18360 * output.c (output_parser): Use it.
18361
18362 2001-03-16 Akim Demaille <akim@epita.fr>
18363
18364 * m4/strerror_r.m4: New.
18365 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18366 * lib/error.h, lib/error.c: Update.
18367
18368 2001-03-16 Akim Demaille <akim@epita.fr>
18369
18370 * src/getargs.c (longopts): Clean up.
18371
18372 2001-02-21 Akim Demaille <akim@epita.fr>
18373
18374 * src/reader.c (gensym): `gensym_count' is your own.
18375 Use a static buf to create the symbol name, as token_buffer is no
18376 longer a buffer.
18377
18378 2001-02-08 Akim Demaille <akim@epita.fr>
18379
18380 * src/conflicts.c (conflict_report): Be sure not to append to res
18381 between two calls, which could happen if both first sprintf were
18382 skipped, but not the first cp += strlen.
18383
18384 2001-02-08 Akim Demaille <akim@epita.fr>
18385
18386 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18387 New, from fileutils 4.0.37.
18388 * configure.in: Require Autoconf 2.49c. I took some time before
18389 making this decision. This is the only way out for portability
18390 issues in Bison, it would mean way too much duplicate effort to
18391 import in Bison features implemented in 2.49c since 2.13.
18392 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18393
18394 2001-02-02 Akim Demaille <akim@epita.fr>
18395
18396 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18397 * lib/xalloc.h, lib/xmalloc.c: Update.
18398
18399 2001-01-19 Akim Demaille <akim@epita.fr>
18400
18401 Get rid of the ad hoc handling of token_buffer in the scanner: use
18402 the obstacks.
18403
18404 * src/lex.c (token_obstack): New.
18405 (init_lex): Initialize it. No longer call...
18406 (grow_token_buffer): this. Remove it.
18407 Adjust all the places which used it to use the obstack.
18408
18409 2001-01-19 Akim Demaille <akim@epita.fr>
18410
18411 * src/lex.h: Rename all the tokens:
18412 s/\bENDFILE\b/tok_eof/g;
18413 s/\bIDENTIFIER\b/tok_identifier/g;
18414 etc.
18415 Let them be enums, not #define, to ease debugging.
18416 Adjust all the code.
18417
18418 2001-01-18 Akim Demaille <akim@epita.fr>
18419
18420 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18421 * src/lex.c (maxtoken, grow_token_buffer): Static.
18422
18423 2001-01-18 Akim Demaille <akim@epita.fr>
18424
18425 Since we now use obstacks, more % directives can be enabled.
18426
18427 * src/lex.c (percent_table): Also accept `%yacc',
18428 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18429 `%debug'.
18430 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18431 instead of returning a token.
18432 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18433 * src/reader.c (read_declarations): Adjust.
18434 * src/files.c (open_files): Don't call `compute_base_names', don't
18435 compute `attrsfile' since they depend upon data which might be
18436 *in* the input file now.
18437 (output_files): Do it here.
18438 * src/output.c (output_headers): Document the fact that this patch
18439 introduces a guaranteed SEGV for semantic parsers.
18440 * doc/bison.texinfo: Document them.
18441 * tests/suite.at: Exercise these %options.
18442
18443 2000-12-20 Akim Demaille <akim@epita.fr>
18444
18445 Also handle the output file (--verbose) with obstacks.
18446
18447 * files.c (foutput): Remove.
18448 (output_obstack): New.
18449 Adjust all dependencies.
18450 * src/conflicts.c: Return a string.
18451 * src/system.h (obstack_grow_string): Rename as...
18452 (obstack_sgrow): this. Be ready to work with non literals.
18453 (obstack_fgrow4): New.
18454
18455 2000-12-20 Akim Demaille <akim@epita.fr>
18456
18457 * src/files.c (open_files): Fix the computation of short_base_name
18458 in the case of `-o foo.tab.c'.
18459
18460 2000-12-20 Akim Demaille <akim@epita.fr>
18461
18462 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18463 (copy_dollar): Now that everything uses obstacks, get rid of the
18464 FILE * parameters.
18465
18466 2000-12-20 Akim Demaille <akim@epita.fr>
18467
18468 * src/files.c (open_files): Actually the `.output' file is based
18469 on the short_base_name, not base_name.
18470 * tests/suite.at (Checking output file names): Adjust.
18471
18472 2000-12-20 Akim Demaille <akim@epita.fr>
18473
18474 * src/bison.s1: Remove, we now use directly...
18475 * src/bison.simple: this.
18476 * src/Makefile.am: Use pkgdata instead of data.
18477
18478 2000-12-20 Akim Demaille <akim@epita.fr>
18479
18480 * src/files.c (guard_obstack): New.
18481 (open_files): Initialize it.
18482 (output_files): Dump it...
18483 * src/files.h: Export it.
18484 * src/reader.c (copy_guard): Use it.
18485
18486 2000-12-19 Akim Demaille <akim@epita.fr>
18487
18488 * src/files.c (outfile, defsfile, actfile): Removed as global
18489 vars.
18490 (open_files): Don't compute them.
18491 (output_files): Adjust.
18492 (base_name, short_base_name): Be global.
18493 Adjust dependencies.
18494
18495 2000-12-19 Akim Demaille <akim@epita.fr>
18496
18497 * src/files.c (strsuffix): New.
18498 (stringappend): Be just like strcat but allocate.
18499 (base_names): Eve out from open_files.
18500 Try to simplify the rather hairy computation of base_name and
18501 short_base_name.
18502 (open_files): Use it.
18503 * tests/suite.at (Checking output file names): New test.
18504
18505 2000-12-19 Akim Demaille <akim@epita.fr>
18506
18507 * src/system.h (obstack_grow_literal_string): Rename as...
18508 (obstack_grow_string): this.
18509 * src/output.c (output_parser): Recognize `%% actions' instead of
18510 `$'.
18511 * src/bison.s1: s/$/%% actions/.
18512 * src/bison.hairy: Likewise.
18513
18514 2000-12-19 Akim Demaille <akim@epita.fr>
18515
18516 * src/output.c (output_parser): Compute the `#line' lines when
18517 there are.
18518 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18519 Suggested by Hans Aberg.
18520
18521 2000-12-19 Akim Demaille <akim@epita.fr>
18522
18523 Let the handling of the skeleton files be local to the procedures
18524 that use it.
18525
18526 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18527 longer static.
18528 (fparser, open_extra_files): Remove.
18529 (open_files, output_files): Don't take care of fparser.
18530 * src/files.h: Adjust.
18531 * src/output.c (output_parser): Open and close the file to the
18532 skeleton.
18533 * src/reader.c (read_declarations): When %semantic_parser, open
18534 fguard.
18535
18536 2000-12-19 Akim Demaille <akim@epita.fr>
18537
18538 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18539 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18540
18541 2000-12-19 Akim Demaille <akim@epita.fr>
18542
18543 * src/files.c (open_files): Yipee! We no longer need all the code
18544 looking for `/tmp' since we have no tmp file.
18545
18546 2000-12-19 Akim Demaille <akim@epita.fr>
18547
18548 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18549 New macros.
18550 * src/files.c (open_files): Less dependency on MSDOS etc.
18551
18552 2000-12-14 Akim Demaille <akim@epita.fr>
18553
18554 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18555 Provide a default definition.
18556 Use it when executing the default @ action.
18557 * src/reader.c (reader_output_yylsp): No longer include
18558 `timestamp' and `text' in the default YYLTYPE.
18559
18560 2000-12-12 Akim Demaille <akim@epita.fr>
18561
18562 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18563 (copy_guard): Quote the file names.
18564 Reported by Laurent Mascherpa.
18565
18566 2000-12-12 Akim Demaille <akim@epita.fr>
18567
18568 * src/output.c (output_headers, output_program, output): Be sure
18569 to escape special characters when outputting filenames.
18570 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18571 (output_headers): Don't depend on them, Use ACTSTR.
18572
18573 2000-11-17 Akim Demaille <akim@epita.fr>
18574
18575 * lib/obstack.h: Formatting changes.
18576 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18577 prevents type checking.
18578 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18579 cast the value to (void *): assigning a `foo *' to a `void *'
18580 variable is valid.
18581 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18582 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18583 append characters.
18584
18585 2000-11-17 Akim Demaille <akim@epita.fr>
18586
18587 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18588 as...
18589 (suite.m4, regression.m4, calc.m4): these.
18590 * tests/atgeneral.m4: Update from CVS Autoconf.
18591
18592 2000-11-17 Akim Demaille <akim@epita.fr>
18593
18594 * tests/regression.m4 (%union and --defines): New test,
18595 demonstrating a current bug in the obstack implementation.
18596
18597 2000-11-17 Akim Demaille <akim@epita.fr>
18598
18599 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18600 macros.
18601 Use them to declare the variables which are global or local to
18602 `yyparse'.
18603
18604 2000-11-17 Akim Demaille <akim@epita.fr>
18605
18606 * acconfig.h: Remove, no longer used.
18607
18608 2000-11-07 Akim Demaille <akim@epita.fr>
18609
18610 * src: s/Copyright (C)/Copyright/g.
18611
18612 2000-11-07 Akim Demaille <akim@epita.fr>
18613
18614 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18615 defining.
18616 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18617
18618 2000-11-07 Akim Demaille <akim@epita.fr>
18619
18620 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18621 Merge in a single CPP if/else.
18622
18623 2000-11-07 Akim Demaille <akim@epita.fr>
18624
18625 * src/output.c (output): Remove useless variables.
18626 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18627 argument `data' for consistency with the prototypes.
18628 Qualify it `const'.
18629 (obstack_copy, obstack_copy0): Rename the second argument as
18630 `address' for consistency. Qualify it `const'.
18631 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18632 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18633 `const' their input argument (`data' or `address').
18634 Adjust the corresponding macros to include `const' in casts.
18635
18636 2000-11-03 Akim Demaille <akim@epita.fr>
18637
18638 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18639 s/PFILE1/BISON_HAIRY/.
18640 Adjust dependencies.
18641
18642 2000-11-03 Akim Demaille <akim@epita.fr>
18643
18644 For some reason, this was not applied.
18645
18646 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18647 `unlink': it's no longer used.
18648
18649 2000-11-03 Akim Demaille <akim@epita.fr>
18650
18651 * src/files.c (skeleton_find): New function, eved out of...
18652 (open_files, open_extra_files): here.
18653
18654 2000-11-03 Akim Demaille <akim@epita.fr>
18655
18656 Don't use `atexit'.
18657
18658 * src/files.c (obstack_save): New function.
18659 (done): Rename as...
18660 (output_files): this.
18661 Use `obstack_save'.
18662 * src/main.c (main): Don't use `atexit' to register `done', since
18663 it no longer has to remove tmp files, just call `output_files'
18664 when there are no errors.
18665
18666 2000-11-02 Akim Demaille <akim@epita.fr>
18667
18668 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18669 `unlink': it's no longer used.
18670 * src/files.h: Formatting changes.
18671
18672 2000-11-02 Akim Demaille <akim@epita.fr>
18673
18674 Remove the last uses of mktemp and unlink/delete.
18675
18676 * src/files.c (fdefines, ftable): Removed.
18677 (defines_ostack, table_obstack): New.
18678 Adjust dependencies of the former into uses of the latter.
18679 * src/output.c (output_short_or_char_table, output_short_table):
18680 Convert to using obstacks.
18681 * src/reader.c (copy_comment2): Accept one FILE * and two
18682 obstacks.
18683 (output_token_defines, reader_output_yylsp): Use obstacks.
18684 * src/system.h (obstack_fgrow3): New.
18685 * po/POTFILES.in: Adjust.
18686
18687 2000-11-01 Akim Demaille <akim@epita.fr>
18688
18689 Change each use of `fattrs' into a use of `attrs_obstack'.
18690
18691 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18692 * src/files.c (fattrs): Remove.
18693 (attrs_obstack): New.
18694 Adjust all dependencies.
18695 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18696
18697 2000-11-01 Akim Demaille <akim@epita.fr>
18698
18699 Introduce obstacks.
18700 Change each use of `faction' into a use of `action_obstack'.
18701
18702 * lib/obstack.h, lib/obstack.c: New files.
18703 * src/files.c (faction): Remove.
18704 (action_obstack): New.
18705 Adjust all dependencies.
18706
18707 2000-10-20 Akim Demaille <akim@epita.fr>
18708
18709 * lib/quote.h (PARAMS): New macro. Use it.
18710
18711 2000-10-16 Akim Demaille <akim@epita.fr>
18712
18713 * src/output.c (output_short_or_char_table): New function.
18714 (output_short_table, output_token_translations): Use it.
18715 (goto_actions): Use output_short_table.
18716
18717 2000-10-16 Akim Demaille <akim@epita.fr>
18718
18719 * src/symtab.c (bucket_new): New function.
18720 (getsym): Use it.
18721
18722 * src/output.c (output_short_table): New argument to display the
18723 comment associated with the table.
18724 Adjust dependencies.
18725 (output_gram): Use it.
18726 (output_rule_data): Nicer output layout for YYTNAME.
18727
18728 2000-10-16 Akim Demaille <akim@epita.fr>
18729
18730 * src/lex.c (read_typename): New function.
18731 (lex): Use it.
18732 * src/reader.c (copy_dollar): Likewise.
18733
18734 2000-10-16 Akim Demaille <akim@epita.fr>
18735
18736 * src/reader.c (copy_comment2): Expect the input stream to be on
18737 the `/' which is suspected to open a comment, instead of being
18738 called after `//' or `/*' was read.
18739 (copy_comment, copy_definition, parse_union_decl, copy_action)
18740 (copy_guard): Adjust.
18741
18742 2000-10-16 Akim Demaille <akim@epita.fr>
18743
18744 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18745 `read_signed_integer'.
18746
18747 2000-10-16 Akim Demaille <akim@epita.fr>
18748
18749 * src/reader.c (copy_dollar): New function.
18750 (copy_guard, copy_action): Use it.
18751
18752 2000-10-16 Akim Demaille <akim@epita.fr>
18753
18754 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18755 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18756 New files, from Fileutils 4.0.27.
18757 * src/main.c (printable_version): Remove.
18758 * src/lex.c, src/reader.c: Use `quote'.
18759
18760 2000-10-04 Akim Demaille <akim@epita.fr>
18761
18762 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18763
18764 2000-10-04 Akim Demaille <akim@epita.fr>
18765
18766 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18767
18768 2000-10-04 Akim Demaille <akim@epita.fr>
18769
18770 When a literal string is used to define two different tokens,
18771 `bison -v' segfaults.
18772 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18773
18774 * tests/regression.m4: New file.
18775 Include the core of the sample provided by Piotr Gackiewicz.
18776 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18777 properly.
18778
18779 2000-10-04 Akim Demaille <akim@epita.fr>
18780
18781 * src/reader.c (parse_expect_decl): Keep `count' within the size
18782 of `buffer'.
18783 From Neil Booth.
18784
18785 2000-10-02 Paul Eggert <eggert@twinsun.com>
18786
18787 * bison.s1 (yyparse): Assign the default value
18788 unconditionally, to avoid a GCC warning and make the parser a
18789 tad smaller.
18790
18791 2000-10-02 Akim Demaille <akim@epita.fr>
18792
18793 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18794 options.
18795
18796 2000-10-02 Akim Demaille <akim@epita.fr>
18797
18798 * src/derives.c, src/print.c, src/reduce.c: To ease the
18799 translation, move some `\n' out of the translated strings.
18800
18801 2000-10-02 Akim Demaille <akim@epita.fr>
18802
18803 The location tracking mechanism is precious for parse error
18804 messages. Nevertheless, it is enabled only when `@n' is used in
18805 the grammar, which is a different issue (you can use it in error
18806 message, but not in the grammar per se). Therefore, there should
18807 be another means to enable it.
18808
18809 * src/getargs.c (getargs): Support `--locations'.
18810 (usage): Report it.
18811 * src/getargs.h (locationsflag): Export it.
18812 * src/lex.c (percent_table): Support `%locations'.
18813 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18814 with `locationsflag'.
18815 * doc/bison.texinfo: Document `--locations' and `%locations'.
18816 Sort the options.
18817 * tests/calc.m4: Test it.
18818
18819 For regularity of the names, replace each
18820 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18821 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18822 In addition replace each `flag' with `_flag'.
18823
18824 2000-10-02 Akim Demaille <akim@epita.fr>
18825
18826 Also test parse error messages, including with YYERROR_VERBOSE.
18827
18828 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18829 associative).
18830 Use it to check the computations.
18831 Use it to check `nonassoc' is honored.
18832 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18833 `--yyerror-verbose'.
18834 (_AT_CHECK_CALC): Adjust to this option.
18835 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18836
18837 2000-10-02 Akim Demaille <akim@epita.fr>
18838
18839 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18840 the latter demonstrates a flaw in the handling of non debugging
18841 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18842 was used in order to simplify:
18843
18844 #if YYDEBUG
18845 if (yydebug)
18846 {
18847 ...
18848 }
18849 #endif
18850
18851 into
18852
18853 if (yydebug)
18854 {
18855 ...
18856 }
18857
18858 unfortunately this leads to a CPP conflict when
18859 `--name-prefix=foo' is used since it produces `#define yydebug
18860 foodebug'.
18861
18862 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18863 (YYDPRINTF): New macro.
18864 Spread its use.
18865 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18866 the bison options.
18867 Also test `--verbose', `--defines' and `--name-prefix'.
18868
18869 2000-10-02 Akim Demaille <akim@epita.fr>
18870
18871 Improve the readability of the produced parsers.
18872
18873 * src/bison.s1: Formatting changes.
18874 Improve the comment related to the `$' mark.
18875 (yydefault): Don't fall through to `yyresume': `goto' there.
18876 * src/output.c (output_parser): When the `$' is met, skip the end
18877 of its line.
18878 New variable, `number_of_dollar_signs', to check there's exactly
18879 one `$' in the parser skeleton.
18880
18881 2000-10-02 Akim Demaille <akim@epita.fr>
18882
18883 * lib/xstrdup.c: New file, from the fileutils.
18884 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18885 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18886 instead of strlen + xmalloc + strcpy.
18887 * src/symtab.c (copys): Remove, use xstrdup instead.
18888
18889 2000-10-02 Akim Demaille <akim@epita.fr>
18890
18891 * src/gram.h (associativity): New enum type which replaces the
18892 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18893 `right_assoc', `left_assoc' and `non_assoc'.
18894 Adjust all dependencies.
18895 * src/reader.c: Formatting changes.
18896 (LTYPESTR): Don't define it, use it as a literal in
18897 `reader_output_yylsp'.
18898 * src/symtab.h (symbol_class): New enum type which replaces the
18899 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18900 `sunknown', `stoken and `snterm'.
18901
18902 2000-10-02 Akim Demaille <akim@epita.fr>
18903
18904 * src/getargs.c (fixed_outfiles): Rename as...
18905 (yaccflag): for consistency and accuracy.
18906 Adjust dependencies.
18907
18908 2000-10-02 Akim Demaille <akim@epita.fr>
18909
18910 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18911 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18912 difficult and introduced a lot of core dump. It turns out that
18913 Bison used an implementation of `xmalloc' based on `calloc', and
18914 at various places it does depend upon the initialization to 0. I
18915 have not tried to isolate the pertinent places, and all the former
18916 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
18917 someone should address this issue.
18918
18919 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
18920 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
18921 files.
18922 Adjust dependencies.
18923 * src/warshall.h: New file.
18924 Propagate.
18925
18926 2000-10-02 Akim Demaille <akim@epita.fr>
18927
18928 Various anti-`extern in *.c' changes.
18929
18930 * src/system.h: Include `assert.h'.
18931
18932 2000-10-02 Akim Demaille <akim@epita.fr>
18933
18934 * src/state.h (nstates, final_state, first_state, first_shift)
18935 (first_reduction): Move their exportation from here...
18936 * src/LR0.h: to here.
18937 Adjust dependencies.
18938 * src/getargs.c (statisticsflag): New variable.
18939 Add support for `--statistics'.
18940 Adjust dependencies.
18941
18942 Remove a lot of now useless `extern' statements in most files.
18943
18944 2000-10-02 Akim Demaille <akim@epita.fr>
18945
18946 * src/LR0.h: New file.
18947 Propagate its use.
18948
18949 2000-10-02 Akim Demaille <akim@epita.fr>
18950
18951 * src/print.h: New file.
18952 Propagate its use.
18953 * src/print.c: Formatting and ordering changes.
18954 (verbose, terse): Replace with...
18955 (print_results): this new function.
18956 Adjust dependencies.
18957
18958 2000-10-02 Akim Demaille <akim@epita.fr>
18959
18960 * src/conflicts.c (conflict_report): New function.
18961 (conflict_log, verbose_conflict_log): Replace with...
18962 (print_conflicts): this function.
18963 Adjust dependencies.
18964 * src/conflicts.h: New file.
18965 Propagate its inclusion.
18966
18967 2000-10-02 Akim Demaille <akim@epita.fr>
18968
18969 * src/nullable.h: New file.
18970 Propagate its inclusion.
18971 * src/nullable.c: Formatting changes.
18972
18973 2000-10-02 Akim Demaille <akim@epita.fr>
18974
18975 * src/reduce.h: New file.
18976 Propagate its inclusion.
18977 * src/reduce.c: Topological sort and other formatting changes.
18978 (bool, TRUE, FALSE): Move their definition to...
18979 * src/system.h: here.
18980
18981 2000-10-02 Akim Demaille <akim@epita.fr>
18982
18983 * src/files.c: Formatting changes.
18984 (tryopen, tryclose, openfiles): Rename as...
18985 (xfopen, xfclose, open_files): this.
18986 (stringappend): static.
18987 * src/files.h: Complete the list of exported symbols.
18988 Propagate its use.
18989
18990 2000-10-02 Akim Demaille <akim@epita.fr>
18991
18992 * src/reader.h: New file.
18993 Propagate its use instead of tedious list of `extern' and
18994 prototypes.
18995 * src/reader.c: Formatting changes, topological sort,
18996 s/register//.
18997
18998 2000-10-02 Akim Demaille <akim@epita.fr>
18999
19000 * src/lex.h: Prototype `lex.c' exported functions.
19001 * src/reader.c: Adjust.
19002 * src/lex.c: Formatting changes.
19003 (safegetc): Rename as...
19004 (xgetc): this.
19005
19006 2000-10-02 Akim Demaille <akim@epita.fr>
19007
19008 * src/lalr.h: New file.
19009 Propagate its inclusion instead of prototypes and `extern'.
19010 * src/lalr.c: Formatting changes, topological sorting etc.
19011
19012 2000-10-02 Akim Demaille <akim@epita.fr>
19013
19014 * src/output.c (token_actions): Introduce a temporary array,
19015 YYDEFACT, that makes it possible for this function to use
19016 output_short_table.
19017
19018 2000-10-02 Akim Demaille <akim@epita.fr>
19019
19020 `user_toknums' is output as a `short[]' in `output.c', while it is
19021 defined as a `int[]' in `reader.c'. For consistency with the
19022 other output tables, `user_toknums' is now defined as a table of
19023 shorts.
19024
19025 * src/reader.c (user_toknums): Be a short table instead of an int
19026 table.
19027 Adjust dependencies.
19028
19029 Factor the short table outputs.
19030
19031 * src/output.c (output_short_table): New function.
19032 * src/output.c (output_gram, output_stos, output_rule_data)
19033 (output_base, output_table, output_check): Use it.
19034
19035 2000-10-02 Akim Demaille <akim@epita.fr>
19036
19037 * src/output.c (output): Topological sort of the functions, in
19038 order to get rid of the `static' prototypes.
19039 No longer use `register'.
19040 * src/output.h: New file.
19041 Propagate its inclusion in files explicitly prototyping functions
19042 from output.c.
19043
19044 2000-09-21 Akim Demaille <akim@epita.fr>
19045
19046 * src/atgeneral.m4: Update from Autoconf.
19047
19048 2000-09-21 Akim Demaille <akim@epita.fr>
19049
19050 * src/closure.h: New file.
19051 * src/closure.c: Formatting changes, topological sort over the
19052 functions, use of closure.h.
19053 (initialize_closure, finalize_closure): Rename as...
19054 (new_closure, free_closure): these. Adjust dependencies.
19055 * src/LR0.c: Formatting changes, topological sort, use of
19056 cloture.h.
19057 (initialize_states): Rename as...
19058 (new_states): this.
19059 * src/Makefile.am (noinst_HEADERS): Adjust.
19060
19061 2000-09-20 Akim Demaille <akim@epita.fr>
19062
19063 * src/acconfig.h: Don't protect config.h against multiple
19064 inclusion.
19065 Don't define PARAMS.
19066 * src/system.h: Define PARAMS.
19067 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19068 purpose of config.h. system.h must not try to fix wrong
19069 definitions in config.h.
19070
19071 2000-09-20 Akim Demaille <akim@epita.fr>
19072
19073 * src/derives.h: New file.
19074 * src/main.c, src/derives.h: Use it.
19075 Formatting changes.
19076 * src/Makefile.am (noinst_HEADERS): Adjust.
19077
19078 2000-09-20 Akim Demaille <akim@epita.fr>
19079
19080 * tests/atgeneral.m4: Update from Autoconf.
19081 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19082 (AT_CHECK_CALC): New macros.
19083 Use these macros to test bison with options `', `--raw',
19084 `--debug', `--yacc', `--yacc --debug'.
19085
19086 2000-09-19 Akim Demaille <akim@epita.fr>
19087
19088 * src/output.c: Formatting changes.
19089 * src/machine.h: Remove, leaving its contents in...
19090 * src/system.h: here.
19091 Include stdio.h.
19092 Adjust all dependencies on stdio.h and machine.h.
19093 * src/getargs.h: New file.
19094 Let all `extern' declarations about getargs.c be replaced with
19095 inclusion of `getargs.h'.
19096 * src/Makefile.am (noinst_HEADERS): Adjust.
19097
19098 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19099 scope.
19100 (yyerror): Returns void, not int.
19101 * doc/bison.texinfo: Formatting changes.
19102
19103 2000-09-19 Akim Demaille <akim@epita.fr>
19104
19105 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19106 portable.
19107
19108 2000-09-18 Akim Demaille <akim@epita.fr>
19109
19110 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19111 * src/Makefile.am (INCLUDES): Don't.
19112 Be ready to fetch headers in lib/.
19113
19114 2000-09-18 Akim Demaille <akim@epita.fr>
19115
19116 * doc/bison.texinfo: Update the copyright.
19117 ANSIfy and GNUify the examples.
19118 Remove the old menu.
19119
19120 2000-09-18 Akim Demaille <akim@epita.fr>
19121
19122 First set of tests: use the `calc' example from the documentation.
19123
19124 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19125 is defined only when YYDEBUG is.
19126 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19127 * src/files.c (tryopen, tryclose): Formatting changes.
19128 Move to the top and be static.
19129 * src/reader.c (read_signed_integer): Likewise.
19130 * tests/calc.m4: New file.
19131 * Makefile.am, suite.m4: Adjust.
19132 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19133
19134 2000-09-18 Akim Demaille <akim@epita.fr>
19135
19136 Add support for an Autotest test suite for Bison.
19137
19138 * m4/m4.m4, m4/atconfig.m4: New files.
19139 * m4/Makefile.am (EXTRA_DIST): Adjust.
19140 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19141 files.
19142 * src/getargs.c: Display a more standard --version message.
19143 * src/reader.c (reader): Formatting changes.
19144 No longer depend upon VERSION_STRING.
19145 * configure.in: No longer use `dnl'.
19146 Set up the test suite and the new directory `tests/.
19147 (VERSION_STRING): Remove.
19148
19149 2000-04-14 Akim Demaille <akim@epita.fr>
19150
19151 * src/reader.c (copy_comment2): New function, same as former
19152 `copy_comment', but outputs into two FILE *.
19153 (copy_comment): Use it.
19154 (parse_union_decl): Use it.
19155 (get_type, parse_start_decl): Use the same `invalid' message.
19156 (parse_start_decl, parse_union_decl): Use the same `multiple'
19157 message.
19158 (parse_union_decl, copy_guard, copy_action): Use the same
19159 `unmatched' message.
19160 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19161
19162 2000-03-31 Akim Demaille <akim@epita.fr>
19163
19164 * src/files.c (tryopen, tryclose): Move to the top.
19165 Be static.
19166
19167 2000-03-31 Akim Demaille <akim@epita.fr>
19168
19169 * src/main.c (main): Don't call `done', exit does it.
19170
19171 2000-03-31 Akim Demaille <akim@epita.fr>
19172
19173 * allocate.c: s/return (foo)/return foo/.
19174 * lalr.c: Likewise.
19175 * LR0.c: Likewise.
19176 * output.c: Likewise.
19177 * reader.c: Likewise.
19178 * symtab.c: Likewise.
19179 * vmsgetargs.c: Likewise.
19180
19181 2000-03-31 Akim Demaille <akim@epita.fr>
19182
19183 Clean up the error reporting functions.
19184
19185 * src/report.c: New file.
19186 * src/report.h: Likewise.
19187 * src/Makefile.am: Adjust.
19188 * m4/error.m4: New file.
19189 * m4/Makefile.am: Adjust.
19190 * configure.in (jm_PREREQ_ERROR): Call it.
19191 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19192 Remove.
19193 (fatal, fatals): Remove. All callers use complain.c::fatal.
19194 (warn, warni, warns, warnss, warnss): Remove. All callers use
19195 complain.c::complain.
19196 (toomany): Remove, use fatal instead.
19197 * src/files.c (done): No argument, use complain_message_count.
19198 * src/main.c (main): Register `done' to `atexit'.
19199
19200 * src/getargs.c (usage): More `fputs', less `fprintf'.
19201
19202 2000-03-28 Akim Demaille <akim@epita.fr>
19203
19204 * lib/: New directory.
19205 * Makefile.am (SUBDIRS): Adjust.
19206 * configure.in: Adjust.
19207 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19208 useless.
19209 * src/alloca.c: Moved to lib/.
19210 * src/getopt.c: Likewise.
19211 * src/getopt1.c: Likewise.
19212 * src/getopt.h: Likewise.
19213 * src/ansi2knr.c: Likewise.
19214 * src/ansi2knr.1: Likewise.
19215 * src/Makefile.am: Adjust.
19216 * lib/Makefile.am: New file.
19217
19218 2000-03-28 Akim Demaille <akim@epita.fr>
19219
19220 * src/getargs.c (usage): Refresh the help message.
19221
19222 2000-03-17 Akim Demaille <akim@epita.fr>
19223
19224 * src/getopt1.c: Updated from textutils 2.0e
19225 * src/getopt.c: Likewise.
19226 * src/getopt.h: Likewise.
19227
19228 2000-03-17 Akim Demaille <akim@epita.fr>
19229
19230 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19231 the file name, not the whole `#line LINE FILE'.
19232
19233 2000-03-17 Akim Demaille <akim@epita.fr>
19234
19235 On syntax errors, report the token on which we choked.
19236
19237 * src/bison.s1 (yyparse): In the label yyerrlab, when
19238 YYERROR_VERBOSE, add yychar in msg.
19239
19240 2000-03-17 Akim Demaille <akim@epita.fr>
19241
19242 * src/reader.c (copy_at): New function.
19243 (copy_guard): Use it.
19244 (copy_action): Use it.
19245
19246 2000-03-17 Akim Demaille <akim@epita.fr>
19247
19248 Be kind to translators, save some useless translations.
19249
19250 * src/main.c (banner): New function.
19251 (fatal_banner): Use it.
19252 (warn_banner): Use it.
19253
19254 2000-03-17 Akim Demaille <akim@epita.fr>
19255
19256 * src/reader.c (copy_definition): Use copy_string and
19257 copy_comment. Removed now unused `match', `ended',
19258 `cplus_comment'.
19259 (copy_comment, copy_string): Moved, to be visible from
19260 copy_definition.
19261
19262 2000-03-17 Akim Demaille <akim@epita.fr>
19263
19264 * src/reader.c (copy_string): Declare `static inline'. No
19265 problems with inline, since it is checked by configure.
19266 (copy_comment): Likewise.
19267
19268 2000-03-17 Akim Demaille <akim@epita.fr>
19269
19270 * src/reader.c (packsymbols): Formatting changes.
19271
19272 2000-03-17 Akim Demaille <akim@epita.fr>
19273
19274 * src/reader.c (copy_comment): New function, factored out from:
19275 (copy_action): Use it. Removed now unused `match', `ended',
19276 `cplus_comment'.
19277 (copy_guard): Likewise.
19278
19279 2000-03-17 Akim Demaille <akim@epita.fr>
19280
19281 * src/reader.c (copy_string): New function, factored out from:
19282 (copy_action): Use it.
19283 (copy_guard): Likewise.
19284
19285 2000-03-17 Akim Demaille <akim@epita.fr>
19286
19287 Change the handling of @s so that they behave exactly like $s.
19288 There is now a pseudo variable @$ (readble and writable), location
19289 of the lhs of the rule (by default ranging from the location of
19290 the first symbol of the rhs, to the location of the last symbol,
19291 or, if the rhs is empty, YYLLOC).
19292
19293 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19294 yyval.
19295 (yyparse): When providing a default semantic action, provide a
19296 default location action.
19297 (after the $): No longer change `*YYLSP', just stack YYLOC the
19298 same way you stack YYVAL.
19299 * src/reader.c (read_declarations): Use warns.
19300 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19301 (copy_action, case '@'): Likewise.
19302 Use a standard error message, to save useless work from
19303 translators.
19304
19305 2000-03-17 Akim Demaille <akim@epita.fr>
19306
19307 * src/bison.s1: Formatting and cosmetics changes.
19308 * src/reader.c: Likewise.
19309 Update the Copyright notice.
19310
19311 2000-03-17 Akim Demaille <akim@epita.fr>
19312
19313 * src/bison.s1 (#line): All set to `#line' only, since the
19314 Makefile now handles them.
19315
19316 2000-03-16 Akim Demaille <akim@epita.fr>
19317
19318 * src/output.c (output_rule_data): Output the documentation of
19319 some of the tables.
19320 (Copyright notice): Update.
19321 Formatting changes.
19322
19323 2000-03-16 Akim Demaille <akim@epita.fr>
19324
19325 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19326 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19327 One `#if YYDEBUG' remains, since it uses variables which are
19328 defined only if `YYDEBUG != 0'.
19329
19330 2000-03-16 Akim Demaille <akim@epita.fr>
19331
19332 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19333 and related variables so that the similarities are highlighted.
19334
19335 2000-03-16 Akim Demaille <akim@epita.fr>
19336
19337 * src/bison.s1: Properly indent CPP directives.
19338
19339 2000-03-16 Akim Demaille <akim@epita.fr>
19340
19341 * src/bison.s1: Properly indent the `alloca' CPP section.
19342
19343 2000-03-16 Akim Demaille <akim@epita.fr>
19344
19345 Do not hard code values of directories in `configure.in'.
19346 Update the `configure' tool chain.
19347
19348 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19349 src/makefile.am.
19350 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19351 (AC_OUTPUT): Add m4/Makefile.
19352 Bump to bison 1.28a, 1.29 has never been released.
19353 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19354 handled via src/Makefile.am.
19355 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19356 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19357 autoheader.
19358 * Makefile.am (SUBDIRS): Add m4.
19359 (ACLOCAL_AM_FLAGS): New variable.
19360 (AUTOMAKE_OPTIONS): Add check-news.
19361 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19362 the proper line number and file name.
19363 (DEFS): Propagate the location of bison library files and of the
19364 locale files.
19365 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19366 builddir.
19367 * acinclude.m4: Remove, replaced by the directory m4.
19368 * m4/Makefile.am (EXTRA_DIST): New variable.
19369 * m4/gettext.m4: New file, from the fileutils.
19370 * m4/lcmessage.m4: Likewise
19371 * m4/progtest.m4: Likewise.
19372 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19373
19374 2000-03-10 Akim Demaille <akim@epita.fr>
19375
19376 * src/closure.c:
19377 Formatting changes of various comments.
19378 Respect the GNU coding standards at various places.
19379 Don't use `_()' when no translation is needed.
19380
19381 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19382
19383 * src/files.c:
19384 OS/2 honors TMPDIR environment variable.
19385
19386 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19387
19388 * doc/bison.texinfo: Tweaked spelling and grammar.
19389 Updated ISBN.
19390 Removed reference to price of printed copy.
19391 Mention BISON_SIMPLE and BISON_HAIRY.
19392
19393 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19394
19395 * configure.in, NEWS:
19396 Bison 1.29 released.
19397
19398 1999-10-27 Jesse Thilo <jthilo@gnu.org>
19399
19400 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19401 Added reference card.
19402
19403 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19404
19405 * po/ru.po: Added Russian translation.
19406
19407 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19408
19409 * configure.in: Added Russian translation.
19410
19411 1999-07-06 Jesse Thilo <jthilo@gnu.org>
19412
19413 * configure.in, NEWS, README:
19414 Released version 1.28.
19415
19416 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19417
19418 * src/system.h:
19419 Squashed redefinition warning on some systems.
19420
19421 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19422 Have configure build version string instead of relying on ANSI string
19423 concatentation.
19424
19425 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19426
19427 * po/POTFILES.in: Got rid of version.c.
19428
19429 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19430
19431 * acconfig.h, configure.in:
19432 Have configure build version string instead of relying on ANSI string
19433 concatentation.
19434
19435 1999-06-08 Jesse Thilo <jthilo@gnu.org>
19436
19437 * doc/bison.1:
19438 Dropped mention of `+' for long-named options.
19439
19440 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19441
19442 * src/files.c: Added <unistd.h> for unlink().
19443
19444 * src/Makefile.am, src/system.h:
19445 I18n fixes.
19446
19447 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19448
19449 * README: Added a FAQ list.
19450
19451 * configure.in, acconfig.h:
19452 I18n fixes.
19453
19454 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19455
19456 * doc/FAQ, doc/Makefile.am:
19457 Added a FAQ list.
19458
19459 1999-05-19 Jesse Thilo <jthilo@gnu.org>
19460
19461 * src/alloc.h, src/symtab.h, src/version.c:
19462 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19463
19464 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19465
19466 * src/.cvsignore, src/Makefile.am:
19467 Reorganized: sources in `src', documentation in `doc'.
19468
19469 * src/lex.c (literalchar):
19470 fixed the code for escaping double quotes (thanks
19471 Jonathan Czisny.)
19472
19473 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19474
19475 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19476 Adjusted paths to reflect directory reorganization.
19477
19478 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19479
19480 * doc/.cvsignore, doc/Makefile.am:
19481 Reorganized: sources in `src', documentation in `doc'.
19482
19483 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19484
19485 * configure.in:
19486 Updated AC_INIT file to reflect directory reorganization.
19487
19488 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19489 Reorganized: sources in `src', documentation in `doc'.
19490
19491 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19492
19493 * src/allocate.c:
19494 Don't declare calloc() and realloc() if not necessary.
19495
19496 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19497
19498 * configure.in, acconfig.h, acinclude.m4:
19499 Don't declare calloc() and realloc() if not necessary.
19500
19501 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19502
19503 * po/.cvsignore: Added i18n support.
19504
19505 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19506
19507 * acconfig.h, configure.in, Makefile.am:
19508 Added i18n support.
19509
19510 1999-03-22 Jesse Thilo <jthilo@gnu.org>
19511
19512 * src/bison.s1: Fixed #line numbers.
19513
19514 1999-03-15 Jesse Thilo <jthilo@gnu.org>
19515
19516 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19517 Added PO files from Translation Project.
19518
19519 1999-03-03 Jesse Thilo <jthilo@gnu.org>
19520
19521 * Makefile.am:
19522 Added support for non-ANSI compilers (ansi2knr).
19523
19524 1999-02-16 Jesse Thilo <jthilo@gnu.org>
19525
19526 * configure.in: Bumped version number to 1.27.
19527
19528 * Makefile.am:
19529 Added `bison.simple' to list of files removed by `make distclean'.
19530
19531 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19532
19533 * src/files.c, src/files.h:
19534 Defined locations of parser files in config.h instead of Makefile.
19535
19536 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19537
19538 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19539 Defined locations of parser files in config.h instead of Makefile.
19540
19541 1999-02-09 Jesse Thilo <jthilo@gnu.org>
19542
19543 * Makefile.am:
19544 Removed inappropriate use of $< macro.
19545
19546 1999-02-05 Jesse Thilo <jthilo@gnu.org>
19547
19548 * po/Makefile.in.in, po/POTFILES.in:
19549 Add `po' directory skeleton.
19550
19551 1999-01-27 Jesse Thilo <jthilo@gnu.org>
19552
19553 * README: Document help-bison list.
19554
19555 * configure.in: Add check for mkstemp().
19556
19557 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19558
19559 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19560 Hush a few compiler warnings.
19561
19562 * src/files.c:
19563 Add tryclose(), which verifies that fclose was successful.
19564 Hush a couple of compiler warnings.
19565
19566 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19567
19568 * Makefile.am, OChangeLog:
19569 ChangeLog is now automatically generated. Include the old version as
19570 OChangeLog.
19571
19572 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19573
19574 * 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:
19575 Update FSF address.
19576
19577 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19578
19579 * doc/bison.texinfo: Fix formatting glitch.
19580
19581 * doc/bison.texinfo: Update FSF address.
19582
19583 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19584
19585 * acconfig.h: Update FSF address.
19586
19587 1999-01-08 Jesse Thilo <jthilo@gnu.org>
19588
19589 * src/system.h:
19590 Don't define PACKAGE here, since config.h defines it.
19591
19592 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19593
19594 * src/reader.c: Update copyright date.
19595
19596 * src/main.c:
19597 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19598 favor of output directly to stderr (avoids buffer overruns).
19599
19600 * src/reader.c: Some checks for premature EOF.
19601
19602 * 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:
19603 Use prototypes if the compiler understands them.
19604
19605 * src/files.c: Honor TMPDIR on Unix hosts.
19606 Use prototypes if the compiler understands them.
19607
19608 * src/reader.c:
19609 Fix a couple of buffer overrun bugs.
19610 Use prototypes if the compiler understands them.
19611
19612 * src/system.h: Include unistd.h and ctype.h.
19613 Use #ifdef instead of #if for NLS symbols.
19614
19615 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19616
19617 * doc/bison.texinfo:
19618 Delete comment "consider using @set for edition number, etc..." since
19619 we now are doing so.
19620
19621 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19622
19623 * configure.in:
19624 Use prototypes if the compiler understands them.
19625
19626 * NEWS: Document 1.26 highlights.
19627
19628 * Makefile.am: Require Automake 1.3 or later.
19629
19630 * acconfig.h:
19631 Use prototypes if the compiler understands them.
19632
19633 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19634
19635 * src/version.c:
19636 Use VERSION symbol from automake for version number.
19637
19638 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19639
19640 * acconfig.h, configure.in, version.cin:
19641 Use VERSION symbol from automake for version number.
19642
19643 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19644
19645 * Makefile.am:
19646 Distribute original version of simple parser (bison.s1), not built
19647 version (bison.simple).
19648
19649 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19650
19651 * doc/bison.texinfo: Add info dir entry.
19652
19653 * doc/bison.texinfo:
19654 Let automake put version number into documentation.
19655
19656 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19657
19658 * src/bison.cld, src/build.com, src/vmshlp.mar:
19659 Add non-RCS files from /gd/gnu/bison.
19660
19661 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19662
19663 * doc/bison.1:
19664 Document the BISON_HAIRY and BISON_SIMPLE variables.
19665
19666 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19667
19668 * src/version.c: Build version.c automatically.
19669
19670 * src/reader.c:
19671 Fix token numbering (used to start at 258, not 257).
19672
19673 * src/system.h: Include config.h.
19674
19675 * src/getargs.c: Update bug report address.
19676
19677 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19678 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19679
19680 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19681
19682 * Makefile.am:
19683 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19684
19685 * configure.in, version.cin:
19686 Build version.c automatically.
19687
19688 * AUTHORS: Add AUTHORS file.
19689
19690 * README: Update bug report address.
19691
19692 * bison.simple:
19693 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19694
19695 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19696 Add automake stuff.
19697
19698 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19699
19700 * doc/bison.texinfo: Clean up some formatting.
19701
19702 1998-05-05 Richard Stallman <rms@gnu.org>
19703
19704 * doc/bison.texinfo:
19705 Explain better why to make a pure parser.
19706
19707 1998-01-05 Richard Stallman <rms@gnu.org>
19708
19709 * src/files.c (openfiles):
19710 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19711 find a temporary directory, if possible. Do not unlink files while
19712 they are open.
19713
19714 1997-08-25 Richard Stallman <rms@gnu.org>
19715
19716 * src/reader.c (stack_offset;):
19717 Change some warni to warns.
19718
19719 * src/lex.c (literalchar): Use warns, not warni.
19720
19721 1997-06-28 Richard Stallman <rms@gnu.org>
19722
19723 * src/bison.s1: Add a Bison version comment.
19724
19725 * src/main.c (fatal, warn, berror):
19726 Use program_name.
19727
19728 1997-06-28 Richard Stallman <rms@gnu.org>
19729
19730 * Makefile.in (bison_version): New variable.
19731 (dist): Use that variable.
19732 (bison.s1): Substitute the Bison version into bison.simple.
19733
19734 * bison.simple: Add a Bison version comment.
19735
19736 1997-06-18 Richard Stallman <rms@gnu.org>
19737
19738 * src/main.c (fatal, warn, berror):
19739 Make error messages standard.
19740 (toomany): Improve error message text.
19741
19742 * 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:
19743 new.h renamed to alloc.h.
19744
19745 1997-06-18 Richard Stallman <rms@gnu.org>
19746
19747 * Makefile.in: new.h renamed to alloc.h.
19748
19749 1997-05-24 Richard Stallman <rms@gnu.org>
19750
19751 * src/lex.c (literalchar):
19752 Fix the code for escaping \, " and '.
19753
19754 (lex): Avoid trouble when there are many chars
19755 to discard in a char literal with just several chars in it.
19756
19757 1997-05-17 Richard Stallman <rms@gnu.org>
19758
19759 * src/bison.s1:
19760 Use malloc, if using alloca is troublesome.
19761 (YYSTACK_USE_ALLOCA): New flag macro.
19762 Define it for some systems and compilers.
19763 (YYSTACK_ALLOC): New macro.
19764 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19765 If it was malloc'd, free it.
19766
19767 1997-05-17 Richard Stallman <rms@gnu.org>
19768
19769 * bison.simple:
19770 Use malloc, if using alloca is troublesome.
19771 (YYSTACK_USE_ALLOCA): New flag macro.
19772 Define it for some systems and compilers.
19773 (YYSTACK_ALLOC): New macro.
19774 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19775 If it was malloc'd, free it.
19776
19777 1997-04-23 Richard Stallman <rms@gnu.org>
19778
19779 * src/bison.s1:
19780 (alloca) [__hpux]: Always define as __builtin_alloca.
19781
19782 1997-04-23 Richard Stallman <rms@gnu.org>
19783
19784 * bison.simple:
19785 (alloca) [__hpux]: Always define as __builtin_alloca.
19786
19787 1997-04-22 Richard Stallman <rms@gnu.org>
19788
19789 * src/bison.s1:
19790 [__hpux]: Include alloca.h (right for HPUX 10)
19791 instead of declaring alloca (right for HPUX 9).
19792
19793 * src/bison.s1 (__yy_memcpy):
19794 Declare arg `count' as unsigned int.
19795 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19796
19797 1997-04-22 Richard Stallman <rms@gnu.org>
19798
19799 * bison.simple:
19800 [__hpux]: Include alloca.h (right for HPUX 10)
19801 instead of declaring alloca (right for HPUX 9).
19802
19803 * bison.simple (__yy_memcpy):
19804 Declare arg `count' as unsigned int.
19805 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19806
19807 1997-01-03 Richard Stallman <rms@gnu.org>
19808
19809 * src/allocate.c: [__STDC__ or _MSC_VER]:
19810 Declare calloc and realloc to return void *.
19811
19812 1997-01-02 Richard Stallman <rms@gnu.org>
19813
19814 * src/system.h:
19815 [_MSC_VER]: Include stdlib.h and process.h.
19816 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19817
19818 * src/main.c (main): Return FAILURE as a value.
19819 (printable_version): Declare arg as int, not char.
19820
19821 1997-01-02 Richard Stallman <rms@gnu.org>
19822
19823 * Makefile.in (dist):
19824 Explicitly check for symlinks, and copy them.
19825
19826 1996-12-19 Richard Stallman <rms@gnu.org>
19827
19828 * src/files.c:
19829 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19830
19831 1996-12-18 Paul Eggert <eggert@gnu.org>
19832
19833 * src/bison.s1 (yyparse):
19834 If __GNUC__ and YYPARSE_PARAM are both defined,
19835 declare yyparse to have a void * argument.
19836
19837 1996-12-18 Paul Eggert <eggert@gnu.org>
19838
19839 * bison.simple (yyparse):
19840 If __GNUC__ and YYPARSE_PARAM are both defined,
19841 declare yyparse to have a void * argument.
19842
19843 1996-12-17 Richard Stallman <rms@gnu.org>
19844
19845 * src/reduce.c (nbits): Add some casts.
19846
19847 1996-08-12 Richard Stallman <rms@gnu.org>
19848
19849 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19850
19851 1996-08-12 Richard Stallman <rms@gnu.org>
19852
19853 * bison.simple: Test _MSDOS as well as _MSDOS_.
19854
19855 1996-07-31 Richard Stallman <rms@gnu.org>
19856
19857 * src/bison.s1:
19858 [__sun && __i386]: Include alloca.h.
19859
19860 1996-07-31 Richard Stallman <rms@gnu.org>
19861
19862 * bison.simple:
19863 [__sun && __i386]: Include alloca.h.
19864
19865 1996-07-30 Richard Stallman <rms@gnu.org>
19866
19867 * src/bison.s1: Comment change.
19868
19869 * src/bison.s1: Test _MSDOS_, not MSDOS.
19870
19871 1996-07-30 Richard Stallman <rms@gnu.org>
19872
19873 * bison.simple: Comment change.
19874
19875 * bison.simple: Test _MSDOS_, not MSDOS.
19876
19877 1996-06-01 Richard Stallman <rms@gnu.org>
19878
19879 * 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:
19880 Insert `_' macro around many string constants.
19881
19882 * src/main.c:
19883 Insert `_' macro around many string constants.
19884
19885 (main): Call setlocale, bindtextdomain and textdomain.
19886
19887 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19888 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19889 [ENABLE_NLS]: Include libintl.h.
19890 [ENABLE_NLS] (gettext): Define.
19891 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19892 (N_, PACKAGE, LOCALEDIR): New macros.
19893
19894 1996-06-01 Richard Stallman <rms@gnu.org>
19895
19896 * POTFILES.in: New file.
19897
19898 * Makefile.in (allocate.o):
19899 Define target explicitly.
19900
19901 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19902 (LDFLAGS): Set to @LDFLAGS@.
19903 (configure): Run autoconf only if preceding `cd' succeeds.
19904 (bison.s1): Redirect output to temporary file then move the
19905 temporary to the target, rather than redirecting directly to bison.s1.
19906 (clean): Remove config.status and config.log.
19907 (distclean): Don't remove config.status here.
19908
19909 1996-05-12 Richard Stallman <rms@gnu.org>
19910
19911 * src/bison.s1:
19912 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19913
19914 1996-05-12 Richard Stallman <rms@gnu.org>
19915
19916 * bison.simple:
19917 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19918
19919 1996-05-11 Richard Stallman <rms@gnu.org>
19920
19921 * src/bison.s1 (__yy_memcpy):
19922 Really reorder the args, as was supposedly done on Feb 14 1995.
19923 (yyparse): Calls changed accordingly.
19924
19925 1996-05-11 Richard Stallman <rms@gnu.org>
19926
19927 * Makefile.in (dist): Don't use $(srcdir).
19928
19929 * bison.simple (__yy_memcpy):
19930 Really reorder the args, as was supposedly done on Feb 14 1995.
19931 (yyparse): Calls changed accordingly.
19932
19933 1996-01-27 Richard Stallman <rms@gnu.org>
19934
19935 * src/output.c (output_rule_data):
19936 Test YYERROR_VERBOSE in the conditional
19937 around the definition of ttyname.
19938
19939 1995-12-29 Richard Stallman <rms@gnu.org>
19940
19941 * src/bison.s1:
19942 Fix line numbers in #line commands.
19943
19944 1995-12-29 Richard Stallman <rms@gnu.org>
19945
19946 * bison.simple:
19947 Fix line numbers in #line commands.
19948
19949 1995-12-27 Richard Stallman <rms@gnu.org>
19950
19951 * src/bison.s1 (YYPARSE_PARAM_DECL):
19952 In C++, make it always null.
19953 (YYPARSE_PARAM_ARG): New macro.
19954 (yyparse): Use YYPARSE_PARAM_ARG.
19955
19956 1995-12-27 Richard Stallman <rms@gnu.org>
19957
19958 * bison.simple (YYPARSE_PARAM_DECL):
19959 In C++, make it always null.
19960 (YYPARSE_PARAM_ARG): New macro.
19961 (yyparse): Use YYPARSE_PARAM_ARG.
19962
19963 1995-11-29 Richard Stallman <rms@gnu.org>
19964
19965 * doc/bison.texinfo:
19966 Describe literal string tokens, %raw, %no_lines, %token_table.
19967
19968 1995-11-29 Daniel Hagerty <hag@gnu.org>
19969
19970 * doc/bison.texinfo: Fixed update date
19971
19972 1995-10-16 Richard Stallman <rms@gnu.org>
19973
19974 * src/version.c: Version 1.25.
19975
19976 1995-10-16 Richard Stallman <rms@gnu.org>
19977
19978 * NEWS: *** empty log message ***
19979
19980 1995-10-16 Richard Stallman <rms@gnu.org>
19981
19982 * doc/bison.1, doc/bison.rnh:
19983 Add new options.
19984
19985 1995-10-15 Richard Stallman <rms@gnu.org>
19986
19987 * src/vmsgetargs.c, src/getargs.c:
19988 Added -n, -k, and -raw switches.
19989 (noparserflag, toknumflag, rawtoknumflag): New variables.
19990
19991 * src/symtab.h (SALIAS):
19992 New #define for adding aliases to %token.
19993 (struct bucket): Added `alias' field.
19994
19995 * src/reduce.c (reduce_grammar):
19996 Revise error message.
19997 (print_notices): Remove final `.' from error message.
19998
19999 * src/reader.c (reader_output_yylsp):
20000 New function.
20001 (readgram): Use `#if 0' around code that accepted %command
20002 inside grammar rules: The documentation doesn't allow it,
20003 and it will fail since the %command processors scan for the next %.
20004 (parse_token_decl): Extended the %token
20005 declaration to allow a multi-character symbol as an alias.
20006 (parse_thong_decl): New function.
20007 (read_declarations): Added %thong declarations.
20008 (read_declarations): Handle NOOP to deal with allowing
20009 % declarations as another means to specify the flags.
20010 (readgram): Allow %prec prior to semantics embedded in a rule.
20011 (skip_to_char, read_declarations, copy_definition)
20012 (parse_token_decl, parse_start_decl, parse_type_decl)
20013 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20014 (get_type_name, copy_guard, copy_action, readgram)
20015 (get_type, packsymbols): Revised most error messages.
20016 Changed `fatal' to `warnxxx' to avoid aborting for error.
20017 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20018 (read_declarations): Improve the error message for
20019 an invalid character. Do not abort.
20020 (read_declarations, copy_guard, copy_action): Use
20021 printable_version to avoid unprintable characters in printed output.
20022 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20023 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20024 Allow the type of a non-terminal can be given
20025 more than once, as long as all specifications give the same type.
20026
20027 * src/output.c:
20028 (output_headers, output_trailers, output, output_gram)
20029 (output_rule_data): Implement noparserflag variable.
20030 Implement toknumflag variable.
20031 (output): Call reader_output_yylsp to output LTYPESTR.
20032
20033 * src/main.c (main):
20034 If reader sees an error, don't process the grammar.
20035 (fatals): Updated to not use VARARGS1.
20036 (printable_version, int_to_string, warn, warni, warns, warnss)
20037 (warnsss): New error reporting functions. Avoid abort for error.
20038
20039 * src/lex.h:
20040 Added THONG and NOOP for alias processing.
20041 Added SETOPT for the new code that allows setting options with %flags.
20042
20043 * src/lex.c:
20044 Include getopt.h. Add some extern decls.
20045 (safegetc): New function to deal with EOF gracefully.
20046 (literalchar); new function to deal with reading \ escapes.
20047 (lex): Use literalchar.
20048 (lex): Implemented "..." tokens.
20049 (literalchar, lex, parse_percent_token): Made tokenbuffer
20050 always contain the token. This includes growing the token
20051 buffer while reading an integer.
20052 (parse_percent_token): Replaced if-else statement with percent_table.
20053 (parse_percent_token): Added % declarations as another
20054 way to specify the flags -n, -l, and -r. Also added hooks for
20055 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20056 major changes to files.c.
20057 (lex) Retain in the incoming stream a character following
20058 an incorrect '/'.
20059 (skip_white_space, lex): Revised most error messages
20060 and changed fatal to warn to avoid aborting.
20061 (percent_table): Added %thong declarations.
20062
20063 * src/gram.h: Comment changes.
20064
20065 * src/files.c (openfiles, open_extra_files, done):
20066 Add faction flag
20067 and actfile file. Handle noparserflag. Both for -n switch.
20068
20069 * src/conflicts.c (resolve_sr_conflict):
20070 Remove use of alloca.
20071
20072 1995-06-01 Jim Meyering <meyering@gnu.org>
20073
20074 * doc/bison.texinfo: *** empty log message ***
20075
20076 1995-05-06 Richard Stallman <rms@gnu.org>
20077
20078 * src/bison.s1: Comment change.
20079
20080 1995-05-06 Richard Stallman <rms@gnu.org>
20081
20082 * bison.simple: Comment change.
20083
20084 1995-05-03 Richard Stallman <rms@gnu.org>
20085
20086 * src/version.c: Version now 1.24.
20087
20088 * src/bison.s1: Change distribution terms.
20089
20090 * src/version.c: Version now 1.23.
20091
20092 1995-05-03 Richard Stallman <rms@gnu.org>
20093
20094 * doc/bison.texinfo:
20095 Rewrite "Conditions for Using Bison".
20096 Update version to 1.24.
20097
20098 1995-05-03 Richard Stallman <rms@gnu.org>
20099
20100 * bison.simple: Change distribution terms.
20101
20102 1995-02-23 Richard Stallman <rms@gnu.org>
20103
20104 * src/files.c: Test __VMS_POSIX as well as VMS.
20105
20106 1995-02-14 Jim Meyering <meyering@gnu.org>
20107
20108 * src/bison.s1 (__yy_memcpy):
20109 Renamed from __yy_bcopy to avoid
20110 confusion. Reverse FROM and TO arguments to be consistent with
20111 those of memcpy.
20112
20113 1995-02-14 Jim Meyering <meyering@gnu.org>
20114
20115 * bison.simple (__yy_memcpy):
20116 Renamed from __yy_bcopy to avoid
20117 confusion. Reverse FROM and TO arguments to be consistent with
20118 those of memcpy.
20119
20120 1994-11-10 David J. MacKenzie <djm@gnu.org>
20121
20122 * NEWS: reformat
20123
20124 * NEWS: New file.
20125
20126 * Makefile.in (DISTFILES): Include NEWS.
20127
20128 * Makefile.in (DISTFILES):
20129 Include install-sh, not install.sh.
20130
20131 * configure.in: Update to Autoconf v2 macro names.
20132
20133 1994-10-05 David J. MacKenzie <djm@gnu.org>
20134
20135 * Makefile.in: fix typo
20136
20137 * Makefile.in (prefix, exec_prefix):
20138 Let configure set them.
20139
20140 1994-09-28 David J. MacKenzie <djm@gnu.org>
20141
20142 * Makefile.in: Set datadir to $(prefix)/share.
20143
20144 1994-09-15 Richard Stallman <rms@gnu.org>
20145
20146 * src/bison.s1:
20147 Update copyright notice and GPL version.
20148
20149 1994-09-15 Richard Stallman <rms@gnu.org>
20150
20151 * bison.simple:
20152 Update copyright notice and GPL version.
20153
20154 1994-07-12 Richard Stallman <rms@gnu.org>
20155
20156 * src/reduce.c, src/reader.c:
20157 entered into RCS
20158
20159 1994-05-05 David J. MacKenzie <djm@gnu.org>
20160
20161 * Makefile.in: entered into RCS
20162
20163 1994-03-26 Richard Stallman <rms@gnu.org>
20164
20165 * src/bison.s1: entered into RCS
20166
20167 1994-03-26 Richard Stallman <rms@gnu.org>
20168
20169 * bison.simple: entered into RCS
20170
20171 1994-03-25 Richard Stallman <rms@gnu.org>
20172
20173 * src/main.c: entered into RCS
20174
20175 1994-03-24 Richard Stallman <rms@gnu.org>
20176
20177 * src/conflicts.c: entered into RCS
20178
20179 1994-01-02 Richard Stallman <rms@gnu.org>
20180
20181 * Makefile.in: *** empty log message ***
20182
20183 1993-11-21 Richard Stallman <rms@gnu.org>
20184
20185 * src/bison.s1: *** empty log message ***
20186
20187 1993-11-21 Richard Stallman <rms@gnu.org>
20188
20189 * doc/bison.texinfo: entered into RCS
20190
20191 * doc/bison.texinfo: *** empty log message ***
20192
20193 1993-11-21 Richard Stallman <rms@gnu.org>
20194
20195 * bison.simple: *** empty log message ***
20196
20197 1993-10-25 David J. MacKenzie <djm@gnu.org>
20198
20199 * doc/bison.texinfo: *** empty log message ***
20200
20201 1993-10-19 Richard Stallman <rms@gnu.org>
20202
20203 * src/bison.s1: *** empty log message ***
20204
20205 1993-10-19 Richard Stallman <rms@gnu.org>
20206
20207 * bison.simple: *** empty log message ***
20208
20209 1993-10-14 Richard Stallman <rms@gnu.org>
20210
20211 * src/bison.s1: *** empty log message ***
20212
20213 1993-10-14 Richard Stallman <rms@gnu.org>
20214
20215 * bison.simple: *** empty log message ***
20216
20217 1993-09-14 David J. MacKenzie <djm@gnu.org>
20218
20219 * doc/bison.texinfo: *** empty log message ***
20220
20221 1993-09-13 Noah Friedman <friedman@gnu.org>
20222
20223 * Makefile.in: *** empty log message ***
20224
20225 1993-09-10 Richard Stallman <rms@gnu.org>
20226
20227 * src/conflicts.c: *** empty log message ***
20228
20229 * src/system.h: entered into RCS
20230
20231 1993-09-10 Richard Stallman <rms@gnu.org>
20232
20233 * doc/bison.1: entered into RCS
20234
20235 1993-09-06 Noah Friedman <friedman@gnu.org>
20236
20237 * src/version.c: entered into RCS
20238
20239 1993-09-06 Noah Friedman <friedman@gnu.org>
20240
20241 * Makefile.in: *** empty log message ***
20242
20243 1993-07-30 David J. MacKenzie <djm@gnu.org>
20244
20245 * Makefile.in: *** empty log message ***
20246
20247 1993-07-24 Richard Stallman <rms@gnu.org>
20248
20249 * src/bison.s1: *** empty log message ***
20250
20251 1993-07-24 Richard Stallman <rms@gnu.org>
20252
20253 * bison.simple: *** empty log message ***
20254
20255 1993-07-08 David J. MacKenzie <djm@gnu.org>
20256
20257 * Makefile.in: *** empty log message ***
20258
20259 1993-07-04 Richard Stallman <rms@gnu.org>
20260
20261 * src/bison.s1: *** empty log message ***
20262
20263 1993-07-04 Richard Stallman <rms@gnu.org>
20264
20265 * bison.simple: *** empty log message ***
20266
20267 1993-06-26 David J. MacKenzie <djm@gnu.org>
20268
20269 * src/getargs.c: entered into RCS
20270
20271 1993-06-26 David J. MacKenzie <djm@gnu.org>
20272
20273 * doc/bison.texinfo: *** empty log message ***
20274
20275 * doc/bison.1: New file.
20276
20277 1993-06-25 Richard Stallman <rms@gnu.org>
20278
20279 * src/getargs.c: New file.
20280
20281 1993-06-16 Richard Stallman <rms@gnu.org>
20282
20283 * src/bison.s1: *** empty log message ***
20284
20285 1993-06-16 Richard Stallman <rms@gnu.org>
20286
20287 * bison.simple: *** empty log message ***
20288
20289 1993-06-03 Richard Stallman <rms@gnu.org>
20290
20291 * src/bison.s1: New file.
20292
20293 1993-06-03 Richard Stallman <rms@gnu.org>
20294
20295 * doc/bison.texinfo: *** empty log message ***
20296
20297 1993-06-03 Richard Stallman <rms@gnu.org>
20298
20299 * bison.simple: New file.
20300
20301 1993-05-19 Richard Stallman <rms@gnu.org>
20302
20303 * doc/bison.texinfo: New file.
20304
20305 1993-05-07 Noah Friedman <friedman@gnu.org>
20306
20307 * Makefile.in: *** empty log message ***
20308
20309 1993-04-28 Noah Friedman <friedman@gnu.org>
20310
20311 * src/reader.c: *** empty log message ***
20312
20313 1993-04-23 Noah Friedman <friedman@gnu.org>
20314
20315 * src/alloc.h: entered into RCS
20316
20317 1993-04-20 David J. MacKenzie <djm@gnu.org>
20318
20319 * src/version.c: *** empty log message ***
20320
20321 * src/files.c, src/allocate.c:
20322 entered into RCS
20323
20324 * src/reader.c: *** empty log message ***
20325
20326 * src/lex.c: entered into RCS
20327
20328 * src/conflicts.c: New file.
20329
20330 * src/symtab.c: entered into RCS
20331
20332 * src/alloc.h: New file.
20333
20334 * src/LR0.c: entered into RCS
20335
20336 1993-04-18 Noah Friedman <friedman@gnu.org>
20337
20338 * src/reader.c: New file.
20339
20340 * src/version.c: *** empty log message ***
20341
20342 1993-04-18 Noah Friedman <friedman@gnu.org>
20343
20344 * Makefile.in: *** empty log message ***
20345
20346 1993-04-17 Noah Friedman <friedman@gnu.org>
20347
20348 * Makefile.in: *** empty log message ***
20349
20350 1993-04-15 Richard Stallman <rms@gnu.org>
20351
20352 * src/main.c, src/files.c:
20353 New file.
20354
20355 1993-04-15 Noah Friedman <friedman@gnu.org>
20356
20357 * configure.in: entered into RCS
20358
20359 * configure.in: *** empty log message ***
20360
20361 * configure.in: New file.
20362
20363 1993-04-14 Richard Stallman <rms@gnu.org>
20364
20365 * Makefile.in: New file.
20366
20367 1993-04-13 Richard Stallman <rms@gnu.org>
20368
20369 * src/version.c: New file.
20370
20371 1993-03-25 Richard Stallman <rms@gnu.org>
20372
20373 * src/output.c: entered into RCS
20374
20375 1992-09-25 Richard Stallman <rms@gnu.org>
20376
20377 * configure.bat: entered into RCS
20378
20379 1992-06-22 Richard Stallman <rms@gnu.org>
20380
20381 * src/vmsgetargs.c: entered into RCS
20382
20383 1992-06-22 Richard Stallman <rms@gnu.org>
20384
20385 * doc/bison.rnh: entered into RCS
20386
20387 1992-04-20 David J. MacKenzie <djm@gnu.org>
20388
20389 * README: entered into RCS
20390
20391 1992-01-22 Richard Stallman <rms@gnu.org>
20392
20393 * src/machine.h: entered into RCS
20394
20395 1991-12-21 Richard Stallman <rms@gnu.org>
20396
20397 * src/lalr.c, src/closure.c:
20398 entered into RCS
20399
20400 1991-12-20 Richard Stallman <rms@gnu.org>
20401
20402 * src/state.h: entered into RCS
20403
20404 1991-12-18 Richard Stallman <rms@gnu.org>
20405
20406 * src/print.c, src/nullable.c, src/derives.c:
20407 entered into RCS
20408
20409 1991-11-03 David J. MacKenzie <djm@gnu.org>
20410
20411 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20412 entered into RCS
20413
20414 1988-09-09 Richard Stallman <rms@gnu.org>
20415
20416 * src/bison.hairy: entered into RCS
20417
20418 1987-12-16 Richard Stallman <rms@gnu.org>
20419
20420 * REFERENCES: entered into RCS
20421
20422
20423 -----
20424
20425 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20426 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20427 Free Software Foundation, Inc.
20428
20429 Copying and distribution of this file, with or without
20430 modification, are permitted provided the copyright notice and this
20431 notice are preserved.
20432
20433 $Id$