]> git.saurik.com Git - bison.git/blob - ChangeLog
35b2249af007b33ac55ca41b89087bfb55a08ac7
[bison.git] / ChangeLog
1 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * NEWS (2.3b+): New section, empty for now.
4 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
5
6 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
7
8 * NEWS (2.3b): Update release date since there has been a delay in
9 getting the announcements and tarballs out.
10
11 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
12
13 * NEWS: Version 2.3b.
14 * configure.ac (AC_INIT): Likewise.
15 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
16
17 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
18
19 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
20 been doing it for years.
21 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
22 (Release Procedure): Add FIXME about make alpha being unmaintained.
23
24 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
25
26 * data/yacc.c: Reformat m4 a little for readability.
27 * src/lalr.c (build_relations): Correct comment.
28
29 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
30
31 DJGPP specific issue.
32 * djgpp/config.sed: Fixes required to run configure scripts generated
33 by autoconf 2.62.
34
35 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
36
37 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
38 coordinator@translationproject.org.
39
40 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
41
42 * THANKS: Add Eric Blake.
43
44 2008-04-23 Eric Blake <ebb9@byu.net>
45
46 Revert prior patch, by working around autoconf regression.
47 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
48 ("Output file name: ("): Uncomment test.
49 ("Output file name: )"): Likewise.
50 Based on an idea from Noah Misch.
51
52 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
53
54 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
55 2.61. Reported by Juan Manuel Guerrero at
56 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
57 * tests/output.at ("Output file name: ("): Comment out test case for
58 now.
59 ("Output file name: )"): Likewise.
60
61 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
62
63 * GNUmakefile: Update git-version-gen invocation so make dist
64 succeeds.
65
66 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
67
68 Update to the current gnulib CVS repository, and fix trigraph handling
69 in Bison.
70 * bootstrap: Update gnulib CVS repository URL.
71 (symlink_to_dir): Encapsulate the code that guarantees the destination
72 directory exists into...
73 (check_dst_dir): ... this new function, and...
74 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
75 fail when copying files into lib/uniwidth/.
76 * src/output.c (prepare_symbols): When writing yytname muscles, where
77 symbol names will be encoded in C-string literals, tell quotearg to
78 escape trigraphs. This used to be the default in gnulib.
79 * tests/regression.at (Token definitions): Because of the change in
80 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
81 escapes trigraphs in symbol names. Thus, yytname no longer has
82 trigraphs unnecessarily doubly escaped. Update test case output.
83 Extend test case to be sure Bison's own error messages will no longer
84 have trigraphs in symbol names unnecessarily escaped once.
85
86 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
87
88 Fix make dist infinite loop reported by Juan Manuel Guerrero at
89 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
90 * .cvsignore: Add .version.
91 * .version.in: New.
92 * bootstrap.conf (gnulib_modules): Add git-version-gen.
93 * configure.ac (AC_CONFIG_FILES): Add .version.
94 * build-aux/.cvsignore: Add git-version-gen.
95
96 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
97
98 * NEWS (2.3a+): Mention that -g now takes an argument.
99 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
100 consistency. Update the -g and -x entries now that they take
101 arguments. Use brackets to indicate optional arguments.
102 * src/getargs.c (usage): Explain the relationship between arguments of
103 long and short options more completely. Document --defines and -d
104 separately since the former takes an argument but, for POSIX Yacc, the
105 latter does not.
106 (short_options): Let -W take an optional argument like --warnings.
107 (getargs): Sort cases.
108
109 2008-02-28 Akim Demaille <demaille@gostai.com>
110
111 * doc/bison.texinfo: Fix a few typos.
112
113 2008-02-28 Akim Demaille <akim@epita.fr>
114
115 * doc/bison.texinfo (Bison Options): Document -W.
116 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
117
118 2008-02-28 Akim Demaille <akim@epita.fr>
119
120 * src/getargs.c (short_options): Split and sort for readability.
121 -g and -x take optional arguments, just like their long options.
122 * build-aux/cross-options.pl: Use /x to make the regexp easier to
123 understand.
124 Fix the handling of $opt which resulted in all the argument to be
125 considered as optional.
126
127 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
128
129 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
130 say its interface is experimental.
131 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
132 Java.
133 (Bison Options): In the -L and --language entry, mention Java.
134 (Java Bison Interface): Say the interface is experimental.
135 * src/getargs.c (usage): Mention -L and --language.
136
137 * NEWS (2.3a+): Say the push parsing interface is experimental.
138 * doc/bison.texinfo (Push Decl): Likewise.
139 (Decl Summary): Likewise in the "%define api.push_pull" entry.
140 (Push Parser Function): Likewise.
141 (Pull Parser Function): Likewise.
142 (Parser Create Function): Likewise.
143 (Parser Delete Function): Likewise.
144 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
145 yypull_parse, and yypush_parse entries.
146
147 * NEWS (2.3a+): Mention XML support, and say the schema is
148 experimental.
149 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
150 * src/getargs.c (usage): Say the XML schema is experimental.
151
152 * NEWS (2.3a+): Say option instead of flag.
153
154 2008-02-21 Wojciech Polak <polak@gnu.org>
155
156 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
157 text.
158
159 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
160
161 Fix impure push parser compile error reported by Bob Rossi at
162 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
163 * data/yacc.c: Clean up whitespace in the output a little.
164 (yypstate_allocated): Define for impure push parsers regardless of
165 whether the pull interface is also requested.
166 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
167 check impure push parsers without the pull interface.
168
169 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
170 yyerror takes arguments specified by %parse-param while yypstate_new
171 does not.
172 * doc/bison.texinfo (Parser Create Function): Document that
173 yypstate_new returns 0 for multiple impure parser instances.
174 * tests/push.at (Push Parsing: Multiple impure instances): Update
175 expected stderr output.
176
177 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
178
179 * runtime-po/POTFILES.in (push.c): Remove.
180
181 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
182
183 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
184 * data/push.c: Rename to...
185 * data/yacc.c: ... this, overwriting it.
186 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
187 `%push-pull-parser' -> `%define api.push_pull "both"'.
188 Remove old yacc.c tests, and update push.c tests to yacc.c.
189
190 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
191
192 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
193 `"%code top" blocks' instead of `%code "top" blocks'.
194 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
195 Clean up whitespace in the output a little.
196
197 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
198
199 Fix documentation problems reported by Tim Josling at
200 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
201 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
202 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
203 integers. Explain the effect of literal string aliases on error
204 messages. Copy token 0 documentation from the C++ skeleton
205 documentation.
206
207 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
208
209 Accept a token number in a %left, %right, or %nonassoc for POSIX
210 conformance. Reported by Tim Josling at
211 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
212 * NEWS (2.3a+): Mention.
213 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
214 and code numbers are treated by precedence declarations.
215 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
216 of symbols.1.
217 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
218 of symbol.
219 (symbol.prec): New, just like symbol but allows INT.
220 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
221 longer holds.
222 * tests/regression.at (Token number in precedence declaration): New
223 test case.
224
225 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
226
227 DJGPP specific issues.
228 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
229 be changed. Copyright timestamp adjusted.
230 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
231 be changed. Copyright timestamp adjusted.
232 * djgpp/config.site: Copyright timestamp adjusted.
233 * djgpp/config_h.sed: Copyright timestamp adjusted.
234 * djgpp/djunpack.bat: Copyright timestamp adjusted.
235 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
236 filename translation list.
237 * djgpp/subpipe.c (init_subpipe): Check the environment variables
238 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
239 files shall be created. Before trying to use the temp dir where the
240 environment variable points to check that the dir really exists. If
241 not default to the cwd as temp dir. Copyright timestamp adjusted.
242 * djgpp/subpipe.h: Copyright timestamp adjusted.
243 * djgpp/testsuite.sed: Copyright timestamp adjusted.
244
245 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
246
247 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
248
249 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
250
251 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
252 Problem reported by Claudio Saavedra in
253 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
254
255 2008-01-05 Wojciech Polak <polak@gnu.org>
256
257 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
258 document's title with the input grammar file name.
259
260 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
261
262 Automate regression testing of the XML/XSLT implementation. Discussed
263 starting at
264 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
265 * configure.ac (XSLTPROC): New substitution.
266 * Makefile.am (maintainer-xml-check): New phony target invoking...
267 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
268 invoking make maintainer-check with BISON_TEST_XML=1.
269 * tests/atlocal.in (XSLTPROC): New.
270 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
271 not to report reachable memory when Bison is expected to have a
272 non-zero exit status and (2) to compare XML/XSLT output with --graph
273 and --report=all output for every working grammar when
274 BISON_TEST_XML=1.
275 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
276 (AT_BISON_CHECK_XML): New.
277 (AT_QUELL_VALGRIND): New.
278 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
279 (AT_CHECK): ... don't redefine this since this was the old way to
280 quell Valgrind.
281 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
282 AT_BISON_CHECK invocations.
283 * tests/c++.at: Likewise.
284 * tests/calc.at: Likewise.
285 * tests/conflicts.at: Likewise.
286 * tests/cxx-type.at: Likewise.
287 * tests/existing.at: Likewise.
288 * tests/glr-regression.at: Likewise.
289 * tests/headers.at: Likewise.
290 * tests/input.at: Likewise.
291 * tests/java.at: Likewise.
292 * tests/output.at: Likewise.
293 * tests/push.at: Likewise.
294 * tests/reduce.at: Likewise.
295 * tests/regression.at: Likewise.
296 * tests/sets.at: Likewise.
297 * tests/skeletons.at: Likewise.
298 * tests/synclines.at: Likewise.
299 * tests/torture.at: Likewise.
300 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
301 tends to hang xsltproc.
302 (Big horizontal): Likewise.
303
304 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
305
306 In XML output, remove redundant class attribute on symbol element.
307 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
308 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
309 look up a symbol to determine whether it's a nonterminal or terminal.
310 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
311 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
312
313 Add prec/assoc information to XML output.
314 * src/gram.c (grammar_rules_print_xml): For each rule that has a
315 %prec, add a percent_prec attribute.
316 * src/print-xml.c (print_grammar): For each terminal that has a
317 precedence or associativity, add a prec or assoc attribute.
318 (xml_indent): New.
319 (xml_puts): Use xml_indent.
320 (xml_printf): Use xml_indent.
321 * src/print-xml.h (xml_indent): Prototype.
322
323 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
324 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
325
326 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
327
328 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
329 (bison:ruleByNumber): ... this for clarity.
330 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
331 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
332 (xsl:template match="reduction"): Update.
333 (xsl:template match="item"): Update.
334 (xsl:template match="reduction"): Update.
335
336 In the XML output, don't print the list of rules where symbols appear.
337 Compute it in XSLT instead. Discussed at
338 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
339 * data/xslt/bison.xsl (bison:ruleByLhs): New.
340 (bison:ruleByRhs): New.
341 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
342 bison:ruleByRhs.
343 (xsl:template match="terminal/rule"): Remove.
344 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
345 bison:ruleByRhs.
346 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
347 Remove.
348 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
349 bison:ruleByRhs and mode="number-link" for rule template.
350 (xsl:template match="terminal/rule"): Remove.
351 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
352 bison:ruleByRhs and mode="number-link" for rule template.
353 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
354 Rewrite as...
355 (xsl:template match="rule" mode="number-link"): ... this.
356 * src/print-xml.c (print_grammar): Don't print the list of rules.
357
358 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
359
360 Don't let --report affect XML output; always print all information.
361 Discussed at
362 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
363 * src/conflicts.c (log_resolution): Implement.
364 * src/print-xml.c (print_core): Implement.
365 (print_state): Implement.
366 (print_xml): Implement.
367
368 * NEWS (2.3a+): Fix quotes.
369 * src/parse-gram.y (prologue_declaration): For consistency with -v,
370 don't let %verbose clear the list specified by --report.
371
372 2007-11-26 Akim Demaille <akim@epita.fr>
373
374 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
375
376 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
377
378 In the XML output, list useless and unused symbols and rules with the
379 useful ones and add a "usefulness" attribute. Discussed starting at
380 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
381 * src/gram.c (grammar_rules_partial_print_xml): Remove.
382 (grammar_rules_print_xml): Print all rules instead of just those
383 useful in the grammar, and add a "usefulness" attribute.
384 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
385 * src/print-xml.c (print_rules_useless_in_parser): Remove.
386 (print_grammar): Print all nonterminals instead of just useful ones,
387 and add a "usefulness" attribute to nonterminals and terminals.
388 (print_xml): Don't print a separate "reductions" or
389 "rules-useless-in-parser" element.
390 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
391 (reduce_xml): Remove.
392 (reduce_token_unused_in_grammar): New.
393 (reduce_nonterminal_useless_in_grammar): New.
394 * src/reduce.h (reduce_xml): Remove prototype.
395 (reduce_token_unused_in_grammar): Add prototype.
396 (reduce_nonterminal_useless_in_grammar): Add prototype.
397 * data/xslt/xml2text.xsl: Update for XML changes.
398 * data/xslt/xml2xhtml.xsl: Update for XML changes.
399 * tests/reduce.at (Useless Terminals): Update output.
400 (Useless Rules): Update output.
401 (Reduced Automaton): Update output.
402
403 Say "Terminals unused in grammar" instead of "Unused terminals".
404 * NEWS (2.3a+): Update.
405 * doc/bison.texinfo (Understanding): Update example output.
406 * src/reduce.c (reduce_output): Implement.
407 * data/xslt/xml2text.xsl: Implement.
408 * data/xslt/xml2xhtml.xsl: Implement.
409
410 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
411
412 Accept --report-file=FILE to override the default `.output' filename.
413 * NEWS (2.3a+): Mention.
414 * doc/bison.texinfo (Bison Options): Add an entry.
415 * src/files.c (compute_output_file_names): Don't override
416 spec_verbose_file if already set.
417 * src/getargs.c (usage): Document --report-file.
418 (REPORT_FILE_OPTION): New anonymous enum member.
419 (long_options): Add entry for it.
420 (getargs): Add case for it setting spec_verbose_file.
421
422 * build-aux/cross-options.pl: Don't record a short option just because
423 there's an arg.
424 * doc/.cvsignore: Add yacc.1.
425
426 2007-11-14 Akim Demaille <akim@epita.fr>
427
428 * doc/yacc.1.in: New.
429 * configure.ac, doc/Makefile.am: Adjust.
430 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
431 config.h symbol.
432 Use AC_SUBST for assignments too.
433 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
434
435 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
436
437 * src/gram.c: Remove comments that duplicate comments in gram.h.
438
439 When reporting useless rules and nonterminals, say "useless in grammar"
440 instead of "useless", and say "useless in parser" instead of "never
441 reduced". Discussed starting at
442 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
443 * NEWS (2.3a+): Mention this change.
444 * data/xslt/xml2text.xsl: Update output text and expected input XML
445 element names to match changes below.
446 * data/xslt/xml2xhtml.xsl: Likewise.
447 (xsl:template match="bison-xml-report"): Add missing entry in Table of
448 Contents: "Rules useless in parser due to conflicts".
449 * doc/bison.texinfo (Decl Summary): Reword a little.
450 (Understanding): Update example output for changes below.
451 * src/gram.c: (rule_useful_p): Rename to...
452 (rule_useful_in_grammar_p): ... this.
453 (rule_useless_p): Rename to...
454 (rule_useless_in_grammar_p): ... this.
455 (rule_never_reduced_p): Rename to...
456 (rule_useless_in_parser_p): ... this.
457 (grammar_rules_print): Update for renames.
458 (grammar_rules_print_xml): Update for renames.
459 (grammar_rules_never_reduced_report): Rename to...
460 (grammar_rules_useless_report): ... this since it is used for either
461 kind of useless rule.
462 * src/gram.h: Reword comments and update function names in prototypes.
463 * src/main.c (main): Say "rule useless in parser due to conflicts".
464 * src/print-xml.c (print_rules_never_reduced): Rename to...
465 (print_rules_useless_in_parser): ... this, and rename output XML
466 element "rules-never-reduced" to "rules-useless-in-parser".
467 (print_xml): Update for rename.
468 * src/print.c (print_results): Say "Rules useless in parser due to
469 conflicts".
470 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
471 (nonterminals_reduce): Say "nonterminal useless in grammar".
472 (reduce_output): Say "Nonterminals useless in grammar".
473 Say "Rules useless in grammar".
474 (reduce_xml): Rename output XML element "useless" to
475 "useless-in-grammar".
476 (reduce_print): Don't report the count of grammatically useless rules
477 as "rules never reduced" just because %yacc is specified.
478 In the correct report of this count, say nonterminal(s) and rule(s)
479 "useless in grammar".
480 * tests/conflicts.at (S/R in initial): Update expected output.
481 (Defaulted Conflicted Reduction): Likewise.
482 (Unreachable States After Conflict Resolution): Likewise.
483 * tests/existing.at (GNU pic Grammar): Likewise.
484 * tests/reduce.at (Useless Nonterminals): Likewise.
485 (Useless Rules): Likewise.
486 (Reduced Automaton): Likewise.
487 (Underivable Rules): Likewise.
488 (Empty Language): Likewise.
489
490 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
491
492 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
493 here document and before the EOF so that BSD's implementation of Bourne
494 shell doesn't parse the delimiter as part of the here document.
495 * doc/.cvsignore: Add cross-options.texi.
496 * src/getargs.c (usage): Add a blank line after the warning categories.
497
498 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
499
500 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
501
502 2007-11-05 Akim Demaille <akim@epita.fr>
503
504 Remove Id: from bison.1.
505 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
506 (perl -0777 -pi -e 's/\.PP\nId): New.
507 (.x.1): Use it to ignore the version control revision.
508
509 2007-11-05 Akim Demaille <demaille@gostai.com>
510
511 * build-aux/Makefile.am: Ship cross-options.pl.
512 * doc/Makefile.am: Always refer to cross-options.texi with
513 $(srcdir).
514 (MAINTAINERCLEANFILES): Add it.
515
516 2007-11-04 Akim Demaille <demaille@gostai.com>
517
518 Generate the long/short option cross-table.
519 * build-aux/cross-options.pl: New.
520 * doc/Makefile.am (cross-options.texi): New.
521 * doc/bison.texinfo: Use it.
522
523 2007-11-04 Akim Demaille <demaille@gostai.com>
524
525 Generate bison.1 using help2man.
526 * doc/common.x, doc/bison.x: New.
527 * doc/Makefile.am (bison.1, .x.1): New.
528 The code is taken from autoconf-2.61/man/Makefile.am.
529 * configure.ac: Look for help2man.
530
531 2007-11-04 Akim Demaille <demaille@gostai.com>
532
533 Complete --help.
534 * src/getargs.c (usage): Document -W, make it clear that -d,
535 -g and -x have optional arguments.
536
537 2007-11-04 Akim Demaille <demaille@gostai.com>
538
539 Find sha1sum when named gsha1sum.
540 * bootstrap (find_tool): New.
541 ($SHA1SUM): New.
542
543 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
544
545 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
546 at
547 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
548 * NEWS (2.3a+): Mention.
549 * data/bison.m4 (b4_pure_if): Don't define it here.
550 * data/c.m4 (b4_identification): Depend on individual skeletons to
551 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
552 values of the %define variables api.pure or api.push_pull. Define
553 YYPURE, YYPUSH, and YYPULL accordingly.
554 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
555 glr.cc has already defined b4_pure_flag.
556 * data/push.c: Define b4_pure_if based on `%define api.pure'.
557 Remove YYPUSH and YYPULL since they're back in b4_identification again.
558 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
559 * doc/bison.texinfo (Pure Decl): Update.
560 (Push Decl): Update.
561 (Decl Summary): Add api.pure to %define entry.
562 In %pure-parser entry, say it's deprecated and reference %define.
563 (Pure Calling): Update.
564 (Error Reporting): Update.
565 (C++ Scanner Interface): Update.
566 (How Can I Reset the Parser): Update.
567 (Table of Symbols): In %pure-parser entry, say it's deprecated and
568 reference %define.
569 * src/getargs.c (pure_parser): Remove global variable.
570 * src/getargs.h (pure_parser): Remove extern.
571 * src/output.c (prepare): Don't define pure_flag muscle.
572 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
573 wrapper around `%define api.pure'.
574 * tests/calc.at (Simple LALR Calculator): Update.
575 (Simple GLR Calculator): Update.
576 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
577 Update.
578 (GLR: Resolve ambiguity, pure, locations): Update.
579 (GLR: Merge conflicting parses, pure, no locations): Update.
580 (GLR: Merge conflicting parses, pure, locations): Update.
581 * tests/glr-regression.at (Uninitialized location when reporting
582 ambiguity): Update
583 * tests/input.at (Unused %define api.pure): New test case.
584 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
585 AT_PURE_IF and AT_PURE_AND_LOC_IF.
586 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
587
588 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
589
590 %define push_pull -> %define api.push_pull. Discussed starting at
591 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
592 * data/push.c: Expect the new name.
593 * data/yacc.c: Likewise.
594 * doc/bison.texinfo (Push Decl): Update.
595 (Decl Summary): Update %define entry.
596 (Push Parser Function): Update.
597 (Pull Parser Function): Update.
598 (Parser Create Function): Update.
599 (Parser Delete Function): Update.
600 * tests/calc.at (Simple LALR Calculator): Update.
601 * tests/input.at (%define enum variables): Update.
602 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
603 (Push Parsing: Multiple impure instances): Update.
604 (Push Parsing: Unsupported Skeletons): Update.
605 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
606 (Exploding the Stack Size with Malloc): Update.
607
608 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
609 other entries some.
610
611 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
612
613 For the XML output's terminal element, rename @number to @token-number,
614 and add @symbol-number. In the nonterminal element, rename @number to
615 @symbol-number. Discussed starting at
616 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
617 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
618 renames.
619 (xsl:template match="nonterminal"): Likewise.
620 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
621 (xsl:template match="nonterminal"): Likewise.
622 * src/print-xml.c (print_grammar): Implement.
623
624 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
625
626 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
627 2007-10-11 change, the child elements here are items not rules.
628 (xsl:template match="item"): New.
629 (xsl:template match="rule"): Update for new reduced itemset.
630 (xsl:template match="point"): Remove.
631 (xsl:template match="empty"): For consistency with --graph, don't
632 output "/* empty */".
633 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
634 line-wrap, don't pass a negative value as first-line-length since this
635 won't work with the following changes.
636 (xsl:template name="line-wrap"): Simplify slightly.
637 (xsl:template name="ws-search"): Eliminate recursion.
638 * src/print_graph.c (print_core): Don't print a reduction's lookahead
639 set next to an item whose dot is not at the end of the RHS even if it
640 happens to be associated with the same rule.
641
642 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
643
644 Add %define lr.keep_unreachable_states.
645 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
646 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
647 * src/main.c (main): Implement it.
648 * tests/conflicts.at (Unreachable States After Conflict Resolution):
649 Extend to test it, and fix a typo.
650
651 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
652
653 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
654 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
655 the example .output text.
656 * tests/regression.at (Extra lookahead sets in report): Improve wording
657 of comments.
658
659 2007-10-17 Wojciech Polak <polak@gnu.org>
660
661 * src/print-xml.c (print_grammar): Renamed
662 <terminal> and <nonterminal> attributes:
663 "type" to "number" and "symbol" to "name".
664 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
665 Use new attribute names.
666 (xsl:template match="nonterminal"): Likewise.
667 * data/xslt/xml2xhtml.xsl: Likewise.
668
669 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
670
671 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
672 (Option Cross Key): Likewise.
673
674 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
675 next to an item whose dot is not at the end of the RHS even if it
676 happens to be associated with the same rule.
677 * src/print.c (print_core): Likewise.
678 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
679 (Resolved SR Conflicts): Update output.
680 * tests/regression.at (Extra lookahead sets in report): New test case.
681
682 2007-10-11 Wojciech Polak <polak@gnu.org>
683
684 * src/print-xml.c (print_core): Remove item set
685 redundancy.
686 * data/xslt/bison.xsl (bison:ruleNumber): New key.
687 Improve processing time. Suggested by Joel E. Denny.
688 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
689 Write xsl:param "required" attribute as comment.
690 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
691 (xsl:template match="rule"): Support new reduced itemset.
692 (xsl:template match="point"): Remove.
693 * data/xslt/xml2xhtml.xsl: Likewise.
694
695 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
696
697 * src/getargs.c (version): Update copyright year.
698
699 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
700
701 Make xml2dot.xsl and --graph produce the same output.
702 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
703 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
704 escaped later.
705 (xsl:template name="output-node"): Use the new escape template instead
706 of the string-replace template directly.
707 (xsl:template name="output-edge"): Likewise.
708 (xsl:template name="escape"): New, escapes backslashes and newlines in
709 addition to quotation marks.
710 * src/graphviz.c (start_graph, output_node, output_edge): Add
711 whitespace to output for legibility.
712
713 Make xml2text.xsl and --report produce the same output, and remove the
714 XML "conflicts" element since a conflict summary is easily extracted
715 from the automaton.
716 * data/xslt/bison.xsl: New.
717 (xsl:template match="state" mode="bison:count-conflicts): New.
718 * data/xslt/xml2text.xsl: Import bison.xsl.
719 (xsl:template match="bison-xml-report"): Instead of styling the
720 "conflicts" element, style the "automaton" element with mode
721 "conflicts". Unlike the former, the latter lists S/R and R/R
722 conflicts for a state on the same line.
723 (xsl:template match="conflicts"): Remove.
724 (xsl:template match="conflict"): Remove.
725 (xsl:template match="terminal"): Line-wrap the list of rules in which
726 the terminal is used.
727 (xsl:template match="nonterminal"): Likewise for nonterminals.
728 (xsl:template match="automaton" mode="conflicts"): New.
729 (xsl:template match="state" mode="conflicts"): New.
730 (xsl:template name="line-wrap"): New.
731 (xsl:template name="ws-search"): New.
732 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
733 (xsl:template match="bison-xml-report"): Instead of styling the
734 "conflicts" element, style the "automaton" element with mode
735 "conflicts."
736 (xsl:template match="conflicts"): Remove.
737 (xsl:template match="conflict"): Remove.
738 (xsl:template match="automaton" mode="conflicts"): New.
739 (xsl:template match="state" mode="conflicts): New.
740 * src/conflicts.c (conflicts_output_xml): Remove.
741 * src/conflicts.h (conflicts_output_xml): Remove prototype.
742 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
743 * src/print.c (print_grammar): Consistently wrap at the 66th column so
744 the corresponding XSLT is easier. Also, never wrap between a word and
745 the comma that follows it.
746
747 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
748
749 Improve C++ namespace support. Discussed starting at
750 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
751 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
752 b4_namespace_close): New macros that interpret the %define variable
753 "namespace" so its value can contain "::" to indicate nested
754 namespaces.
755 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
756 the above macros.
757 * data/lalr1.cc (b4_namespace): Likewise.
758 * data/location.cc (b4_namespace): Likewise.
759 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
760 inside a new table in the general %define entry. Document `%define
761 namespace' there as well. Point the %name-prefix entry to it since it
762 explains it more completely in the case of C++.
763 (C++ Bison Interface): Mention `%define namespace' instead of
764 %name-prefix.
765 (Table of Symbols): Remove the `%define push_pull' entry. The %define
766 entry suffices.
767 * tests/c++.at (Relative namespace references): New test case.
768 (Absolute namespace references): New test case.
769 (Syntactically invalid namespace references): New test case.
770 * tests/input.at (C++ namespace reference errors): New test case.
771
772 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
773
774 Add syncline support and location accessor to internal %define
775 interfaces.
776 * data/bison.m4 (b4_percent_define_get_loc): New.
777 (b4_percent_define_get_syncline): New.
778 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
779 (b4_percent_define_default): Record defining location as line 1 rather
780 than 0 for the sake of synchronizing #line's, and define
781 b4_percent_define_syncline(VARIABLE).
782 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
783 * src/muscle_tab.c (muscle_syncline_grow): New.
784 (muscle_code_grow): Use muscle_syncline_grow.
785 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
786 define b4_percent_define_syncline(VARIABLE).
787 (muscle_percent_define_get_loc): New.
788 (muscle_percent_define_get_syncline): New.
789 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
790 remove some unused variables.
791 (muscle_percent_define_default): Record defining location as line 1
792 rather than 0 for the sake of synchronizing #line's, and define
793 b4_percent_define_syncline(VARIABLE).
794 (muscle_percent_define_check_values): Use
795 muscle_percent_define_get_loc.
796 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
797 (muscle_percent_define_get_syncline): Prototype.
798 * tests/skeletons.at (%define Boolean variables: invalid skeleton
799 defaults): Update output for location change.
800 (Complaining during macro argument expansion): Extend to test
801 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
802
803 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
804
805 Fix some error-reporting macro bugs.
806 * data/bison.m4 (b4_cat): New.
807 (b4_error, b4_error_at): Use b4_cat to send error directives directly
808 to stdout so they don't become arguments to other macros. Update
809 comments and add examples.
810 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
811 add examples.
812 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
813 after printing the error directive so that M4 doesn't report subsequent
814 problems that are induced by this problem.
815 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
816 instead of just in them. Recognize @\n in both places. Both expand to
817 the empty string. Needed by b4_cat.
818 * tests/skeletons.at (Complaining during macro argument expansion):
819 New test case.
820 (Fatal errors make M4 exit immediately): New test case.
821
822 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
823
824 Implement --print-datadir.
825 * src/getargs.c (usage): Mention.
826 (PRINT_DATADIR_OPTION): New anonymous enum member.
827 (long_options): Add entry for it.
828 (getargs): Add case for it calling compute_pkgdatadir.
829 * src/output.c (output_skeleton): Encapsulate data directory
830 computation from here...
831 (prepare): ... and from here...
832 (compute_pkgdatadir): ... into this new function.
833 * src/output.h (compute_pkgdatadir): Prototype.
834
835 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
836
837 * src/print-xml.c (escape_bufs): New static global variable
838 replacing...
839 (xml_escape_n): ... the static local variable buf here.
840 (print_xml): Free memory for escape_bufs.
841 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
842
843 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
844
845 Replace `%push-parser' and `%push-pull-parser' with
846 `%define push_pull "push"' and `%define push_pull "both"'.
847 `%define push_pull "pull"' is the default.
848 * doc/bison.texinfo (Push Decl, Push Parser Function,
849 Pull Parser Function, Parser Create Function, Parser Delete Function):
850 Update declarations.
851 (Decl Summary, Table of Symbols): Replace %push-parser and
852 %push-pull-parser entries with a %define push_pull entry.
853 * data/bison.m4 (b4_percent_define_check_values): New macro.
854 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
855 definitions...
856 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
857 definitions...
858 * data/push.c: ... to here and compute them from the value of the
859 %define variable push_pull.
860 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
861 parsing requests here...
862 * data/yacc.c: ... hack this to switch to push.c any time
863 b4_use_push_pull_flag or the %define variable push_pull is set. This
864 will go away when we mv push.c yacc.c.
865 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
866 push parsing is not supported since unused %define variables are
867 reported anyway.
868 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
869 * src/muscle_tab.h (muscle_percent_define_check_values): Update
870 comments for consistency with b4_percent_define_check_values.
871 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
872 muscles.
873 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
874 Remove.
875 (prologue_declaration): Remove %push-parser and %push-pull-parser
876 rules.
877 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
878 * tests/calc.at: Update declarations.
879 * tests/input.at (%define enum variables): New test case.
880 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
881 declaration.
882 (Push Parsing: Multiple impure instances): Update declaration.
883 (Push Parsing: Unsupported Skeletons): New test case.
884 * tests/torture.at (Exploding the Stack Size with Alloca): Update
885 declaration.
886 (Exploding the Stack Size with Malloc): Update declaration.
887
888 2007-09-24 Wojciech Polak <polak@gnu.org>
889
890 Add XSLT transformations.
891
892 * data/xslt/xml2dot.xsl: Transform XML into DOT.
893 * data/xslt/xml2text.xsl: Transform XML into plain text.
894 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
895 * data/Makefile.am (xsltdir): New variable.
896 (dist_xslt_DATA): Add xslt/*.xsl files.
897
898 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
899
900 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
901 Problem reported by Wojciech Polak.
902 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
903 (xml_printf): Undo change I made on 21 September; that is,
904 indent 2 spaces, not 1.
905
906 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
907
908 Pacify ./configure --enable-gcc-warnings.
909 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
910 `char const *' instead of `char *'.
911 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
912 local variable `sep'.
913
914 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
915
916 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
917 elsewhere.
918 * src/print-xml.c: Prefer "const" after types; that's more consistent.
919 (xml_printf): Indent just 1 space for level.
920 (e_char, xlate_char): Remove.
921 (xml_escape_string): Rewrite to avoid undefined behavior (used
922 storage that was freed from the stack).
923 (xml_escape_n): Don't bother checking for subscript error.
924
925 2007-09-21 Wojciech Polak <polak@gnu.org>
926
927 Add Bison XML Automaton Report.
928
929 Add support for an -x option to generate an XML report.
930 It is not documented yet.
931 * src/print-xml.c: New file.
932 * src/print-xml.h: Likewise.
933 * lib/timevar.def (TV_XML): New var.
934 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
935 * src/conflicts.c: Include print-xml.h.
936 (solved_conflicts_xml_obstack): New var.
937 (log_resolution, conflicts_solve, conflicts_free):
938 Add support for XML report.
939 (conflicts_output_val): New function.
940 * src/conflicts.h (conflicts_output_val): New decl.
941 * src/files.c (spec_xml_file): New var.
942 (compute_output_file_names, output_file_names_free): Add XML support.
943 * src/files.h (spec_xml_file): New decl.
944 * src/getargs.c (xml_flag): New var.
945 (usage, short_options, long_options, getargs): Add XML support.
946 * src/getargs.h (xml_flag): New decl.
947 * src/gram.c: Include print-xml.h.
948 (rule_lhs_print_xml, rule_rhs_print_xml):
949 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
950 New functions.
951 * src/gram.h: Declare external ones.
952 * src/main.c: Include print-xml.h.
953 (main): Add XML support.
954 * src/reduce.c: Include print-xml.h.
955 (reduce_xml): New function.
956 * src/reduce.h: Declare it.
957 * src/state.c: Include print-xml.h.
958 (state_new): Add XML support.
959 (state_rule_lookahead_tokens_print_xml): New function.
960 * src/state.h: Declare it.
961 (struct state): New member solved_conflicts_xml.
962 * src/symtab.c (symbol_class_get_string): New function.
963 * src/symtab.h: Declare it.
964
965 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
966
967 * GNUmakefile: Switch to coreutils's version.
968 * bootstrap: Likewise.
969 * Makefile.cfg: Adjust to new GNUmakefile.
970 * README-hacking: Likewise.
971
972 Import from gnulib:
973
974 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
975 Bruno Haible <bruno@clisp.org>
976
977 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
978 and is a script that invokes bison. Tighten the code. Add comments.
979
980 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
981
982 Spell "boolean" as "Boolean". Reported by Akim Demaille.
983 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
984 * doc/bison.texinfo (Decl Summary): Fix.
985 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
986 * tests/input.at (Boolean %define variables): Update output.
987 * tests/skeletons.at (%define boolean variables: invalid skeleton
988 defaults): Rename to...
989 (%define Boolean variables: invalid skeleton defaults): ... this and
990 update output.
991
992 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
993
994 In impure push mode, don't allow more than one yypstate to be allocated
995 since multiple impure parsers would corrupt yynerrs.
996 * data/push.c (yypstate_allocated): New static global variable
997 initialized to 0.
998 (yypull_parse): If yypstate_new returns 0, don't report it as memory
999 exhaustion if yypstate_allocated is 1, but still return 2.
1000 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1001 already 1. Otherwise, set it to 1.
1002 (yypstate_delete): Set it to 0.
1003 * tests/push.at (Push Parsing: Multiple impure instances): New test
1004 case.
1005
1006 2007-08-17 Bob Rossi <bob@brasko.net>
1007
1008 * doc/bison.texinfo (Push Decl): Document the push parser.
1009 (Table of Symbols): Ditto.
1010 (Pure Decl): Ditto.
1011 (Decl Summary): Ditto.
1012 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1013 Parser Create Function, Parser Delete Function):
1014 Add new push parser symbols.
1015 (Table of Symbols): Document push-parser, push-pull-parser,
1016 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1017
1018 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1019
1020 Update to GPLv3.
1021 * doc/gpl-3.0.texi: New file.
1022 * doc/gpl.texi: Remove.
1023 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1024 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1025 * README-hacking, TODO, bootstrap, bootstrap.conf:
1026 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1027 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1028 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1029 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1030 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1031 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1032 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1033 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1034 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1035 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1036 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1037 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1038 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1039 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1040 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1041 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1042 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1043 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1044 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1045 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1046 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1047 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1048 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1049 * src/complain.c, src/complain.h, src/conflicts.c:
1050 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1051 * src/files.h, src/flex-scanner.h, src/getargs.c:
1052 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1053 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1054 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1055 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1056 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1057 * src/print.c, src/print.h, src/print_graph.c:
1058 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1059 * src/reduce.h, src/relation.c, src/relation.h:
1060 * src/revision.h, src/scan-code.h, src/scan-code.l:
1061 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1062 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1063 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1064 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1065 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1066 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1067 * tests/existing.at, tests/glr-regression.at:
1068 * tests/headers.at, tests/input.at, tests/java.at:
1069 * tests/local.at, tests/output.at, tests/push.at:
1070 * tests/reduce.at, tests/regression.at, tests/sets.at:
1071 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1072 * tests/torture.at:
1073 Update to GPLv3.
1074
1075 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1076
1077 Get rid of broken %no-parser, -n, and --no-parser implementation and
1078 documentation.
1079 * TODO: Don't mention them.
1080 * doc/bison.1: Likewise.
1081 * doc/bison.texinfo (Decl Summary): Likewise.
1082 (Bison Options): Likewise.
1083 (Option Cross Key): Likewise.
1084 * src/getargs.c (no_parser_flag): Remove global variable.
1085 (usage): Don't print description of -n and --no-parser.
1086 (long_options): Remove --no-parser entry here.
1087 (getargs): Remove -n case in the switch here.
1088 * src/getargs.h (no_parser_flag): Remove extern.
1089 * tests/regression.at (Web2c Actions): Remove comment that mentions
1090 --no-parser.
1091
1092 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1093
1094 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1095 name user variables starting with `yy'. Just pass NULL instead of a
1096 dummy local &yylval to yypush_parse.
1097 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1098 starting with `yy'.
1099
1100 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1101
1102 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1103 true since it's then always used regardless of whether yyoverflow is
1104 defined. Reported by Christian Burger at
1105 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1106 * THANKS: Add Christian Burger.
1107
1108 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1109 node names: say "Decl Summary" not "Bison Declaration Summary".
1110
1111 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1112
1113 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1114 determine whether this function has already complained about an invalid
1115 value for a %define boolean variable, don't check whether Bison has
1116 ever examined the value. As written, the check was a tautology.
1117 Instead, record and check for this complaint using a separate muscle.
1118
1119 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1120
1121 Fix push parsing memory leak reported by Brandon Lucia at
1122 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1123 * THANKS: Add Brandon Lucia.
1124 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1125 but the parse never completed and thus freed it.
1126 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1127 * tests/testsuite.at: Include push.at.
1128 * test/push.at: New.
1129 (Push Parsing: Memory Leak for Early Deletion): New test case.
1130
1131 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1132
1133 Improve handling of multiple S/R conflicts in the same state and of S/R
1134 conflicts involving multiple reductions.
1135 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1136 set for a state here or Bison will abort if it is reassigned on a
1137 later conflicted reduction in the same state.
1138 Similarly, don't finalize and assign the solved conflicts report here
1139 or it will be lost if it is reassigned on a later conflicted reduction
1140 in the same state.
1141 (set_conflicts): Instead, assign them both here after all S/R conflicts
1142 in the state have been fully examined.
1143 * src/print.c (shift_set): Rename to...
1144 (no_reduce_set): ... this.
1145 (print_reductions): Update for rename, and add %nonassoc error action
1146 tokens to no_reduce_set so that, when printing the first remaining
1147 reduction on an error action token, the reduction is enclosed in
1148 brackets.
1149 (print_results): Update for rename.
1150 * tests/conflicts.at (Solved conflicts report for multiple reductions
1151 in a state): New test case.
1152 (%nonassoc error actions for multiple reductions in a state): New test
1153 case.
1154
1155 * src/main.c (main): Don't depend on C99 features.
1156
1157 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1158
1159 * build-aux/.cvsignore: Add compile.
1160 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1161 uniwidth.
1162
1163 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1164
1165 * bootstrap (slurp): Create target directories that don't exist.
1166 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1167
1168 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1169
1170 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1171 than item number.
1172 * closure.c (closure): Likewise.
1173 * state.h (reductions): Comment sorting of rules.
1174 (state): Comment sorting of items.
1175
1176 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1177
1178 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1179 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1180 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1181 definition in order to avoid Gnulib headers since we don't use config.h
1182 here.
1183 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1184 rather than AT_DATA so that config.h is included.
1185
1186 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1187
1188 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1189 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1190 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1191 and so that YYFPRINTF is guaranteed to be defined here.
1192
1193 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1194
1195 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1196 with...
1197 (muscle_percent_define_check_values): ... this more helpful function.
1198 Again, it's not used yet, but it will be.
1199 * src/muscle_tab.h: Likewise.
1200
1201 Improve some comments in parser table construction.
1202 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1203 (generate_states): Don't mention ruleset, which is internal to closure.
1204 * src/closure.c (closure): Explain sorting of core and itemset, which
1205 is required for this function to behave correctly.
1206 * src/closure.h (closure): Mention sorting.
1207
1208 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1209
1210 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1211 move the check for disabled transitions to an aver since conflict
1212 resolution hasn't happened yet.
1213
1214 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1215 labels a state as inconsistent just because it has error transitions.
1216 The original form of this check appeared in revision 1.1 of lalr.c,
1217 which was committed on 1991-12-21. Now (at least), changing the
1218 consistency label on such a state appears to have no useful effect in
1219 any of the places it is examined, which I enumerate below. The key
1220 point to understanding each item in this enumeration is that a state
1221 with an error transition is labelled consistent in the first place only
1222 if it has no rules, so the check cannot matter for states that have
1223 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1224 to try to identify its conflicts, and a state must have *rules* to have
1225 conflicts. (2) Labelling a state as inconsistent will affect how
1226 action_row sets the default *rule* for the state. (3) Labelling a
1227 state as inconsistent will cause build_relations to add lookback edges
1228 to *rules* in that state.
1229 * src/state.h (struct state): Word the comment for member consistent
1230 more carefully.
1231
1232 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1233
1234 Don't depend on C99 features.
1235 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1236 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1237 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1238 * src/state.c (state_mark_reachable_states): Fix for-loop.
1239 (state_remove_unreachable_states): Fix for-loop.
1240
1241 Don't widen struct state with member reachable just to temporarily
1242 record reachability. Instead, use a local bitset.
1243 * src/state.h (struct state): Remove member.
1244 * src/state.c (state_new): Don't initialize it.
1245 (state_mark_reachable_states): Rename to...
1246 (state_record_reachable_states): ... this, and use bitset.
1247 (state_remove_unreachable_states): Use bitset.
1248
1249 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1250
1251 * src/Makefile.am (yacc): Quote target action commands properly so
1252 that the yacc script isn't corrupt. Reported by Hans Aberg at
1253 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1254
1255 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1256 the case of pure parsers. Reported by Frans Englich at
1257 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1258 * THANKS: Add Frans Englich.
1259
1260 * NEWS (2.3a+): In the %code entry, reference section `Bison
1261 Declaration Summary' from the manual now since the %code summary has
1262 moved there.
1263 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1264 in the rules section must be terminated by semicolons.
1265
1266 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1267
1268 Extend the front-end API for %define variables to more completely
1269 mirror the back-end. This will be useful in the future.
1270 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1271 Update comments to mention the new front-end counterparts of these
1272 macros.
1273 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1274 for muscle_string_decode and muscle_location_decode.
1275 (muscle_string_decode): New static function.
1276 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1277 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1278 functions.
1279 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1280 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1281 implementation more closely.
1282 (muscle_percent_define_invalid_value): New function.
1283 * src/muscle_tab.h (muscle_percent_define_get,
1284 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1285 Prototype.
1286
1287 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1288
1289 * NEWS (2.3a+): Mention yesterday's state-removal change.
1290 (2.3a): Remove the %language entry, which was added after 2.3a.
1291 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1292 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1293 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1294 tests/existing.at: Update copyright date.
1295
1296 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1297
1298 If conflict resolution makes states unreachable, remove those states,
1299 report rules that are then unused, and don't report conflicts in those
1300 states.
1301 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1302 New global function.
1303 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1304 function.
1305 * src/main.c (main): After conflict resolution, remove the unreachable
1306 states and update all data structures that reference states by number.
1307 * src/state.c (state_new): Initialize each state's reachable member to
1308 false.
1309 (state_mark_reachable_states): New static function.
1310 (state_remove_unreachable_states): New global function.
1311 * src/state.h (struct state): Add member bool reachable.
1312 (state_remove_unreachable_states): Prototype.
1313 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1314 New test case.
1315 * tests/existing.at (GNU pic Grammar): Update test case output now that
1316 an unused rule is discovered.
1317
1318 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1319
1320 Minor code cleanup in parser table construction.
1321 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1322 (new_itemsets, save_reductions): Update for rename to nitemset.
1323 * src/closure.c (nritemset): Rename to...
1324 (nitemset): ... this since the "r" appears to meaningless and isn't
1325 used in the comments.
1326 (closure): Update for rename.
1327 * src/closure.h (nritemset): Update extern to...
1328 (nitemset): ... this.
1329 * src/lalr.c (LA): Fix a typo in comments.
1330 * src/print.c (print_core): Update for rename to nitemset.
1331 * src/print_graph.c (print_graph): Likewise.
1332 * src/state.h: Fix some typos in header comments.
1333
1334 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1335
1336 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1337 still sticks to ASCII. Sorry!
1338
1339 * README-hacking: New file, taken mostly from coreutils, with changes
1340 for Bison. Contains much of the contents of:
1341 * README-cvs: Remove.
1342 * bootstrap: Sync from gnulib.
1343 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1344 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1345
1346 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1347
1348 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1349 Setzer.
1350 (Java Differences): Fix some typos.
1351 * THANKS: Add Sebastian Setzer.
1352
1353 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
1354
1355 * data/java.m4 (b4_single_class_if): Remove.
1356 (b4_abstract_if): Look at "%define abstract".
1357 (b4_lexer_if): New.
1358 (b4_union_name): Rename...
1359 (b4_yystype): ... to this. Map to "%define stype".
1360 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1361 b4_maybe_throws): Fix quoting.
1362 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1363 * data/lalr1.java (Lexer interface): Always define.
1364 (Lexer interface within parser class): Remove.
1365 (YYLexer class): New, used when "%code lexer" is present.
1366 (constructor): When "%code lexer" is used, pass %lex-param
1367 to the lexer constructor.
1368 (yylex, yyparse): Remove %lex-param from method invocations
1369 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1370
1371 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1372 abstract". Rename "%define union_name" to "%define stype".
1373 Rename method names according to previous patch.
1374 (Java Scanner Interface): Describe "%code lexer" instead of
1375 "%pure-parser" and "%define single_class".
1376 (Java Differences): Mention "%code lexer".
1377
1378 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1379 Include scanner here, using macros from tests/local.at.
1380 (AT_DATA_CALC_Y): Remove final argument.
1381 (_AT_CHECK_JAVA_CALC): Likewise.
1382 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1383 of %locations and %error-verbose.
1384 (main): Test with and without %lex-param.
1385 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1386 (AT_BISON_OPTION_POPDEFS): Pop it.
1387
1388 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1389
1390 DJGPP spefic issue. Inhibit the use of disallowed characters for
1391 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1392 and concern testsuite case 46.
1393 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1394 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1395 * djgpp/config.bat: Inhibit the use of disallowed characters.
1396
1397 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1398
1399 Miscellaneous %define and %code cleanup.
1400 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1401 values are interpreted.
1402 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1403 documentation a little more.
1404 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1405 muscle_percent_define_insert, muscle_percent_code_grow): New
1406 functions/macros.
1407 * src/muscle_tab.h (muscle_percent_define_insert,
1408 muscle_percent_code_grow): Prototype.
1409 * src/parse-gram.y (prologue_declaration): Use
1410 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1411 %define and %code directives.
1412
1413 Make it easy to share %define boolean variables between the front-end
1414 and back-end. Though not used yet, this will be useful in the future.
1415 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1416 Bison uses of names rather than just skeleton uses of names.
1417 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1418 b4_percent_define_skeleton_variables(VARIABLE) to
1419 b4_percent_define_bison_variables(VARIABLE).
1420 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1421 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1422 b4_percent_code_bison_qualifiers(QUALIFIER).
1423 (b4_check_user_names_wrap): Update for renames.
1424 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1425 muscle_percent_define_default): New functions mimicking
1426 b4_percent_define_flag_if and b4_percent_define_default.
1427
1428 For %define variables, report locations for invalid values and
1429 redefinitions.
1430 * data/bison.m4 (b4_percent_define_flag_if): Read
1431 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1432 value for VARIABLE.
1433 (b4_percent_define_default): Save a special location in
1434 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1435 must later be reported as invalid.
1436 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1437 functions.
1438 (muscle_percent_define_insert): Record the location of VARIABLE in
1439 muscle percent_define_loc(VARIABLE), and use it to report the previous
1440 location for a redefinition.
1441 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1442 (muscle_percent_define_default): Update like b4_percent_define_default.
1443 (muscle_grow_user_name_list): Rename to...
1444 (muscle_user_name_list_grow): ... this for consistency and use
1445 muscle_location_grow.
1446 * src/muscle_tab.h (muscle_location_grow): Prototype.
1447 * tests/input.at (%define errors): Update expected output.
1448 * tests/skeletons.at (%define boolean variables: invalid skeleton
1449 defaults): New test case.
1450
1451 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1452
1453 * src/print.c (lookahead_set, state_default_rule): Remove.
1454 (print_reductions): Replace state_default_rule invocation with
1455 equivalent use of yydefact, which was computed in token_actions in
1456 tables.c.
1457 (print_results): Don't allocate lookahead_set.
1458
1459 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
1460
1461 * data/lalr1.java: Prefix all private members with yy.
1462
1463 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1464
1465 Use YYFPRINTF instead of fprintf where appropriate. Reported by
1466 Sebastien Fricker at
1467 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
1468 * THANKS: Add Sebastien Fricker.
1469 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1470 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1471 accept a variable number of arguments.
1472
1473 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1474
1475 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1476
1477 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1478
1479 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1480 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1481 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1482
1483 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1484
1485 Undo my 2007-02-07 change, switching back to the c-strcase module
1486 introduced in the 2007-02-03 change. Bruno Haible reported that
1487 the 2007-02-07 change would be dangerous in Turkish if we add a
1488 language whose name contains "i", since "i" is not lowercase "I"
1489 in Turkish.
1490 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1491 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1492 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1493 * m4/.cvsignore: Remove strcase.m4.
1494 * src/getargs.c: Revert 2007-02-07 change, as follows.
1495 Include c-strcase.h.
1496 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1497
1498 2007-02-11 Bruno Haible <bruno@clisp.org>
1499
1500 Enable the Java related testsuite tests when the only Java compiler
1501 found is a gcj < 4.3. Discussed at
1502 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1503 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1504
1505 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1506
1507 * data/Makefile.am: Update copyright date.
1508 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1509 yypstate_new returns NULL.
1510 (yypstate_new): Return NULL if malloc does.
1511 * src/reader.c (packgram): Move translation of rule actions from the
1512 beginning of packgram to...
1513 (check_and_convert_grammar): ... here right before packgram is invoked
1514 so it's easier to write more complete comments, and remove redundant
1515 code.
1516
1517 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1518
1519 As in semantic actions, make @$ in %initial-action, %destructor, and
1520 %printer imply %locations.
1521 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1522 scanning @$.
1523 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1524 (@$ in %initial-action implies %locations,
1525 @$ in %destructor implies %locations,
1526 @$ in %printer implies %locations): ... these new test cases.
1527
1528 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1529
1530 Undo most of the 2007-02-03 change, switching to the strcase module
1531 now that gnulib strcase has been fixed.
1532 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1533 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1534 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1535 * m4/.cvsignore: Add strcase.m4.
1536 * src/getargs.c: Revert 2007-02-03 change, as follows.
1537 Don't include c-strcase.h.
1538 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1539 strcasecmp has "unspecified behavior" outside the POSIX locale,
1540 but it works fine in practice if at least one argument is ASCII,
1541 as is the case in Bison.
1542
1543 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
1544
1545 * tests/java.at: Skip tests if only one of javac/java is present.
1546 Reported by Joel E. Denny.
1547 * tests/atlocal.in: Adjust copyright years.
1548
1549 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1550
1551 * data/lalr1.java (Stack): Work around old verifiers that disallow
1552 access to the private fields of an inner class, from the outer class.
1553 We can make Stack's fields public because user code doesn't have access
1554 to the instance of Stack used by parse(). Reported by Paul Eggert.
1555
1556 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1557
1558 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1559 the right spot for these files?
1560 * bootstrap.conf (gnulib_modules): Add c-strcase.
1561 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1562 c-strncasecmp.c.
1563 * src/getargs.c: Include c-strcase.h.
1564 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1565 to avoid unspecified behavior.
1566
1567 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1568
1569 * doc/bison.texinfo (Decl Summary): Correct typo.
1570
1571 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
1572
1573 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1574 Complain if the value does not match empty, "true" or "false".
1575 * data/c++.m4: Adjust default definitions of %define variables.
1576 * data/java.m4: Adjust default definitions of %define variables.
1577 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1578 to above behavior.
1579 * tests/input.at (Boolean %define variables): Test new behavior.
1580
1581 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
1582
1583 * NEWS: Mention java.
1584 * TODO: Remove things that are done.
1585 * bootstrap.conf: Add javacomp-script and javaexec-script.
1586 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1587
1588 * data/Makefile.am: Add new files.
1589 * data/java-skel.m4: New.
1590 * data/java.m4: New.
1591 * data/lalr1.java: New.
1592
1593 * doc/bison.texinfo: Put "A Complete C++ Example" under
1594 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1595 under Other Languages.
1596
1597 * src/getargs.c (valid_languages): Add Java.
1598 * src/getargs.h (struct bison_language): Update size of string fields.
1599
1600 * tests/Makefile.am: Add java.at.
1601 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1602 * tests/java.at: New.
1603 * tests/testsuite.at: Include it.
1604
1605 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1606
1607 Clean up.
1608 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1609 at_directive_argv arguments so these no longer have to be global
1610 variables. Also, update the implementation for the following changes.
1611 (fail_for_at_directive_too_many_args,
1612 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1613 (at_directive_name): Remove as at_directive_argv[0] will be used for
1614 this now.
1615 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1616 for the directive name.
1617 (at_directive_argc, at_directive_argv): Make these local within
1618 skel_lex instead of global.
1619 (INITIAL): Update directive start action for above changes.
1620 (SC_AT_DIRECTIVE_ARG): Rename to...
1621 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1622 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1623 (scan_skel): Move yylex_destroy to...
1624 (skel_scanner_free): ... here.
1625 * tests/skeletons.at (installed skeleton file name): Rename to...
1626 (installed skeleton file names): ... this.
1627
1628 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1629
1630 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1631 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1632 Summary" not "Directives".
1633 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1634 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1635 since the former is now the more complete one.
1636 (Prologue Alternatives): Likewise and do the same for %defines.
1637 (Table of Symbols): Add summary of %code, add summary of %define, and
1638 move full %code documentation to...
1639 (Decl Summary): ... here for consistency with other entries in these
1640 sections.
1641 Move %define entry in order to keep this list alphabetized.
1642 Reword %define entry a little to put less emphasis on the skeleton
1643 concept, which most users shouldn't have to think about.
1644
1645 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1646
1647 Adjust to recent gnulib changes.
1648 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1649 Add string.h, string_.h, unistd_.h, wchar_.h.
1650 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1651 * src/system.h: Don't include <stpcpy.h>; this is now done by
1652 <string.h>.
1653
1654 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
1655
1656 Simplify implementation of unqualified %code, implement macros for
1657 uniform treatment of boolean %define flags. Document %define.
1658 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1659 b4_percent_code_ifdef): New.
1660 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1661 * data/c++.m4: Define default value for global_tokens_and_yystype.
1662 * data/glr.cc: Likewise.
1663 * data/location.cc: Use b4_percent_define_flag_if.
1664
1665 * doc/bison.texinfo (Decl Summary): Document %define.
1666
1667 * src/parse-gram.y (Unqualified %code): Change muscle name to
1668 b4_percent_code().
1669 (content.opt): Default to empty.
1670
1671 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1672
1673 Implement support for relative and absolute skeleton file names.
1674 Discussed starting at
1675 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1676 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1677 (Bison Options): Document in --skeleton entry.
1678 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1679 full_skeleton can't necessarily hold all of pkgdatadir.
1680 If the specified skeleton file name contains a `/', don't prepend
1681 pkgdatadir.
1682 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1683 file name contains a `/', prepend the grammar file directory.
1684 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1685 * skeletons.at: New file.
1686 (relative skeleton file names): New test case.
1687 (installed skeleton file names): New test case.
1688 * tests/testsuite.at: Include skeletons.at.
1689
1690 * bootstrap: Update copyright to 2007.
1691
1692 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
1693
1694 * bootstrap: Remove occurrences of .#bootmp from the files.
1695
1696 2007-01-17 Akim Demaille <akim@epita.fr>
1697
1698 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1699 nonterminals.
1700 Use per-type %printer.
1701
1702 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1703
1704 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1705 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1706 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1707 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1708 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1709 tests/glr-regression.at, tests/input.at, tests/local.at,
1710 tests/output.at, tests/torture.at: Update copyright to 2007.
1711
1712 2007-01-16 Akim Demaille <akim@epita.fr>
1713
1714 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1715 error code.
1716 (Calc++ Scanner): Exit with failure if we can't open the input
1717 file.
1718 Accept "-" standing for stdin.
1719 (Calc++ Top Level): Print the result only if the parsing was
1720 successful.
1721
1722 2007-01-16 Akim Demaille <akim@epita.fr>
1723
1724 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1725
1726 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
1727 and Joel E. Denny <jdenny@ces.clemson.edu>
1728
1729 Clean up %define and %code implementation in M4 some. Most
1730 importantly, rename all related macros to be in the b4_percent_define
1731 and b4_percent_code namespaces. Also, complete support for `.' in
1732 %define variable names and %code qualifiers.
1733 * data/bison.m4 (b4_check_user_names): Check for special
1734 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1735 m4_foreach loops.
1736 (b4_get_percent_define, b4_get_percent_code): Rename to...
1737 (b4_percent_define_get, b4_percent_code_get): ... these.
1738 Extend documentation with examples.
1739 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1740 b4_percent_define_skeleton_variables and
1741 b4_percent_code_skeleton_qualifiers.
1742 Expect any value for the %define variable `foo' to be stored in the
1743 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1744 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1745 expect any unqualified %code blocks to be stored in a macro named
1746 `b4_percent_code_unqualified'.
1747 Use m4_indir so that %define variable names and %code qualifiers can
1748 contain `.', which is allowed by the grammar parser.
1749 (b4_percent_define_default): New macro to set a default value for a
1750 %define variable.
1751 (m4_wrap): Update wrapped code, and fix some underquoting.
1752 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1753 Expect grammar uses of %define variables and %code qualifiers to be
1754 defined in b4_percent_define_user_variables and
1755 b4_percent_code_user_qualifiers.
1756 * data/c++.m4: Use b4_percent_define_default rather than
1757 m4_define_default. Fix some underquoting. Skeleton usage of %define
1758 variable define_location_comparison now implies skeleton usage of
1759 %define variable filename_type.
1760 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1761 data/push.c, data/yacc.c: Update macro names.
1762 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1763 muscle names.
1764
1765 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1766
1767 DJGPP specific issues.
1768
1769 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1770 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1771
1772 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1773
1774 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1775 run parsers in all tests so that Valgrind is invoked during
1776 maintainer-check-valgrind.
1777 (Duplicate representation of merged trees): Free all semantic values.
1778 (Duplicated user destructor for lookahead): Likewise.
1779
1780 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1781
1782 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1783 command-line prefix.
1784 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1785 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1786 miss Valgrind messages.
1787 (Exploding the Stack Size with Malloc): Likewise.
1788
1789 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1790
1791 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1792 locals. Reported by Juan Manuel Guerrero at
1793 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1794 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1795 Fix some indentation also.
1796 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1797 explaining this issue.
1798
1799 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
1800 and Joel E. Denny <jdenny@ces.clemson.edu>
1801
1802 Simplify union and prologue handling, and escape union and lex/parse
1803 params with digraphs.
1804 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1805 values to the empty string since these are no longer guaranteed
1806 initialized by the front-end.
1807 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1808 braces around b4_user_stype since this is no longer done by the
1809 front-end.
1810 * src/files.c, src/files.h (pre_prologue_obstack,
1811 post_prologue_obstack): Remove.
1812 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1813 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1814 with digraphs. This fixes lex params and parse params.
1815 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1816 * src/output.c (prepare): Remove muscle insertion of the prologues.
1817 (output): Remove freeing of pre_prologue_obstack and
1818 post_prologue_obstack.
1819 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1820 than prologue_augment for prologue parsing so you don't need prologue
1821 obstacks.
1822 (grammar_declaration): For %union RHS, use `braceless' instead of
1823 "{...}" so that braces are already stripped and code is escaped with
1824 digraphs.
1825 * src/reader.c (prologue_augment): Remove.
1826 (reader): Remove initialization of pre_prologue_obstack and
1827 post_prologue_obstack.
1828 * src/reader.h (prologue_augment): Remove.
1829
1830 * data/c.m4: Remove stray parenthesis.
1831
1832 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1833
1834 Remove quotes from variables names in %define directives and from
1835 qualifiers in %code directives, and restrict the characters that are
1836 allowed in them to M4-friendly ones. For %define, continue to support
1837 the quoted form as a deprecated feature. Discussed starting at
1838 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1839 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1840 %code.
1841 * doc/bison.texinfo (Prologue Alternatives): Update.
1842 (Decl Summary): In %defines entry, update mention of `%code requires'
1843 and `%code provides'.
1844 (C++ Location Values): Update %define uses.
1845 (Calc++ Parser Interface): Likewise.
1846 (Calc++ Parser): Likewise, and update `%code requires' uses.
1847 (Table of Symbols): Update %code documentation.
1848 * src/parse-gram.y (prologue_declaration): For %define variables, use
1849 `variable' instead of `STRING'.
1850 (grammar_declaration): For %code qualifiers, use `ID' instead of
1851 `STRING'.
1852 (variable): New nonterminal that takes an `ID' or a `STRING'.
1853 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1854 and %define uses.
1855 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1856 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1857 (%define errors): Update %define uses.
1858
1859 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1860
1861 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1862 instead of muscle_insert for %define values so that M4-special
1863 characters are replaced with digraphs.
1864 * tests/input.at (%define errors): Extend to check weird values.
1865
1866 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1867
1868 Instead of having skeletons declare all valid %define variables and
1869 %code qualifiers, provide macros that retrieve the associated values
1870 and build these lists automatically. Thus Bison will now warn when a
1871 variable or qualifier is not used by the skeleton in the current
1872 invocation regardless of whether it might sometimes be used by that
1873 skeleton in other invocations. Also, move all %define value macros to
1874 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1875 form, which is replaced by %code.
1876 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1877 (b4_check_user_names): ... this, and change the series of valid name
1878 arguments to a single list argument for names used in the skeleton
1879 similar to the existing list argument for names used in the grammar.
1880 Warn instead of complaining.
1881 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1882 values and %code code, to format %code code properly, and to build
1883 lists of all %define variables and %code qualifiers used in the
1884 skeleton: b4_skeleton_percent_define_variables and
1885 b4_skeleton_percent_code_qualifiers.
1886 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1887 Remove, and...
1888 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1889 the skeleton names lists can finish building first. In place of
1890 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1891 expect the lists b4_user_percent_define_variables and
1892 b4_user_percent_code_qualifiers.
1893 * data/c++.m4: Where setting default values for b4_parser_class_name,
1894 b4_location_type, b4_filename_type, b4_namespace, and
1895 b4_define_location_comparison, update their names to the
1896 b4_percent_define_ namespace.
1897 * data/glr.c: Don't use b4_check_percent_define_variables and
1898 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1899 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1900 (b4_parser_class_name, b4_namespace): Define these using
1901 b4_get_percent_define for parser_class_name and namespace.
1902 * data/location.cc: Use b4_get_percent_define.
1903 * data/push.c: Don't use b4_check_percent_define_variables and
1904 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1905 * data/yacc.c: Likewise, and don't call m4_exit in
1906 b4_use_push_for_pull_if or m4_wrap code will never execute.
1907 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1908 Rename to...
1909 (muscle_grow_user_name_list): ... this for consistency with the
1910 terminology used in bison.m4.
1911 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1912 %define variable names, and rename muscle used_percent_define_variables
1913 to user_percent_define_variables.
1914 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1915 user_percent_code_qualifiers.
1916 (content): Remove.
1917 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1918 {CODE} form is no longer accepted.
1919 * tests/input.at (Reject bad %code qualifiers): Rename to...
1920 (Reject unused %code qualifiers): ... this, and update test output.
1921 (%define error): Update test output.
1922
1923 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1924
1925 Check for unrecognized %define variables similar to checking for
1926 unrecognized %code qualifiers. Check for redefined %define variables.
1927 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1928 generalizes...
1929 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1930 (b4_check_percent_define_variables): New, also wraps it.
1931 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1932 variables using b4_check_percent_define_variables.
1933 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1934 all those exercised in the test suite and all those listed in the
1935 `Default values' section of c++.m4. Are there others?
1936 * data/push.c, data/yacc.c: Declare no valid %define variables.
1937 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1938 similar to muscle_find, but it works even when the muscle stores a
1939 const value.
1940 (muscle_grow_used_name_list): New function for constructing the used
1941 name list muscles that b4_check_for_unrecognized_names requires.
1942 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1943 %define'd more than once. Define the b4_used_percent_define_variables
1944 muscle with muscle_grow_used_name_list.
1945 (grammar_declaration): Abbreviate %code code with
1946 muscle_grow_used_name_list.
1947 * tests/input.at (%define errors): New.
1948
1949 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1950
1951 Provide warn_at, complain_at, and fatal_at function callbacks to the
1952 skeletons, and use this for %code qualifier complaints.
1953 * data/bison.m4 (b4_error_at): New, invoked by...
1954 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1955 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1956 @fatal_at(...@) directives.
1957 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1958 qualifiers in b4_used_percent_code_qualifiers and to use
1959 b4_complain_at.
1960 * src/location.c, src/location.h (boundary_set_from_string): New global
1961 function.
1962 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1963 function.
1964 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1965 to b4_used_percent_code_qualifiers.
1966 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1967 function.
1968 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1969 (lineno): Rename to...
1970 (out_lineno): ... this so I don't misunderstand it again.
1971 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1972 here; these newlines are in the input but not the output file.
1973 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1974 (at_directive_perform): ... this new static function, and add handling
1975 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1976 directives.
1977 * tests/input.at (Reject bad %code qualifiers): Update test output with
1978 locations and extend.
1979
1980 * tests/output.at (Output file name: [, Output file name: ]): Remove
1981 bogus comment about these tests failing.
1982
1983 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1984
1985 Clean up b4_check_percent_code_qualifiers a little.
1986 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1987 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1988 documentation and add examples.
1989 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1990 qualifiers here.
1991
1992 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1993
1994 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1995 unreliable -- especially when they're hidden inside another macro.
1996 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1997 data/c.m4: Remove m4_divert(-1).
1998 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1999 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2000 m4_divert_push(0) and m4_divert_pop(0).
2001 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
2002 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2003 pushed and popped by m4sugar, should be first on the stack.
2004
2005 Provide warn, complain, and fatal function callbacks to the skeletons.
2006 This provides more flexibility than m4_fatal, improves the error
2007 message format, and captures messages for translation. Discussed
2008 starting at
2009 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2010 * data/bison.m4 (b4_error): New, invoked by...
2011 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2012 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2013 directives. Because these M4 macros might be called when the current
2014 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2015 the previous removal of uses of m4_divert, which caused trouble.
2016 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2017 m4_fatal to report unrecognized %code qualifiers.
2018 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2019 push parser requests.
2020 * data/glr.c: Use b4_complain instead of m4_fatal to report
2021 non-deterministic push parser requests.
2022 Update @output usage to @output(...@) form.
2023 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2024 report missing %defines. Update @output usage to @output(...@) form.
2025 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2026 @output(...@) form.
2027 * src/main.c (main): Invoke skel_scanner_free.
2028 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2029 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2030 obstack_for_string from flex-scanner.h.
2031 (YY_DECL): Use to declare skel_lex static.
2032 (decode_at_digraphs): Remove; now handled in the new
2033 SC_AT_DIRECTIVE_ARG start condition.
2034 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2035 functions.
2036 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2037 at_directive_argv): New static globals.
2038 (INITIAL): Use fail_for_invalid_at.
2039 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2040 recognize the start of a generalized `@directive(...@)' form and
2041 start...
2042 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2043 directive args (using the new obstack_for_string), to decode the
2044 contained @ diagraphs, and to perform the directive. It recognizes
2045 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2046 @output(...@).
2047 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2048 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2049 `@,'.
2050 (scan_skel): Initialize obstack_for_string on the first call.
2051 (skel_scanner_free): New function to free obstack_for_string.
2052 * tests/input.at (Reject bad %code qualifiers): Update test output.
2053
2054 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2055
2056 Consolidate the 4 prologue alternative directives (%code, %requires,
2057 %provides, and %code-top) into a single %code directive with an
2058 optional qualifier field. Discussed at
2059 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2060 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2061 alternatives.
2062 * doc/bison.texinfo (Prologue Alternatives): Update.
2063 (Decl Summary): Update to %code "requires" and %code "provides".
2064 (Calc++ Parser): Update to %code "requires".
2065 (Table of Symbols): Remove entries for %requires, %provides, and
2066 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2067 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2068 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2069 which are skeleton-specific.
2070 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2071 declare what %code qualifiers it supports and to complain if any other
2072 qualifiers were used in the grammar.
2073 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2074 and b4_user_code([b4_percent_code_provides]) in place of
2075 b4_user_requires and b4_user_provides.
2076 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2077 Add b4_user_code([b4_percent_code_top]) and
2078 b4_user_code([b4_percent_code]).
2079 Invoke b4_check_percent_code_qualifiers.
2080 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2081 PERCENT_REQUIRES): Remove.
2082 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2083 %requires. Rewrite the %code RHS as the unqualified form defining the
2084 muscle b4_percent_code. Add another RHS for the qualified %code form,
2085 which defines muscles of the form b4_percent_code_QUALIFIER and the
2086 b4_used_percent_code_qualifiers muscle.
2087 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2088 PERCENT_REQUIRES): Remove.
2089 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2090 %code "requires" and %code "provides".
2091 * tests/input.at (Reject bad %code qualifiers): New.
2092
2093 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2094
2095 Use the new code_props interface for destructors and printers.
2096 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2097 printer_location members, and change the type of the destructor and
2098 printer members to code_props.
2099 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2100 symbol_printer_get, semantic_type_destructor_set,
2101 semantic_type_printer_set, default_tagged_destructor_set,
2102 default_tagless_destructor_set, default_tagged_printer_set,
2103 default_tagless_printer_set): Use code_props in arguments and return
2104 types in place of char const * and location.
2105 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2106 since the locations are now contained in the return of
2107 symbol_destructor_get and symbol_printer_get.
2108 * src/output.c (symbol_destructors_output, symbol_printers_output):
2109 Replace with...
2110 (symbol_code_props_output): ... this to eliminate duplicate code.
2111 (output_skeleton): Update to use symbol_code_props_output.
2112 * src/reader.c (symbol_should_be_used): Update use of
2113 symbol_destructor_get.
2114 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2115 Update uses of the various _destructor_set and _printer_set functions.
2116 * src/symtab.c: (default_tagged_destructor_location,
2117 default_tagless_destructor_location, default_tagged_printer_location,
2118 default_tagless_printer_location): Remove since we...
2119 (default_tagged_destructor, default_tagless_destructor,
2120 default_tagged_printer, default_tagless_printer): ... change the type
2121 of these to code_props.
2122 (symbol_new, semantic_type_new, symbol_destructor_set,
2123 semantic_type_destructor_set, symbol_destructor_get,
2124 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2125 symbol_check_alias_consistency, default_tagged_destructor_set,
2126 default_tagless_destructor_set, default_tagged_printer_set,
2127 default_tagless_printer_set): Update.
2128 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2129 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2130 code_props members.
2131 (symbol_print): Use SYMBOL_CODE_PRINT.
2132
2133 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2134
2135 Use the new code_props interface for rule actions.
2136 * src/symlist.h (symbol_list): Replace action, action_location, and
2137 used members with a code_props action_props member.
2138 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2139 grammar_midrule_action, grammar_current_rule_merge_set,
2140 grammar_current_rule_symbol_append, packgram): Update.
2141 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2142 * src/scan-code.l (handle_action_dollar): Update.
2143 (translate_rule_action): Remove, no longer used.
2144 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2145
2146 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2147
2148 Use the new code_props interface in parse-gram.y.
2149 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2150 Update all uses of translate_* functions to use the new code_props
2151 interface and to use gram_scanner_last_string_free and
2152 code_scanner_last_string_free where possible.
2153 (grammar_declaration): symbol_list_destructor_set and
2154 symbol_list_printer_set now perform the translation, so don't do it
2155 here. Use gram_scanner_last_string_free where possible.
2156 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2157 translate_code): Remove, no longer used.
2158 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2159 symbol_list_printer_set): Perform code translation here rather than
2160 depending on the caller to do so.
2161
2162 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2163 * src/scan-gram.h (gram_last_string): Remove declaration.
2164 * src/scan-gram.l (last_string): Declare it static.
2165
2166 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2167
2168 Encapsulate code properties and related functionality for the various
2169 destructors, printers, and actions into a code_props structure and
2170 interface. This patch merely implements code_props in scan-code.h and
2171 scan-code.l. Future patches will rewrite other modules to use it.
2172 Discussed starting at
2173 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2174 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2175 consistently initialize const structs that have an empty location
2176 field.
2177 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2178 to ensure consistency.
2179 * src/scan-code.h (code_props): New structure.
2180 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2181 function, macro, and const global variable for initializing a
2182 code_props with no code.
2183 (code_props_plain_init, code_props_symbol_action_init,
2184 code_props_rule_action_init, code_props_translate_code): The rest of
2185 the new code_props functional interface. Among other things, the init
2186 functions set the code_props kind field so that
2187 code_props_translate_code will know whether to behave like
2188 translate_symbol_action, translate_rule_action, or translate_code.
2189 These old translate functions must remain until all other modules are
2190 updated to use the new code_props interface.
2191 (code_scanner_last_string_free): New function similar to
2192 gram_scanner_last_string_free.
2193 (code_scanner_free): Add documentation.
2194 * src/scan-code.l: Implement the new interface.
2195 (code_lex): Make it static, add a code_props* argument, and remove the
2196 rule argument.
2197 (last_string): New static global similar to the one in scan-gram.l.
2198 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2199 instead of rule.
2200 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2201 code_props since Bison may one day use this information for destructors
2202 and printers.
2203 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2204 (handle_action_dollar): Use symbol_list_n_get and set used flag
2205 directly since symbol_list_n_used_set is removed.
2206 (translate_action): Add a code_props* argument and remove the rule,
2207 action, and location arguments. Pass the code_props* on to code_lex.
2208 (translate_rule_action, translate_symbol_action, translate_code):
2209 Rewrite as wrappers around the new code_props interface.
2210 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2211 it would eventually need to break the encapsulation of code_props.
2212
2213 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2214
2215 * etc/.cvsignore: New.
2216
2217 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2218
2219 Add maintainer-push-check to run maintainer-check using push parsing in
2220 place of pull parsing where available.
2221 * Makefile.am (maintainer-push-check): New.
2222 * data/bison.m4 (b4_use_push_for_pull_if): New.
2223 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2224 appropriately based on their existing values.
2225 (yypush_parse): Don't print push-parser-specific diagnostics if push
2226 parsing is being used in place of pull parsing.
2227 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2228 push.c.
2229 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2230 variable, and insert b4_use_push_for_pull_flag into muscles.
2231 * tests/Makefile.am (maintainer-push-check): New.
2232
2233 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2234
2235 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2236 (whether successful or failed) so that yypush_parse can be invoked
2237 again to start a new parse using the same yypstate.
2238 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2239 check multiple yypull_parse invocations on the same yypstate. For pull
2240 mode, extend to check multiple yyparse invocations.
2241 (Exploding the Stack Size with Alloca): Extend to try with
2242 %push-pull-parser.
2243 (Exploding the Stack Size with Malloc): Likewise.
2244
2245 * tests/calc.at (Simple LALR Calculator): Don't specify
2246 %skeleton "push.c" since %push-pull-parser implies that now.
2247 * tests/headers.at (export YYLTYPE): Don't check for the push
2248 declarations. Otherwise, this test case can't be used to see if push
2249 mode can truly emulate pull mode.
2250 * tests/input.at (Torturing the Scanner): Likewise.
2251 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2252 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2253 AT_YACC_IF, which now includes the case of push mode since %skeleton
2254 need not be used for push mode. This will be more intuitive once
2255 push.c is renamed to yacc.c.
2256
2257 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2258
2259 For push mode, convert yyparse from a macro to a function, invoke yylex
2260 instead of passing a yylexp argument to yypull_parse, and don't
2261 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2262 Discussed starting at
2263 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2264 * data/bison.m4 (b4_pull_if): New.
2265 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2266 * data/push.c: Improve M4 quoting a little.
2267 (b4_generate_macro_args, b4_parenthesize): Remove.
2268 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2269 any time a pull parser is requested.
2270 Don't #define this as a wrapper around yypull_parse. Instead, when
2271 both push and pull are requested, make it a function that does that
2272 same thing.
2273 (yypull_parse): If there's a b4_prefix, #define this to
2274 b4_prefix[pull_parse] when both push and pull are requested.
2275 Don't define this as a function unless both push and pull are
2276 requested.
2277 Remove the yylexp argument and hard-code yylex invocation instead.
2278 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2279 %push-parser.
2280 * src/getargs.c (pull_parser): New global initialized to true.
2281 * getargs.h (pull_parser): extern it.
2282 * src/output.c (prepare): Insert pull_flag muscle.
2283 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2284 (prologue_declaration): Set both push_parser and pull_parser = true for
2285 %push-pull-parser. Set push_parser = true and pull_parser = false for
2286 %push-parser.
2287 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2288 %push-parser since there's no backward-compatibility concern here.
2289 Scan %push-pull-parser.
2290 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2291 instead of %push-parser.
2292 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2293 prototype it in the module that calls yyparse.
2294 * tests/input.at (Torturing the Scanner): Likewise.
2295 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2296
2297 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2298
2299 Update etc/bench.pl. Optimize push mode a little (the yyn change
2300 deserves most of the credit).
2301 * Makefile.am (SUBDIRS): Add etc subdirectory.
2302 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2303 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2304 yytoken, yyval, and yyloc declarations to...
2305 (yyparse or yypush_parse): ... here to improve performance. For
2306 yypush_parse invocations after the first, be sure to assign yyn its old
2307 value again.
2308 (yypstate_new): Don't bother initializing the yyresult field since the
2309 initial value isn't used.
2310 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2311 remove the #define that, in push mode, set it to yyps->NAME.
2312 * etc/Makefile.am: New.
2313 * etc/bench.pl: Remove and build it instead from...
2314 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2315 "tests/bison" from the build directory by default rather than just
2316 invoking "bison" from $PATH.
2317 (calc_grammar): Update push parser code: don't declare yylval globally,
2318 don't define yyparse_wrapper, and don't #define yyparse.
2319 (bench_grammar): Update to check all working combinations of yacc.c,
2320 push.c, impure, pure, pull, and push.
2321
2322 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2323
2324 For push mode, add pull wrappers around yypush_parse.
2325 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2326 (yypull_parse): New function wrapping yypush_parse.
2327 (yyparse): New #define wrapping yypull_parse.
2328 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2329 is declared.
2330 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2331 prototype yylex in the module that calls yyparse, and don't prototype
2332 yyparse there. Otherwise, the yyparse expansion won't compile.
2333 * tests/input.at (Torturing the Scanner): Likewise.
2334
2335 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2336
2337 Enable push parsers to operate in impure mode. Thus, %push-parser no
2338 longer implies %pure-parser. The point of this change is to move
2339 towards being able to test the push parser code by running the entire
2340 test suite as if %push-parser had been declared.
2341 * data/push.c (yypush_parse): For impure mode, remove the
2342 yypushed_char, yypushed_val, and yypushed_loc arguments.
2343 Instead, declare these as local variables initialized to the global
2344 yychar, yylval, and yylloc.
2345 For the first yypush_parse invocation only, restore the initial values
2346 of these global variables when it's time to read a token since they
2347 have been overwritten.
2348 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2349 %push-parser.
2350 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2351 %pure-parser along with %push-parser since this test case was designed
2352 for pure push parsers.
2353 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2354 (AT_YACC_OR_PUSH_IF): New.
2355 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2356 add a note that it's still wrong for some cases (as it has been for a
2357 while).
2358 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2359 %push-parser no longer implies %pure-parser.
2360
2361 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2362
2363 Remove some unnecessary differences between the pull parser code and
2364 the push parser code. This patch enables yynerrs in push mode.
2365 * data/push.c: Reformat M4 a little.
2366 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2367 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2368 because push mode is on. Instead, if pure mode is on, move yynerrs
2369 to...
2370 (b4_declare_parser_state_variables): ... here.
2371 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2372 to yyps->NAME so it can be used in yypush_parse.
2373 (yypush_parse): Don't omit uses of yynerrs in push mode.
2374
2375 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2376
2377 Fix bug such that the first pushed token's value and location are
2378 sometimes overwritten (sometimes by %initial-action) before being used.
2379 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2380 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2381 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2382 more closely mimic the pull parser logic.
2383 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2384 time to read a token, which is after any initialization of yylval and
2385 yylloc.
2386 (gottoken): Rename label to...
2387 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2388 user namespace.
2389
2390 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2391
2392 Rearrange initialization of the parser state variables so that the
2393 skeleton doesn't have to have a copy for pull mode and another for push
2394 mode. This patch also fixes at least a bug such that yylloc was not
2395 initialized (with b4_location_initial_line and
2396 b4_location_initial_column) upon calling yypush_parse. However, that
2397 initialization now overwrites the first token's location;
2398 %initial-action assigning @$ already did the same thing, and both bugs
2399 will be fixed in a later patch.
2400 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2401 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2402 yyss, yyvs, yyls, and yystacksize.
2403 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2404 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2405 yylsp.
2406 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2407 yyps->NAME so it can be used in yypush_parse.
2408 (yyparse or yypush_parse): For yypush_parse, don't print the
2409 "Starting parse" diagnostic for invocations after the first.
2410 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2411 yypush_parse, only do it for the first invocation.
2412 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2413 initialization to occur in yypush_parse but only on the first
2414 invocation.
2415
2416 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2417
2418 * data/push.c: Add CPP guards around push parser declarations in both
2419 the header and the code file.
2420 In the code file, move the push parser declarations to the same place
2421 they appear in the header file.
2422 Clean up the M4 some, especially the inconsistent underquoting in
2423 some b4_c_function_def and b4_c_function_decl uses.
2424
2425 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2426
2427 Encapsulate the push parser state variables into an M4 macro so the
2428 push skeleton doesn't have to list them again for pull mode's yyparse.
2429 For push mode, remove yypush_parse's local equivalents of these
2430 variables to eliminate unnecessary copying between the two sets at
2431 run-time. This patch also fixes at least a bug related to multiple
2432 %initial-action invocations in push mode.
2433 * data/push.c (b4_declare_parser_variables): Rename to...
2434 (b4_declare_scanner_communication_variables): ... this for clarity and
2435 update both uses.
2436 (b4_declare_yyparse_variables): Remove and move its contents to the one
2437 spot where it was invoked.
2438 (b4_declare_parser_state_variables): New macro containing the parser
2439 state variables required by push mode.
2440 (struct yypstate): Replace all fields but yynew with
2441 b4_declare_parser_state_variables.
2442 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2443 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2444 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2445 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2446 parser state variable declarations with
2447 b4_declare_parser_state_variables.
2448 Don't initialize parser state variables when calling yypush_parse since
2449 yypstate_new already does that.
2450 Invoke the user's initial action only upon the first yypush_parse
2451 invocation.
2452 Remove all code that copies between the local parser state variables
2453 and the yypstate.
2454
2455 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2456
2457 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2458 prevent a name collision in a future patch where these names will
2459 sometimes be #define'd.
2460 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2461 since it no longer has the same name as the existing argument.
2462 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2463
2464 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
2465 and Joel E. Denny <jdenny@ces.clemson.edu>
2466
2467 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2468 that the argument is case-insensitive, and there's no `=' here.
2469 For the %skeleton entry, mention that %language is better.
2470 (Bison Options): Likewise for --language and --skeleton. Move the
2471 --skeleton entry so that the `Tuning the parser' section is sorted
2472 alphabetically on long options.
2473 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2474 %language directive in detail here; cross-reference the %language
2475 documentation instead.
2476 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2477 `%require "2.3b"' so that the example is always up-to-date.
2478 (Table of Symbols): Add entries for %language and %skeleton.
2479 * examples/extexi (normalize): Instead of replacing every %require
2480 argument with the current Bison version, just substitute for
2481 `@value{VERSION}'. This guarantees that we're testing what actually
2482 appears in the documentation.
2483 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2484 rather than `@VERSION@'.
2485
2486 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2487
2488 * NEWS: Reword the %language news a bit, and put it earlier.
2489
2490 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2491 Rewrite to simplify the logic.
2492 (language_argmatch): Likewise.
2493 (program_name): We now own this var.
2494 * src/getargs.h (struct bison_language): Use char[] rather than
2495 const char *.
2496
2497 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2498 Java is supported.
2499 * src/complain.c (program_name): Remove decl; no longer needed.
2500 * src/main.c (program_name): Remove; now belongs to getargs.
2501
2502 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
2503
2504 * NEWS: Document %language.
2505
2506 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2507
2508 * data/c-skel.m4, data/c++-skel.m4: New files.
2509 * data/glr.c: Complain on push parsers.
2510
2511 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2512 over %skeleton.
2513 (Decl Summary): Document %language and %skeleton.
2514 (Command line): Document -L.
2515
2516 * examples/extexi: Rewrite %require directive.
2517 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2518
2519 * src/files.c (compute_exts_from_gc): Look in language structure
2520 for .y extension.
2521 (compute_file_name_parts): Check whether .tab should be added.
2522 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2523 (language, skeleton_arg, language_argmatch): New.
2524 (long_options): Add --language.
2525 (getargs): Use skeleton_arg, add -L/--language.
2526 * src/getargs.h: Include location.h.
2527 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2528 * src/output.c (prepare): Pick default skeleton from struct language.
2529 Don't dispatch C skeletons here.
2530 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2531 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2532 * src/scan-gram.l ("%language"): New rule.
2533
2534 * tests/calc.at: Test %skeleton and %language.
2535 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2536 (AT_GLR_IF): Look for %skeleton "glr.cc".
2537 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2538 (AT_YACC_IF): Reject %language.
2539
2540 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2541
2542 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2543 since it wasn't used; only the typedef name 'semantic_type' is needed.
2544 Also, omit trailing white space.
2545
2546 * bootstrap: Sync from coreutils.
2547 (gnulib_extra_files): Add build-aux/announce.gen.
2548 (slurp): Adjust .gitignore files like .cvsignore files.
2549 * build-aux/announce-gen: Remove from CVS, since bootstrap
2550 now creates this.
2551
2552 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2553
2554 Make %push-parser imply %pure-parser. This fixes several bugs; see
2555 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2556 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2557 pure_parser = true.
2558 * data/push.c: Don't bother testing b4_push_if when deciding whether
2559 to expand b4_declare_parser_variables globally.
2560 (yypush_parse): Likewise in here.
2561
2562 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2563 (yy_reduce_print): Reformat M4 for readability.
2564
2565 2006-12-15 Bob Rossi <bob@brasko.net>
2566 and Joel Denny <jdenny@ces.clemson.edu>
2567
2568 * data/push.c (yypstate): Add typedef, and update all uses of
2569 struct yypstate to just yypstate.
2570 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2571
2572 2006-12-14 Bob Rossi <bob@brasko.net>
2573
2574 * data/push.c (yypush_parse): Declare prototype regardless of
2575 %locations option.
2576
2577 2006-12-14 Bob Rossi <bob@brasko.net>
2578
2579 * data/push.c (yyparse): Remove the prototype and the #define when in
2580 push-parser mode.
2581
2582 2006-12-13 Bob Rossi <bob@brasko.net>
2583
2584 * data/push.c (yypstate_init): Rename to...
2585 (yypstate_new): ... this and use b4_c_function_def.
2586 (yypstate_delete): New.
2587 (yypush_parse): Change parameters yynval and yynlloc to be const.
2588 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2589 yypstate_delete functions.
2590
2591 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2592
2593 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2594 strange test case titles. Reported by Bob Rossi.
2595
2596 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2597
2598 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2599 of potential ambiguities in GLR grammers.
2600
2601 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2602
2603 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2604 `bison ', use m4_index instead of m4_substr since chopping up a string
2605 containing M4-special characters causes problems here.
2606
2607 Fix a couple of bugs related to special characters in user-specified
2608 file names, and make it easier for skeletons to compute output file
2609 names with the same file name prefix as Bison-computed output file
2610 names.
2611 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2612 b4_parser_file_name and b4_spec_defines_file instead of
2613 @output_parser_name@ and @output_header_name@, which are now redundant.
2614 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2615 b4_parser_file_name, b4_spec_defines_file, and the new
2616 @basename(FILENAME@) instead of @output_parser_name@ and
2617 @output_header_name@, which inappropriately escaped the file names as
2618 C string literals.
2619 * src/files.c (all_but_ext): Remove static qualifier.
2620 (compute_output_file_names): Move `free (all_but_ext)' to...
2621 (output_file_names_free): ... here since all_but_ext is needed later.
2622 * src/files.h (all_but_ext): Extern.
2623 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2624 exactly what MUSCLE_INSERT_STRING used to do.
2625 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2626 characters are escaped properly.
2627 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2628 all_but_ext.
2629 For pkgdatadir muscle, maintain previous functionality by using
2630 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2631 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2632 digraphs would never be expanded. Hopefully no one has M4-special
2633 characters in his Bison installation path.
2634 * src/scan-skel.l: Don't parse @output_header_name@ and
2635 @output_parser_name@ anymore since they're now redundant.
2636 In @output, use decode_at_digraphs.
2637 Parse a new @basename command that invokes last_component.
2638 (decode_at_digraphs): New.
2639 (BASE_QPUTS): Remove unused.
2640 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2641 (Output file name): New tests.
2642
2643 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2644
2645 Warn about output files that are generated by the skeletons and that
2646 conflict with other output files.
2647 * data/glr.c: Don't generate the header file here when glr.cc does.
2648 * src/files.c (file_names, file_names_count): New static globals.
2649 (compute_output_file_names): Invoke output_file_name_check for files
2650 not generated by the skeletons and remove existing checks.
2651 (output_file_name_check): New function that warns about conflicting
2652 output file names.
2653 (output_file_names_free): Free file_names.
2654 * src/files.h (output_file_name_check): Declare.
2655 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2656 the skeletons.
2657 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2658 (Conflicting output files): New tests.
2659
2660 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2661
2662 * doc/bison.texinfo: Fix a couple of typos.
2663
2664 2006-12-08 Bob Rossi <bob@brasko.net>
2665
2666 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2667 Rename to...
2668 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2669 update all uses.
2670 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2671 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2672 local pv.
2673 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2674 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2675
2676 2006-12-07 Bob Rossi <bob@brasko.net>
2677 and Joel Denny <jdenny@ces.clemson.edu>
2678
2679 * data/push.c (yypvarsinit): Change return type from void* to struct
2680 yypvars*. No longer cast to void* on return.
2681 (struct yypvars): Remove yylen since it need not be remembered between
2682 yypushparse invocations.
2683 (yypushparse): Don't copy between yylen and pv->yylen.
2684
2685 2006-12-05 Bob Rossi <bob@brasko.net>
2686
2687 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2688 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2689 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2690 (struct yypvars): Remove b4_declare_parser_variables.
2691 (yypvarsinit): Remove init code for removed variables.
2692 (global scope): Do not declare b4_declare_parser_variables if
2693 push or pure mode.
2694 (yypushparse): Add b4_declare_parser_variables.
2695 Init new local variables, and remove init code for removed
2696 yypvars variables.
2697 (yyparse): Delete.
2698 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2699 and yyparse for other modes.
2700 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2701 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2702 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2703 (AT_PURE_LEX_IF): True if pure or push parser.
2704
2705 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2706
2707 Document Yacc prologue alternatives and default %destructor's and
2708 %printer's as experimental. Don't mention Java yet. Discussed at
2709 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2710 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2711 (2.3a): Annotate this entry to say the old forms of these features were
2712 also experimental.
2713 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2714 Table of Symbols): Say they're experimental. Comment out any mention
2715 of Java (we'll want this back eventually).
2716
2717 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2718
2719 Support a file name argument to %defines. Deprecate `=' in
2720 %file-prefix, %name-prefix, and %output. Discussed at
2721 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2722 * NEWS (2.3a+): Mention.
2723 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2724 form of %defines, and remove `=' from entries for %file-prefix,
2725 %name-prefix, and %output.
2726 * src/parse-gram.y (prologue_declaration): Implement.
2727 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2728 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2729 all but one occurrence of %name-prefix.
2730 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2731 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2732 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2733 occurrence of each of %file-prefix and %output. Add check for %defines
2734 with argument.
2735 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2736 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2737 Remove the `=' from %output.
2738
2739 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2740
2741 Don't escape $ in test case titles since Autoconf 2.61 now does that
2742 correctly.
2743 * tests/actions.at (Default %printer and %destructor are not for error
2744 or $undefined): Here.
2745 (Default %printer and %destructor are not for $accept): Here.
2746 * tests/input.at (Invalid $n and @n): Here.
2747
2748 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2749
2750 Rename <!> to <>. Discussed starting at
2751 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2752 * NEWS (2.3a+): Update.
2753 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2754 Update.
2755 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2756 * src/scan-gram.l (INITIAL): Implement.
2757 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2758 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2759 comment.
2760 * tests/actions.at (Default tagless %printer and %destructor,
2761 Default tagged and per-type %printer and %destructor,
2762 Default %printer and %destructor are not for error or $undefined,
2763 Default %printer and %destructor are not for $accept,
2764 Default %printer and %destructor for mid-rule values): Update.
2765 * tests/input.at (Default %printer and %destructor redeclared,
2766 Unused values with default %destructor): Update.
2767
2768 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2769
2770 Don't let %prec take a nonterminal.
2771 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2772 token.
2773 * tests/input.at (%prec takes a token): New test checking that %prec
2774 won't take a nonterminal.
2775
2776 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2777
2778 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2779 it was double-quoted.
2780 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2781 grammar is maintained with Bison's highest standards.
2782 * src/getargs.c: Fix some typos in Doxygen comments.
2783
2784 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2785
2786 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2787 later. Reported by Paul Eggert in
2788 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2789 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2790 * src/scan-code.l (translate_action): Don't bother invoking
2791 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2792 (code_scanner_free): Instead of invoking
2793 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2794 which frees more.
2795 * src/scan-gram.l (gram_scanner_free): Likewise.
2796 * src/scan-skel.l (scan_skel): Likewise.
2797
2798 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2799
2800 * src/files.c (tr): Change return type to void.
2801 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2802 has been called previously for the same key.
2803 (muscle_find): Return storage instead of value so that
2804 --enable-gcc-warnings doesn't produce warnings that the return discards
2805 const. aver that the value and storage are the same since storage
2806 could potentially be NULL when value is not.
2807 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2808 same as 0.
2809
2810 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2811
2812 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2813 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2814 us a slightly cleaner distribution, and also works.
2815 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2816 gnulib changes.
2817
2818 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2819 and Paul Eggert <eggert@cs.ucla.edu>
2820
2821 Don't let Bison leak memory except when it complains.
2822 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2823 (spec_defines_file, dir_prefix): Now char *, not const char *,
2824 since they are freed.
2825 * src/files.c: Likewise.
2826 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2827 Likewise.
2828 (tr): Now operates in-place. All uses changed.
2829 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2830 values.
2831 (compute_file_name_parts, compute_output_file_names): Don't store
2832 read-only data in variables that will be freed.
2833 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2834 src_extension, and header_extension.
2835 (output_file_names_free): New public function to free
2836 spec_verbose_file, spec_graph_file, spec_defines_file,
2837 parser_file_name, and dir_prefix.
2838 * src/getargs.c (getargs): Don't store read-only data in variables that
2839 will be freed.
2840 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2841 (which previously existed but was unused), and quotearg_free.
2842 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2843 * src/muscle_tab.c: Likewise.
2844 (muscle_entry): Make the value char const *,
2845 and add a new storage member that is char * and can be freed.
2846 (muscle_entry_free): New private function.
2847 (muscle_init): Use it instead of free.
2848 (muscle_insert, muscle_grow): Update and use new storage member.
2849 (muscle_code_grow): Free the string passed to muscle_grow
2850 since it's not needed anymore.
2851 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2852 add a new `char *code' member.
2853 ("{...}"): Declare semantic type as code.
2854 * src/scan-code.h (translate_rule_action):
2855 (translate_symbol_action, translate_code, translate_action): Return
2856 `char const *' rather than `char *' since external code should not free
2857 these strings.
2858 * src/scan-code.l: Likewise.
2859 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2860 which is "{...}" in the parser.
2861 * tests/Makefile.am (maintainer-check-valgrind): Set
2862 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2863 Valgrind.
2864 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2865 complain.
2866 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2867 expecting a non-zero exit status sets --leak-check=summary and
2868 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2869 this case, and we don't want to hear about it.
2870
2871 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2872
2873 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2874 instead of from the template, to simplify configuration a bit.
2875 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2876 and m4/wint_t.m4, as they are needed with the latest gnulib.
2877
2878 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2879
2880 Disable unset/unused mid-rule value warnings by default, and recognize
2881 --warnings=midrule-values to enable them. Discussed starting at
2882 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2883 * NEWS (2.3a+): Mention.
2884 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2885 warnings): Add entry for midrule-values subargument.
2886 * src/reader.c (symbol_should_be_used): Don't return true just because
2887 the value is a set/used mid-rule value unless
2888 --warnings=midrule-values was specified.
2889 * tests/input.at (Unused values, Unused values before symbol
2890 declarations): Run tests with and without --warnings=midrule-values.
2891
2892 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2893 than LIST_FREE directly.
2894
2895 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2896
2897 Finish implementing --warnings=error, which should not be implied by
2898 --warnings=all (or by its synonyms -W and --warnings without
2899 subarguments).
2900 * src/complain.c (set_warning_issued): New function to report that
2901 warnings are being treated as errors and to record an error if so.
2902 Invoke...
2903 (warn_at, warn): ... here.
2904 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2905 "error - warnings are errors" does not appear above "all - all of the
2906 above".
2907 (getargs): For -W and --warnings without subarguments, don't let
2908 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2909 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2910
2911 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2912
2913 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2914 empty subargument list. For example: `bison --warnings= parser.y'.
2915
2916 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2917
2918 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2919 the parser header file so that gcc doesn't warn.
2920
2921 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2922
2923 Split the default %destructor/%printer into two kinds: <*> and <!>.
2924 Discussed starting at
2925 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2926 * NEWS (2.3a+): Mention.
2927 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2928 previous change today related to mid-rules.
2929 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2930 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2931 (TYPE_TAG_ANY): Add as <*>.
2932 (TYPE_TAG_NONE): Add as <!>.
2933 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2934 for <*> and <!>.
2935 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2936 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2937 * src/symlist.c (symbol_list_default_new): Split into tagged and
2938 tagless versions.
2939 (symbol_list_destructor_set, symbol_list_printer_set): Split
2940 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2941 SYMLIST_DEFAULT_TAGLESS.
2942 * src/symlist.h: Update symbol_list_default*_new prototypes.
2943 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2944 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2945 * src/symtab.c (default_destructor, default_destructor_location,
2946 default_printer, default_printer_location): Split each into tagged and
2947 tagless versions.
2948 (symbol_destructor_get, symbol_destructor_location_get,
2949 symbol_printer_get, symbol_printer_location_get): Implement tagged
2950 default and tagless default cases.
2951 (default_destructor_set, default_printer_set): Split each into tagged
2952 and tagless versions.
2953 * src/symtab.h: Update prototypes.
2954 * tests/actions.at (Default %printer and %destructor): Rename to...
2955 (Default tagless %printer and %destructor): ... this, and extend.
2956 (Per-type %printer and %destructor): Rename to...
2957 (Default tagged and per-type %printer and %destructor): ... this, and
2958 extend.
2959 (Default %printer and %destructor for user-defined end token): Extend.
2960 (Default %printer and %destructor are not for error or $undefined):
2961 Update.
2962 (Default %printer and %destructor are not for $accept): Update.
2963 (Default %printer and %destructor for mid-rule values): Extend.
2964 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2965 (Unused values with default %destructor): Extend.
2966
2967 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2968
2969 Don't apply the default %destructor/%printer to an unreferenced midrule
2970 value. Mentioned at
2971 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2972 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2973 like $@n instead of just @n so that the default %destructor/%printer
2974 logic doesn't see them as user-defined symbols.
2975 (symbol_is_dummy): Check for both forms of the name.
2976 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2977 name for which the midrule value is referenced in any action.
2978 * tests/actions.at (Default %printer and %destructor for mid-rule
2979 values): New test.
2980 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2981 for change to dummy symbol names.
2982
2983 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2984
2985 Warn about unset midrule $$ if the corresponding $n is used.
2986 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2987 $n usage.
2988 (packgram): Before invoking grammar_rule_check on any rule, make sure
2989 all actions have already been scanned in order to set `used' flags.
2990 Otherwise, checking that a midrule's $$ is set will not always work
2991 properly because the midrule check must forward-reference the midrule's
2992 parent rule.
2993 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2994 warning.
2995
2996 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2997
2998 More improvements to the documentation of the prologue alternatives:
2999 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3000 Bison manual.
3001 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3002 some text to clarify the relative importance of the new directives and
3003 to show how these directives may be viewed as code labels.
3004
3005 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3006
3007 Similar to the recently removed %before-header, add %code-top as the
3008 alternative to the pre-prologue. Mentioned at
3009 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3010 Also, let the prologue alternatives appear in the grammar section.
3011 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3012 (prologue_declaration): Move the existing prologue alternatives to...
3013 (grammar_declaration): ... here and add %code-top.
3014 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3015
3016 Clean up and extend documentation for the prologue alternatives.
3017 * NEWS (2.3a+): Describe prologue alternatives.
3018 * doc/bison.texinfo (Prologue): Move discussion of prologue
3019 alternatives to...
3020 (Prologue Alternatives): ... this new section, and extend it to discuss
3021 all 4 directives in detail.
3022 (Table of Symbols): Clean up discussion of prologue alternatives and
3023 add %code-top.
3024
3025 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3026
3027 DJGPP specific issues.
3028
3029 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3030 config.bat accordingly.
3031 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3032 * djgpp/config.site: Likewise.
3033
3034 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
3035
3036 Replace %*-header with %provides, %requires, %code. See discussion at
3037 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3038
3039 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3040 (b4_user_start_header): Remove.
3041 * data/glr.c: Use new macros instead of b4_*start_header
3042 and b4_*end_header.
3043 * data/glr.cc: Likewise.
3044 * data/lalr1.cc: Likewise.
3045 * data/push.c: Likewise.
3046 * data/yacc.c: Likewise.
3047
3048 * doc/bison.texinfo: Remove %before-header, rename
3049 %{start,end,after}-header to %requires, %provides, %code.
3050
3051 * src/parse-gram.y: Likewise (also rename token names accordingly).
3052 * src/scan-gram.l: Likewise.
3053 * tests/actions.at: Likewise.
3054
3055 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3056
3057 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3058 Problem reported by Joel E. Denny.
3059
3060 2006-10-14 Jim Meyering <jim@meyering.net>
3061
3062 (Sync from coreutils.)
3063 Work also when the working directory (with e.g. coreutils sources)
3064 is version controlled with git, rather than CVS.
3065 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3066 rather than CVS.
3067 In messages and comments, say e.g., "checked-out sources",
3068 rather than "CVS sources".
3069 (version_controlled_file): New function. Work for git as well as
3070 for CVS. Don't use grep's -q option.
3071 (slurp): Call it here, in place of CVS-specific code.
3072
3073 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3074
3075 Fix testsuite for ./configure --enable-gcc-warnings:
3076 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3077 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3078 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3079 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3080 * test/regression.at (Diagnostic that expects two alternatives):
3081 Likewise.
3082
3083 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3084
3085 * bootstrap.conf (gnulib_modules): Add config-h.
3086 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3087 worry about HAVE_CONFIG_H.
3088 * lib/abitset.c: Likewise.
3089 * lib/bitset.c: Likewise.
3090 * lib/bitset_stats.c: Likewise.
3091 * lib/bitsetv-print.c: Likewise.
3092 * lib/bitsetv.c: Likewise.
3093 * lib/ebitset.c: Likewise.
3094 * lib/get-errno.c: Likewise.
3095 * lib/lbitset.c: Likewise.
3096 * lib/subpipe.c: Likewise.
3097 * lib/timevar.c: Likewise.
3098 * lib/vbitset.c: Likewise.
3099 * lib/bitset.c: Include "bitset.h" first, to test interface.
3100 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3101 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3102 * lib/bitsetv.c: Include "bitsetv.h" first.
3103 * lib/get-errno.c: Include "get-errno.h" first.
3104 * m4/.cvsignore: Add config-h.m4.
3105 * tests/actions.at (Default %printer and %destructor for ...):
3106 Adjust expected line numbers in output to reflect removal of #if
3107 HAVE_CONFIG_H lines.
3108 * tests/glr-regression.at (Missed %merge type warnings when ...):
3109 Likewise.
3110 * tests/regression.at (Braced code in declaration in rules section):
3111 Likewise.
3112 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3113 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3114 Include <config.h> unconditionally.
3115
3116 * bootstrap: Sync from coreutils, as follows:
3117
3118 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3119
3120 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3121 variable was sometimes used without being initialized. This
3122 messed up the installation of the INSTALL file in some cases.
3123
3124 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3125
3126 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3127 --copy. Inspired by a suggestion from Bruno Haible.
3128
3129 2006-10-03 Jim Meyering <jim@meyering.net>
3130
3131 * bootstrap: Undo last change to this file, since now gnulib-tool
3132 sticks with the automake default in generating dependencies.
3133
3134 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3135
3136 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3137 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3138
3139 * doc/bison.1: Add copyright notice.
3140
3141 * data/glr.c: Don't include <stdarg.h>; not used.
3142
3143 * NEWS: The -g and --graph options now output graphs in Graphviz
3144 DOT format, not VCG format.
3145 * doc/bison.1: Likewise.
3146 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
3147 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3148 of this change in
3149 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
3150 * TODO: Remove Graphviz entry.
3151 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3152 remove vcg.c, vcg.h, vcg_defaults.h.
3153 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3154 * src/graphviz.c, src/graphviz.h: New files.
3155 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3156 * src/files.h: Make comment more generic.
3157 * src/main.c (main): Likewise.
3158 * src/print_graph.h: Likewise.
3159 * src/getargs.c (usage): Make usage description more generic.
3160 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3161 (static_graph, fgraph): Remove. All uses changed to pass
3162 arguments instead of sharing a static var.
3163 (print_core, print_actions, print_state, print_graph):
3164 Output graphviz format rather than VCG format.
3165 * tests/.cvsignore: Remove *.vcg; add *.dot.
3166 * tests/output.at: Expect *.dot files, not *.vcg files.
3167
3168 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3169 accommodates the 2006-10-08 change.
3170
3171 2006-10-11 Bob Rossi <bob@brasko.net>
3172
3173 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3174 (b4_yyssa, b4_yyerror_range): New macros.
3175 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3176 (yypvarsinit): Remove init of removed fields.
3177 (yypushparse): Remove use of removed fields; use new macros instead.
3178
3179 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3180
3181 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3182 in a push parser. Reindent slightly to match yacc.c better.
3183
3184 2006-10-11 Bob Rossi <bob@brasko.net>
3185
3186 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3187 yymsg_alloc fields.
3188 (yypvarsinit, yypushparse): Remove init of removed fields.
3189 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
3190
3191 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3192
3193 * THANKS: Add Paolo Bonzini and Bob Rossi.
3194
3195 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
3196
3197 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3198 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3199 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3200 b4_define_user_cde and uses): Remove.
3201 (b4_comment, b4_prefix, b4_sync_start): New.
3202 * data/bison.m4: New file, with most of the content removed from c.m4.
3203 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3204 * src/output.c (output_skeleton): Pass bison.m4.
3205 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3206 only if specified.
3207
3208 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3209
3210 Fix test failure reported by Tom Lane in
3211 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3212 and try to make such failures easier to catch in the future.
3213 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3214 that's now the caller's responsibility.
3215 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3216 Set yychar = YYEOF if it's negative.
3217 * tests/actions.at (yylex): Abort if asked to read past EOF.
3218 * tests/conflicts.at (yylex): Likewise.
3219 * tests/cxx-type.at (yylex): Likewise.
3220 * tests/glr-regression.at (yylex): Likewise.
3221 * tests/input.at (yylex): Likewise.
3222 * tests/regression.at (yylex): Likewise.
3223 * tests/torture.at (yylex): Likewise.
3224
3225 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3226
3227 Fix problems with translating English-language diagnostics.
3228 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3229 respect to bison-runtime pot generation. The YY_ stuff
3230 wasn't being captured.
3231 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3232 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3233 * runtime-po/POTFILES.in: Add data/push.c.
3234
3235 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3236
3237 Merge bootstrap changes from coreutils.
3238
3239 2006-09-28 Jim Meyering <jim@meyering.net>
3240
3241 Automatically generated dependencies are important even
3242 when all of the sources in a directory come from gnulib.
3243 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3244 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3245
3246 2006-09-23 Jim Meyering <jim@meyering.net>
3247
3248 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3249
3250 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3251
3252 * bootstrap: Add support for --force.
3253 (usage): New function. Describe usage less tersely.
3254 (CVS_only_file): New var.
3255
3256 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3257
3258 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3259 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3260 Adjust white space and comments to match GNU style better.
3261
3262 2006-09-20 Bob Rossi <bob@brasko.net>
3263
3264 * data/push.c (yyresult_get): Remove function.
3265 (YYPUSH_MORE): Add #define.
3266 (yypushparse): Modify return value.
3267
3268 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3269
3270 * stamp-h.in: Remove; no longer needed.
3271 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3272 Remove config.h, config.hin, intl (no longer created).
3273 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3274 stamp-h1.
3275
3276 Sync bootstrap from coreutils, as follows:
3277
3278 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3279
3280 * bootstrap (symlink_to_gnulib): New function.
3281 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3282 to copies-of-gnulib.
3283 (cp_mark_as_generated, slurp, gnulib_files):
3284 Avoid making a copy if it's the same as the old version.
3285 (gnulib_files): Add support for this variable (used by Bison).
3286
3287 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3288
3289 * src/getargs.c (usage): Rework to use conventions similar to
3290 coreutils, to make translation a bit easier and the code a bit
3291 smaller. Problem reported by Tim Van Holder.
3292
3293 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3294
3295 Use some of gnulib's new modules, taken from coreutils.
3296
3297 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3298 * bootstrap.conf: New file.
3299 (gnulib_modules): Add configmake, inttypes, unistd.
3300 (XGETTEXT_OPTIONS): Add complain, complain_at,
3301 fatal, fatal_at, warn, warn_at, unexpected_end.
3302 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3303 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3304 (gl_EARLY): Add.
3305 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3306 (gl_INIT): Add
3307 (GNULIB_AUTOCONF_SNIPPET): Remove.
3308 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3309 the pickiest.
3310 * lib/.cvsignore: Add inttypes_.h.
3311 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3312 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3313 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3314 no-longer-necessary initializations.
3315 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3316 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3317 use the unistd module.
3318 * src/system.h: Likewise.
3319 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3320 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3321 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3322 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3323 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3324 * src/system.h: Include inttypes.h unconditionally, now that we
3325 use the inttypes module. Don't bother to include stdint.h, since
3326 inttypes.h now does that for us.
3327 (LOCALEDIR): Remove, now that we use the configmake module.
3328 * src/getargs.c: Include configmake.h.
3329 * src/main.c: Likewise.
3330 * src/output.c: Likewise.
3331 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3332 not from $abs_top_builddir, since config.h moved.
3333
3334
3335 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3336 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3337
3338 * src/parse-gram.y (symbol_declaration): Don't put statements
3339 before declarations; it's not portable to C89.
3340 * src/scan-code.l (handle_action_at): Likewise.
3341
3342 * src/scan-code.l: Always initialize braces_level; the old code
3343 left it uninitialized and therefore had undefined behavior.
3344
3345 Don't attempt to redefine 'assert', since it runs afoul of
3346 systems where standard headers (mistakenly) include <assert.h>.
3347 Instead, define and use our own alternative, called 'aver'.
3348 * src/reader.c: Don't include assert.h, since we no longer
3349 use assert.
3350 * src/scan-code.l: Likewise.
3351 * src/system.h (assert): Remove, replacing with....
3352 (aver): New function, taking a bool arg. All uses changed.
3353 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3354 not merely an integer.
3355
3356 2006-09-15 Bob Rossi <bob@brasko.net>
3357
3358 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3359 * data/c.m4 (YYPUSH): New.
3360 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3361 * src/getargs.c (push_parser): New var.
3362 * src/getargs.h (push_parser): New declaration.
3363 * src/output.c (prepare): Add macro insertion of `push_flag'.
3364 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3365 (prologue_declaration): Parse %push-parser.
3366 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3367 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3368 list of removed lines from the traces observed.
3369 (AT_CHECK_CALC_LALR): Added push parser tests.
3370
3371 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3372
3373 * NEWS: Version 2.3a.
3374 * configure.ac (AC_INIT): Likewise.
3375
3376 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3377 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3378 due to header ordering dependencies. I don't know why the #define
3379 was there.
3380
3381 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3382 runtime cost when YYDEBUG is not defined, and so that some tests
3383 that used to fail now work. Problem and initial suggestion by
3384 Paolo Bonzini.
3385 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3386 * data/glr.cc (b4_parser_class_name):
3387 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3388 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3389 (yydebug_) [YYDEBUG]: New member.
3390 (yycdebug_): Now defined only if YYDEBUG.
3391 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3392 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3393 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3394 if YYYDEBUG.
3395 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3396 Define only if YYDEBUG.
3397 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3398 set_debug_level.
3399 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3400 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3401 AT_CHECK_CALC_GLR_CC that are working now.
3402
3403 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3404
3405 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3406 We don't need them in glr.cc, and glr.c defines them.
3407 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3408 assumes that defining it to anything is the same as defining
3409 it to 1. Problem reported by Paolo Bonzini.
3410
3411 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3412
3413 * data/c.m4 (b4_null, b4_case): Define.
3414 * src/output.c (prepare_symbols): Use b4_null.
3415 (user_actions_output): Use b4_case.
3416
3417 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3418
3419 * data/glr.c (b4_shared_declarations): Put start-header first,
3420 before any #includes that we generate, so that feature-test
3421 macros work. Problem reported by Michael Deutschmann in
3422 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3423 * data/lalr1.cc: Likewise.
3424 * doc/bison.texinfo (Prologue): Document that feature-test macros
3425 should be defined before any Bison declarations.
3426 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3427 that depend on location.hh after, not before, Bison decls, since
3428 we now include location.hh after the first user prologue.
3429
3430 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3431 Sander Brandenburg in
3432 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3433 Also, fix minor white space and comment issues.
3434 (Prologue): Mention that it's better to define feature-test macros
3435 before Bison declarations. Problem reported by Michael Deutschmann.
3436
3437 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3438 by Jim Meyering.
3439 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3440 This adjusts to recent gnulib changes.
3441
3442 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3443
3444 Finish implementation of per-type %destructor/%printer. Discussed
3445 starting at
3446 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3447 and
3448 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3449 * NEWS (2.3+): Add a description of this feature to the default
3450 %destructor/%printer description.
3451 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3452 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3453 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3454 list node contains a semantic type.
3455 * src/symtab.c, src/symtab.h: Extend with a table that associates
3456 semantic types with their %destructor's and %printer's.
3457 (semantic_type_from_uniqstr, semantic_type_get,
3458 semantic_type_destructor_set, semantic_type_printer_set): New functions
3459 composing the public interface of that table.
3460 (symbol_destructor_get, symbol_destructor_location_get,
3461 symbol_printer_get, symbol_printer_location_get): If there's no
3462 per-symbol %destructor/%printer, look up the per-type before trying
3463 the default.
3464 * tests/actions.at (Per-type %printer and %destructor): New test case.
3465 * tests/input.at (Default %printer and %destructor redeclared):
3466 Extend to check that multiple occurrences of %symbol-default in a
3467 single %destructor/%printer declaration is an error.
3468 (Per-type %printer and %destructor redeclared, Unused values with
3469 per-type %destructor): New test cases.
3470
3471 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3472
3473 Require default %destructor/%printer to be declared using
3474 %symbol-default instead of an empty symbol list, and start working on
3475 new per-type %destructor/%printer. Discussed at
3476 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3477 * NEWS (2.3+): Add %symbol-default to example.
3478 * bison.texinfo (Freeing Discarded Symbols): Likewise.
3479 (Table of Symbols): Add entry for %symbol-default.
3480 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3481 (generic_symlist, generic_symlist_item): New nonterminals for creating
3482 a list in which each item is a symbol, semantic type, or
3483 %symbol-default.
3484 (grammar_declaration): Use generic_symlist in %destructor and %printer
3485 declarations instead of symbols.1 or an empty list.
3486 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3487 for changes to symbol_list.
3488 * src/reader.c: Update for changes to symbol_list.
3489 * src/scan-code.l: Likewise.
3490 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3491 * src/symlist.c, src/symlist.h: Extend such that a list node may
3492 represent a semantic type or a %symbol-default in addition to just an
3493 ordinary symbol. Add switched functions for setting %destructor's and
3494 %printer's.
3495 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3496 %destructor/%printer declarations.
3497
3498 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3499
3500 Whether the default %destructor/%printer applies to a particular symbol
3501 isn't a question of whether the user *declares* that symbol (in %token,
3502 for example). It's a question of whether the user by any means
3503 *defines* the symbol at all (by simply using a char token, for
3504 example). $end is defined by Bison whereas any other token with token
3505 number 0 is defined by the user. The error token is always defined by
3506 Bison regardless of whether the user declares it with %token, but we
3507 may one day let the user define error as a nonterminal instead.
3508 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3509 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3510 the meaning of "user-defined".
3511 * tests/actions.at (Default %printer and %destructor for user-declared
3512 end token): Rename to...
3513 (Default %printer and %destructor for user-defined end token): ...
3514 this.
3515
3516 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3517 computation of whether to apply the default, don't maintain a list of
3518 every Bison-defined symbol. Instead, just check for a first character
3519 of '$', which a user symbol cannot have, and check for the error token.
3520
3521 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3522
3523 Don't apply the default %destructor or %printer to the error token,
3524 $undefined, or $accept. This change fits the general rule that the
3525 default %destructor and %printer are only for user-declared symbols,
3526 and it solves several difficulties that are described in the new test
3527 cases listed below.
3528 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3529 * tests/actions.at (Default %printer and %destructor are not for error
3530 or $undefined, Default %printer and %destructor are not for $accept):
3531 New test cases.
3532
3533 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3534
3535 Allow %start after the first rule.
3536 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3537 when parsing the first rule.
3538 (check_and_convert_grammar): Search for it here after all grammar
3539 declarations have been parsed. Skip midrules, which have dummy LHS
3540 nonterminals.
3541 * src/symtab.c (symbol_is_dummy): New function.
3542 * src/symtab.h (symbol_is_dummy): Declare it.
3543 * tests/input.at (%start after first rule): New test.
3544
3545 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3546
3547 Redo some of the previous commit: add back the ability to use
3548 non-aliased/undeclared string literals since it might be useful to
3549 those declaring %token-table.
3550 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3551 commit: don't worry about complaints from symbols_pack.
3552 * src/symtab.c (symbol_new, symbol_class_set,
3553 symbol_check_alias_consistency): Undo changes in previous commit: count
3554 each string literal as a new symbol and token, assign it a symbol
3555 number, and don't complain about non-aliased string literals.
3556 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3557 and token counts but does still set aliased tokens to the same number,
3558 symbol_pack_processor now leaves empty slots in the symbols array.
3559 Remove those slots.
3560 * tests/regression.at (Undeclared string literal): Remove test case
3561 added in previous commit since non-aliased string literals are allowed
3562 again.
3563 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3564 remove unnecessary string literal declarations.
3565 * tests/sets.at (Firsts): Likewise.
3566
3567 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3568
3569 Don't allow an undeclared string literal, but allow a string literal to
3570 be used before its declaration.
3571 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3572 symbols_pack complained.
3573 * src/symtab.c (symbol_new): Don't count a string literal as a new
3574 symbol.
3575 (symbol_class_set): Don't count a string literal as a new token, and
3576 don't assign it a symbol number since symbol_make_alias does that.
3577 (symbol_make_alias): It's not necessary to decrement the symbol and
3578 token counts anymore. Don't assume that an alias declaration occurs
3579 before any uses of the identifier or string, and thus don't assert that
3580 one of them has the highest symbol number so far.
3581 (symbol_check_alias_consistency): Complain if there's a string literal
3582 that wasn't declared as an alias.
3583 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3584 symbol_pack asserts that every token has been assigned a symbol number
3585 although undeclared string literals have not.
3586 * tests/regression.at (String alias declared after use, Undeclared
3587 string literal): New test cases.
3588 (Characters Escapes, Web2c Actions): Declare string literals as
3589 aliases.
3590 * tests/sets.at (Firsts): Likewise.
3591
3592 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3593
3594 In the grammar scanner, STRING_FINISH unclosed constructs and return
3595 them to the parser in order to improve error messages.
3596 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3597 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3598 * tests/input.at (Unclosed constructs): New test case.
3599 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3600 seen.
3601
3602 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3603 unused global.
3604
3605 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3606
3607 Handle string aliases for character tokens correctly.
3608 * src/symtab.c (symbol_user_token_number_set): If the token has an
3609 alias, check and set its alias's user token number instead of its own,
3610 which is set to indicate the alias. Previously, every occurrence of
3611 the character token in the grammar overwrote that alias indicator with
3612 the character code.
3613 * tests/input.at (String aliases for character tokens): New test.
3614
3615 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3616
3617 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3618
3619 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3620
3621 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3622 to prevent failures when building on older platforms.
3623 Check for autopoint failure.
3624 Set XGETTEXT_OPTIONS to values that check for C format strings,
3625 so that translators are warned about them (this also helps
3626 prevent core dumps).
3627
3628 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3629 function, since it simplifies our code a bit.
3630
3631 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3632 rather than -W, so we don't get bogus warnings about sign comparisons.
3633 Add -Wpointer-arith, since that warning is useful (it reports code
3634 that does not conform to C89 and that some compilers reject).
3635 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3636 since it's no longer needed.
3637
3638 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3639
3640 Clean up scanners a bit.
3641 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3642 definitions so gcc won't warn when obstack_for_string is unused.
3643 * src/scan-code.l: config.h and system.h are already #include'd by
3644 scan-code-c.c, so get rid of them here.
3645 * src/scan-gram.l: Likewise.
3646 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3647 definitions rather than duplicating the rest of it.
3648 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3649
3650 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3651
3652 Suppress signed/unsigned comparison warnings for yycheck.
3653 * data/c.m4 (b4_safest_int_type): New macro.
3654 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3655 a signed int type, cast it to b4_safest_int_type first.
3656 * data/yacc.c: Likewise.
3657 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3658 also overwritten.
3659
3660 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3661
3662 * doc/bison.texinfo: Fix some typos.
3663
3664 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3665
3666 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3667 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3668
3669 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3670 the latest gnulib does this a different way.
3671 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3672 translation was patched, so stop omitting it.
3673
3674 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3675
3676 Enable declaration of default %printer/%destructor. Make the parser
3677 use these for all user-declared grammar symbols for which the user does
3678 not declare a specific %printer/%destructor. Thus, the parser uses it
3679 for token 0 if the user declares it but not if Bison generates it as
3680 $end. Discussed starting at
3681 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3682 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3683 and
3684 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3685 * NEWS (2.3+): Mention.
3686 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3687 declare a %destructor for a mid-rule's semantic value. It's just
3688 impossible to declare one specific to it.
3689 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3690 code. Describe default %destructor form.
3691 * src/parse-gram.y (grammar_declaration): Parse default
3692 %printer/%destructor declarations.
3693 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3694 and symbol_destructor_location_get rather than accessing the destructor
3695 and destructor_location members of struct symbol.
3696 (symbol_printers_output): Likewise but for %printer's.
3697 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3698 again.
3699 * src/symtab.c (default_destructor, default_destructor_location,
3700 default_printer, default_printer_location): New static global
3701 variables to record the default %destructor and %printer.
3702 (symbol_destructor_get, symbol_destructor_location_get,
3703 symbol_printer_get, symbol_printer_location_get): New functions to
3704 compute the appropriate %destructor and %printer for a symbol.
3705 (default_destructor_set, default_printer_set): New functions to set the
3706 default %destructor and %printer.
3707 * src/symtab.h: Prototype all those new functions.
3708 * tests/actions.at (Default %printer and %destructor): New test to
3709 check that the right %printer and %destructor are called, that they're
3710 not called for $end, and that $$ and @$ work correctly.
3711 (Default %printer and %destructor for user-declared end token): New
3712 test to check that the default %printer and %destructor are called for
3713 a user-declared end token.
3714 * tests/input.at (Default %printer and %destructor redeclared, Unused
3715 values with default %destructor): New tests to check related grammar
3716 warnings and errors.
3717
3718 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3719
3720 Clean up handling of %destructor for the end token (token 0).
3721 Discussed starting at
3722 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3723 and
3724 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3725
3726 Make the skeletons consistent in how they pop the end token and invoke
3727 its %destructor.
3728 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3729 state, which has token number 0, since this would invoke the
3730 %destructor for the end token.
3731 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3732 until after shifting the end token, or else it won't be popped.
3733 * data/yacc.c (yyparse): Likewise.
3734
3735 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3736 it's the end token. Upon termination, destroy an unshifted lookahead
3737 even when it's the end token.
3738 * data/lalr1.cc (yy::parser::parse): Likewise.
3739 * data/yacc.c (yyparse): Likewise.
3740
3741 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3742 value warnings for the end token when the user gives the end token a
3743 %destructor.
3744
3745 * tests/actions.at (Printers and Destructors): Test all the above.
3746
3747 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3748
3749 Update to latest gnulib and gettext versions.
3750 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3751 Add fopen-safer.
3752 (gnulib_files): Add m4/warning.m4. Don't worry about files
3753 overwritten by autopoint.
3754 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3755 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3756 rejects them.
3757 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3758 so that we can remove the intl files at a better time.
3759 (intl_files_to_remove): Remove aclocal.m4, since it gets
3760 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3761 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3762 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3763 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3764 Remove datarootdir hack; no longer needed.
3765 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3766 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3767 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3768 strdup.h.
3769 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3770 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3771
3772 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3773
3774 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3775 it with --assume-autoconf='latest-stable'.
3776
3777 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3778
3779 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3780 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3781 YYSTYPE' and `{'.
3782 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3783 those from muscle_tab.c since the old ones are misleading.
3784
3785 2006-07-13 Akim Demaille <akim@epita.fr>
3786
3787 Support %define "KEY" {VALUE}.
3788 * src/scan-code.h, src/scan-code.l (translate_action)
3789 (translate_rule_action, translate_symbol_action, translate_code):
3790 Return char *, not const char *.
3791 * src/parse-gram.y (declaration): Rename as...
3792 (prologue_declaration): this.
3793 (string_content): Remove this nonterminal, use STRING.
3794 (braceless, content, content.opt): New nonterminal.
3795 Use them.
3796 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3797 as value.
3798 * src/scan-gram.l (getargs.h): Don't include it.
3799
3800 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3801
3802 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3803 rather than a for-loop that declares a local bool variable. This
3804 should work around a compatibility problem with a Cray x1e C++
3805 compiler reported by Hung Nguyen in
3806 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3807 The for-loop was introduced in the 2004-11-17 change but I don't
3808 know why it was needed.
3809
3810 2006-07-12 Akim Demaille <akim@epita.fr>
3811
3812 * data/c.m4: Comment changes.
3813
3814 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
3815
3816 * src/complain.c (error_message, ERROR_MESSAGE): New.
3817 To factor...
3818 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3819 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3820
3821 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3822
3823 * NEWS: Instead of %union, you can define and use your own union type
3824 YYSTYPE if your grammar contains at least one <type> tag.
3825 Your YYSTYPE need not be a macro; it can be a typedef.
3826 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3827 (Union Decl, Decl Summary): Document this.
3828 * data/glr.c (YYSTYPE): Implement this.
3829 * data/glr.cc (YYSTYPE): Likewise.
3830 * data/lalr1.cc (YYSTYPE): Likewise.
3831 * data/yacc.c (YYSTYPE): Likewise.
3832 * src/output.c (prepare): Output tag_seen_flag.
3833 * src/parse-gram.y (declaration, grammar_declaration):
3834 Use 'union_seen' rather than 'typed' to determine whether
3835 %union has been seen, since grammars can now be typed without
3836 %union.
3837 (symbol_declaration, type.opt, symbol_def):
3838 Keep track of whether a tag has been seen.
3839 * src/reader.c (union_seen, tag_seen): New vars.
3840 (typed): remove.
3841 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3842 * src/scan-code.l (untyped_var_seen): New variable.
3843 (handle_action_dollar): Adjust to above changes.
3844 (handle_action_dollar, handle_action_at):
3845 Improve overflow checking for outlandish numbers.
3846 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3847 avoid new diagnostics generated by above changes.
3848 * tests/regression.at (YYSTYPE typedef): Add test to check
3849 for type tags without %union.
3850
3851 * src/symlist.c (symbol_list_length): Return int, not unsigned
3852 int, since callers expect int. This may need to get revisited
3853 once we have proper integer overflow checking.
3854
3855 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3856 object is now static.
3857
3858 * src/getargs.c (flags_argmatch): Return void, not int,
3859 to pacify ./configure --enable-gcc-warnings.
3860
3861 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3862 since last_string is already defined to FLEX_PREFIX (last_string).
3863
3864 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3865
3866 Implement --warnings/-W.
3867 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3868 replaced by...
3869 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3870 Adjust callers.
3871 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3872 (warnings_args, warnings_types): New.
3873 (getargs, short_options, long_options): Accept -W/--warnings.
3874 Sort the options by alphabetical order, upper case letter right
3875 before its lower case.
3876
3877 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3878
3879 Change %merge result type clash warnings to errors. Discussed at
3880 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3881 * src/reader.c (record_merge_function_type): Use complain_at.
3882 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3883 declared later): Update test case results.
3884
3885 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3886
3887 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3888 to be in alphabetical order.
3889 (trace_args): Spelling fixes.
3890
3891 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3892
3893 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3894 so they don't collide with user-defined macros.
3895 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3896 this was never guaranteed, and now that we're using gnulib stdint,
3897 which defines int_fast16_t to long int, the problem is exposed.
3898
3899 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3900
3901 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3902 need the full POSIX semantics (and weren't implementing them
3903 anyway).
3904
3905 Adjust to Autoconf 2.60 and today's gnulib.
3906 * bootstrap (gnulib_modules): Add stdint.
3907 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3908 no longer copies it.
3909 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3910 since stdint needs the former and wcwidth (which is now required
3911 by mbswidth) needs the latter.
3912 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3913 work around a compatibility glitch between gettext 0.14.6 and
3914 Autoconf 2.60.
3915 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3916 Do not check for uintptr_t, since new stdint module does the right
3917 thing.
3918 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3919 Add stdint.h, stdint_.h, wcwidth.h.
3920 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3921 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3922 stdint.m4, wchar_t.m4, wcwidth.m4.
3923 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3924 usual order for ../lib/*.h files.
3925 (file_name_split): Use last_component, not base_name, to adjust
3926 to gnulib changes.
3927 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3928 for ../lib/*.h files.
3929 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3930 Define unconditionally, since we now assume the stdint module.
3931 * src/scan-skel.l: Include <dirname.h>.
3932 (BASE_QPUTS): Use last_component, not base_name.
3933 * src/system.h: Include <unlocked-io.h> in the usual order
3934 for ../lib/*.h files. Include <stdint.h> unconditionally,
3935 since we now use the stdint module.
3936 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3937 HAVE_UINTPTR_T, since we now use the stdint module.
3938 (base_name): Remove decl, since files now include <dirname.h>
3939 to get the decl.
3940
3941 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3942
3943 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3944 New, default to 1.
3945 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3946 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3947 default.
3948 * tests/calc.at: Adjust.
3949
3950 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3951
3952 * data/c.m4 (b4_basename): New.
3953 (b4_syncline): Also output the location of its invocation (from
3954 the skeleton).
3955 (b4_user_action, b4_define_user_action, b4_user_actions)
3956 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3957 (b4_user_stype): New.
3958 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3959
3960 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3961
3962 In the grammar file, the first column is 1 not 0 on the first line as
3963 on every other line.
3964 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3965 * tests/input.at (Torturing the Scanner): Update output.
3966
3967 * src/scan-gram.l (scanner_cursor): Declare it static.
3968
3969 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3970
3971 In warnings, say "previous declaration" rather than "first
3972 declaration".
3973 * src/symtab.c (redeclaration): Do that here.
3974 * src/reader.c (record_merge_function_type): In the case of a result
3975 type clash, report the previous declaration rather than the very first
3976 one in the grammar file.
3977 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3978 declared later): Add a third declaration to check this behavior.
3979 * tests/input.at (Incompatible Aliases): Update output.
3980
3981 2006-06-27 Akim Demaille <akim@epita.fr>
3982
3983 * doc/Doxyfile.in: New.
3984 * doc/Makefile.am: Use it.
3985 * src/lalr.h, src/symtab.h: Initial doxygenation.
3986
3987 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3988
3989 Don't miss %merge result type warnings just because the LHS types are
3990 declared after the %merge. This continues the effort of the previous
3991 patch.
3992 * src/reader.c (get_merge_function): Don't set the merger type yet.
3993 (record_merge_function_type): New function for setting the merger type
3994 and checking for clashes.
3995 (grammar_current_rule_merge_set): Set the location of the %merge for
3996 the current rule.
3997 (packgram): Invoke record_merge_function_type for each rule now that
3998 all symbol type declarations have been parsed.
3999 * src/reader.h (merger_list.type_declaration_location): New member
4000 storing the location of the first %merge from which the type for this
4001 merging function was derived.
4002 * src/symlist.h (symbol_list.merger_declaration_location): New member
4003 storing the location of a rule's %merge, if any.
4004 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4005 declared later): New test to catch the error fixed by the above patch.
4006
4007 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4008
4009 Get action warnings (grammar_rule_check) right even when symbol
4010 declarations appear after the rules. Discussed at
4011 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4012 and
4013 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4014 Don't mistake the type of $$ in a midrule to be that of its parent
4015 rule's $$.
4016 * src/reader.c (grammar_current_rule_end): Don't invoke
4017 grammar_rule_check yet since not all symbol declarations may have been
4018 parsed yet.
4019 (grammar_midrule_action): Likewise.
4020 Don't record whether the midrule's $$ has been used yet since actions
4021 haven't been translated yet.
4022 Record the midrule's parent rule and its RHS index within the parent
4023 rule.
4024 (grammar_current_rule_action_append): Don't translate the action yet
4025 since not all symbol declarations may have been parsed yet and, thus,
4026 warnings about types for $$, $n, @$, and @n can't be reported yet.
4027 (packgram): Translate the action and invoke grammar_rule_check now that
4028 all symbol declarations have been parsed.
4029 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4030 after parsing the entire grammar file, the symbol list here in the case
4031 of a midrule is actually the midrule's empty RHS, so reference its
4032 parent rule's RHS where necessary.
4033 On the other hand, now that you can already know it's a midrule, you
4034 aren't forced to think $$ has the same type as its parent rule's $$.
4035 (handle_action_at): In the case of a midrule, reference the parent rule
4036 where necessary.
4037 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4038 members.
4039 (symbol_list_length): Now that this is invoked after all rules have
4040 been parsed, a NULL symbol (rather than a NULL symbol list node)
4041 terminates a rule. symbol_list_print already does this correctly.
4042 * src/symlist.h (symbol_list.midrule_parent_rule,
4043 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4044 remember their relationships with their parents.
4045 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4046 fixed by the above patch.
4047 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4048 implementing...
4049 (Unused values): ... this old test case and...
4050 (Unused values before symbol declarations): ... this new test case.
4051 This one is the same as `Unused values' except that all symbol
4052 declarations appear after the rules in order to catch the rest of the
4053 errors fixed by the above patch.
4054
4055 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4056
4057 More cleanup.
4058 * src/reader.c (current_rule): Declare it static since it's no longer
4059 used outside this file.
4060 (grammar_current_rule_action_append): Remove redundant arguments from
4061 translate_rule_action invocation.
4062 * src/reader.h (current_rule): Remove this unused extern.
4063 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4064 * src/scan-code.l (translate_rule_action): Likewise.
4065
4066 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4067
4068 Clean up yesterday's patch.
4069 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4070 to...
4071 * src/reader.c (grammar_current_rule_action_append): ... here for
4072 consistency with grammar_current_rule_symbol_append.
4073 * tests/regression.at (Braced code in declaration in rules section):
4074 Make yyerror and yylex static as usual.
4075
4076 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4077
4078 Fix bug that mistakes braced code in a declaration in the rules section
4079 to be a rule action. Mentioned at
4080 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4081 * src/scan-gram.l: Move midrule action detection from the start of the
4082 scanning of any braced code to...
4083 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4084 action. For readability, use $2 and @2 rather than the equivalent
4085 global variables.
4086 * tests/regression.at (Braced code in declaration in rules section):
4087 New test to catch the error fixed by the above patch.
4088
4089 Work on code readability some.
4090 * src/scan-code.l (current_rule): Get rid of this misleading and
4091 redundant declaration: it's actually extern'ed in reader.h.
4092 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4093 translate_action): Add a rule argument and use it instead of the global
4094 current_rule.
4095 (translate_rule_action): This already receives current_rule through an
4096 argument, so pass it on to translate_action instead of assigning
4097 current_rule to current_rule.
4098 (translate_symbol_action, translate_code): Pass rule = NULL to
4099 translate_action.
4100
4101 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4102
4103 Rename %before-definitions to %start-header and %after-definitions to
4104 %end-header. Don't use these declarations to separate pre-prologue
4105 blocks from post-prologue blocks. Add new order-independent
4106 declarations %before-header and %after-header as alternatives to the
4107 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4108 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4109 * NEWS (2.3+): Update for these changes.
4110 * data/glr.c (b4_before_definitions): Update to...
4111 (b4_start_header): ... this.
4112 (b4_after_definitions): Update to...
4113 (b4_end_header): ... this.
4114 * data/glr.cc: Likewise.
4115 * data/lalr1.cc: Likewise.
4116 * data/yacc.c: Likewise.
4117 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4118 prologue blocks with %*-header declarations.
4119 (Calc++ Parser): Likewise.
4120 (Decl Summary): Update names.
4121 (Table of Symbols): Update description.
4122 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4123 (PERCENT_END_HEADER): ... this.
4124 (PERCENT_BEFORE_DEFINITIONS): Update to...
4125 (PERCENT_START_HEADER): ... this.
4126 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4127 (declaration): Update token names and m4 macro names.
4128 When parsing %end-header and %start-header, invoke translate_code
4129 before muscle_code_grow, and no longer set global booleans to remember
4130 whether these declarations have been seen.
4131 Parse new %after-header and %before-header.
4132 * src/reader.c (before_definitions, after_definitions): Remove.
4133 (prologue_augment): Accept a new bool argument to specify whether to
4134 augment the pre-prologue or post-prologue.
4135 * src/reader.h (before_definitions, after_definitions): Remove these
4136 extern's.
4137 (prologue_augment): Add new bool argument.
4138 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4139 (PERCENT_END_HEADER): ... this.
4140 (PERCENT_BEFORE_DEFINITIONS): Update to...
4141 (PERCENT_START_HEADER): ... this.
4142 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4143 * tests/actions.at (Printers and Destructors): Update names.
4144
4145 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4146
4147 Add comparison operators for C++ location classes. Discussed at
4148 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4149 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4150 declaration indicating whether filename_type has an operator==. If
4151 filename_type is `std::string', it defaults to `1', `0' otherwise.
4152 * data/location.cc: Iff b4_define_location_comparison is `1', add
4153 operator== and operator!= for class position and for class location.
4154
4155 Some minor fixes.
4156 * src/scan-action.l: Remove unused file.
4157 * src/symtab.c (symbol_printer_set): Use printer_location not
4158 destructor_location.
4159 * src/symtab.h (struct symbol): Replace incorrect source comment for
4160 printer members.
4161 * tests/input.at (Incompatible Aliases): Update output with correct
4162 printer location.
4163
4164 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4165
4166 Don't put the pre-prologue in the header file. For the yacc.c code
4167 file and the glr.c header and code files, move the pre-prologue before
4168 the token definitions. Add new %before-definitions and
4169 %after-definitions to declare code that will go in both the header file
4170 and code file. Discussed at
4171 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4172 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4173 and
4174 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4175 * NEWS (2.3+): Describe these changes.
4176 * data/glr.c (b4_pre_prologue): Move from within to before...
4177 (b4_shared_declarations): ... this.
4178 Add new b4_before_definitions before b4_token_enums.
4179 Add new b4_after_definitions at the end.
4180 * data/glr.cc (b4_pre_prologue): Replace with...
4181 (b4_before_definitions): ... this in the header file.
4182 (b4_after_definitions): New near the end of the header file.
4183 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4184 code file right before including the header file.
4185 (b4_before_definitions): New in the previous position of
4186 b4_pre_prologue in the header file.
4187 (b4_after_definitions): New near the end of the header file.
4188 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4189 (b4_token_enums_defines): In the code file, move to right before
4190 YYSTYPE for consistency with the header file.
4191 (b4_before_definitions): New right before b4_token_enums_defines in
4192 both the header and code file.
4193 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4194 header and code file.
4195 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4196 of prologues for %union dependencies.
4197 (Decl Summary): In %defines description, mention the effect of
4198 %before-definitions and %after-definitions on the header file.
4199 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4200 than in the pre-prologue so that make check succeeds.
4201 (Table of Symbols): Add entries for %before-definitions and
4202 %after-definitions.
4203 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4204 %before-definitions.
4205 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4206 (declaration): Parse those declarations and append to
4207 b4_before_definitions and b4_after_definitions, respectively.
4208 * src/reader.c (before_definitions, after_definitions): New bools to
4209 track whether those declarations have been seen.
4210 (prologue_augment): Add to the post-prologue if %union,
4211 %before-definitions, or %after-definitions has been seen.
4212 * src/reader.h (before_definitions, after_definitions): New extern's.
4213 * src/scan-gram.l: Scan the new declarations.
4214 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4215 prologue block in a %before-definitions or a %after-definitions based
4216 on whether the %union is declared.
4217 * tests/regression.at (Early token definitions with --yacc, Early token
4218 definitions without --yacc): Move tests for token definitions into the
4219 post-prologue since token names are no longer defined in the
4220 pre-prologue.
4221
4222 2006-06-20 Akim Demaille <akim@epita.fr>
4223
4224 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4225 (symbol_get): Use it.
4226 * src/parse-gram.y: Use it.
4227
4228 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4229
4230 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4231 build succeeds when configured with --enable-gcc-warnings.
4232
4233 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4234
4235 * src/parse-gram.y (char_name): New function.
4236 (CHAR, STRING, string_content): For %printer, properly escape.
4237 (ID): Prefer fputs to fprintf.
4238 (id): Reindent to be consistent with other rules.
4239 Properly quote char.
4240
4241 The Translation Project changed its way of publishing translations
4242 to maintainers. I haven't received any responses to my request
4243 for supporting the old way, or for documenting the new way. I
4244 have modified 'bootstrap' to use screen scraping
4245 (in this case, HTML scraping). This is unreliable and inelegant,
4246 but I don't see any better way. Yuck.
4247 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4248 (get_translations): New function, which uses HTML scraping to
4249 deduce locations of latest translations.
4250 Use this function to grab both bison and bison-runtime .po files.
4251 Don't bother priming the pump for the runtime-po domain any more,
4252 as it's now translated better than bison is.
4253
4254 2006-06-19 Akim Demaille <akim@epita.fr>
4255
4256 * src/scan-gram.l: No longer "parse" things after `%union' until
4257 `{'. Rather, return a single "%union" token.
4258 No longer make symbols: return strings, and leave the conversion
4259 to symbols to the parser.
4260 (SC_PRE_CODE, token_type): Remove.
4261 * src/parse-gram.y (%union): New field `character'.
4262 Sort tokens.
4263 (CHAR): New token.
4264 (ID, ID_COLON): Now that the scanner no longer makes them
4265 identifiers, adjust all uses to invoke symbol_get.
4266 (id_colon): New, wraps the conversion from string to symbol.
4267 (%union): Accept a possible union_name.
4268 (symbol): Now can be a char.
4269 * data/c.m4 (b4_union_name): Leave a default value.
4270 * data/glr.c, data/yacc.c: Use it.
4271
4272 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4273
4274 For associating token numbers with token names for "yacc.c", don't use
4275 #define statements unless `--yacc' is specified; always use enum
4276 yytokentype. Most important discussions start at:
4277 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4278 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4279 and
4280 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4281 * NEWS (2.3+): Mention.
4282 * data/c.m4 (b4_yacc_if): New.
4283 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4284 token #define's.
4285 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4286 on token name definitions.
4287 * src/getargs.c (usage): Capitalize `Yacc' in English.
4288 * src/output.c (prepare): Define b4_yacc_flag.
4289 * tests/regression.at (Early token definitions): Test that tokens names
4290 are defined before the pre-prologue not just before the post-prologue.
4291 Remove this test case and copy to...
4292 (Early token definitions with --yacc): ... this to test #define's.
4293 (Early token definitions without --yacc): ... and this to test enums.
4294
4295 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4296
4297 * NEWS: Reword the post-2.3 change to not be so optimistic about
4298 removing the old "look-ahead" spelling.
4299 Update previous look-ahead/lookahead change reports.
4300 * REFERENCES: look-ahead -> lookahead (since that's
4301 what he actually wrote).
4302 * doc/refcard.tex: look ahead -> lookahead,
4303 look-ahead -> lookahead
4304
4305 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4306
4307 For consistency, use `lookahead' instead of `look-ahead' or
4308 `look_ahead'. Discussed starting at
4309 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4310 and then at
4311 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4312 * NEWS: For the next release, note the change to `--report'.
4313 * TODO, doc/bison.1: Update English.
4314 * doc/bison.texinfo: Update English.
4315 (Understanding Your Parser, Bison Options): Document as
4316 `--report=lookahead' rather than `--report=look-ahead'.
4317 * src/conflicts.c: Update English in comments.
4318 (lookahead_set): Rename from look_ahead_set.
4319 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4320 (resolve_sr_conflict): Rename local look_ahead_tokens to
4321 lookahead_tokens, and update other uses.
4322 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4323 count_rr_conflicts, conflicts_free): Update uses.
4324 * src/getargs.c (report_args): Move "lookahead" before alternate
4325 spellings.
4326 (report_types): Update uses.
4327 (usage): For `--report' usage description, state `lookahead' spelling
4328 rather than `look-ahead'.
4329 * src/getargs.h (report.report_lookahead_tokens): Rename from
4330 report_look_ahead_tokens.
4331 * src/lalr.c: Update English in comments.
4332 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4333 (state_lookahead_tokens_count): Rename from
4334 state_look_ahead_tokens_count.
4335 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4336 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4337 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4338 Update other uses.
4339 Update English in output.
4340 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4341 * src/print.c: Update English in comments.
4342 (lookahead_set): Rename from look_ahead_set.
4343 (print_reduction): Rename argument lookahead_token from
4344 look_ahead_token.
4345 (print_core, state_default_rule, print_reductions, print_results):
4346 Update uses.
4347 * src/print_graph.c: Update English in comments.
4348 (print_core): Update uses.
4349 * src/state.c: Update English in comments.
4350 (reductions_new): Update uses.
4351 (state_rule_lookahead_tokens_print): Rename from
4352 state_rule_look_ahead_tokens_print, and update other uses.
4353 * src/state.h: Update English in comments.
4354 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4355 (state_rule_lookahead_tokens_print): Rename from
4356 state_rule_look_ahead_tokens_print.
4357 * src/tables.c: Update English in comments.
4358 (conflict_row, action_row): Update uses.
4359 * tests/glr-regression.at
4360 (Incorrect lookahead during deterministic GLR,
4361 Incorrect lookahead during nondeterministic GLR): Rename
4362 print_look_ahead to print_lookahead.
4363 * tests/torture.at: Update English in comments.
4364 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4365 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4366 (Many lookahead tokens): Update uses.
4367 * data/glr.c: Update English in comments.
4368 * lalr1.cc: Likewise.
4369 * yacc.c: Likewise.
4370 * src/conflicts.h: Likewise.
4371 * src/lalr.h: Likewise.
4372 * src/main.c: Likewise.
4373 * src/output.c: Likewise.
4374 * src/parse-gram.c: Likewise.
4375 * src/tables.h: Likewise.
4376 * tests/calc.at: Likewise.
4377
4378 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4379
4380 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4381
4382 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4383
4384 * TODO: Add request from Nelson H. F. Beebe to be able to install
4385 Bison without installing the yacc script.
4386
4387 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4388
4389 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4390 and yytext if they're already #define'd.
4391 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4392 * src/scan-code-c.c: ... here.
4393 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4394 <config.h>.
4395
4396 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4397
4398 Get Bison to build again when configured with --enable-gcc-warnings.
4399 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4400 missing #include's.
4401 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4402 loc argument as it shadows a global.
4403 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4404 invocation.
4405
4406 * src/.cvsignore: Add scan-code.c.
4407
4408 2006-06-07 Akim Demaille <akim@epita.fr>
4409
4410 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4411 to...
4412 * src/scan-code.l: here.
4413 * tests/input.at (Torturing the Scanner): Fix another location
4414 error.
4415
4416 2006-06-07 Akim Demaille <akim@epita.fr>
4417
4418 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4419
4420 2006-06-06 Akim Demaille <akim@epita.fr>
4421
4422 Extract the parsing of user actions from the grammar scanner.
4423 As a consequence, the relation between the grammar scanner and
4424 parser is much simpler. We can also split "composite tokens" back
4425 into simple tokens.
4426 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4427 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4428 rename as...
4429 * src/location.h, src/location.c (add_column_width)
4430 (location_compute): these.
4431 Fix the column count: the initial column is 0.
4432 (location_print): Be robust to ending column being 0.
4433 * src/location.h (boundary_set): New.
4434 * src/main.c: Adjust to scanner_free being renamed as
4435 gram_scanner_free.
4436 * src/output.c: Include scan-code.h.
4437 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4438 Use boundary_set.
4439 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4440 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4441 which is now, again, a separate token.
4442 Adjust all dependencies.
4443 Whereever actions with $ and @ are used, use translate_code.
4444 (action): Remove this nonterminal which is now useless.
4445 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4446 (grammar_current_rule_action_append): Use translate_code.
4447 (packgram): Bound check ruleno, itemno, and rule_length.
4448 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4449 (last_string, last_braced_code_loc, max_left_semantic_context)
4450 (scanner_initialize, scanner_free, scanner_last_string_free)
4451 (gram_out, gram_lineno, YY_DECL_): Move to...
4452 * src/scan-gram.h: this new file.
4453 (YY_DECL): Rename as...
4454 (GRAM_DECL): this.
4455 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4456 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4457 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4458 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4459 Move these declarations, and...
4460 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4461 these to...
4462 * src/flex-scanner.h: this new file.
4463 * src/scan-gram.l (rule_length, rule_length_overflow)
4464 (increment_rule_length): Remove.
4465 (last_braced_code_loc): Rename as...
4466 (gram_last_braced_code_loc): this.
4467 Adjust to the changes of the parser.
4468 Move all the handling of $ and @ into...
4469 * src/scan-code.l: here.
4470 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4471 (handle_action_dollar, handle_action_at): Move to...
4472 * src/scan-code.l: here.
4473 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4474 scan-code.h, scan-code-c.c, scan-gram.h.
4475 (EXTRA_bison_SOURCES): Add scan-code.l.
4476 (BUILT_SOURCES): Add scan-code.c.
4477 (yacc): Be robust to white spaces.
4478
4479 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4480 * tests/regression.at: Adjust the column numbers.
4481 * tests/regression.at: Adjust the error message.
4482
4483 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4484
4485 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4486 Use Akim's wording from
4487 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4488
4489 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4490
4491 Between Bison releases, manually append `+' to the previous Bison
4492 release number, and use that as a signal to automatically print the
4493 ChangeLog's CVS Id keyword from --version. Discussed starting at
4494 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4495 * ChangeLog: Add Id header.
4496 * configure.ac (AC_INIT): Append `+' to `2.3'.
4497 * src/.cvsignore: Add revision.c.
4498 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4499 (BUILT_SOURCES): Add revision.c.
4500 (revision.c): New target rule. This file defines a new global variable
4501 named revision. It initializes it with either the Id from ChangeLog
4502 or, if VERSION doesn't contain `+', with the empty string.
4503 * src/getargs.c (version): Print the value of revision.
4504 * src/revision.h: Extern revision.
4505
4506 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4507
4508 * NEWS: Version 2.3.
4509 * configure.ac (AC_INIT): Likewise.
4510
4511 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4512
4513 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4514 with no arguments, not as an object-like macro. This is for
4515 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4516 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4517 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4518 Document this.
4519
4520 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4521
4522 * src/getargs.c (usage): Back out yesterday's modification of the
4523 --help output so that we don't have to wait for translation before
4524 releasing 2.3.
4525
4526 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4527
4528 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4529 Problem reported by Akim Demaille.
4530
4531 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4532
4533 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4534
4535 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4536
4537 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4538 generated source code. Problem reported by Frans Englich in
4539 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4540
4541 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4542
4543 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4544 shell, not within 'make', so that 'make' by an ordinary builder
4545 (using GNU make) does not worry about configuring gzip. This also
4546 works around a bug reported independently by Keith Thompson and by
4547 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4548 stderr rather than stdout, messing up the build logs.
4549
4550 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4551
4552 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4553 to make sure that YYID will never be unused. This fixes a 'make
4554 maintainer-check' failure caused by the recent changes to the 'Trivial
4555 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4556 not used.
4557 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4558
4559 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4560
4561 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4562 state before an empty RHS is always resolved here. Only the location
4563 of that state is guaranteed to be resolved, and that's enough. This
4564 fixes the remaining bug reported by Derek M. Jones in
4565 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4566 * tests/glr-regression.at (Uninitialized location when reporting
4567 ambiguity): Test the above case.
4568 Also, the embedded comments in this test case claim it checks the case
4569 of an empty RHS that has inherited the initial location. However, the
4570 corresponding LHS was already resolved, so yyresolveLocations didn't
4571 actually have reason to modify it. Fix this by forcing
4572 nondeterministic operation at the beginning of the parse.
4573
4574 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4575
4576 * data/c.m4 (b4_yy_symbol_print_generate):
4577 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4578 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4579 of the bugs reported today by Derek M Jones in
4580 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4581 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4582 defined to be a type name without parens or brackets.
4583 (Location Type): Similarly for YYLTYPE.
4584 * tests/regression.at (Trivial grammars): Put in a test for this
4585 bug that will be caught by 'make maintainer-check' (though not,
4586 alas, by 'make check' unless your compiler is picky).
4587
4588 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4589
4590 * NEWS: Version 2.2.
4591 * configure.ac (AC_INIT): Likewise.
4592
4593 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4594
4595 * data/glr.c (yyreportTree): Make room in yystates for the state
4596 preceding the RHS. This fixes the segmentation fault reported by Derek
4597 M. Jones in
4598 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4599 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4600 to the user. Reported for yyreportTree by Derek M. Jones later in the
4601 same thread.
4602 * THANKS: Add Derek M. Jones.
4603 Update my email address.
4604 Fix typo in Steve Murphy's name.
4605
4606 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4607
4608 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4609 checking against YYLAST that caused the parser to miss a potential
4610 alternative in its diagnostic.
4611 Problem reported by Maria Jose Moron Fernandez in
4612 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4613 * data/lalr1.cc (yysyntax_error_): Likewise.
4614 * data/yacc.c (yysyntax_error): Likewise.
4615 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4616 tokens, in case we run into an older C compiler.
4617 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4618 Use them to check for the off-by-one error fixed above.
4619
4620 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4621 YYSIZE_T, not size_t.
4622 * tests/regression.at (Trivial grammars): New test, to catch
4623 the error fixed by the above patch.
4624
4625 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4626
4627 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4628 scheme.
4629 Reported by Steve Murphy.
4630
4631 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4632
4633 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4634 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4635
4636 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4637
4638 Implement --trace=m4.
4639 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4640 * src/output.c (output_skeleton): When set, pass -dV to m4.
4641
4642 Factor the handling of flags in m4.
4643 * src/output.c (prepare): Rename the muscle names debug, defines,
4644 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4645 * data/c.m4: Adjust.
4646 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4647 Use b4_define_flag_if to define other b4_FLAG_if macros.
4648 (b4_location_if): As a consequence, rename as...
4649 (b4_locations_if): this, for consistency.
4650 Adjust all the skeletons.
4651
4652 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4653
4654 * etc/bench.pm: Shorten bench names.
4655
4656 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4657
4658 * src/output.h, src/output.c (error_verbose): Move to...
4659 * src/getargs.h, src/getargs.c: here.
4660 Sort the flags.
4661 Adjust dependencies.
4662
4663 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4664
4665 * data/c.m4 (b4_copyright): Put the special exception for Bison
4666 skeletons here, so we don't have to put it in each skeleton. All
4667 uses changed. Suggested by Akim Demaille. Also, wrap the
4668 copyright notice, in case it is longer than 80 columns. Replace
4669 comma by newline after title.
4670
4671 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4672
4673 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4674 incompatibility, not a bug. Mention that it wasn't fixed as of
4675 flex 2.5.33.
4676
4677 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4678
4679 * examples/extexi: Enforce the precedence of concatenation over
4680 >>.
4681 Reported by Tommy Nordgren.
4682
4683 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4684
4685 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4686 with the member "token".
4687 Reported by Martin Nylin.
4688
4689 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4690
4691 * data/glr.c: Switch to Bison 2.2 special-exception language in
4692 the copyright notice. Use more-regular format for titles and
4693 copyright notices.
4694 * data/glr.cc: Likewise.
4695 * data/location.cc: Likewise.
4696 * data/yacc.cc: Likewise.
4697 * doc/bison.texinfo (Conditions): Document this.
4698 * NEWS: likewise. Upgrade version to 2.2.
4699
4700 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
4701
4702 * data/glr.cc: Remove dead code.
4703
4704 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4705
4706 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4707 that variable and the line breaks the bootstrap. Problem reported
4708 by Juan M. Guerrero.
4709
4710 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4711
4712 * doc/bison.texinfo (Multiple start-symbols): New.
4713
4714 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4715
4716 * etc/README, etc/bench.pl: New.
4717
4718 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
4719
4720 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4721 rule.
4722 Reported by Mickael Labau.
4723 * tests/input.at (Torturing the Scanner): Test it.
4724
4725 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4726
4727 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4728 Problem reported by Bob Rossi.
4729
4730 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4731
4732 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4733 and didn't really work.
4734 For the index, use @ifnotinfo, not @iftex.
4735 Minor cleanups of spacing and terminology.
4736
4737 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4738
4739 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4740 of AT_NAME_PREFIX when %name-prefix is not used.
4741
4742 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4743
4744 Apply --prefix to C++ skeletons too: they change the namespace.
4745 The test suite already exercize these cases.
4746 * data/c++.m4 (b4_namespace): New.
4747 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4748 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4749 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4750 * doc/bison.texinfo: Document it.
4751 (Option Cross Key): Use @multitable in all formats. It looks
4752 nicer, even in TeX outputs.
4753 (Rules): Use the same code whatever the output type is.
4754 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4755 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4756 * tests/calc.at: Use it, instead of hard coding `yy'.
4757
4758 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4759
4760 * TODO: Remove dead items.
4761
4762 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4763
4764 * doc/FAQ: Remove, merged into...
4765 * doc/bison.texinfo (FAQ): this.
4766 * doc/Makefile.am (EXTRA_DIST): Adjust.
4767
4768 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4769
4770 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4771 even if empty.
4772 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4773 * doc/bison.texinfo (Calc++ Scanner): Use it.
4774
4775 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4776
4777 Fix two nits reported by twlevo, plus one more that I discovered.
4778
4779 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4780 this is the usual Bison style.
4781 * src/location.h (location_print): Likewise.
4782
4783 * src/reader.h (token_name): Likewise.
4784
4785 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4786
4787 Fix some nits reported by twlevo.
4788 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4789 and "POSIX". Use more-modern syntax for URLs. Mention C++
4790 and ask for Java. Don't hardwire OS version numbers. Add
4791 copyright notice.
4792 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4793 * src/conflicts.c (solved_conflicts_obstack): Now static.
4794
4795 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4796
4797 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4798 page. Say "you can use it" not "you may use it" as on the web page;
4799 we're describing capabilities not granting permission.
4800
4801 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4802
4803 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4804 shadowing warnings. Use usual patter for iterating through RHS.
4805 * tests/glr-regression.at
4806 (Uninitialized location when reporting ambiguity):
4807 Modify yylex so that it uses its argument, rather than trying
4808 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4809 const char -> char const.
4810
4811 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4812 Don't use tabs inside commands; it messes up 'ps'.
4813 Problem reported by twlevo.
4814
4815 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4816
4817 * tests/glr-regression.at (Uninitialized location when reporting
4818 ambiguity): New test case.
4819 * data/glr.c (yyresolveLocations): New function, which uses
4820 YYLLOC_DEFAULT.
4821 (yyresolveValue): Invoke yyresolveLocations before reporting an
4822 ambiguity.
4823 * doc/bison.texinfo (Default Action for Locations): Note
4824 YYLLOC_DEFAULT's usage for ambiguity locations.
4825 (GLR Semantic Actions): Cross-reference those notes.
4826
4827 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4828
4829 * tests/glr-regression.at (Leaked semantic values when reporting
4830 ambiguity): Remove unnecessary union and type declarations.
4831 (Leaked lookahead after nondeterministic parse syntax error): New test
4832 case.
4833 * data/glr.c (yyparse): Check for zero stacks remaining before
4834 attempting to shift the lookahead so that you don't lose it.
4835
4836 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4837
4838 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4839 * tests/glr-regression.at (Leaked semantic values when reporting
4840 ambiguity): New test case.
4841 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4842 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4843 now unnecessary yystackp parameter.
4844 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4845 destructors can be called.
4846
4847 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4848 in existing testcases.
4849
4850 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4851
4852 Don't leak semantic values for parent RHS when a user action cuts the
4853 parser, and clean up related code a bit.
4854 * tests/glr-regression.at (Leaked merged semantic value if user action
4855 cuts parse): Rename to...
4856 (Leaked semantic values if user action cuts parse): ... this. Add check
4857 for leaked parent RHS values.
4858 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4859 between an unresolved state (non-empty chain of semantic options) and
4860 an incomplete one (signaled by an empty chain).
4861 (yyresolveStates): Document the interface. Move all manipulation of a
4862 successfully or unsuccessfully resolved yyGLRState to...
4863 (yyresolveValue): ... here so that yyresolveValue always leaves a
4864 yyGLRState with consistent data and thus is easier to understand.
4865 Remove the yyvalp and yylocp parameters since they are always just
4866 taken from the yys parameter. When reporting a discarded merged value
4867 in debugging output, note that it is incompletely merged. Document the
4868 interface.
4869 (yyresolveAction): If resolving any of the RHS states fails, destroy
4870 them all rather than leaking them. Thus, as long as user actions are
4871 written to clean up the RHS correctly, yyresolveAction always cleans up
4872 the RHS of a semantic option. Document the interface.
4873
4874 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4875
4876 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4877 led to a segmentation fault in GNU Pascal. Problem reported
4878 by Waldek Hebisch.
4879
4880 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4881
4882 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4883 mid-rule action inside a nonterminal symbol in order to declare a
4884 destructor for its semantic value.
4885
4886 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4887
4888 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4889 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4890 __cplusplus && ! defined _STDLIB_H && !
4891 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4892 defined free))]: Include <stdlib.h> rather than rolling our own
4893 declarations of malloc and free, to avoid problems with
4894 incompatible declarations (using 'throw') C++'s stdlib.h. This
4895 should fix Debian bug 340012
4896 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4897 reported by Guillaume Melquiond.
4898
4899 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4900
4901 * NEWS: Clarify symbols versus types in unused-value warnings.
4902
4903 * configure.ac (AC_INIT): Bump version number.
4904
4905 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4906
4907 * NEWS: Version 2.1a.
4908 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4909 since C99 requires this.
4910
4911 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4912
4913 * m4/c-working.m4: New file.
4914 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4915
4916 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4917
4918 * Makefile.maint: Merge from coreutils.
4919
4920 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4921
4922 More portability fixes for problems summarized by Nelson H. F. Beebe.
4923
4924 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4925 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4926 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4927 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4928 messes up because C++ code is compiled in 32-bit mode but linked
4929 in 64-bit mode.
4930
4931 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4932
4933 More portability fixes for problems summarized by Nelson H. F. Beebe.
4934
4935 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4936 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4937
4938 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4939 nodist_PROGRAMS, since we don't need to actually compile the
4940 example if we're just doing a plain 'make'. This avoids bothering
4941 the installer unnecessarily about problems due to weird C++
4942 compilers.
4943
4944 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4945
4946 More portability fixes for problems summarized by Nelson H. F. Beebe.
4947
4948 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4949 than #include "...", and compile with -I'.'. The old method was
4950 not portable, according to Posix and the C standard, and it does
4951 not work with Sun C 5.7, where previous #line directives affect
4952 the working directory used in later #include "..." directives.
4953
4954 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4955
4956 Various DJGGP specific issues in /djgpp
4957
4958 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4959
4960 More portability fixes for problems summarized by Nelson H. F. Beebe.
4961
4962 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4963 '#include <map>' works and that you can apply ++ to iterators.
4964
4965 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4966
4967 Work around portability problems summarized by Nelson H. F. Beebe in
4968 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4969
4970 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4971 that '#include <string>' works.
4972
4973 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4974 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4975 "warning: sorry: semantics of inline function static data `const
4976 unsigned char translate_table[262]' are wrong (you'll wind up with
4977 multiple copies)".
4978
4979 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4980 or, xor to not_, and_, or_, and xor_, respectively. This works
4981 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4982 random system header somewhere that includes the equivalent of
4983 <iso646.h>.
4984
4985 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4986 -E" works; it apparently doesn't work with PathScale EKO Compiler
4987 Suite Version 2.0.
4988
4989 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4990
4991 During deterministic GLR operation, user actions should be able to
4992 influence the parse by changing yychar. To make this easier to fix and
4993 to make glr.c easier to evolve in general, don't maintain yytoken in
4994 parallel with yychar; just compute yytoken when needed.
4995 * tests/glr-regression.at (Incorrect lookahead during deterministic
4996 GLR): Check that setting yychar in a user action has the intended
4997 effect.
4998 * data/glr.c (yyGLRStack): Remove yytokenp member.
4999 (yyclearin): Don't set *yytokenp.
5000 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5001 yychar rather than *yytokenp to determine the current lookahead.
5002 Compute yytoken locally when needed.
5003 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5004 point to.
5005
5006 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5007 after `--report' documentation.
5008
5009 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5010
5011 * src/parse-gram.y (grammar_declaration): Location of printer
5012 symbol is @1, not list->location. Bug reported by twlevo.
5013 * tests/input.at (Incompatible Aliases): Adjust to above change.
5014
5015 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5016
5017 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5018 all the test at once. This makes the output easier to read in the
5019 normal case.
5020
5021 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5022 got from <http://bro-ids.org/download.html>. The bug is that
5023 when two actions appeared in succession, the second one was
5024 scanned before the first one was added to the grammar rule
5025 as a midrule action. Bison then output the incorrect warning
5026 "parse.y:905.17-906.36: warning: unused value: $3".
5027 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5028 associated with a value.
5029 (rhs): Don't invoke grammar_current_rule_action_append.
5030 (action): Invoke it here instead.
5031 * src/reader.c (grammar_midrule_action): Now extern.
5032 (grammar_current_rule_action_append): Don't invoke
5033 grammar_midrule_action; that is now the scanner's job.
5034 * src/reader.h (last_string, last_braced_code_loc):
5035 (grammar_midrule_action): New decls.
5036 * src/scan-gram.l (last_string): Now extern, sigh.
5037 (last_braced_code_loc): New extern variable.
5038 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5039 rule already has an action.
5040 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5041 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5042 Add some tests to check that the above changes fixed the bug.
5043
5044 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5045
5046 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5047 All used changed. Check whether the symbol has a destructor,
5048 not whether it is typed.
5049 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5050 that the values are still reported as unused. All line numbers
5051 adjusted.
5052
5053 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5054
5055 Work around a bug in bro 0.8, which underparenthesizes its
5056 definition of YYLLOC_DEFAULT.
5057 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5058 their arguments.
5059 * data/lalr1.cc: Likewise.
5060 * data/yacc.cc: Likewise.
5061
5062 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5063
5064 Work around a bug in Pike 7.0, and give the Pike folks a
5065 better way to override the usual int widths.
5066 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5067 user can override the types.
5068 (short): #undef, to work around a bug in Pike 7.0.
5069 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5070 (union yyalloc.yyss): Use yytype_int16 rather than short.
5071 All uses changed.
5072 (yysigned_char): Remove.
5073 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5074 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5075 * tests/regression.at (Web2c Actions): Adjust to above changes.
5076
5077 * src/reader.c (check_and_convert_grammar): New function.
5078 (reader): Close the input file even if something went wrong during
5079 parsing. Minor file descriptor leak reported by twlevo.
5080
5081 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5082 to pacify gcc -Wswitch-default.
5083 * src/scan-gram.l (adjust_location): Use a default: break; case
5084 to pacify gcc -Wswitch-default.
5085 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5086 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5087 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5088 Move these decls to scan-skel.l, since they don't need to be
5089 visible elsewhere.
5090 * src/scan-skel.l: Accept the above decls.
5091 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5092 is used.
5093
5094 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5095
5096 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5097 since we don't want to insist on a version number at the start
5098 of the changelog every time.
5099 * Makefile.maint: Sync from coreutils a bit better.
5100 (sc_trailing_blank): Renamed from sc_trailing_space.
5101 All uses changed.
5102 (sc_no_if_have_config_h, sc_require_config_h):
5103 (sc_prohibit_assert_without_use): New rules.
5104 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5105 (sc_dd_max_sym_length): Fix leading spaces in rule.
5106 (sc_system_h_headers): Prefix with @.
5107 (sc_useless_cpp_parens, m4-check): Output line numbers.
5108 (changelog-check): Allow version only in head.
5109 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5110 satisfy new Makefile.maint rule.
5111 * data/glr.c: Likewise.
5112 * data/glr.cc: Likewise.
5113 * data/lalr1.cc: Likewise.
5114 * data/yacc.c: Likewise.
5115 * lib/ebitsetv.c: Likewise.
5116 * lib/lbitset.c: Likewise.
5117 * lib/subpipe.c: Likewise.
5118 * lib/timevar.c: Likewise.
5119 * src/system.h: Likewise.
5120 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5121 * djgpp/Makefile.maint: Add copyright notice.
5122 * djgpp/README.in: Likewise.
5123 * djgpp/config.bat: Likewise.
5124 * djgpp/config.site: Likewise.
5125 * djgpp/config_h.sed: Likewise.
5126 * djgpp/djunpack.bat: Likewise.
5127 * djgpp/config.sed: Fix copyright notice to match standard format.
5128 * djgpp/subpipe.h: Likewise.
5129 * lib/bitsetv-print.c: Likewise.
5130 * lib/bitsetv.c: Likewise.
5131 * lib/subpipe.h: Likewise.
5132 * lib/timevar.c: Likewise.
5133 * lib/timevar.h: Likewise.
5134 * djgpp/subpipe.c: Use standard recipe for config.h.
5135 * lib/abitset.c: Likewise.
5136 * lib/bitset.c: Likewise.
5137 * lib/bitset_stats.c: Likewise.
5138 * lib/bitsetv-print.c: Likewise.
5139 * lib/bitsetv.c: Likewise.
5140 * lib/ebitsetv.c: Likewise.
5141 * lib/get-errno.c: Likewise.
5142 * lib/lbitset.c: Likewise.
5143 * lib/subpipe.c: Likewise.
5144 * lib/timevar.c: Likewise.
5145 * lib/vbitset.c: Likewise.
5146 * tests/local.at: Likewise.
5147 * src/scan-gram.l: Don't include verify.h, since system.h does
5148 that for us.
5149 * .x-sc_require_config_h: New file.
5150 * .x-sc_unmarked_diagnostics: New file.
5151
5152 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5153
5154 Be a bit more systematic about using 'abort'.
5155 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5156 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5157 Put 'default: abort ();' before some other case, to satisfy older
5158 pedantic compilers.
5159 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5160 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5161 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5162 * src/conflicts.c (resolve_sr_conflict): Likewise.
5163 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5164 (get_decision_str, get_orientation_str, get_node_alignment_str):
5165 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5166 (get_linestyle_str, get_arrowstyle_str): Likewise.
5167 * src/conflicts.c (resolve_sr_conflict):
5168 Use a default case rather than one for the one remaining enum
5169 value, to catch invalid enum values as well.
5170 * src/lalr.c (set_goto_map, map_goto):
5171 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5172 * src/nullable.c (nullable_compute, token_definitions_output):
5173 Likewise.
5174 * src/reader.c (packgram, reader): Likewise.
5175 * src/state.c (transitions_to, state_new, state_reduction_find):
5176 Likewise.
5177 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5178 (symbol_pack): Likewise.
5179 * src/tables.c (conflict_row, pack_vector): Likewise.
5180 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5181 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
5182 * src/system.h: Don't include <assert.h>.
5183 (assert): New macro.
5184
5185 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5186 (Destructor Decl, Parser Function, Pure Calling):
5187 Describe rules for braces inside C code more carefully.
5188
5189 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5190
5191 Fix some porting glitches found by Nelson H. F. Beebe.
5192 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5193 compilers that don't understand that abort () does not return.
5194 * src/state.c (transitions_to): Likewise.
5195 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5196 that '#include <cstdlib>' works.
5197 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5198 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5199 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5200 for the benefit of some pre-C99 compilers.
5201
5202 * bootstrap: Undo changes to gnulib files that autoreconf made.
5203
5204 Minor fixups to get 'make maintainer-check' to work.
5205 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5206 with the new verify.h implementation.
5207 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5208 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5209 * data/yacc.c (YYUSE): Likewise.
5210 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5211 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5212 * src/parse-gram.y (declaration): Don't pass a string constant
5213 to a function that expects char *, since GCC might complain
5214 about the constant value.
5215 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5216 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5217 before #defining them.
5218 * tests/glr-regression.at
5219 (Incorrectly initialized location for empty right-hand side in GLR):
5220 In yyerror, use the msg arg.
5221 (Corrupted semantic options if user action cuts parse):
5222 (Incorrect lookahead during deterministic GLR):
5223 (Incorrect lookahead during nondeterministic GLR):
5224 Don't name a local var 'index'; it shadows string.h's 'index'.
5225
5226 2006-01-19 Akim Demaille <akim@epita.fr>
5227
5228 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5229 location, not just parts of it.
5230
5231 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5232
5233 * NEWS: Document the fact that multiple %unions are now allowed.
5234 * doc/bison.texinfo (Union Decl): Likewise.
5235 * TODO: This feature is now implemented, so remove it from
5236 the wishlist.
5237
5238 * Makefile.maint: Merge with coreutils Makefile.maint.
5239 (CVS_LIST): Use build-aux version if available.
5240 (VERSION_REGEXP): New macro.
5241 (syntax-check-rules): Add sc_no_if_have_config_h,
5242 sc_prohibit_assert_without_use, sc_require_config_h,
5243 sc_useless_cpp_parens.
5244 (sc_obsolete_symbols): Check for O_NDELAY.
5245 (sc_dd_max_sym_length): Track coreutils.
5246 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5247 (sc_useless_cpp_parens): New rule.
5248 (news-date-check): Look for version or today's date.
5249 (changelog-check): Don't require version number near head.
5250 (copyright-check): Use current year instead of hardwiring 2005.
5251 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5252 (announcement): Add --gpg-key-ID.
5253
5254 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5255 with "file system".
5256
5257 Avoid undefined behavior that addressed just before the start of an
5258 array. Problem reported by twlevo.
5259 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5260 * src/lalr.c (build_relations): Rely on new sentinel.
5261 * src/gram.c (gram_free): Adjust to new sentinel.
5262
5263 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5264
5265 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5266 yylookaheadNeeds. All uses updated.
5267 (yysplitStack): Rename local yynewLookaheadStatuses to
5268 yynewLookaheadNeeds.
5269 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5270 GLR): In comments, change `lookahead status' to `lookahead need'.
5271
5272 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5273
5274 * data/glr.c (yysplitStack): A little stylistic rewrite.
5275
5276 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5277
5278 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5279
5280 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5281
5282 * doc/bison.texinfo: Fix some typos.
5283 (GLR Semantic Actions): New subsection discussing special
5284 considerations because GLR semantic actions might be deferred.
5285 (Actions): Mention look-ahead usage of yylval.
5286 (Actions and Locations): Mention look-ahead usage of yylloc.
5287 (Special Features for Use in Actions): Add YYEOF entry and mention it
5288 in the yychar entry.
5289 In the yychar entry, remove mention of the local yychar case (pure
5290 parser) since this is irrelevant information when writing semantic
5291 actions and since it's already discussed in `Table of Symbols' where
5292 yychar is otherwise described as an external variable.
5293 In the yychar entry, don't call it the `current' look-ahead since it
5294 isn't when semantic actions are deferred.
5295 In the yychar and yyclearin entries, add note about deferred semantic
5296 actions.
5297 Add yylloc and yylval entries discussing look-ahead usage.
5298 (Look-Ahead Tokens): When discussing yychar, don't call it the
5299 `current' look-ahead, and do mention yylval and yylloc.
5300 (Error Recovery): Cross-reference `Action Features' when mentioning
5301 yyclearin.
5302 (Table of Symbols): In the yychar entry, don't call it the `current'
5303 look-ahead.
5304 In the yylloc and yylval entries, mention look-ahead usage.
5305
5306 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5307
5308 * tests/glr-regression.at: Update copyright year to 2006.
5309
5310 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5311
5312 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5313 use during nondeterministic operation to track which stacks have
5314 actually needed the current lookahead.
5315 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5316 Allocate, deallocate, resize, and otherwise shuffle space for
5317 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5318 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5319 appropriately during nondeterministic operation.
5320 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5321 members to store the current lookahead to be used by the deferred
5322 user action.
5323 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5324 from which the RHS is taken. Set the lookahead members of the new
5325 yySemanticOption according to the lookahead status for stack yyk.
5326 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5327 yyaddDeferredAction.
5328 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5329 members of yySemanticOption before invoking yyuserAction, and then set
5330 them back to their current values afterward.
5331 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5332 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5333 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5334 titles for consistency.
5335 (Leaked merged semantic value if user action cuts parse): In order to
5336 suppress lint warnings, use arguments in merge function, and assign
5337 char value < 128 in main.
5338 (Incorrect lookahead during deterministic GLR): New test case.
5339 (Incorrect lookahead during nondeterministic GLR): New test case.
5340
5341 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5342
5343 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
5344 !yyvaluep as signal that no semantic value is available to print.
5345 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5346 to print a semantic value.
5347
5348 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5349
5350 * tests/glr-regression.at: For consistency with my newer test cases,
5351 don't thank myself.
5352
5353 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5354
5355 * data/glr.c (yyresolveValue): When merging semantic options, if at
5356 least one user action succeeds but a later one cuts the parse, then
5357 destroy the semantic value before returning rather than leaking it.
5358 (yyresolveStates): If a user action cuts the parse and thus
5359 yyresolveValue fails, ignore the (unset) semantic value rather than
5360 corrupting the yyGLRState, and empty the semantic options list since
5361 the user actions should have called all necessary destructors.
5362 Simplify code with YYCHK.
5363 * tests/glr-regression.at (Corrupted semantic options if user action
5364 cuts parse): New test case.
5365 (Undesirable destructors if user action cuts parse): New test case.
5366 Before applying any of this patch, this test case never actually failed
5367 for me... but only because the corrupted semantic options usually
5368 masked this bug.
5369 (Leaked merged semantic value if user action cuts parse): New test
5370 case.
5371
5372 2006-01-05 Akim Demaille <akim@epita.fr>
5373
5374 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5375
5376 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5377
5378 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5379 _MSC_VER. Problem reported by Cenzato Marco.
5380 (b4_c_function_def): Use it.
5381 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5382 b4_c_modern.
5383 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5384 than rolling our own.
5385
5386 2006-01-04 Akim Demaille <akim@epita.fr>
5387
5388 Also warn about non-used mid-rule values.
5389 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5390 member.
5391 (symbol_list_new): Adjust.
5392 * src/reader.c (symbol_typed_p): New.
5393 (grammar_rule_check): Use it.
5394 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5395 Check its rule.
5396 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5397 Use it.
5398 * tests/actions.at (Exotic Dollars): Adjust.
5399
5400 2006-01-04 Akim Demaille <akim@epita.fr>
5401
5402 * src/reader.c (grammar_midrule_action): If $$ is set in a
5403 mid-rule, move the `used' bit to its lhs.
5404 * tests/input.at (Unused values): New.
5405 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5406
5407 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5408
5409 * doc/bison.texinfo (Bison Options): Say more accurately what
5410 --yacc does.
5411 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5412 about declarations in the grammar when in Yacc mode, as POSIX does
5413 not require a diagnostic when the grammar uses extensions.
5414
5415 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5416
5417 Warn about dubious constructions like "%token T T".
5418 Reported by twlevo.
5419 * src/symtab.h (struct symbol.declared): New member.
5420 * src/symtab.c (symbol_new): Initialize it to false.
5421 (symbol_class_set): New arg DECLARING, specifying whether
5422 this is a declaration that we want to warn about, if there
5423 is more than one of them. All uses changed.
5424
5425 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5426 Allow multiple %union directives, whose contents concatenate.
5427 * src/parse-gram.y (grammar_declaration): Likewise.
5428 Use muscle_code_grow, so that we don't need stype_line any more.
5429 All uses changed.
5430
5431 * src/muscle_tab.c (muscle_grow): Fix comment.
5432
5433 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5434 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5435 Update copyright year to 2006.
5436
5437 2006-01-03 Akim Demaille <akim@epita.fr>
5438
5439 Have glr.cc pass (some of) the calc.at tests.
5440 * data/glr.cc (b4_parse_param_orig): New.
5441 (b4_parse_param): Improve its definition, and bound it more
5442 clearly in the skeleton.
5443 (b4_epilogue): Append, instead of prepending, in order to keep
5444 #line consistency.
5445 Simplify the generation of auxiliary functions: locations and
5446 purity are mandated.
5447 (b4_global_tokens_and_yystype): Honor it.
5448 * data/location.cc (c++.m4): Don't include it.
5449 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5450 and AT_SKEL_CC_IF.
5451 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5452 AT_LALR1_CC_IF.
5453 Be sure to initialize the first position's filename.
5454 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5455 mandated anyway.
5456 (AT_CHECK_CALC_GLR_CC): New.
5457 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5458
5459 2006-01-02 Akim Demaille <akim@epita.fr>
5460
5461 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5462 c.m4.
5463 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
5464 * data/glr.cc: Do not include stack.hh.
5465
5466 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5467
5468 * data/glr.c: Reformat whitespace with tabs.
5469 (b4_lpure_formals): Remove this unused m4 macro.
5470 * tests/cxx-type.at: Reformat whitespace with tabs.
5471 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5472 since it's a member. Rename type to isNterm for clarity.
5473
5474 2005-12-29 Akim <akim@sulaco.local>
5475
5476 Let glr.cc catch up with symbol_value_print.
5477 * data/glr.cc (b4_yysymprint_generate): Replace by...
5478 (b4_yy_symbol_print_generate): this.
5479 (yy_symbol_print, yy_symbol_value_print): Declare them.
5480
5481 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5482
5483 * src/location.h (boundary): Note that a line or column equal
5484 to INT_MAX indicates an overflow.
5485 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5486 (rule_length_overflow, increment_rule_length, add_column_width):
5487 New functions.
5488 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5489 (<SC_BRACED_CODE>"}"):
5490 Use increment_rule_length rather than incrementing it by hand.
5491 (adjust_location, handle_syncline): Diagnose overflow.
5492 (handle_action_dollar, handle_action_at):
5493 Fix bug with monstrosities like $-2147483648.
5494 Remove now-unnecessary checks.
5495 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5496 (convert_ucn_to_byte): Verify assumptions.
5497 (handle_syncline): New arg LOC. All callers changed.
5498 Don't store through a value derived from char const * pointer.
5499
5500 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5501 GCC warnings.
5502
5503 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5504
5505 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5506 Remove unnecessary forward static decls.
5507
5508 2005-12-27 Akim Demaille <akim@epita.fr>
5509
5510 * src/reader.c (grammar_current_rule_check): Also check that $$
5511 is used.
5512 Take the rule to check as argument, hence rename as...
5513 (grammar_rule_check): this.
5514 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5515 Rename as...
5516 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5517 (grammar_midrule_action, grammar_symbol_append): Now static.
5518 * tests/torture.at (input): Don't rely on the default action
5519 being always performed.
5520 * tests/calc.at: "Set" $$ even when the action is "cut" with
5521 YYERROR or other.
5522 * tests/actions.at (Exotic Dollars): Instead of using unused
5523 values, check that the warning is issued.
5524
5525 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5526
5527 * NEWS: Improve wording for unused-value warnings.
5528
5529 2005-12-22 Akim Demaille <akim@epita.fr>
5530
5531 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5532 (b4_yysymprint_generate): Rename as...
5533 (b4_yy_symbol_print_generate): this.
5534 Generate yy_symbol_print instead of yysymprint.
5535 Generate also yy_symbol_value_print, and use it.
5536
5537 2005-12-22 Akim Demaille <akim@epita.fr>
5538
5539 * NEWS: Warn about unused values.
5540 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5541 a `used' member.
5542 (symbol_list_n_get, symbol_list_n_used_set): New.
5543 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5544 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5545 * src/reader.c (grammar_current_rule_check): Check that values are
5546 used.
5547 * src/symtab.c (symbol_print): Accept 0.
5548 * tests/existing.at: Remove the type information.
5549 Empty the actions.
5550 Remove useless actions (beware of mid-rule actions: perl -000
5551 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5552 * tests/actions.at (Exotic Dollars): Use unused values.
5553 * tests/calc.at: Likewise.
5554 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5555 Likewise.
5556
5557 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5558 rule_useful_p.
5559
5560 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5561
5562 Undo 2005-12-01 tentative license wording change. The wording is
5563 still being reviewed by the lawyers, and we don't want to wait for
5564 them before publishing a test release. For now, revert to the
5565 previous wording.
5566 * NEWS: Undo 2005-12-01 change.
5567 * data/glr.c: Revert to previous license wording.
5568 * data/glr.cc: Likewise.
5569 * data/lalr1.cc: Likewise.
5570 * data/location.cc: Likewise.
5571 * data/yacc.c: Likewise.
5572
5573 * NEWS: Reword %destructor vs YYABORT etc.
5574 * data/glr.c: Use American spacing, for consistency.
5575 * data/glr.cc: Likewise.
5576 * data/lalr1.cc: Likewise.
5577 * data/yacc.c: Likewise.
5578 * data/yacc.c: Reformat comments slightly.
5579 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5580 for consistency. Fix some spelling errors and reword recently-included
5581 text slightly.
5582 * tests/cxx-type.at: Cast results of malloc, for C++.
5583
5584 2005-12-21 Joel E. Denny <address@hidden>
5585
5586 * tests/cxx-type.at: Construct a tree, count the parents of shared
5587 nodes, and free each node once and only once. Previously, the memory
5588 for semantic values was leaked instead.
5589
5590 2005-12-21 Joel E. Denny <address@hidden>
5591
5592 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5593 (yylval, yylloc): If pure, #define to yystackp->yyval and
5594 yystackp->yyloc similar to yychar and yynerrs.
5595 (yyparse): If pure, remove local yylval and yylloc. Add local
5596 yystackp to accommodate pure definitions of yylval and yylloc.
5597 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5598 yylvalp and yyllocp to &yylval and &yylloc.
5599 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5600 namespace. Previously, nerrs and char were missing, but lval and lloc
5601 weren't necessary.
5602 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5603 yylvalp and yyllocp parameters since, if pure, these are now always
5604 accessible through yystackp. If not pure, they are still accessible
5605 globally.
5606 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5607 `if (YYID (N))' to pacify lint.
5608
5609 2005-12-21 Akim Demaille <akim@epita.fr>
5610
5611 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5612 destroy the RHS symbols of a rule.
5613 * data/yacc.c (yylen): Initialize to 0.
5614 Keep its value to the number of items to possibly shift.
5615 In particular, a regular successful parse that ends on YYFINAL by
5616 a (internal) YYACCEPT must not have yylen != 0.
5617 (yyerrorlab, yyreturn): Pop the RHS.
5618 Reorder a bit to emphasize the `shifting' bits of code.
5619 (YYPOPSTACK): Now accept a number of items to pop.
5620 * data/lalr1.cc: Likewise.
5621 * data/glr.c: Formatting changes.
5622 Use goto instead of fall through.
5623 * doc/bison.texinfo (Destructor Decl): Complete.
5624
5625 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5626
5627 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5628 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5629 * djgpp/config.bat: Replace every occurence of the file name
5630 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5631 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5632 * djgpp/config.sed: Replace every occurence of the file name
5633 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5634 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5635 * djgpp/djunpack.bat: DJGPP specific file.
5636 * djgpp/fnchange.lst: DJGPP specific file.
5637 * djgpp/README.in: Add new information about how to unpack the bison
5638 source on MSDOS and other systems which have 8.3 file name restrictions
5639 using djunpack.bat and fnchange.lst.
5640
5641 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5642
5643 * bootstrap (build_cvs_prefix): Remove; unused.
5644 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5645 when getting gnulib.
5646
5647 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5648
5649 * data/glr.c: Reorder typedef declarations for structs to match order
5650 of struct declarations.
5651 Rename yystack everywhere to yystackp except in yyparse where it's not
5652 a pointer.
5653 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5654 consistency.
5655 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5656 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5657 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5658 lint.
5659
5660 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5661
5662 * tests/sets.at (Accept): Fix typos in regular expression used to
5663 sed out the final state number.
5664
5665 Work around portability problem on Solaris 10: flex-generated
5666 files include <stdio.h> before <config.h>, which messes up
5667 because the latter defines __EXTENSIONS__. Address the problem
5668 by creating two new little files that include <config.h> first,
5669 then include the flex-generated files. Rewrite everyone else
5670 to include <config.h> first, as well.
5671 * lib/timevar.c: Always include "config.h".
5672 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5673 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5674 (EXTRA_bison_SOURCES): New macro.
5675 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5676 * src/system.h: Don't include config.h.
5677 * src/LR0.c: Include <config.h> first.
5678 * src/assoc.c: Likewise.
5679 * src/closure.c: Likewise.
5680 * src/complain.c: Likewise.
5681 * src/conflicts.c: Likewise.
5682 * src/derives.c: Likewise.
5683 * src/files.c: Likewise.
5684 * src/getargs.c: Likewise.
5685 * src/gram.c: Likewise.
5686 * src/lalr.c: Likewise.
5687 * src/location.c: Likewise.
5688 * src/main.c: Likewise.
5689 * src/muscle_tab.c: Likewise.
5690 * src/nullable.c: Likewise.
5691 * src/output.c: Likewise.
5692 * src/parse-gram.y: Likewise.
5693 * src/print.c: Likewise.
5694 * src/print_graph.c: Likewise.
5695 * src/reader.c: Likewise.
5696 * src/reduce.c: Likewise.
5697 * src/relation.c: Likewise.
5698 * src/state.c: Likewise.
5699 * src/symlist.c: Likewise.
5700 * src/symtab.c: Likewise.
5701 * src/tables.c: Likewise.
5702 * src/uniqstr.c: Likewise.
5703 * src/vcg.c: Likewise.
5704
5705 * src/parse-gram.y: Fix minor problems uncovered by lint.
5706 (current_lhs, current_lhs_location): Now static.
5707 (current_assoc): Remove unused variable.
5708
5709 Cleanups so that Bison-generated parsers have less lint.
5710 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5711 Prepend /*ARGSUSED*/, for lint's sake.
5712 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5713 definition if 'lint' is defined.
5714 (YYID): New macro (or function, if lint).
5715 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5716 * data/yacc.c: Likewise.
5717 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5718 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5719 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5720 is C++ only.
5721 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5722 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5723 Use YYID(0) rather than 0, for lint.
5724 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5725 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5726
5727 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5728
5729 * tests/glr-regression.at
5730 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5731 Close memory leak reported by twlevo.
5732
5733 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5734
5735 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5736 all stacks.
5737 (yyparse): Iterate another stack in order to call user destructors.
5738 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5739 New test case.
5740 (Duplicated user destructor for lookahead): This test now is expected
5741 to succeed.
5742
5743 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5744
5745 * NEWS: Document the following change.
5746 * data/yacc.c: Say "parser skeleton" rather than "file", since
5747 it's no longer just a file.
5748 * data/glr.c: Grant a special exception for C GLR parsers, that
5749 reads like the already-existing exception for C LALR(1) parsers.
5750 * data/glr.cc: Likewise.
5751 * data/lalr1.cc: Likewise.
5752 * data/location.cc: Likewise.
5753 * data/yacc.c: Reword the "written by" statement to clarify that
5754 it was the parser skeleton, not the entire output file.
5755 * data/glr.c: Written by Paul Hilfinger.
5756 * data/glr.cc: Written by Akim Demaille.
5757 * data/lalr1.cc: Likewise.
5758
5759 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5760
5761 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5762 Fix typos in previous change that broke 'make check'.
5763 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5764 supported in C.
5765 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5766 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5767 We can revert this once things settle down.
5768
5769 * src/conflicts.c (conflicts_print): Don't print file name twice
5770 when %expect fails because there were no conflicts.
5771 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5772 change.
5773 * tests/conflicts.at (%expect not enough, %expect too much):
5774 (%expect with reduce conflicts): Adjust to new behavior.
5775
5776 2005-11-18 Akim Demaille <akim@epita.fr>
5777
5778 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5779 errors.
5780 * NEWS: Document this.
5781 * doc/bison.texinfo (Expect Decl): Likewise.
5782
5783 2005-11-16 Akim Demaille <akim@epita.fr>
5784
5785 Generalize the display of semantic values and locations in traces.
5786 * data/glr.c (yy_reduce_print): Fix indices (again).
5787 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5788 literal integers.
5789 * data/lalr1.cc (yyreduce_print): Rename as...
5790 (yy_reduce_print): this.
5791 Display values and locations.
5792 * data/yacc.c (yy_reduce_print): Likewise.
5793 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5794 (yysymprint): Move higher to be visible from yy_reduce_print).
5795 (yyparse): Adjust.
5796 * tests/calc.at: Adjust the expected length of the traces.
5797
5798 2005-11-14 Akim Demaille <akim@epita.fr>
5799
5800 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5801 from 1 to N, while values and location start at 0.
5802 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5803
5804 2005-11-14 Akim Demaille <akim@epita.fr>
5805
5806 * data/glr.c (yy_reduce_print): Fix the $ number.
5807
5808 2005-11-14 Akim Demaille <akim@epita.fr>
5809
5810 "Use" parse parameters.
5811 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5812 * data/glr.c, data/glr.cc: Use them.
5813 * data/glr.c (YYUSE): Have a C++ definition that supports
5814 non-pointer types.
5815
5816 2005-11-14 Akim Demaille <akim@epita.fr>
5817
5818 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5819
5820 2005-11-14 Akim Demaille <akim@epita.fr>
5821
5822 * data/glr.cc: New.
5823 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5824
5825 2005-11-12 Akim Demaille <akim@epita.fr>
5826
5827 Let position and location be PODs.
5828 * data/location.cc (position::initialize, location::initialize): New.
5829 (position::position, location::location): Define only if
5830 b4_location_constructors is defined.
5831 * data/lalr1.cc (b4_location_constructors): Define it for backward
5832 compatibility.
5833 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5834
5835 2005-11-12 Akim Demaille <akim@epita.fr>
5836
5837 * data/lalr1.cc: Move the body of the ctor and dtor into the
5838 parser file (instead of the header).
5839 Wrap the implementations in a "namespace yy".
5840
5841 2005-11-12 Akim Demaille <akim@epita.fr>
5842
5843 Have glr.c include its header file when created.
5844 * data/glr.c (b4_shared_declarations): New.
5845 Output them verbatim in the parser if !%defines, otherwise
5846 output then in the header file, and include it instead.
5847
5848 2005-11-11 Akim Demaille <akim@epita.fr>
5849
5850 * data/glr.c: Comment changes.
5851
5852 2005-11-11 Akim Demaille <akim@epita.fr>
5853
5854 When yydebug, report semantic and location values for reductions.
5855 * data/glr.c (yy_reduce_print): Report the semantic values and the
5856 locations.
5857 (YY_REDUCE_PRINT): Adjust.
5858 (yyglrReduce): Use them.
5859 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5860 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5861 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5862 traces.
5863
5864 2005-11-10 Akim Demaille <akim@epita.fr>
5865
5866 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5867 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5868 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5869
5870 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5871
5872 * m4/cxx.m4, examples/Makefile.am: Don't build
5873 examples/calc++ if no C++ compiler is available. (trivial change)
5874
5875 2005-11-09 Akim Demaille <akim@epita.fr>
5876
5877 * src/scan-skel.l: Use a couple of asserts.
5878
5879 2005-11-03 Akim Demaille <akim@epita.fr>
5880
5881 In some (weird) cases, the final state number is incorrect.
5882 Reported by Alexandre Duret-Lutz.
5883 * src/LR0.c (state_list_append): Remove the computation of
5884 final_state.
5885 (save_reductions): Do it here.
5886 (get_state): Alpha conversion.
5887 (generate_states): Use a for loop.
5888 * src/gram.h (item_number_is_rule_number)
5889 (item_number_is_symbol_number): New.
5890 * src/state.c: Use assert.
5891 * src/system.h: Include assert.h.
5892 * tests/sets.at (Accept): New.
5893
5894 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5895
5896 * data/glr.c (yyfill): Adjust comment.
5897 (yyresolveAction): Initialize default location properly
5898 for empty right-hand sides.
5899 (yydoAction): Ditto.
5900 Add comment explaining apparently dead code.
5901 * tests/glr-regression.at
5902 (Incorrectly initialized location for empty right-hand side in GLR):
5903 New test.
5904
5905 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5906
5907 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5908 gnulib when interrupted. This fixes some race conditions and
5909 works around some portability problems (one noted by Paul
5910 Hilfinger).
5911
5912 2005-10-22 Akim <akim@epita.fr>
5913
5914 * Makefile.cfg: Adjust to config -> build-aux.
5915 Reported by twledo.
5916
5917 2005-10-21 Akim Demaille <akim@epita.fr>
5918
5919 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5920 the %parse-params.
5921 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5922 * data/yacc.c (b4_Pure_if): Rename as...
5923 (b4_yacc_pure_if): this.
5924 (YY_SYMBOL_PRINT, yyparse): Adjust.
5925 * doc/bison.texinfo: Formatting changes.
5926
5927 2005-10-21 Akim Demaille <akim@epita.fr>
5928
5929 Finish the transition config -> build-aux.
5930 * configure.ac, Makefile.am: Use build-aux.
5931 * config/prev-version, config/announce-gen, config/Makefile.am:
5932 Move to...
5933 * build-aux/prev-version, build-aux/announce-gen,
5934 * build-aux/Makefile.am: here.
5935
5936 2005-10-14 Akim Demaille <akim@epita.fr>
5937
5938 * examples/calc++/test: Use set -x only when VERBOSE.
5939
5940 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5941
5942 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5943 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5944
5945 2005-10-13 Akim Demaille <akim@epita.fr>
5946
5947 * src/scan-skel.l: Output the base name parts of the parser and
5948 header file names.
5949 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5950 additional checks.
5951 Use this to exercise C++ outputs in subdirs.
5952 Reported by Oleg Smolsky.
5953
5954 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5955
5956 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5957 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5958 Problem reported by John P. Hartmann.
5959 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5960 already defined it.
5961
5962 2005-10-12 Akim Demaille <akim@epita.fr>
5963
5964 * src/parse-gram.y (version_check): Exit 63 to please missing
5965 (stands for "version mismatch).
5966 * tests/input.at, doc/bison.texinfo: Adjust.
5967
5968 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5969
5970 Work around portability problems with Visual Age C compiler
5971 (xlc and xlC_r) reported by John P. Hartmann.
5972 * data/location.cc (initial_column, initial_line): Remove.
5973 All uses replaced by 0 and 1.
5974 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5975 that xlc complains about.
5976 * src/scan-skel.l (skel_wrap): Likewise.
5977 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5978 as __STDC__.
5979 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5980 __STDC_VERSION__. Use it everywhere instead of looking at
5981 __STDC__ and __cplusplus.
5982
5983 2005-10-10 Akim Demaille <akim@epita.fr>
5984
5985 * examples/calc++/test: Be quiet unless VERBOSE.
5986
5987 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5988
5989 * data/c.m4 (yydestruct, yysymprint):
5990 Use YYUSE instead of casting to void.
5991 * data/glr.c (YYUSE): New macro.
5992 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5993 Use it instead of rolling our own.
5994 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5995 (YYCHK1):
5996 Use /*CONSTCOND*/ to suppress lint warnings.
5997 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5998 (YY_STACK_PRINT): Use 'false' not '0'.
5999 (YYUSE): New macro.
6000 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6001 * data/yacc.c (YYUSE): New macro.
6002 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6003 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6004 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6005
6006
6007 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6008 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6009
6010 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6011
6012 Undo the parts of the unlocked-I/O change that substituted
6013 putc or puts for printf. This might hurt performance a bit,
6014 but some people prefer the printf style.
6015 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6016 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6017 All uses replaced by YYFPRINTF and YYDPRINTF.
6018 * data/yacc.c: Likewise.
6019 * lib/bitset.c (bitset_print): Likewise.
6020 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6021 putc and puts.
6022 * lib/lbitset.c (debug_lbitset): Likewise.
6023 * src/closure.c (print_firsts, print_fderives): Likewise.
6024 * src/gram.c (grammar_dump): Likewise.
6025 * src/lalr.c (look_ahead_tokens_print): Likewise.
6026 * src/output.c (escaped_output): Likewise.
6027 (user_actions_output): Break apart two printfs.
6028 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6029 * src/reduce.c (reduce_print): Likewise.
6030 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6031 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6032
6033 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6034 Use assignments rather than casts-to-void to suppress
6035 unused-variable warnings. This pacifies 'lint'.
6036 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6037 unused-variable warnings.
6038
6039 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6040
6041 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6042
6043 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6044
6045 Use unlocked I/O for a minor performance improvement on hosts like
6046 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6047 is to use the gnlib unlocked-io module, and to prefer putc and
6048 puts to printf when either will work (since the latter doesn't
6049 come in an unlocked flavor).
6050 * bootstrap (gnulib_modules): Add unlocked-io.
6051 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6052 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6053 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6054 and similarly for puts and putc and printf.
6055 * data/yacc.c: Likewise.
6056 * lib/bitset.c (bitset_print): Likewise.
6057 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6058 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6059 to printf.
6060 * lib/lbitset.c (debug_lbitset): Likewise.
6061 * src/closure.c (print_firsts, print_fderives): Likewise.
6062 * src/gram.c (grammar_dump): Likewise.
6063 * src/lalr.c (look_ahead_tokens_print): Likewise.
6064 * src/output.c (escaped_output): Likewise.
6065 (user_actions_output): Coalesce two printfs.
6066 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
6067 * src/reduce.c (reduce_print): Likewise.
6068 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6069 * src/system.h: Include unlocked-io.h rather than stdio.h.
6070
6071 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6072 this confuses xgettext.
6073
6074 2005-10-02 Akim Demaille <akim@epita.fr>
6075
6076 * bootstrap (gnulib_modules): Add strverscmp.
6077 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6078 * m4/.cvsignore: Add strverscmp.m4.
6079 * src/parse-gram.y (%require): New token, new rule.
6080 (version_check): New.
6081 * src/scan-gram.l (%require): Adjust.
6082 * tests/input.at (AT_REQUIRE): New.
6083 Use it.
6084 * doc/bison.texinfo (Require Decl): New.
6085 (Calc++ Parser): Use %require.
6086
6087 2005-10-02 Akim Demaille <akim@epita.fr>
6088
6089 * data/location.cc: New.
6090
6091 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6092 Akim Demaille <akim@epita.fr>
6093
6094 Make sure -odir/foo.cc creates dir/location.hh etc.
6095 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6096 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6097 (spec_defines_file): Now const.
6098 (dir_prefix): New.
6099 (short_base_name): Remove.
6100 * src/files.c: Adjust.
6101 (dirname.h): Include.
6102 (base_name): Don't prototype it.
6103 (finput): Remove, duplicates gram_in.
6104 (full_base_name, short_base_name): Replace by...
6105 (all_but_ext, all_but_tab_ext): these.
6106 (compute_base_names): Rename as...
6107 (compute_file_name_parts): this.
6108 Update to compute the new variables, including dir_prefix.
6109 Adjust dependencies.
6110 * src/output.c (prepare): Output them.
6111 * src/reader.c: Adjust to use gram_in, not finput.
6112 * src/scan-skel.l (@dir_prefix@): New.
6113
6114 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6115
6116 * lib/subpipe.c: New function end_of_output_subpipe() added
6117 to allow support for non-posix systems. This is a no-op function
6118 for posix systems.
6119
6120 * lib/subpipe.h: New function end_of_output_subpipe() added
6121 to allow support for non-posix systems. This is a no-op function
6122 for posix systems.
6123
6124 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6125 handle the lack of pipe/fork functionality on non-posix systems.
6126
6127 * djgpp/Makefile.maint: DJGPP specific file.
6128
6129 * djgpp/README.in: DJGPP specific file.
6130
6131 * djgpp/config.bat: DJGPP specific configuration file.
6132
6133 * djgpp/config.sed: DJGPP specific configuration file.
6134
6135 * djgpp/config.site: DJGPP specific configuration file.
6136
6137 * djgpp/config_h.sed: DJGPP specific configuration file.
6138
6139 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6140
6141 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6142
6143 2005-10-02 Akim Demaille <akim@epita.fr>
6144
6145 * data/location.cc: New, extract from...
6146 * data/lalr1.cc: here.
6147 (location.hh): Include it after the user prologue, in case the
6148 filename type is defined by the user.
6149 Forward declation location and position before the pre-prologue.
6150 (yyresult_): Rename as...
6151 (yyresult): this, it's a local variable, not an attribute.
6152 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6153
6154 2005-10-01 Akim Demaille <akim@epita.fr>
6155
6156 * examples/extexi: Restore the #line generation.
6157
6158 2005-09-30 Akim Demaille <akim@epita.fr>,
6159 Alexandre Duret-Lutz <adl@gnu.org>
6160
6161 Move the token type and YYSTYPE in the parser class.
6162 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6163 (parser::token): New, from the moved free definition of tokens.
6164 (parser::semantic_value): Now a full definition instead of an
6165 indirection to YYSTYPE.
6166 (b4_post_prologue): No longer included in the header file, but
6167 in the implementation file.
6168 * doc/bison.texi (C+ Language Interface): Update.
6169 * src/parse-gram.y: Support unary %define.
6170 * tests/actions.at: Define global_tokens_and_yystype for backward
6171 compatibility until we update the tests.
6172 * tests/calc.at: Idem.
6173 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6174 to simplify the code.
6175
6176 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6177
6178 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6179 Ah, the good old days! Problem reported by Peter Klein.
6180 * bootstrap (gnulib_modules): Add strerror, strtoul.
6181 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6182 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6183
6184 2005-09-29 Akim Demaille <akim@epita.fr>
6185
6186 * data/c.m4 (b4_error_verbose_if): New.
6187 * data/lalr1.cc: Use it.
6188 (YYERROR_VERBOSE_IF): Remove.
6189 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6190 parser members, replaced by...
6191 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6192 local variables.
6193 (yysyntax_error_): Takes the state number as argument.
6194 (yyreduce_print_): Use the argument yyrule, not the former
6195 attribute yyn_.
6196
6197 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6198
6199 * bootstrap (gnulib_modules): Add verify.
6200 * lib/.cvsignore: Add verify.h.
6201 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6202 * src/system.h (verify): Remove.
6203 Include verify.h instead.
6204 * src/tables.c (tables_generate): Use new API for 'verify'.
6205
6206 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6207
6208 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6209 local variables whose names begin with 'yy'.
6210 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6211 Trivial changes from Joel E. Denny.
6212
6213 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6214 it itself.
6215 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6216 don't use alloca any more.
6217
6218 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6219 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
6220 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
6221 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6222 to match yacc.c, to test more hosts.
6223
6224 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6225
6226 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6227 doesn't affect behavior.
6228 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6229 Solaris, AIX, MSC.
6230 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6231 This works a bit better with glibc, if user code has already included
6232 stdlib.h.
6233 * doc/bison.texinfo (Bison Parser): Document that users can't
6234 arbitrarily use malloc and free for other purposes. Document
6235 that <alloca.h> and <malloc.h> might be included.
6236 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6237 user must declare alloca.
6238
6239 * HACKING (release): Forwarn the Translation Project about
6240 stable releses.
6241
6242 2005-09-20 Akim Demaille <akim@epita.fr>
6243
6244 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6245
6246 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6247
6248 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6249 (YYSTACK_ALLOC_MAXIMUM): Use it.
6250 (yysyntax_error): New function.
6251 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6252 multiple syntax errors are reported, and alloca is being used.
6253 Instead, reallocate buffers twice as big each time, so that
6254 we waste at most half the allocated memory. Start with a small
6255 (128-byte) buffer that will suffice in most cases anyway.
6256 Use yysyntax_error to do most of the work.
6257
6258 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6259 yynerrs is the number of errors reported, not the number of
6260 errors encountered.
6261
6262 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6263 Mark it as expected to fail.
6264 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6265 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6266 Don't start user-code symbols with "yy", to avoid name space problems.
6267
6268 2005-09-19 Akim Demaille <akim@epita.fr>
6269
6270 Remove the traits, failed experiment.
6271 It never proved useful, and anyway because of the current
6272 definition, it was not possible to have several specialization of
6273 this traits, making it useless.
6274 * data/lalr1.cc (yy:traits): Remove.
6275 Inline its definitions in the parser class.
6276
6277 2005-09-19 Akim Demaille <akim@epita.fr>
6278
6279 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6280 least Mac OSX with a /usr/local install of gettext.
6281
6282 2005-09-19 Akim Demaille <akim@epita.fr>
6283
6284 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6285 and yytoken for similarity with the other skeletons.
6286
6287 2005-09-19 Akim Demaille <akim@epita.fr>
6288
6289 * NEWS, configure.ac: update version number to 2.1a.
6290
6291 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6292
6293 * NEWS: Version 2.1.
6294
6295 * NEWS: Remove notice of yytname change, since it was never in an
6296 official release.
6297 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6298 diagnostic.
6299 * src/output.c (prepare): Likewise.
6300 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6301 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6302 is not defined. This is an awful hack, but it's enough for now.
6303 All callers changed.
6304 * tests/glr-regression-at (make_value): Args are const pointers now,
6305 to avoid GCC warning.
6306 (Duplicated user destructor for lookahead): New test. Currently
6307 skipped. It fails on my host but I'm not sure it'll always fail.
6308
6309 2005-09-16 Akim Demaille <akim@epita.fr>
6310
6311 * src/symtab.h (struct symbol): Declare the printer and destructor
6312 as const, to avoid accidental calls to free.
6313 (symbol_destructor_set, symbol_printer_set): Adjust.
6314 * src/symtab.c: Adjust.
6315
6316 2005-09-16 Akim Demaille <akim@epita.fr>
6317
6318 * data/c.m4 (b4_token_enums): New.
6319 (b4_token_defines): Rename as...
6320 (b4_token_enums_defines): this.
6321 (b4_token_defines): New, output only the #defines.
6322 * data/yacc.c, data/glr.c: Adjust.
6323 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6324 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6325 as default values.
6326
6327 2005-09-16 Akim Demaille <akim@epita.fr>
6328
6329 * data/lalr1.cc (yylex_): Remove, inline its code.
6330 (yyreport_syntax_error_): Remove, replaced by...
6331 (yysyntax_error_): this which returns a string and leaves to the
6332 caller the call to the users' error function.
6333 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6334 Move from members of the parser object...
6335 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6336 to local variables of the parse function.
6337
6338 2005-09-16 Akim Demaille <akim@epita.fr>
6339
6340 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6341 since it's in Bison's name space.
6342
6343 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6344
6345 * data/glr.c (yyresolveValue): Add default case to pacify
6346 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6347
6348 * NEWS: Document when yyparse started to return 2.
6349 * doc/bison.texinfo (Parser Function): Document when yyparse
6350 returns 2.
6351
6352 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6353 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6354 changed.
6355 (class position): file_name -> filename (reverting). All uses changed.
6356
6357 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6358
6359 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6360 do anything if $@ exists. This reverts part of the 2005-07-07
6361 patch.
6362
6363 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6364
6365 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6366 contains obsolete information and isn't worth distributing as a
6367 separate file anyway.
6368 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6369 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6370 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6371 (yyparse): Abort if user code uses longjmp to throw an unexpected
6372 value.
6373
6374 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6375
6376 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6377 Suggested by twlevo@xs4all.nl.
6378
6379 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6380 This avoids a diagnostic from gcc -Wswitch-enum.
6381 Problem reported by twlevo@xs4all.nl.
6382
6383 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6384 standards. Use "file name" or "file" or "name", depending on
6385 the context.
6386 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6387 not to hack/foo.tab.c.
6388 (Calc++ Top Level): 2nd arg of main is not const.
6389 * data/glr.c: b4_filename -> b4_file_name.
6390 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6391 All uses changed.
6392 (class position): filename -> file_name. All uses changed.
6393 * data/yacc.c: b4_filename -> b4_file_name.
6394 * lib/bitset.h: filename -> file_name in local vars.
6395 * lib/bitset_stats.c: Likewise.
6396 * src/files.c: Likewise.
6397 * src/scan-skel.l ("@output ".*\n): Likewise.
6398 * src/files.c (file_name_split): Renamed from filename_split.
6399 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6400
6401 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6402
6403 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6404 to accommodate latest gnulib.
6405
6406 * tests/glr-regression.at (Duplicate representation of merged trees):
6407 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6408
6409 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6410 needed.
6411
6412 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6413
6414 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6415 All uses changed. Invoke user destructor after an error during a
6416 split parse (trivial change from Joel E. Denny).
6417
6418 * tests/glr-regression.at
6419 (User destructor after an error during a split parse): New test case.
6420 Problem reported by Joel E. Denny in:
6421 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6422
6423 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6424
6425 * README-cvs: Give URLs for recommended tools.
6426 Mention Gzip version problem, and bootstrapping issues.
6427 Remove troubleshooting section, as it's somewhat obsolete.
6428
6429 * bootstrap (no_cache): New var, to accommodate different wget
6430 variants. Use it instead of '-C off'. Problem reported by
6431 twlevo@xs4all.nl.
6432
6433 * data/glr.c (yydestroyStackItem): New function.
6434 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6435 debugging information. Problem reported by Joel E. Denny.
6436
6437 2005-08-25 Akim Demaille <akim@epita.fr>
6438
6439 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6440
6441 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6442
6443 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6444 Don't invoke destructor on unresolved entries.
6445 * tests/glr-regression.at
6446 (User destructor for unresolved GLR semantic value): New test case.
6447 Problem reported by Joel E. Denny in:
6448 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6449
6450 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6451
6452 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6453 Add strnlen.c.
6454 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6455 lib-prefix.m4, po.m4.
6456
6457 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6458 in yydestruct diagnostic, since it might not be an error.
6459 Problem reported by Joel Denny near end of
6460 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6461 * data/lalr1.cc (yyerturn): Likewise.
6462 * data/yacc.c (yyreturn): Likewise.
6463 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6464
6465 * src/files.c: Remove obsolete FIXME comment.
6466
6467 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6468 with the other templates, and to fix bogus run-on messages such
6469 as the one reported at the end of
6470 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6471 All callers changed to avoid the newline.
6472 (yyprocessOneStack): Output two lines rather than one, to accommodate
6473 the above change. This changes the debug output format slightly.
6474
6475 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6476 reported by Joel E. Denny in
6477 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6478 (trivial change).
6479 * tests/glr-regression.at (Duplicate representation of merged trees):
6480 New test, from Joel E. Denny in:
6481 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6482 * THANKS: Add Joel E. Denny.
6483
6484 * configure.ac (AC_INIT): Bump to 2.0c.
6485
6486 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6487
6488 * NEWS: Version 2.0b.
6489
6490 * Makefile.am (SUBDIRS): Put examples before tests, so that
6491 "make check" doesn't finish with "All 1 tests passed".
6492
6493 * tests/regression.at (Token definitions): Don't rely on
6494 AT_PARSER_CHECK for data that contains backslashes. It currently
6495 uses 'echo', and 'echo' isn't portable if its argument contains
6496 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6497 that the byte '\0xff' is not printable in the C locale; it is,
6498 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6499 not printable, so use '\0x81' to test.
6500
6501 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6502 version of GCC, since the macro is used with non-GCC compilers.
6503
6504 Fix core dump reported by Pablo De Napoli in
6505 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6506 * tests/regression.at (Invalid inputs with {}): New test.
6507 * src/parse-gram.y (token_name): Translate type before using
6508 it as an index.
6509
6510 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6511 the user's name space. All uses changed to __attribute__
6512 ((__unused__)).
6513 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6514 Add __attribute__ ((__noreturn__)).
6515
6516 * etc/clcommit: Remove. We weren't using it, and it failed
6517 "make maintainer-distcheck".
6518 * Makefile.maint: Merge from coreutils.
6519 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6520 (syntax-check-rules): Change list of rules as described below.
6521 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6522 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6523 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6524 (sc_trailing_space): New rules.
6525 (sc_xalloc_h_in_src): Remove.
6526 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6527 (sc_space_tab, sc_error_exit_success, sc_changelog):
6528 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6529 (makefile-check, po-check, author_mark_check):
6530 (makefile_path_separator_check, copyright-check):
6531 Use grep -n, to make it easier to find violations.
6532 Use CVS_LIST and CVS_LIST_EXCEPT.
6533 (header_regexp, h_re): Remove.
6534 (dd_c): New macro.
6535 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6536 (my-distcheck): Use more-modern GCC flags.
6537 (signatures, %.asc): Remove.
6538 (rel-files, announcement): Remove signatures.
6539 Restore old updating code, even though we don't use it, so
6540 that we're the same as coreutils.
6541 (alpha, beta, major): Depend on news-date-check.
6542 Make the upload commands.
6543
6544 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6545 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6546 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6547 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6548 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6549 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6550 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6551 * tests/sets.at: Likewise.
6552
6553 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6554 we comment out the Autoconf version number.
6555 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6556 it's error-prone and "make maintainer-distcheck" rejects it.
6557
6558 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6559 Indent calls to "error" to pacify "make maintainer-distcheck",
6560 when the calls are not intended to be translated.
6561 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6562
6563 * src/Makefile.am (DEFS): Use +=, to pacify
6564 "make maintainer-distcheck".
6565 (bison_SOURCES): Add scan-skel.h.
6566 (sc_tight_scope): New rule, from coreutils.
6567
6568 * src/files.c (src_extension, header_extension):
6569 Now static, not extern.
6570 * src/getargs.c (short_options): Likewise.
6571 * src/muscle_tab.c (muscle_table): Likewise.
6572 * src/parse-gram.y (current_class, current_type, current_prec):
6573 Likewise.
6574 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6575 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6576 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6577 void, to avoid warning when NLS is disabled.
6578 * src/output.c: Include scan-skel.h.
6579 (scan_skel): Remove decl, since scan-skel.h does this.
6580 (output_skeleton):
6581 Indent calls to "error" to pacify "make maintainer-distcheck".
6582 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6583 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6584 "make maintainer-distcheck".
6585 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6586 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6587 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6588 (skel_lex_destroy, scan_skel): Move these decls to...
6589 * src/scan-skel.h: New file.
6590 * src/uniqstr.c (uniqstr_assert):
6591 Indent calls to "error" to pacify "make maintainer-distcheck".
6592
6593 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6594 not @VAR@.
6595
6596 * tests/torture.at: Revamp to avoid misuse of atoi that
6597 "make maintainer-distcheck" complained about.
6598
6599 * examples/extexi (message): Don't print a message more than once,
6600 and omit line-number decoration that makes Emacs compile think
6601 that informative messages are worth worrying about.
6602
6603 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6604
6605 * configure.ac: Update version number.
6606
6607 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6608 accidentally.
6609 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6610 autogenerated by the maintainer.
6611 * examples/calc++/.cvsignore: Add *.yy.
6612
6613 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6614 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6615 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6616
6617 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6618
6619 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6620 from maintainer-distcheck about casting the argument of 'free'.
6621
6622 * NEWS: Mention recent yytname changes.
6623 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6624
6625 * bootstrap: For translations that have not yet been upgraded to
6626 the new runtime-po domain, prime the pump by extracting the
6627 relevant strings from the obsolete translations. This code can be
6628 removed once the bison-runtime domain has been translated by each
6629 team.
6630
6631 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6632 now that token names are already quoted.
6633
6634 Fix problem reported by Anthony Heading.
6635 * data/glr.c (YYTOKEN_TABLE): New macro.
6636 (yytname): Define if YYTOKEN_TABLE.
6637 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6638 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6639 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6640 * src/output.c (prepare_symbols): Output token_table_flag.
6641
6642 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6643
6644 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6645 again if the first call fails.
6646
6647 * data/glr.c (yytnamerr): New function.
6648 (yyreportSyntaxError): Use it to dequote most string literals.
6649 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6650 with other skeletons. All uses changed.
6651 (yytnameerr_): New function.
6652 (yyreport_syntax_error): Use it to dequote most string literals.
6653 * data/yacc.c (yytnamerr): New function.
6654 (yyerrlab): Use it to decode most string literals.
6655 * doc/bison.texinfo (Decl Summary, Calling Convention):
6656 Clarify quoting convention of yytname.
6657 * src/output.c (prepare_symbols): Quote all names. This undoes
6658 the 2005-04-17 change, which is now accomplished (mostly) via
6659 changes in the parsers as described above.
6660 * tests/regression.at (Token definitions, Web2c Actions):
6661 Undo most 2005-04-17 change here, too.
6662
6663 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6664
6665 Fix more problems reported by twlevo@xs4all.nl.
6666 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6667 remove trailing spaces. This loses the exit status of ./types,
6668 and isn't needed since ./types shouldn't be emitting trailing
6669 spaces.
6670 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6671 as the stack isn't valid in that case.
6672
6673 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6674 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6675 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6676 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6677 is used.
6678 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6679 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6680 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6681 Likewise.
6682
6683 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6684 overly-picky compilers that reject 'char *foo = "bar";'.
6685
6686 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6687 to FILE * parameter, not to stderr. This fixes a typo introduced
6688 in the 2005-07-12 change.
6689
6690 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6691 warnings from GCC 4.
6692
6693 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6694 (yyglrShiftDefer, yysplitStack):
6695 Remove unused parameters b4_pure_formals. All uses changed.
6696 (yyglrShift): Remove unused parameters b4_user_formals.
6697 All uses changed.
6698 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6699
6700 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6701
6702 Destructor cleanups and regularization among the three skeletons.
6703 * NEWS: Document the behavior changes.
6704 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6705 stack before failing, as the cleanup code will do it for us now.
6706 * data/lalr1.cc (yyerrlab): Likewise.
6707 * data/glr.c (yyparse): Pop everything off the stack before
6708 freeing it, so that destructors get called properly.
6709 * data/lalr1.cc (yyreturn): Likewise.
6710 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6711 This is more consistent.
6712 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6713 why destructors might be called. 1.875 -> 2.1.
6714 (Destructor Decl, Decl Summary, Table of Symbols):
6715 Some English-language cleanups for %destructor.
6716 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6717 Add output line for destructor of start symbol.
6718 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6719 because of that same extra output line.
6720
6721 * NEWS: Document minor wording changes in diagnostics of
6722 Bison-generated parsers.
6723 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6724 Remove unused formals. All uses changed.
6725 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6726 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6727 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6728 Rename yyoverflowab to yyexhaustedlab.
6729 When memory exhaustion occurs during syntax-error reporting,
6730 report it separately rather than in a single diagnostic; this
6731 eases translation.
6732 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6733 (Memory Exhausted): Renamed from Parser Stack Overflow.
6734 Revamp wording slightly to prefer "memory exhaustion".
6735 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6736
6737 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6738
6739 Add i18n support to the GLR skeleton. Partially fix the C++
6740 skeleton; a C++ expert needs to finish this. Remove debugging
6741 msgids; there's little point to having them translated, since they
6742 can be understood only by someone who can read the
6743 (English-language) source code.
6744
6745 Generate runtime-po/bison-runtime.pot automatically, so that we
6746 don't have to worry about garbage getting in that file. We'll
6747 make sure after the next official release that old msgids don't
6748 get lost. See
6749 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6750
6751 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6752 Now auto-generated.
6753 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6754 Fix typos in explanations of the runtime file.
6755 * bootstrap: Change gettext keyword from YYI18N to YY_.
6756 Use standard Makefile.in.in in runtime-po, since we'll arrange
6757 for backward-compatible bison-runtime.po files in a different way.
6758 * data/glr.c (YY_): New macro, from yacc.c.
6759 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6760 Translate messages intended for users.
6761 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6762 the wording in the other skeletons. We don't know that the memory
6763 is virtual.
6764 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6765 Use same method that yacc.c uses.
6766 Don't translate debugging messages.
6767 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6768 it doesn't work (yet), and requires C++ expertise to fix.
6769 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6770 Move defn to a more logical place, to be consistent with other
6771 skeletons.
6772 Don't translate debugging messages.
6773 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6774 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6775 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6776 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6777
6778 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6779 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6780 void, not int.
6781 * tests/glr-regression.at (Badly Collapsed GLR States):
6782 Likewise.
6783 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6784 yylex should return 0 at EOF rather than aborting.
6785
6786 Improve tests for stack overflow in GLR parser.
6787 Problem reported by twlevo@xs4all.nl.
6788 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6789 All uses removed.
6790 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6791 can handle the problem.
6792 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6793 (yyparse): New local variable yyresult to record the result.
6794 Use result of setjmp to set it, rather than storing itinto
6795 struct.
6796 (yyDone): Remove label.
6797 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6798 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6799 if YYABORT is used).
6800 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6801 yyparse status; put status > 1 into diagnostic.
6802 Check that status==2 works.
6803 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6804 Use exit status 3 for failure to open (which shouldn't happen).
6805
6806 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6807
6808 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6809 1 on syntax error; just let yyparse do its thing.
6810 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6811 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6812 (Exploding the Stack Size with Alloca):
6813 (Exploding the Stack Size with Malloc):
6814 Expect exit status 2, not 1, since the parser is supposed to blow
6815 its stack. Problem reported by twlevo@xs4all.nl.
6816
6817 * data/glr.c (yyparse): Don't assume that the initial calls
6818 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6819 Print a stack-overflow message and fail instead.
6820 Initialize the line-number information before creating the stack,
6821 so that the stack-overflow message can report line zero safely.
6822
6823 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6824
6825 Fix problems reported by twlevo@xs4all.nl.
6826 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6827 (yyuserMerge): Provide a default case if b4_mergers is empty.
6828 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6829 * tests/glr-regression.at
6830 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6831 Add casts to pacify C++ compilers.
6832 * tests/glr-regression.at (Improper merging of GLR delayed action
6833 sets): Declare yylex before using it.
6834 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6835 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6836 test for valgrind; valgrind is independent of g++.
6837 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6838 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6839 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6840 Use a destructor, so that we can expand the stack. Change
6841 YYSTYPE to char * so that we can free it. Cast result of malloc.
6842
6843 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6844
6845 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6846 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6847
6848 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6849
6850 * PACKAGING: New file, suggested by Bruno Haible and taken from
6851 similar wording in gettext's PACKAGING file.
6852 * NEWS: Mention PACKAGING.
6853 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6854
6855 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6856
6857 * NEWS: Document recent i18n improvements.
6858 * bootstrap: Get runtime translations into runtime-po.
6859 Create runtime-po files automatically, if possible.
6860 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6861 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6862 does not infringe on the user's name space.
6863 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6864 * doc/bison.texinfo (Internationalization): Revamp the English
6865 and Texinfo syntax a bit, to try to make it clearer.
6866 (Bison Options, Option Cross Key): Mention --print-localedir.
6867 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6868 YYENABLE_NLS. Quote a bit more.
6869 * runtime-po/.cvsignore: New file.
6870 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6871 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6872 * runtime-po/quot.sed: Likewise.
6873 * runtime-po/boldquot.sed: Likewise.
6874 * runtime-po/en@quot.header: Likewise.
6875 * runtime-po/en@boldquot.header: Likewise.
6876 * runtime-po/insert-header.sin: Likewise.
6877 * runtime-po/remove-potcdate.sin: Likewise.
6878 * runtime-po/Makevars: Likewise.
6879 * runtime-po/LINGUAS: Likewise.
6880 * runtime-po/de.po: Likewise; we will rely on the translation project
6881 to maintain this, so "bootstrap" should get it.
6882 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6883 its value.
6884 * src/main.c (main): Bind the bison-runtime domain, too.
6885
6886 2005-07-12 Bruno Haible <bruno@clisp.org>
6887
6888 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6889 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6890 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6891 * runtime-po: New directory.
6892 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6893 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6894 * runtime-po/Rules-quot: New file, copied from po/.
6895 * runtime-po/quot.sed: Likewise.
6896 * runtime-po/boldquot.sed: Likewise.
6897 * runtime-po/en@quot.header: Likewise.
6898 * runtime-po/en@boldquot.header: Likewise.
6899 * runtime-po/insert-header.sin: Likewise.
6900 * runtime-po/remove-potcdate.sin: Likewise.
6901 * runtime-po/Makevars: New file.
6902 * runtime-po/POTFILES.in: New file.
6903 * runtime-po/LINGUAS: New file.
6904 * runtime-po/bison-runtime.pot: New file.
6905 * runtime-po/de.po: New file.
6906 * m4/bison.m4: New file.
6907 * Makefile.am (SUBDIRS): Add runtime-po.
6908 (aclocaldir, aclocal_DATA): New variables.
6909 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6910 Define aclocaldir.
6911 * src/getargs.c (usage): Document --print-localedir option.
6912 (PRINT_LOCALEDIR_OPTION): New enum item.
6913 (long_options): Add --print-localedir option.
6914 (getargs): Handle --print-localedir option.
6915 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6916 (Internationalization): New section.
6917
6918 2005-07-12 Akim Demaille <akim@epita.fr>
6919
6920 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6921 for consistency with the rest of the code.
6922 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6923 Add separators.
6924
6925 2005-07-12 Akim Demaille <akim@epita.fr>
6926
6927 * src/parse-gram.y: Use %printer instead of YYPRINT.
6928
6929 2005-07-12 Akim Demaille <akim@epita.fr>
6930
6931 * src/symtab.h, src/symtab.c (symbol_print): New.
6932 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6933 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6934
6935 2005-07-12 Akim Demaille <akim@epita.fr>
6936
6937 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6938 b4_at_dollar and b4_dollar_dollar.
6939
6940 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6941
6942 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6943 and Pennello's paper.
6944
6945 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6946
6947 * data/yacc.c (yyparse): Undo previous patch. Instead,
6948 set yylsp[0] and yyvsp[0] only if the initial action
6949 sets yylloc and yylval, respectively.
6950
6951 * data/yacc.c (yyparse): In the initial action, set
6952 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6953 This avoids the use of undefined variables if the initial
6954 action does not set yylloc and/or yylval.
6955
6956 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6957
6958 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6959 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6960 Remove from CVS. These files are automatically generated.
6961 * examples/extexi: Clarify that this file is now part of Bison,
6962 not GNU M4, and that it works with any POSIX-compatible Awk.
6963 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6964 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6965 so that we also get calc++-parser.yy. Geneate it.
6966 Use $(AWK), not gawk, since any conforming Awk will do.
6967 Put comment before action, since older 'make' can't handle comment
6968 in action.
6969 $(BUILT_SOURCES): List all built sources, not just some of them.
6970 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6971 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6972 $($(calc_sources_generated)): Remove unnecessary test for existence
6973 of target. (This had a shell syntax error anyway; a stray "x".)
6974 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6975 calc++-parser.yy.
6976 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6977
6978 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6979 implied by the other modules.
6980
6981 2005-07-06 Akim Demaille <akim@epita.fr>
6982
6983 Bind examples/calc++ to the package.
6984 * examples/calc++/Makefile: Remove, replaced by...
6985 * examples/calc++/Makefile.am: ... this new file.
6986 * examples/calc++/test: Remove input.
6987 * examples/calc++/compile: Remove.
6988 * examples/Makefile.am: New.
6989 * configure.ac, Makefile.am: Adjust.
6990 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6991
6992 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6993
6994 * data/glr.c (yyFail): Drastically simplify; since the format argument
6995 never had any % directives, we can simply pass it to yyerror.
6996 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6997 be modified later, as that is the usual style in glr.c.
6998 Problems reported by Paul Hilfinger.
6999
7000 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7001 and size overflow errors.
7002 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7003 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7004 (YYSIZEMAX): New macro.
7005 (yystpcpy): New function, taken from yacc.c.
7006 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7007 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7008 so that we don't have to maintain their signatures.
7009 (yyFail): Check for buffer overflow, by using vsnprintf rather
7010 than vsprintf. Allocate a bigger buffer if possible.
7011 Report an error if buffer allocation fails.
7012 (yyStackOverflow): New function.
7013 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7014 the initialization was successful. It might fail if storage was
7015 exhausted.
7016 (yyexpandGLRStack): Add more checks for storage allocation failure.
7017 Use yyStackOverflow to report failures.
7018 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7019 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7020 Don't assume stack number fits in int.
7021 (yysplitStack): Check for storage allocation failure.
7022 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7023 can print diagnostics on storage allocation failure. All callers
7024 changed.
7025 (yyresolveValue): Use yybool for boolean.
7026 (yyreportSyntaxError): Check for size-calculation overflow.
7027 This code is taken from yacc.c.
7028 (yyparse): Check for storage allocation errors when allocating
7029 the initial stack.
7030
7031 2005-07-05 Akim Demaille <akim@epita.fr>
7032
7033 Extract calc++ from the documentation.
7034 * doc/bison.texinfo (Calc++): Add the extraction marks.
7035 * examples/extexi: New, from the aborted GNU Programming 2E.
7036 Separate the different paragraph of a file with empty lines.
7037 * examples/Makefile: Use it to extract the whole calc++ example.
7038
7039 2005-06-24 Akim Demaille <akim@epita.fr>
7040
7041 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7042 class typedefs.
7043
7044 2005-06-22 Akim Demaille <akim@epita.fr>
7045
7046 * doc/bison.texinfo (C++ Language Interface): First stab.
7047 (C++ Parsers): Remove.
7048
7049 2005-06-22 Akim Demaille <akim@epita.fr>
7050
7051 * data/lalr1.cc (yylex_): Honor %lex-param.
7052
7053 2005-06-22 Akim Demaille <akim@epita.fr>
7054
7055 Start a set of simple examples.
7056 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7057 * examples/calc++/calc++-driver.hh,
7058 * examples/calc++/calc++-parser.yy,
7059 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7060 * examples/calc++/compile, examples/calc++/test: New.
7061
7062 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7063
7064 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7065 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7066 which stems from the 2005-05-27 patch.
7067
7068 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7069
7070 * data/glr.c: Modify treatment of unused parameters to permit use
7071 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7072
7073 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7074
7075 Fix infringement on user name space reported by Janos Zoltan Szabo.
7076 * data/yacc.c (yyparse): strlen -> yystrlen.
7077
7078 2005-05-30 Akim Demaille <akim@epita.fr>
7079
7080 * data/lalr1.cc (_): New.
7081 Translate the various messages.
7082
7083 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7084
7085 Fix infringement on user name space reported by Bruno Haible.
7086 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7087 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7088 the user's name space.
7089 (alloca): Include <stdlib.h> to get it, if it's not built in.
7090 (YYMALLOC, YYFREE): Define only if needed.
7091 (malloc, free): Declare, but only if needed, as this infringes on
7092 the user name space.
7093
7094 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7095
7096 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7097 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7098 with %d format.
7099 * lib/ebitset.c (min, max): Undef before defining.
7100 * lib/vbitset.c (min, max): Likewise.
7101 * lib/subpipe.c (create_subpipe): Save local variables in case
7102 vfork clobbers them.
7103
7104 2005-05-24 Bruno Haible <bruno@clisp.org>
7105
7106 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7107 error message syntax used by gcc-4.0.
7108
7109 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7110
7111 * README: Mention m4 1.4.3. Remove obsolete advice about
7112 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7113
7114 * bootstrap: Remove workaround for problem I encountered with
7115 gettext 0.14.1; it seems to be fixed now.
7116
7117 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7118
7119 * NEWS: Version 2.0a.
7120
7121 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7122 the previous change.
7123
7124 Various maintainer cleanups.
7125 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7126 conftest*, for benefit of CVS commands run at the same time as
7127 "configure". Add build-aux, since "bootstrap" now creates it and
7128 its subfiles.
7129 * Makefile.cfg (move_if_change): Remove.
7130 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7131 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7132 (po_repo, do-po-update, po-update, wget_files, get-targets):
7133 (config.guess-url_prefix, config.sub-url_prefix):
7134 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7135 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7136 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7137 Remove.
7138 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7139 this is now the recommended name.
7140 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7141 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7142 ylwrap. These files now go into build-aux.
7143 * config/move-if-change: Remove.
7144 * config/prev-version.txt: Bump from 1.75 to 2.0.
7145
7146 * bootstrap: Add stdio-safer, unistd-safer modules.
7147 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7148 we don't need it).
7149 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7150 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7151 * lib/subpipe.c: Include "unistd-safer.h".
7152 (create_subpipe): Make sure all the newly-created
7153 file descriptors are > 2, so that diagnostics don't
7154 get sent down them (which might cause Bison to hang, in theory).
7155 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7156 * src/files.c (xfopen): Use fopen_safer, not fopen.
7157
7158 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7159 yesterday's yacc.c fix.
7160
7161 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7162
7163 * data/glr.c, data/lalr1.cc: Update copyright date.
7164
7165 Fix a destructor bug reported by Wolfgang Spraul in
7166 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7167 * data/yacc.c (yyabortlab): Don't call destructor, and
7168 don't set yychar to EMPTY.
7169 (yyoverflowlab): Don't call destructor.
7170 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7171 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7172 since we no longer output the message "discarding lookahead token
7173 end of input ()".
7174
7175 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7176
7177 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7178 fix a small glitch in debugging output.
7179 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7180 after YY_SYMBOL_PRINT where needed.
7181
7182 (struct yyGLRState): Add some comments.
7183 (struct yySemanticOption): Add some comments.
7184 (union yyGLRStackItem): Add comment.
7185
7186 (yymergeOptionSets): Correct this to properly perform the union,
7187 avoiding infinite reported by Michael Rosien.
7188 Update comment.
7189
7190 * tests/glr-regression.at: Add test for GLR merging error reported
7191 by M. Rosien.
7192
7193 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7194
7195 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7196 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7197 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7198 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7199 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7200 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7201 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7202 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7203 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7204 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7205 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7206 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7207 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7208 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7209 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7210 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7211 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7212 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7213 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7214 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7215 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7216 src/output.h, src/parse-gram.c, src/parse-gram.h,
7217 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7218 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7219 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7220 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7221 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7222 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7223 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7224 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7225 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7226 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7227 tests/reduce.at, tests/regression.at, tests/sets.at,
7228 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7229 Update FSF postal mail address.
7230
7231 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7232
7233 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7234 Problem reported by Ralf Menzel.
7235
7236 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7237
7238 * tests/actions.at: Test that stack overflow invokes destructors.
7239 From Marcus Holland-Moritz.
7240 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7241 from here....
7242 (yyreturn): to here. That way, destructors are called properly
7243 even if the stack overflows, or the user calls YYACCEPT or
7244 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7245 (yyoverflowlab): Destroy the lookahead.
7246
7247 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7248
7249 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7250
7251 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7252
7253 * NEWS: Bison-generated C parsers no longer quote literal strings
7254 associated with tokens.
7255 * src/output.c (prepare_symbols): Don't escape strings,
7256 since users don't want to see C escapes.
7257 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7258 in diagnostics.
7259 * tests/input.at (Torturing the Scanner): Likewise.
7260 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7261
7262 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7263
7264 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7265 the data size is known to be too small and we can't increase it.
7266 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7267
7268 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7269
7270 * src/parse-gram.y: Include quotearg.h.
7271 (string_as_id): Quote $1 before using it as a key, since the
7272 lexer no longer quotes it for us.
7273 (string_content): Don't strip quotes, since lexer no longer
7274 quotes it for us.
7275 * src/scan-gram.l: Include quotearg.h.
7276 ("\""): Omit quote.
7277 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7278 a key, since the rest of the lexer doesn't quote it.
7279 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7280 * tests/regression.at (Token definitions): Check for backslashes
7281 in token strings.
7282
7283 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7284 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7285 (yyparse): Revamp code to generate long syntax error message, to
7286 make it easier to translate, and to avoid problems with arithmetic
7287 overflow. Change "virtual memory" to "memory" in diagnostic, since
7288 we don't know whether the memory is virtual.
7289
7290 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7291
7292 * NEWS: Bison-generated C parsers now use the _ macro to
7293 translate strings.
7294 * data/yacc.c (_) [!defined _]: New macro.
7295 All English strings wrapped inside this macro.
7296 * doc/bison.texinfo (Bison Parser): Document _.
7297 * po/POTFILES.in: Include src/parse-gram.c, since it now
7298 includes translateable strings that parse-gram.y doesn't.
7299
7300 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7301
7302 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7303 reverting the 2004-10-11 change to this function.
7304 (symbol_check_alias_consistency): Don't call symbol_type_set
7305 if the type name is already correct.
7306 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7307
7308 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7309
7310 * tests/regression.at (Token definitions): Don't use a token named
7311 c, as that generates a "#define c ..." that runs afoul of buggy
7312 stdlib.h that uses the identifier c as a member of struct
7313 drand48_data. Problem reported by Horst Wente.
7314
7315 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7316
7317 * bootstrap: Change translation URL from
7318 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7319 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7320 redirection glitches. Problem reported by twlevo@xs4all.nl.
7321
7322 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7323
7324 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7325 after operands; POSIX says this isn't portable for the c99 command.
7326
7327 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7328
7329 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7330 immediately if a data overrun has occurred; this may help us track
7331 down what may be a spurious failure on MacOS.
7332
7333 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7334
7335 Respond to problems reported by twlevo@xs4all.nl.
7336
7337 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7338
7339 * src/vcg.h: Comment fix.
7340 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7341 (G_CMAX): Change to -1 instead of INT_MAX.
7342
7343 * data/yacc.c (yyparse): Omit spaces before #line.
7344
7345 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7346
7347 * src/tables.c (state_number_to_vector_number): Put it inside an
7348 "#if 0", since it's not currently used. Problem reported by
7349 Roland McGrath.
7350
7351 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7352
7353 * src/output.c (escaped_output): Renamed from
7354 escaped_file_name_output, since we now use it for symbol tags as
7355 well. All uses changed.
7356 (symbol_destructors_output, symbol_printers_output):
7357 Escape symbol tags too.
7358 Problem reported by Matyas Forstner in
7359 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7360
7361 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7362 not needed.
7363 * src/output.c (user_actions_output, token_definitions_output,
7364 symbol_destructors_output, symbol_printers_output): Likewise.
7365 * src/reader.c (prologue_augment): Likewise.
7366 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7367
7368 * src/vcg.c (output_edge): Don't quote linestyle arg.
7369 Problem reported by twlevo@xs4all.nl.
7370
7371 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7372
7373 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7374 example, reported by Derek M Jones. Also, make the example even
7375 more outrageous, to better illustrate how bad the problem is.
7376
7377 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7378
7379 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7380 putsym. Typo reported by Sebastian Piping.
7381
7382 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7383
7384 * doc/bison.texinfo (Language and Grammar): some -> same
7385 (Epilogue): int he -> in the
7386 Typos reported by Sebastian Piping via Justin Pence.
7387
7388 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7389
7390 * tests/glr-regression.at (Improper handling of embedded actions
7391 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7392 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7393 with dollar signs in test names.
7394 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7395 for a similar reason.
7396
7397 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7398
7399 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7400 wants to redefine G_VIEW.
7401
7402 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7403
7404 * src/vcg.c (get_view_str): Remove case for normal_view.
7405 Problem reported by twlevo@xs4all.nl.
7406
7407 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7408
7409 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7410 Problem reported by twlevo@xs4all.nl.
7411
7412 * doc/bison.texinfo: Change @dircategory from "GNU programming
7413 tools" to "Software development". Requested by Richard Stallman
7414 via Karl Berry.
7415
7416 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7417
7418 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7419 Problem reported by twlevo@xs4all.nl.
7420
7421 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7422
7423 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7424 keyword; it's not needed with modern compilers, and it doesn't
7425 affect correctness with older compilers. Suggested by
7426 twlevo@xs4all.nl.
7427
7428 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7429
7430 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7431 gcc -Wswitch-default.
7432 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7433 * data/yacc.c (yyparse): Likewise.
7434
7435 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7436
7437 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7438 already. Let config.h define any nonstandard values.
7439
7440 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7441
7442 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7443 for the benefit of slower hosts. Problem reported by
7444 Nelson H. F. Beebe.
7445
7446 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7447
7448 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7449 being defined and not used.
7450 * data/lalr1.cc (yyparse): Likewise.
7451 Use "if (false)" rather than "if (0)".
7452
7453 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7454
7455 * TODO: Mention that we should allow NUL bytes in tokens.
7456
7457 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7458
7459 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7460 Problem reported by Hans Aberg.
7461
7462 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7463
7464 * src/getargs.c (version): Happy new year; update overall
7465 program copyright date from 2004 to 2005.
7466
7467 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7468 Problem reported by Hans Aberg.
7469 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7470 (Output file names.): Add a test for the case when standard output
7471 is closed.
7472
7473 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7474
7475 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7476 to fix an oversight in the Bison 2.0 manual.
7477
7478 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7479
7480 * NEWS: Version 2.0. Reformat the existing news items since
7481 1.875, so that related items are grouped together.
7482 * configure.ac (AC_INIT): Bump version to 2.0.
7483 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7484
7485 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7486 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7487 otherwise, we're not testing alloca. Unfortunately there's no
7488 simple way to consult HAVE_ALLOCA here.
7489
7490 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7491 for yymsg, too.
7492
7493 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7494 hand. This avoids a warning about comparing int to size_t when
7495 GCC warnings are enabled.
7496
7497 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7498
7499 * NEWS: Bison-generated parsers no longer default to using the
7500 alloca function (when available) to extend the parser stack, due
7501 to widespread problems in unchecked stack-overflow detection.
7502 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7503 responsibility to set it to a positive value. This lets the user
7504 specify a value that is not a preprocessor constant.
7505 * data/yacc.c (YYMAXDEPTH): Likewise.
7506 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7507 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7508 to be a compile-time constant. However, explain the constraints on it.
7509 Also, explain the constraints on YYINITDEPTH.
7510 (Table of Symbols): Explain that alloca is no longer the default.
7511 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7512 to 1.
7513
7514 * doc/bison.texinfo (Location Default Action): Mention that n must
7515 be zero when k is zero. Suggested by Frank Heckenbach.
7516
7517 2004-12-22 Akim Demaille <akim@epita.fr>
7518
7519 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7520 (parser::state_type, parser::semantic_type, parser::location_type):
7521 Private, not public.
7522 (parser::parse): Return ints, not bool.
7523 Returning a bool introduces a problem: 0 corresponds to false, and
7524 it seems weird to return false on success. Returning true changes
7525 the conventions for yyparse.
7526 Alternatively we could return void and send an exception.
7527 There is no clear consensus (yet?).
7528 (state_stack, semantic_stack, location_stack): Rename as...
7529 (state_stack_type, semantic_stack_type, location_stack_type): these.
7530 Private, not public.
7531 * tests/c++.at: New.
7532 * tests/testsuite.at, tests/Makefile.am: Adjust.
7533
7534 2004-12-21 Akim Demaille <akim@epita.fr>
7535
7536 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7537
7538 2004-12-21 Akim Demaille <akim@epita.fr>
7539
7540 Don't impose std::string for filenames.
7541
7542 * data/lalr1.cc (b4_filename_type): New.
7543 (position::filename): Use it.
7544 (parser.hh): Move the inclusion of stack.hh and location.hh below
7545 the user code, so that needed headers for the filename type can be
7546 included first.
7547 Forward declare them before the user code.
7548 * tests/Makefile.am (check-local, installcheck-local): Pass
7549 TESTSUITEFLAGS to the TESTSUITE.
7550
7551 2004-12-20 Akim Demaille <akim@epita.fr>
7552
7553 Use more STL like names: my_class instead of MyClass.
7554
7555 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7556 (SemanticStack, SemanticType, StateStack, StateType)
7557 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7558 (Parser::value): Rename as...
7559 (location_stack, location_type, rhs_number_type, semantic_stack)
7560 (semantic_type, state_stack, state_type, token_number_type, stack)
7561 (slice, traits, parser::yylloc, parser::yylval): these.
7562
7563 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7564
7565 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7566
7567 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7568 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7569
7570 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7571
7572 Remove uses of 'short int' and 'unsigned short int'. This raises
7573 some arbitrary limits. It uses more memory but nowadays that's
7574 not much of an issue.
7575
7576 This change does not affect the generated parsers; that's a different
7577 task, as some users will want to conserve memory there.
7578
7579 Ideally we should use size_t to represent all object counts, and
7580 something like ptrdiff_t to represent signed differences of object
7581 counts; but that will require more code-cleanup than I have the
7582 time to do right now.
7583
7584 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7585 Use size_t, not int or short int, to count objects.
7586 * src/closure.c (nritemset, closure): Likewise.
7587 * src/closure.h (nritemset, closure): Likewise.
7588 * src/nullable.c (nullable_compute): Likewise.
7589 * src/print.c (print_core): Likewise.
7590 * src/print_graph.c (print_core): Likewise.
7591 * src/state.c (state_compare, state_hash): Likewise.
7592 * src/state.h (struct state): Likewise.
7593 * src/tables.c (default_goto, goto_actions): Likewise.
7594
7595 * src/gram.h (rule_number, rule): Use int, not short int.
7596 * src/output.c (prepare_rules): Likewise.
7597 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7598 errs, reductions): Likewise.
7599 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7600 Likewise.
7601 * src/tables.c (vector_number, tally, action_number,
7602 ACTION_NUMBER_MINIMUM): Likewise.
7603 * src/output.c (muscle_insert_short_int_table): Remove.
7604
7605 2004-12-17 Akim Demaille <akim@epita.fr>
7606
7607 * data/lalr1.cc: Extensive Doxygenation.
7608 (error_): Rename as...
7609 (error): this, since it is visible to the user.
7610 Adjust callers.
7611 (Parser::message): Now an automatic variable from...
7612 (Parser::yyreport_syntax_error_): here.
7613 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7614 Parser::error.
7615 * tests/input.at: Escape $.
7616
7617 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7618
7619 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7620 Parenthesize rhs to avoid obscure problems with mistakes like
7621 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7622 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7623 b4_rhs_location): Likewise.
7624 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7625 b4_rhs_location): Likewise.
7626
7627 2004-12-16 Akim Demaille <akim@epita.fr>
7628
7629 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7630 yacc.c: be sure to stay within yycheck_.
7631 * tests/actions.at: Re-enable C++ tests.
7632
7633 2004-12-16 Akim Demaille <akim@epita.fr>
7634
7635 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7636 real.
7637
7638 2004-12-16 Akim Demaille <akim@epita.fr>
7639
7640 Use #define to handle the %name-prefix.
7641
7642 * data/glr.c, data/yacc.c: Comment changes.
7643 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7644 so that one can refer to yylex in the parser file, and have it
7645 renamed, as is the case with other skeletons.
7646
7647 2004-12-16 Akim Demaille <akim@epita.fr>
7648
7649 Move lalr1.cc internals into yy*.
7650
7651 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7652 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7653 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7654 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7655 (empty_, final_, terror_, errcode_, ntokens_)
7656 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7657 (looka_, ilooka_, error_range_, nerrs_):
7658 Rename as...
7659 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7660 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7661 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7662 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7663 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7664 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7665 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7666 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7667 these.
7668
7669 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7670
7671 Fix some problems reported by twlevo at xs4all.
7672 * src/symtab.c (symbol_new): Report an error if the input grammar
7673 contains too many symbols. This is better than calling abort() later.
7674 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7675 (struct node, struct graph):
7676 Rename member expand to stretch. All uses changed.
7677 (struct graph): Remove member layoutalgorithm. All uses removed.
7678 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7679 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7680 All uses changed.
7681 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7682
7683 2004-12-15 Akim Demaille <akim@epita.fr>
7684
7685 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7686 Add more Doxygen comments.
7687 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7688 (report_syntax_error_, translate_): Rename as...
7689 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7690 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7691
7692 2004-12-15 Akim Demaille <akim@epita.fr>
7693
7694 * data/lalr1.cc (lex_): Rename as...
7695 (yylex_): this.
7696 Move the trace here.
7697 Take the %name-prefix into account.
7698 Reported by Alexandre Duret-Lutz.
7699
7700 2004-12-15 Akim Demaille <akim@epita.fr>
7701
7702 Simplify the C++ parser constructor.
7703
7704 * data/lalr1.cc (debug_): Rename as...
7705 (yydebug_): so that the parser's internals are always in the yy*
7706 pseudo namespace.
7707 Adjust uses.
7708 (b4_parse_param_decl): Remove the leading comma as it is now only
7709 called as unique argument list.
7710 (Parser::Parser): Remove the constructor accepting a location and
7711 an initial debugging level.
7712 Remove from the other ctor the argument for the debugging level.
7713 (debug_level_type, debug_level, set_debug_level): New.
7714
7715 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7716 constructor calls.
7717
7718 2004-12-15 Akim Demaille <akim@epita.fr>
7719
7720 Remove b4_root related material: failure experiment
7721 (which goal was to allow to derive from a class).
7722
7723 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7724 definitions and uses.
7725
7726 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7727
7728 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7729 not 2, since it's not portable to subtract 1 from the start of an
7730 array. The new item 0 is never set or used. All uses changed.
7731
7732 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7733 the default definition of YYLLOC_DEFAULT. Problem reported
7734 by Frank Heckenbach.
7735
7736 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7737
7738 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7739 the normal case and one for the error case. Just use the
7740 first one uniformly. Problem reported by Frank Heckenbach.
7741 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7742 use exactly the same macro in both places.
7743 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7744 so that the normal-case YYRHSLOC works for the error case too.
7745 All uses changed.
7746 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7747 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7748 * doc/bison.texinfo (Location Default Action): Don't claim that
7749 we have an array of locations. Use the same macro for both glr
7750 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7751 the index is 0.
7752
7753 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7754
7755 * HACKING: Update email addresses to send announcements to.
7756
7757 * configure.ac (AC_INIT): Bump version to 1.875f.
7758
7759 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7760
7761 * NEWS: Version 1.875e.
7762 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7763
7764 * src/scan-skel.l: Include "complain.h", for "fatal".
7765
7766 * src/relation.h (relation_print, relation_digraph):
7767 Relation sizes are of type relation_node, not size_t (this is
7768 merely a doc fix, since the two types are equivalent).
7769 (relation_transpose): Relation sizes are of type relation_node,
7770 not int.
7771 * src/relation.c: Likewise.
7772 (top, infinity): Now of type relation_node, not int.
7773 (traverse, relation_transpose): Use relation_node, not int.
7774
7775 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7776 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7777 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7778
7779 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7780 specifying whether the test should be skipped. Use it tp
7781 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7782 fail on some hosts, and should be skipped.
7783
7784 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7785
7786 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7787 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7788 unless otherwise specified below.
7789
7790 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7791 to allocate kernel_base, kernel_items, kernel_size, since
7792 they needn't be initialized to 0.
7793 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7794 * src/closure.c (new_closure): Likewise, for itemset.
7795 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7796 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7797 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7798 (build_relations): Likewise for edge, states1, includes.
7799 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7800 * src/reader.c (packgram): Likewise, for ritem, rules.
7801 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7802 * src/relation.c (relation_digraph): Likewise for VERTICES.
7803 (relation_transpose): Likewise for new_R, end_R.
7804 * src/symtab.c (symbols_token_translations_init): Likewise for
7805 token_translations.
7806 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7807 (token_actions): Likewise for yydefact, actrow, conflrow,
7808 conflict_list.
7809 (save_column): Likewise for froms[symno], tos[symno].
7810 (goto_actions): Likewise for state_count.
7811 (pack_table): Likewise for base, pos, check.
7812 (tables_generate): Likewise for width.
7813
7814 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7815 for initial core. Just have a separate core, so we needn't worry
7816 about whether kernel_size and kernel_base are initialized.
7817
7818 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7819 kernel_size, kernel_items): Remove unnecessary initialization.
7820 * src/conflicts.c (conflicts): Likewise.
7821 * src/derives.c (derives): Likewise.
7822 * src/muscle_tablc (muscle_insert): Likewise.
7823 * src/relation.c (relation_digraph): Likewise.
7824 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7825 conflrow, conflict_table, conflict_list, table, check):
7826 Likewise.
7827
7828 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7829 This is because all callers pass unsigned int.
7830 * src/closure.h (new_closure): Likewise.
7831
7832 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7833 (build_relations): Initialize includes[i] in all cases.
7834 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7835 and rules[ruleno].precsym. Initialize members in order.
7836 * src/relation.c (relation_transpose): Always initialize new_R[i]
7837 and end_R[i].
7838 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7839
7840 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7841 conflict_list[0] was always 0, but now it isn't initialized.
7842
7843 * src/table.c (table_grow): When conflict_table grew, the grown
7844 area wasn't cleared. Fix this.
7845
7846 * lib/.cvsignore: Add strdup.c, strdup.h.
7847 * m4/.cvsignore: Add strdup.m4.
7848
7849 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7850
7851 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7852 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7853 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7854 ngotos + 1 without checking for overflow.
7855 (build_relations): Use END_NODE, not -1, to denote end of edges.
7856 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7857 build_relations): Use goto_number, not int, for goto numbers.
7858 * src/tables.c (save_column, default_goto): Likewise.
7859
7860 2004-11-23 Akim Demaille <akim@epita.fr>
7861
7862 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7863 of #defining from yystype.
7864 Don't typedef yystype, C++ does not need it.
7865 This lets it possible to forward declare it as union.
7866
7867 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7868
7869 * bootstrap (gnulib_modules): Add extensions.
7870 Problem reported by Jim Meyering.
7871
7872 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7873
7874 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7875 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7876 src/system.h, src/tables.c: XFREE -> free, to accommodate
7877 recent change to gnulib xalloc.h.
7878 Problem reported by Jim Meyering.
7879
7880 2004-11-17 Akim Demaille <akim@epita.fr>
7881
7882 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7883
7884 2004-11-17 Akim Demaille <akim@epita.fr>,
7885 Alexandre Duret-Lutz <adl@gnu.org>
7886
7887 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7888 changes.
7889 (YYCDEBUG): Adjust.
7890 Use it instead of cdebug_.
7891 (Parser::debug_stream, Parser::set_debug_stream): New.
7892 (Parser::symprint_): Define cdebug_ for temporary backward
7893 compatibility.
7894 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7895 debug_stream ().
7896
7897 2004-11-17 Akim Demaille <akim@epita.fr>
7898
7899 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7900 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7901 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7902 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7903
7904 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7905
7906 * data/glr.c (yyloc_default): Remove; not used.
7907 Problem reported by Frank Heckenbach.
7908
7909 2004-10-25 Akim Demaille <akim@epita.fr>
7910
7911 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7912 Introduce another definition to address simple location arrays.
7913 (yyGLRStack): New member: yyerror_range.
7914 (yyrecoverSyntaxError, yyparse): Update it.
7915 (yyrecoverSyntaxError): Use it when shifting the error token to
7916 have an accurate range, equivalent to the one computed by both
7917 yacc.c and lalr1.cc.
7918 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7919 that column numbers start at column 0, as per GNU Coding
7920 Standards, the others tests, and the doc.
7921 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7922 Adjust to the above change (first column is 0).
7923 And adjust the location of the "<error>", now covering the whole
7924 line.
7925
7926 2004-10-22 Akim Demaille <akim@epita.fr>
7927 and Paul Eggert <eggert@cs.ucla.edu>
7928
7929 Remove some arbitrary limits on goto numbers and relations.
7930 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7931 initial values, since they're never used.
7932 (set_goto_map): ngotos is now unsigned, so test for overflow
7933 by seeing whether it wraps around to zero.
7934 * src/lalr.h (goto_number): Now size_t, not short int.
7935 (GOTO_NUMBER_MAXIMUM): Remove.
7936 * src/relation.c (relation_print, traverse, relation_transpose):
7937 Check for END_NODE rather than looking at sign.
7938 * src/relation.h (END_NODE): New macro.
7939 (relation_node): Now size_t, not short int.
7940
7941 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7942
7943 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7944 keyword, not an identifier. Problem reported by Baron Schwartz in
7945 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7946
7947 2004-10-11 Akim Demaille <akim@epita.fr>
7948
7949 * src/symtab.c (symbol_check_alias_consistency): Also check
7950 type names, destructors, and printers.
7951 Reported by Alexandre Duret-Lutz.
7952 Recode the handling of associativity and precedence in terms
7953 of symbol_precedence_set.
7954 Accept no redeclaration at all, not even equal to the previous
7955 value.
7956 (redeclaration): New.
7957 Use it to factor redeclaration complaints.
7958 (symbol_make_alias): Don't set the type of the alias, let
7959 symbol_check_alias_consistency do it as for other features.
7960 * src/symtab.h (symbol): Add new member prec_location, and
7961 type_location.
7962 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7963 * tests/input.at (Incompatible Aliases): New.
7964
7965 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7966
7967 .cvsignore fixes to accommodate gnulib changes,
7968 and the practice of naming build directories "_build".
7969 * .cvsignore: Add "_*". Sort.
7970 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7971 * m4/.cvsignore: Add "*_gl.m4".
7972
7973 2004-10-06 Akim Demaille <akim@epita.fr>
7974
7975 * src/parse-gram.y (add_param): Fix the truncation of trailing
7976 spaces.
7977
7978 2004-10-05 Akim Demaille <akim@epita.fr>
7979
7980 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7981 whether the reducion was empty or not. This leaves room to
7982 improve the use of YYLLOC_DEFAULT in such a case.
7983 lalr1.cc is still experimental, so changing this is acceptable.
7984 And finally, there are probably not many users who changed the
7985 handling of locations in GLR, so changing is admissible too.
7986
7987 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7988 empty reduction, set @$ to an empty location ending the previously
7989 stacked symbol.
7990 Adjust uses to make sure the code is triggered on empty
7991 reductions.
7992 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7993 expected output: empty reductions have empty locations.
7994
7995 2004-09-29 Akim Demaille <akim@epita.fr>
7996
7997 * data/lalr1.cc: Move towards a more standard C++ coding style
7998 for templates: Class < T > -> Class<T>.
7999
8000 2004-09-29 Akim Demaille <akim@epita.fr>
8001
8002 * data/lalr1.cc: Reinstall the former ctor, for sake of
8003 compatibility, but warn it will be removed.
8004 Move towards a more standard C++ coding style (i.e., type *var ->
8005 type* var).
8006
8007 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8008
8009 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8010 since it's less likely to work if NULs are involved in the future.
8011
8012 2004-09-27 Akim Demaille <akim@epita.fr>
8013
8014 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8015
8016 2004-09-27 Akim Demaille <akim@epita.fr>
8017
8018 * data/lalr1.cc (b4_parse_param_decl_1): New.
8019 (b4_parse_param_decl): Use it to have different names between attribute
8020 and argument names.
8021 (b4_cc_constructor_call): Likewise.
8022
8023 2004-09-24 Akim Demaille <akim@epita.fr>
8024
8025 * src/parse-gram.y (add_param): Strip the leading and trailing
8026 blanks from a formal argument declaration.
8027 (YY_LOCATION_PRINT): New.
8028
8029 2004-09-24 Akim Demaille <akim@epita.fr>
8030
8031 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8032 after the location.
8033
8034 2004-09-24 Akim Demaille <akim@epita.fr>
8035
8036 * doc/bison.texinfo (Table of Symbols): Sort.
8037
8038 2004-09-21 Akim Demaille <akim@epita.fr>
8039
8040 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8041 the useless parentheses.
8042 Suggested by Paul Eggert.
8043
8044 2004-09-20 Akim Demaille <akim@epita.fr>
8045
8046 Let the initial-action act on the look-ahead, and use it for the
8047 "initial push" (corresponding to an hypothetical beginning-of-file).
8048 And let lalr1.cc honor %initial-action.
8049
8050 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8051 example.
8052 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8053 (Parser::Parser): Remove the ctor that used to initialize it.
8054 (Parser::parse): Like in the other skeletons, issue the "starting
8055 parse" message before any action.
8056 Honor %initial-action.
8057 Initialize the stacks with the lookahead.
8058 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8059 look-ahead.
8060 Push them in the stacks.
8061 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8062
8063 2004-09-20 Akim Demaille <akim@epita.fr>
8064
8065 * doc/bison.texinfo (Initial Action Decl): New.
8066
8067 2004-09-20 Akim Demaille <akim@epita.fr>
8068
8069 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8070 clearer criterion to define it.
8071 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8072 When reducing on an empty RHS, use the latest stacked location as
8073 location.
8074 yylloc is not always available.
8075 * data/glr.c: Likewise.
8076 Also, honor initial-actions.
8077
8078 2004-09-20 Akim Demaille <akim@epita.fr>
8079
8080 * data/yacc.c (YY_LOCATION_PRINT): New.
8081 Define when we know YYLTYPE's structure, i.e., when the default
8082 YYLLOC_DEFAULT is used.
8083 * data/c.m4 (b4_yysymprint_generate): Use it.
8084 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8085 value of the result.
8086 (error_start_): Replace with...
8087 (error_range_): this location array.
8088 This allows to replace code relying on the implementation of
8089 locations by portable code.
8090 * data/yacc.c (yylerrsp): Replace with...
8091 (yyerror_range): this.
8092 Every time a token is popped, update yyerror_range[0], to have an
8093 accurate location for the error token.
8094 * data/glr.c (YY_LOCATION_PRINT): New.
8095 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8096 deference a pointer.
8097 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8098 report the location in %printers.
8099
8100 * src/scan-skel.l: Instead of abort, report error messages to ease
8101 understanding skeleton scanning failures.
8102
8103 2004-09-16 Akim Demaille <akim@epita.fr>
8104
8105 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8106 (iterator, const_iterator): these, to be more in the C++ spirit.
8107 Also, return reverse iterators so that when displaying the stack
8108 we display its bottom first.
8109 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8110 from yacc.c.
8111 We should probably use vector here though.
8112
8113 2004-09-16 Akim Demaille <akim@epita.fr>
8114
8115 Have more complete shift traces.
8116
8117 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8118 to report Shifts instead of ad hoc YYDPRINTF invocations,
8119 including for the error token.
8120 * data/lalr1.cc (symprint_): Output the location.
8121 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8122 output the location within the %printer.
8123 Activate GLR tests, at least to make sure they compile properly.
8124 They still don't pass though.
8125 * tests/calc.at: Adjust expect verbose output, since now "Entering
8126 state..." is on a different line than the "Shifting" message.
8127
8128 2004-09-08 Akim Demaille <akim@epita.fr>
8129
8130 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8131 Bison directive from the Bison file to the invocation of this
8132 macro, so that these directives are passed to
8133 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8134 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8135 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8136 the extra Bison directives instead of the whole series.
8137 Change the grammar so that there are recoverable errors, and
8138 unrecoverable errors. Now we can have the parser give up before
8139 consuming the whole input. As a result we now can observe that
8140 the lookahead is freed when needed.
8141 Change the parser source to parse argv[1] instead of a hard coded
8142 string.
8143 Simplify yylex, and give a value and location to EOF.
8144 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8145 passed directives already coded in the file.
8146 Add some tests to check the location of "error".
8147 For some tests, the C++ parser is correct, and not yacc.c.
8148 For other tests, they provide different, but unsatisfying, values,
8149 so keep the C++ value so that at least one parser is "correct"
8150 according to the test suite.
8151 (Actions after errors): Remove, this is subsumed by the
8152 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8153
8154 2004-09-06 Akim Demaille <akim@epita.fr>
8155
8156 * data/lalr1.cc: Adjust the indentation of the labels.
8157 (Parser::pop): New.
8158 Use it.
8159
8160 2004-09-06 Akim Demaille <akim@epita.fr>
8161
8162 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8163 argument, an informative message.
8164 Call YY_SYMBOL_PRINT.
8165 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8166 * data/lalr1.cc (destruct_): Likewise.
8167 In addition, no longer depend on b4_yysymprint_generate and
8168 b4_yydestruct_generate to generate these functions, do it "by
8169 hand".
8170
8171 2004-09-03 Akim Demaille <akim@epita.fr>
8172
8173 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8174 invoked, yydestruct the lookahead.
8175 * tests/calc.at (Calculator $1): Update the expected lengths of
8176 traces: there is an added line for the discarded lookahead.
8177 * doc/bison.texinfo (Destructor Decl): Some rewording.
8178 Define "discarded" symbols.
8179
8180 2004-09-02 Akim Demaille <akim@epita.fr>
8181
8182 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8183
8184 2004-09-02 Akim Demaille <akim@epita.fr>
8185
8186 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8187 (YYDSYMPRINTF): Rename as...
8188 (YY_SYMBOL_PRINT): this.
8189 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8190 two.
8191 Use it instead of direct symprint_ calls.
8192 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8193 one.
8194
8195 2004-09-02 Akim Demaille <akim@epita.fr>
8196
8197 * data/lalr1.cc (b4_yysymprint_generate): New.
8198 (symprint_): New member function, defined when YYDEBUG.
8199 Use it consistently instead of token/nterm debugging output by
8200 hand.
8201 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8202 %printer calls to use cdebug_ when using lalr1.cc.
8203
8204 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8205
8206 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8207 with #ifdef YYDEBUG.
8208
8209 2004-08-26 Akim Demaille <akim@epita.fr>
8210
8211 * doc/bison.texinfo (Implementing Loops): Rename as...
8212 (Implementing Gotos/Loops): this.
8213
8214 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8215
8216 Adjust to latest gnulib.
8217 * bootstrap (gnulib_modules): Add xalloc-die.
8218 Set LC_ALL=C so that file names sort consistently.
8219 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8220 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8221 uintmax_t.m4, ulonglong.m4.
8222 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8223 po.m4 since we are now using _gl.m4 instead.
8224
8225 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8226
8227 * src/scan-action.l: Remove. Scanning of semantic actions is
8228 handled in scan-gram.l.
8229
8230 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8231
8232 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8233
8234 * src/location.h (struct): The file member is a uniqstr.
8235 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8236
8237 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8238
8239 Fix bug with non-%union parsers that have printers or destructors,
8240 which led to a Bison core dump. Reported by Peter Fales in
8241 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
8242
8243 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8244 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8245 not to our own type.
8246 * src/output.c (symbol_destructors_output, symbol_printers_output):
8247 Don't assume %union.
8248 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8249 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8250 UNION-FLAG. All callers changed.
8251 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8252 Use type char, not unsigned int, when declaring an array of char;
8253 this lets us remove a cast.
8254 (Printers and Destructors): Add non-%union test cases.
8255
8256 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8257
8258 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8259 GLR writeups. E.g., avoid frenchspacing and the future tense,
8260 change "lookahead" to "look-ahead", and change "wrt" to "with
8261 respect to".
8262
8263 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8264
8265 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8266 New sections, split off from the GLR Parsers section. Put the new
8267 Simple GLR Parser near the start of the GLR section, for clarity.
8268 Rewrite connective text.
8269
8270 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
8271
8272 * doc/bison.texinfo (Simple GLR Parsers): New section.
8273
8274 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8275
8276 * NEWS, TODO, doc/bison.texinfo:
8277 Use "look-ahead" instead of "lookahead", to be consistent.
8278 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8279 while we're fixing "look-ahead".
8280 * src/conflicts.c (shift_set): Renamed from shiftset.
8281 (look_ahead_set): Renamed from lookaheadset.
8282 * src/print.c: Likewise.
8283 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8284 name for "lookahead".
8285 (report_types, usage): Likewise.
8286 * src/getargs.h (report_look_ahead_tokens): Renamed from
8287 report_lookaheads.
8288 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8289 compute_lookaheads.
8290 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8291 (look_ahead_tokens_print): Renamed from lookaheads_print.
8292 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8293 state_rule_lookaheads_print.
8294 * src/state.h: Likewise.
8295 (reductions.look_ahead_tokens): Renamed from lookaheads.
8296 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8297 AT_DATA_LOOKAHEADS_GRAMMAR.
8298
8299 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8300
8301 * README: Update location of patched M4 distribution.
8302
8303 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8304
8305 Don't assume the C++ compiler takes the same arguments as the C compiler
8306 (trivial change).
8307 * configure.ac (O0CXXFLAGS): New var.
8308 * tests/atlocal.in (CXXFLAGS): Use it.
8309
8310 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8311
8312 Fix some "make check" problems with C++ reported by
8313 Albert Chin-A-Young for Tru64 C++ in this thread:
8314 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8315
8316 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8317 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8318 Output to a .cc file for C++, not to a .c file.
8319 * tests/calc.at (AT_CHECK_CALC): Likewise.
8320 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8321 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8322
8323 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8324
8325 * tests/calc.at, tests/actions.at: Workaround for SGI
8326 C++ compiler. (trivial change)
8327
8328 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8329
8330 Spent a few hours checking out which prerequisite versions the
8331 current sources actually require. I went all the way back to
8332 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8333 a seemingly endless set of combinations of versions more recent
8334 than that. The bottom line is that the current sources require
8335 fairly recent versions of the build tools, and it'll be some work
8336 to change this.
8337 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8338 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8339 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8340 Add comments explaining why those particular versions are
8341 currently needed.
8342
8343 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8344 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
8345 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
8346
8347 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8348 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8349
8350 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8351
8352 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8353 0.11.5. Suggested by Bruno Haible.
8354 * bootstrap: Remove gettext version checking.
8355
8356 * doc/bison.texinfo (Decl Summary): Also mention that %union
8357 can depend on prerequisite types. Problem reported by Tim
8358 Van Holder.
8359
8360 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8361
8362 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8363 * README-alpha: Don't tell people not to package this.
8364
8365 * bootstrap: Don't assume $(...) works; use `...` instead.
8366 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8367 gettext better.
8368
8369 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8370 put into the -d output file, and mention what to do if YYSTYPE is
8371 defined as a macro.
8372
8373 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8374
8375 Undo change made earlier today: it caused autopoint to not bring
8376 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8377 autopoint's.
8378
8379 * bootstrap: Check that gettext version matches what's in
8380 configure.ac. Warn users to ignore robots.txt ERROR 404.
8381 * bootstrap: Undo today's earlier change (logged below).
8382 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8383
8384 The gettext version checking is causing more trouble than it's
8385 curing; remove it. Problem reported by Paul Hilfinger.
8386
8387 * bootstrap: Issue a warning that one can expect a message
8388 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8389 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8390
8391 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8392
8393 Ensure that the C++ compiler used for testing actually works on a
8394 simple test program; if not, skip the C++-related tests. Problem
8395 reported by Vin Shelton in:
8396 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8397
8398 * m4/cxx.m4: New file.
8399 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8400 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8401 * tests/local.at (AT_COMPILE_CXX): Use it.
8402
8403 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8404
8405 * data/glr.c (yylloc): Output this macro even if locations are not
8406 being generated, as the GLR parser needs it even in that case.
8407 Problem reported by Troy A. Johnson
8408 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8409
8410 * configure.ac (AC_INIT): Update to 1.875e.
8411
8412 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8413
8414 * NEWS: Version 1.875d.
8415 * configure.ac (AC_INIT): Likewise.
8416 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8417
8418 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8419 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8420 lalr1.cc runs afoul of the first, and the last two are no longer
8421 supported by GCC 3.4.0.
8422 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8423 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8424
8425 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8426
8427 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8428 unsigned int, for compatibility with latest gnulib hash module.
8429 * src/state.c (state_hash, state_hasher): Likewise.
8430 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8431 * src/uniqstr.c (hash_uniqstr): Likewise.
8432
8433 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8434
8435 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8436
8437 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8438 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8439 character and string literals.
8440 (unexpected_end): New function.
8441 (unexpected_eof): Use it.
8442 (unexpected_newline): New function.
8443 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8444 actions.
8445
8446 * NEWS: Document %expect-rr.
8447
8448 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8449 Fix typo by replacing $1 with $option.
8450 Remove more 'intl'-related files.
8451 Don't DEFUN AM_INTL_SUBDIR twice.
8452
8453 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8454 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8455 strtoul.c.
8456 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8457 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8458 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8459 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8460 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8461 * src/.cvsignore: Add *.output.
8462
8463 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8464 gets copied to the output file.
8465
8466 2004-04-28 Paul Eggert <eggert@twinsun.com>
8467
8468 Get files from the gnulib and po repositories, instead of relying
8469 on them being in our CVS. Upgrade to latest versions of gnulib
8470 and Automake.
8471
8472 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8473 * bootstrap: Bootstrap from gnulib and po repositories.
8474 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8475 * README-cvs: Document these changes. Remove version numbers from
8476 mentions of build tools, since they change so often. Mention Flex.
8477
8478 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8479 (gl_USE_SYSTEM_EXTENSIONS): Add.
8480 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8481 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
8482 does this for us.
8483 (AC_ISC_POSIX): Remove; we no longer support this
8484 ancient OS, as it gets in the way of latest Autoconf & gnulib.
8485 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8486 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8487 Do not check for C89 headers, except for locale.h which is used
8488 by the Yacc library and must port to K&R hosts.
8489 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8490 Do not check for C89 functions, except for setlocale which is
8491 used by the Yacc library.
8492 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8493 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8494 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8495 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8496 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8497 AM_GNU_GETTEXT): Remove; now done by:
8498 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8499 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8500 for us.
8501
8502 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8503 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8504 Define to empty, as gnulib.mk will do the rest for us.
8505 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8506 for us.
8507 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8508 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8509
8510 * src/files.c: Include gnulib's xstrndup.h.
8511
8512 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8513 (REALLOC): Use xnrealloc, for likewise.
8514 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8515 (strnlen, memrchr): Remove decls; functions no longer used.
8516 Include <stpcpy.h>.
8517
8518 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8519 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8520 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8521 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8522 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8523 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8524 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8525 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8526 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8527 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8528 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8529 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8530 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8531 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8532 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8533 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8534 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8535 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8536 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8537 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8538 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8539 Remove, as these files are now generated automatically
8540 by bootstrap or automake.
8541
8542 * po/ChangeLog: Remove: all but one entry was a duplicate
8543 of this file, and I moved that 2000-11-02 entry here.
8544
8545 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8546 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8547 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8548 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8549 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8550 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8551 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8552 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8553 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8554 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8555 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8556 xstrndup.h.
8557 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8558 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8559 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8560 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8561 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8562 * src/.cvsignore: Remove *_.c.
8563
8564
8565 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8566 support it. (The latest stable gzip doesn't.)
8567
8568 2004-04-27 Paul Eggert <eggert@twinsun.com>
8569
8570 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8571 case, as stos_ is now used by destructors due to the 2004-02-09
8572 change.
8573
8574 Remove more K&R C support.
8575 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8576 * lib/subpipe.c (errno): Remove decl.
8577 Include <stdlib.h> unconditionally.
8578 (EXIT_FAILURE): Remove macro.
8579 * src/complain.c (vfprintf, strerror): Remove.
8580 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8581 unconditionally.
8582 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8583 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8584 (strchr, strspn, memchr): Remove decls.
8585 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8586 unconditionally. Do not declare perror.
8587 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8588 unconditionally.
8589
8590 * src/complain.c (_): Remove useless defn, as system.h defines this.
8591
8592 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8593 with latest obstack.h.
8594 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8595 to procedure types, as obstack.h now does that for us.
8596 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8597
8598 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8599 so that this include file can stand alone.
8600 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8601 does this now. Include subpipe.h first after config.h, to
8602 test whether it can stand alone.
8603
8604 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8605 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8606 unused declaration.
8607
8608 * tests/synclines.at (%union synch line): Put a dummy member in
8609 the union, because empty unions aren't allowed in C. Caught
8610 by GCC 3.4.0.
8611
8612 2004-04-13 Jim Meyering <jim@meyering.net>
8613
8614 * src/conflicts.c (conflicts_print): Correct format string typo:
8615 use `%%' to produce literal `%'. (trivial change)
8616
8617 2004-03-30 Paul Eggert <eggert@twinsun.com>
8618
8619 * src/getargs.c (version): Update copyright year to 2004.
8620
8621 * data/c.m4 (b4_int_type): Use 'short int' rather than
8622 'short', and similarly for 'long', 'unsigned', etc.
8623 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8624 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8625 yy_yypstack, yydumpstack): Likewise.
8626 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8627 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8628 Likewise.
8629 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8630 yy_stack_print, yyparse): Likewise.
8631 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8632 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8633 * lib/bitset.c (bitset_print): Likewise.
8634 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8635 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8636 * lib/bitsetv.c (bitsetv_dump): Likewise.
8637 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8638 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8639 Likewise.
8640 * src/LR0.c (allocate_itemsets): Likewise.
8641 * src/gram.h (rule_number, rule): Likewise.
8642 * src/lalr.h (goto_number): Likewise.
8643 * src/nullable.c (nullable_compute): Likewise.
8644 * src/output.c (prepare_rules): Likewise.
8645 * src/relation.c (relation_print, relation_digraph): Likewise.
8646 * src/relation.h (relation_node): Likewise.
8647 * src/state.h (state_number, transitions, errs, reductions,
8648 struct state): Likewise.
8649 * src/symtab.h (symbol_number, struct symbol): Likewise.
8650 * src/tables.c (vector_number, tally, action_number,
8651 default_goto, goto_actions): Likewise.
8652 * tests/existing.at (GNU Cim Grammar): Likewise.
8653 * tests/regression.at (Web2c Actions): Likewise.
8654
8655 * src/output.c (muscle_insert_short_int_table): Renamed from
8656 muscle_insert_short_table. All uses changed.
8657
8658 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8659
8660 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8661 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8662 Add %expect-rr rule.
8663
8664 * src/scan-gram.l: Recognize %expect-rr.
8665
8666 * src/conflicts.h (expected_sr_conflicts): Rename from
8667 expected_conflicts.
8668 (expected_rr_conflicts): Declare.
8669
8670 * src/conflicts.c (expected_sr_conflicts): Rename from
8671 expected_conflicts.
8672 (expected_rr_conflicts): Define.
8673 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8674 for GLR parsers.
8675 Use expected_sr_conflicts in place of expected_conflicts.
8676 Warn if expected_rr_conflicts used in non-GLR parser.
8677
8678 * doc/bison.texinfo: Add documentation for %expect-rr.
8679
8680 2004-03-08 Paul Eggert <eggert@gnu.org>
8681
8682 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8683 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8684
8685 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8686 in lalr1.cc.
8687 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8688 * src/scan-gram.l (scan_integer): New function.
8689 ({int}): Use it.
8690 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8691 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8692 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8693 Say "long int", not "long", for uniformity with GNU style.
8694
8695 2004-02-25 Paul Eggert <eggert@twinsun.com>
8696
8697 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8698 compilers. This fixes a problem with Intel's C++ compiler being
8699 chatty, reported by Guido Trentalancia in
8700 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8701
8702 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8703
8704 Support %destructor and merge error locations in lalr1.cc.
8705
8706 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8707 (Parser::stos_): Define unconditionally.
8708 (Parser::destruct_): New method. Generate its body with
8709 b4_yydestruct_generate.
8710 (Parser::error_start_): New attribute.
8711 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8712 token which are discarded.
8713 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8714 error_start_ when erroneous token are discarded.
8715 (Parser::parse) <yyerrlab1>: Compute the location of the error
8716 token so that it covers all the discarded tokens.
8717 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8718 it can be called with `%skeleton "lalr1.cc"', and do that.
8719
8720 2004-02-02 Paul Eggert <eggert@twinsun.com>
8721
8722 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8723 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8724 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8725 There's no need to mention top_builddir since Automake does that
8726 for us.
8727 (INCLUDES): Remove, as Automake says it's obsolescent.
8728 Contents migrated into AM_CPPFLAGS as described above.
8729 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8730
8731 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8732
8733 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8734 (yyreportSyntaxError): Handle case where lookahead token is
8735 YYEMPTY.
8736
8737 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8738
8739 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8740 resulting parsers are compilable with C++.
8741
8742 2003-12-23 Paul Eggert <eggert@twinsun.com>
8743
8744 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8745 * src/output.c (output_skeleton): Rename local var.
8746 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8747 Bison tokens, as this runs afoul of the 2003-10-07 change that
8748 disallowed NUL bytes in character constants or string literals.
8749
8750 * tests/local.at: Require Autoconf 2.59's Autotest.
8751 * tests/testsuite.at: Don't include local.at, since we now assume
8752 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8753 including it.
8754 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8755 multiple inclusion warnings.
8756
8757 2003-12-02 Akim Demaille <akim@epita.fr>
8758
8759 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8760 conditions.
8761 From Bruno Haible.
8762
8763 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8764
8765 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8766
8767 2003-10-07 Paul Eggert <eggert@twinsun.com>
8768
8769 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8770 if testsuite doesn't exist.
8771
8772 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8773 literals, unfortunately.
8774 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8775 Complain about NUL bytes in character constants or string literals.
8776
8777 2003-10-05 Paul Eggert <eggert@twinsun.com>
8778
8779 * NEWS: Don't document %no-default-prec, as it's still
8780 too experimental.
8781 * doc/bison.texinfo: Document %no-default-prec only if
8782 the defaultprec flag is set. Normally it's not.
8783
8784 2003-10-04 Paul Eggert <eggert@twinsun.com>
8785
8786 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8787 non-modifiable lvalue, instead of a modifiable one.
8788 * doc/bison.texinfo (Actions): Document that $$ can
8789 be assigned to. Do not claim that $$ and $N are
8790 array element references: user code should not rely on this.
8791
8792 2003-10-01 Paul Eggert <eggert@twinsun.com>
8793
8794 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8795 (grammar_declaration): Use it.
8796 * src/scan-gram.l: New token %no-default-prec.
8797 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8798 * NEWS, doc/bison.texinfo: Document the above.
8799
8800 2003-10-01 Akim Demaille <akim@epita.fr>
8801
8802 VCG no longer supports long_straight_phase.
8803
8804 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8805 * src/print_graph.c (print_graph): Adjust.
8806
8807 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
8808 and Paul Eggert <eggert@twinsun.com>
8809
8810 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8811 Table of Symbols): Document %default-prec.
8812 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8813 (grammar_declaration): Set default_prec on %default-prec.
8814 * src/scan-gram.l (%default-prec): New token.
8815 * src/reader.h (default_prec): New flag.
8816 * src/reader.c: Likewise.
8817 (packgram): Handle it.
8818 * tests/conflicts.at (%default-prec without %prec,
8819 %default-prec with %prec, %default-prec 1): New tests.
8820
8821 2003-09-30 Paul Eggert <eggert@twinsun.com>
8822
8823 * tests/testsuite.at: Include local.at, not input.at, fixing
8824 a typo in the 2003-08-25 patch.
8825
8826 2003-08-27 Akim Demaille <akim@epita.fr>
8827
8828 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8829 GCC warnings.
8830
8831 2003-08-26 Akim Demaille <akim@epita.fr>
8832
8833 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8834 "<\#" to avoid magic from Gnus when posting parts of this script.
8835
8836 2003-08-26 Akim Demaille <akim@epita.fr>
8837
8838 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8839 (Parser::parse): here.
8840 Adjust: nerrs and errstatus is now replaced by...
8841 (Parser::nerrs_, Parser::errstatus_): New.
8842
8843 2003-08-25 Akim Demaille <akim@epita.fr>
8844
8845 * config/announce-gen, Makefile.cfg: New.
8846 * Makefile.am: Adjust.
8847 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8848 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8849
8850 2003-08-25 Akim Demaille <akim@epita.fr>
8851
8852 When reducing initial empty rules, Bison parser read an initial
8853 location that is not defined. This results in garbage, and that
8854 affects Bison's own parser. Therefore we need (i) to extend Bison
8855 to support a means to initialize this location, and (ii) to use
8856 this CVS Bison to fix CVS Bison's parser.
8857
8858 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8859 with...
8860 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8861 * src/parse-gram.y: Adjust.
8862 (%initial-action): New.
8863 (%error-verbose): Since we require CVS Bison, there is no reason
8864 not to use it.
8865 * src/scan-gram.l: Adjust.
8866 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8867 * data/yacc.c (yyparse): Use b4_initial_action.
8868
8869 2003-08-25 Akim Demaille <akim@epita.fr>
8870
8871 * doc/bison.texinfo: Don't promote stdout for error messages.
8872
8873 2003-08-25 Akim Demaille <akim@epita.fr>
8874
8875 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8876 From Alexandre Duret-Lutz.
8877
8878 2003-08-25 Akim Demaille <akim@epita.fr>
8879
8880 Version 1.875c.
8881
8882 2003-08-25 Akim Demaille <akim@epita.fr>
8883
8884 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8885 Use them.
8886
8887 2003-08-25 Akim Demaille <akim@epita.fr>
8888
8889 * data/lalr1.cc (Parser::reduce_print_): New.
8890 Use it.
8891
8892 2003-08-25 Akim Demaille <akim@epita.fr>
8893
8894 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8895 error recovery loops. This patch is based on
8896 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8897 Also, augment the similarity between lalr1.cc and yacc.c.
8898 Note: the locations of error recovery rules are not correct yet.
8899
8900 * data/lalr1.cc: Comment changes to augment the similarity between
8901 lalr1.cc and yacc.c.
8902 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8903 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8904 yyerrlab), when hitting EOF, pop the whole stack here instead of
8905 merely falling thru the default error handling mechanism.
8906 (yyerrorlab): New label, with the old contents of YYERROR,
8907 plus the following change: pop the stack of rhs corresponding
8908 to the production that invoked YYERROR. That is how Yacc
8909 behaves (required by POSIX).
8910 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8911 fail.
8912
8913 2003-08-25 Akim Demaille <akim@epita.fr>
8914
8915 Tune local.at so that people can "autom4te -l autotest calc.at -o
8916 calc" for instance, to extract a sub test suite.
8917
8918 * tests/testsuite.at: Move the initialization, Autotest version
8919 requirement, and AT_TESTED invocation into...
8920 * tests/local.at: here.
8921 * tests/testsuite.at: Include it for compatibility with Autoconf
8922 2.57.
8923 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8924 be ignore.
8925
8926 2003-08-04 Paul Eggert <eggert@twinsun.com>
8927
8928 Rework code slightly to avoid gcc -Wtraditional warnings.
8929 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8930 The returned value is now stored in *YY0. All callers changed.
8931 * src/output.c (merge_output): Adjust to the above change.
8932
8933 2003-07-26 Paul Eggert <eggert@twinsun.com>
8934
8935 * data/glr.c (YYASSERT): New macro.
8936 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8937 yyresolveStates, yyprocessOneStack):
8938 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8939 Derived from a suggestion by Frank Heckenbach.
8940
8941 2003-07-25 Paul Eggert <eggert@twinsun.com>
8942
8943 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8944 for portability to K&R C (after ansi2knr, presumably). See
8945 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8946 by Frank Heckenbach, though I have omitted the structure-initialization
8947 part of his glr-knr.diff patch since I recall that the Portable
8948 C Compiler didn't require that change.
8949
8950 Let the user specify how to allocate and free memory.
8951 Derived from a suggestion by Frank Heckenbach in
8952 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8953 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8954 All uses of free, malloc, realloc changed to use these macros,
8955 and unnecessary casts removed.
8956 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8957
8958 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8959
8960 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8961 use s.empty() rather than s == "" to test for empty string; see
8962 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8963 (trivial change)
8964
8965 2003-06-25 Akim Demaille <akim@epita.fr>
8966
8967 * config/depcomp, config/install-sh: Update from masters.
8968
8969 2003-06-20 Paul Eggert <eggert@twinsun.com>
8970
8971 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8972 and return properly parenthesized result.
8973 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8974 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8975 Remove unnecessary parentheses from uses.
8976 * doc/bison.texinfo (Location Default Action): Describe the
8977 conventions for parentheses.
8978
8979 2003-06-19 Paul Eggert <eggert@twinsun.com>
8980
8981 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8982 yyreportTree): Do not assume that size_t is the same width as int,
8983 when printing sizes. Print sizes using an unsigned format.
8984 Problem reported by Frank Heckenbach in
8985 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8986
8987 Port to Forte Developer 7 C compiler.
8988 * data/glr.c (struct YYLTYPE): If locations are not being used,
8989 declare a single dummy member, as empty structs do not conform
8990 to the C standard.
8991 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8992 the Forte Developer 7 C compiler complains that end-of-loop
8993 code is not reached.
8994
8995 2003-06-17 Paul Eggert <eggert@twinsun.com>
8996
8997 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8998 avoid warnings from picky compilers about redefinition of PARAMS.
8999
9000 2003-06-17 Paul Eggert <eggert@twinsun.com>
9001
9002 Version 1.875b.
9003
9004 * NEWS: Document 1.875b.
9005
9006 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9007 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9008 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9009 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9010 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9011 per recent gettext manual's suggestion.
9012 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9013 Use prototypes, not old-style definitions.
9014 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9015 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9016 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9017 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9018 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9019 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9020 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9021 vbitset_or_and_cmp, vbitset_copy): Likewise.
9022
9023 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9024 Do not include <stdlib.h>.
9025 (PARAMS): Define unconditionally for C89.
9026 (ATTRIBUTE_NORETURN): Remove.
9027 (ATTRIBUTE_UNUSED): Define unconditionally.
9028
9029 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
9030 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
9031 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9032 * lib/vbitset.c, lib/vbitset.h: New files.
9033 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9034 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9035 from libbitset.
9036
9037 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9038 `How Can I Reset @code{yyparse}', since texinfo does not allow
9039 arbitrary @ in node names.
9040
9041 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9042 shouldn't be needed according to the gettext 0.12.1 documentation
9043 but which seem to be needed anyway: codeset.m4 glibc21.m4
9044 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
9045 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
9046 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
9047
9048 * lib/.cvsignore: Add stdbool.h.
9049 * m4/.cvsignore: Add nls.m4, po.m4.
9050
9051 Upgrade to CVS gnulib.
9052 * stdbool_.h: File renamed from stdbool.h.in.
9053 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9054 AC_HEADER_STDBOOL.
9055 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9056 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9057 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9058 (MOSTLYCLEANFILES): New var.
9059 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9060 (stdbool.h): New rule.
9061 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9062 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9063 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9064 m4/quote.m4: Upgrade to today's gnulib.
9065
9066 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9067 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9068 the tests right now.
9069 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9070 yyerror are declared before use; C99 requires this.
9071
9072 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9073
9074 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9075 first.
9076 (yyrecoverSyntaxError): Correct the logic for setting and testing
9077 yyerrState.
9078 Correct comment on handling EOF.
9079 Allow states with only a default reduction, rather than failing
9080 (I can't quite reconstruct why these were not allowed before).
9081
9082 Fixes to avoid problem that $-N rules in GLR parsers can cause
9083 buffer overruns, corrupting state.
9084
9085 * src/output.c (prepare_rules): Output max_left_semantic_context
9086 definition.
9087 * src/reader.h (max_left_semantic_context): New variable declaration.
9088 * src/scan-gram.l (max_left_semantic_context): Define.
9089 (handle_action_dollar): Update max_left_semantic_context.
9090 * data/glr.c (YYMAXLEFT): New definition.
9091 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9092 (yyresolveAction): Ditto.
9093
9094 Fixes to problems with location handling in GLR parsers reported by
9095 Frank Heckenbach (2003/06/05).
9096
9097 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9098 (YYRHSLOC): Add parentheses, and define only if locations used.
9099 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9100 locations not used.
9101 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9102 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
9103
9104 * tests/cxx-type.at: Exercise location information; update tests
9105 to differentiate output with and without locations.
9106 Remove forward declarations of yylex and yyerror---caused errors
9107 because default YYLTYPE not yet defined.
9108 Change semantic actions to compute strings, rather than printing
9109 them directly (to test proper passing of semantics values). Change
9110 output to prefix notation and update test data and expected results.
9111 (yylex): Track locations.
9112 (stmtMerge): Return value rather than printing, and include arguments
9113 in value.
9114
9115 2003-06-03 Paul Eggert <eggert@twinsun.com>
9116
9117 Avoid warnings generated by GCC 2.95.4 when Bison is
9118 configured with --enable-gcc-warnings.
9119 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9120 yy::]b4_parser_class_name[::translate_,
9121 yy::Stack::operator[] (unsigned),
9122 yy::Stack::operator[] (unsigned) const,
9123 yy::Slice::operator[] (unsigned),
9124 yy::Slice::operator[] (unsigned) const):
9125 Rename local vars to avoid warnings.
9126 * tests/glr-regression.at (Improper handling of embedded actions
9127 and $-N in GLR parsers): Remove unused local variable from yylex.
9128 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9129 (void) as arg when not pure, since we now assume C89 when building
9130 Bison. Pacify GCC by using parameter.
9131
9132 2003-06-02 Paul Eggert <eggert@twinsun.com>
9133
9134 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9135 yy::Location::lines, yy::Location::columns): Rename arguments
9136 to avoid shadowing; this removes a warning generated by GCC 3.3.
9137
9138 2003-06-01 Paul Eggert <eggert@twinsun.com>
9139
9140 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9141 to g++, as GCC 3.3 complains if you do it.
9142 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9143 everything that WARNING_CFLAGS has, except omit warnings
9144 not suitable for C++.
9145 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9146 * tests/atlocal.in (CXXFLAGS): New var.
9147 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9148
9149 Fix a GLR parser bug I reported in February; see
9150 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
9151 The problem was that GLR parsers did not conform to the C standard,
9152 because actions like { $1 = $2 + $3; } expanded to expressions
9153 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9154 to a local variable. The C standard says that expressions
9155 like (var = f ()) + (var = f ()) have undefined behavior.
9156 Another problem was that GCC sometimes issues warnings that
9157 yyfill and its parameters are unused.
9158
9159 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9160 as possibly unused.
9161 (yyfill): New function.
9162 (YYFILL): Use it.
9163 (yyuserAction): Change type of yynormal to bool, so that it matches
9164 the new yyfill signature. Mark it as possibly unused.
9165
9166
9167 Follow up on a bug I reported in February, where a Bison-generated
9168 parser can loop. Provide a test case and a fix for yacc.c. I
9169 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9170 The original bug report is in:
9171 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
9172
9173 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9174 macro's size was becoming unwieldy.
9175 (yyerrlab): Do not discard an empty lookahead symbol, as this
9176 might destroy garbage.
9177 (yyerrorlab): New label, with the old contents of YYERROR,
9178 plus the following change: pop the stack of rhs corresponding
9179 to the production that invoked YYERROR. That is how Yacc
9180 behaves, and POSIX requires this behavior.
9181 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9182 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9183 Define 'alarm' to do nothing if unistd.h is not available.
9184 Add a new rule "exp: '-' error;" to test the above change to
9185 data/yacc.c. Use 'alarm' to abort any test taking longer than
9186 10 seconds, as it's probably looping.
9187 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9188 Also, the new yacc.c generates two fewer diagnostics for an
9189 existing test.
9190
9191 2003-05-24 Paul Eggert <eggert@twinsun.com>
9192
9193 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9194 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9195 This fixes a problem reported by John Bowman when the Compaq/HP
9196 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9197 -ansi -Wall -gall).
9198 * data/yacc.c (union yyalloc): Likewise.
9199 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
9200
9201 Switch from 'int' to 'bool' where that makes sense.
9202
9203 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9204 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9205 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9206 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9207 Return or accept bool, not int. All callers changed.
9208 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9209 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9210 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9211 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9212 bitset_or_and_cmp_): Likewise.
9213 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9214 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9215 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9216 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9217 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9218 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9219 bitset_stats_or_and_cmp): Likewise.
9220 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9221 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9222 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9223 ebitset_xor_cmp): Likewise.
9224 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9225 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9226 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9227 lbitset_xor_cmp): Likewise.
9228 * lib/bbitset.h: Include <stdbool.h>.
9229 (struct bitset_vtable): The following members now return bool, not
9230 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9231 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9232 or_and_cmp).
9233 * src/conflicts.c (count_rr_conflicts): Likewise.
9234 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9235 All uses changed.
9236 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9237 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9238 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9239 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9240 graph_flag): Likewise.
9241 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9242 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9243 graph_flag): Likewise.
9244 * src/output.c (error_verbose): Likewise.
9245 * src/output.h (error_verbose): Likewise.
9246 * src/reader.c (start_flag, typed): Likewise.
9247 * src/reader.h (typed): Likewise.
9248 * src/getargs.c (LOCATIONS_OPTION): New constant.
9249 (long_options, getargs): Use it.
9250 * src/lalr.c (build_relations): Use bool, not int.
9251 * src/nullable.c (nullable_compute): Likewise.
9252 * src/print.c (print_reductions): Likewise.
9253 * src/tables.c (action_row, pack_vector): Likewise.
9254 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9255 * src/output.c (prepare): Use it.
9256 * src/output.c (token_definitions_output,
9257 symbol_destructors_output, symbol_destructors_output): Use string,
9258 not boolean integer, to keep track of whether to output separator.
9259 * src/print_graph.c (print_core): Likewise.
9260 * src/state.c (state_rule_lookaheads_print): Likewise.
9261
9262 * config/install-sh: Sync from automake 1.7.5.
9263
9264 2003-05-14 Paul Eggert <eggert@twinsun.com>
9265
9266 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9267 semicolon after a grammar declaration, in the interest of possible
9268 future changes to the Bison input language.
9269 Do not allow a stray semicolon at the start of the grammar.
9270 (rhses.1): Allow one or more semicolons after any rule, including
9271 just before "|" as required by POSIX.
9272 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9273 grammar.
9274
9275 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9276
9277 %parse-param support for lalr1.cc.
9278
9279 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9280 b4_cc_constructor_calls, b4_cc_constructor_call,
9281 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9282 definitions.
9283 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9284 parse-param arguments.
9285 (yy::b4_parser_class_name): Declare instance variables to
9286 hold parse-param arguments.
9287 * tests/calc.at: s/value/semantic_value/ because value clashes
9288 with a member of yy::b4_parser_class_name. Adjust C++ code
9289 to handle %parse-param. Enable %parse-param test in C++.
9290
9291 2003-05-12 Paul Eggert <eggert@twinsun.com>
9292
9293 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9294 English a bit. Fix fclose typo. Change "const char" to "char
9295 const", and use ANSI C rather than K&R for "main". Suggest
9296 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9297 and suggest yy_switch_to_buffer.
9298
9299 2003-05-05 Paul Eggert <eggert@twinsun.com>
9300
9301 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9302 C89. This avoids a diagnostic on compilers that define __STDC__
9303 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
9304 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9305
9306 2003-05-03 Paul Eggert <eggert@twinsun.com>
9307
9308 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9309 Do not overrun array bounds.
9310 This should fix a bug reported today by Olatunji Oluwabukunmi in
9311 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
9312
9313 2003-04-29 Akim Demaille <akim@epita.fr>
9314
9315 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9316 * src/getargs.c, src/getargs.h: here, as bool, not int.
9317 (nondeterministic_parser): New.
9318 * src/parse-gram.y, src/scan-gram.l: Support
9319 %nondeterministic-parser.
9320 * src/output.c (prepare): Use nondeterministic_parser instead
9321 of glr_parser where appropriate.
9322 * src/tables.c (conflict_row, action_row, save_row)
9323 (token_actions, token_actions, pack_vector): Ditto.
9324
9325 2003-04-29 Akim Demaille <akim@epita.fr>
9326
9327 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9328
9329 2003-04-29 Akim Demaille <akim@epita.fr>
9330
9331 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9332 with %pure-parser and %locations to exercise the patch from Yakov
9333 Markovitch below.
9334
9335 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9336
9337 * data/yacc.c: (b4_lex_param): Corrected for the case where
9338 %lex-param is provided and %pure-parser isn't.
9339
9340 2003-04-27 Paul Eggert <eggert@twinsun.com>
9341
9342 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
9343 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
9344 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9345 if it is not defined.
9346 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9347
9348 2003-04-26 Paul Eggert <eggert@twinsun.com>
9349
9350 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9351 Declare to be of type suitable for the ninf value itself, not of
9352 type suitable for the corresponding table, since the latter might
9353 be unsigned but the ninf value might be negative. This fixes a
9354 bug reported by Alexandre Duret-Lutz in
9355 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
9356
9357 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9358 invokes it. We shouldn't invoke it twice because it will attempt
9359 to put error.o in the archive twice. This fixes a glitch reported
9360 by Martin Mokrejs in
9361 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9362
9363 2003-04-21 Paul Eggert <eggert@twinsun.com>
9364
9365 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9366 to gnulib.
9367
9368 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9369
9370 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9371 Fix obvious typo that results in uncompilable GLR parsers
9372 when both %pure-parser and %locations are used. (trivial change)
9373
9374 2003-04-17 Paul Eggert <eggert@twinsun.com>
9375
9376 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9377 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9378 Do not insert the expected token via unput, as this runs afoul
9379 of a POSIX-compatibility bug in flex 2.5.31.
9380 All uses changed to BEGIN the parent state,
9381 since we no longer insert the expected token via unput.
9382 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9383 that is no longer emitted after the above change.
9384
9385 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9386 the first one. This change is from Paul Hilfinger, and it fixes
9387 regression reported by Werner Lemberg in
9388 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9389
9390 (resolve_sr_conflict): Don't invoke state_errs_set
9391 unless one or more tokens have been explicitly made errors.
9392 Otherwise, the above change causes Bison to abort.
9393
9394 * tests/existing.at (GNU pic Grammar): New test case, taken from
9395 Lemberg's email.
9396
9397 2003-03-31 Akim Demaille <akim@epita.fr>
9398
9399 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9400
9401 2003-03-31 Akim Demaille <akim@epita.fr>
9402
9403 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9404 output.
9405
9406 2003-03-31 Akim Demaille <akim@epita.fr>
9407
9408 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9409 From Paul Hilfinger.
9410
9411 2003-03-29 Akim Demaille <akim@epita.fr>
9412
9413 * m4/error.m4: Do not put under dynamic conditions some code which
9414 expansion is under static control.
9415
9416 2003-03-29 Akim Demaille <akim@epita.fr>
9417
9418 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9419
9420 2003-03-29 Akim Demaille <akim@epita.fr>
9421
9422 * doc/bison.texinfo (Strings are Destroyed): New.
9423
9424 2003-03-13 Paul Eggert <eggert@twinsun.com>
9425
9426 * .cvsignore: Add configure.lineno.
9427 * src/.cvsignore: Add yacc.
9428 * tests/.cvsignore: Add testsuite.log.
9429 * doc/fdl.texi: Sync with latest FSF version.
9430
9431 2003-03-12 Paul Eggert <eggert@twinsun.com>
9432
9433 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9434 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9435 cursor, instead of leaving it undefined. This fixes a bug
9436 reported by Tim Van Holder in
9437 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9438 * tests/input.at (Torturing the Scanner): Test the scanner on
9439 an empty input file, which was Tim Van Holder's test case.
9440
9441 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9442 <sys/resource.h> can be included, include sys/time.h and
9443 sys/times.h first, if available. This works around the SunOS
9444 4.1.4 porting bug reported by Bruce Becker in
9445 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
9446
9447 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9448 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9449 AC_HEADER_SYS_WAIT.
9450
9451 Merge changes from gnulib. This was prompted because the CVS
9452 snapshot didn't build on Solaris 7 due to strnlen problems.
9453
9454 These changes need to be merged back into gnulib:
9455 * lib/hash.c: Include <stdbool.h> unconditionally.
9456 * m4/onceonly.m4 (m4_quote): New macro.
9457 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9458 Quote AC_FOREACH variable-expansions properly.
9459 The 2003-01-03 obstack.h change also needs merging.
9460 {end of changes requiring merging}
9461
9462 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9463 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9464 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9465 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9466 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9467 New files, imported from gnulib.
9468 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9469 above.
9470
9471 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9472 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9473 gnulib sources.
9474
9475 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9476 Add.
9477 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9478 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9479 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9480 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9481 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9482 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9483 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9484 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9485 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9486 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9487 (jm_PREREQ_ARGMATCH): Remove.
9488 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9489 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9490
9491 * src/system.h: Include <stdbool.h> unconditionally.
9492
9493 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9494 assuming at least C89 in the bitset code for some time now.
9495
9496 2003-03-03 Akim Demaille <akim@epita.fr>
9497
9498 * ro.po: New.
9499
9500 2003-03-02 Akim Demaille <akim@epita.fr>
9501
9502 * doc/bison.texinfo (Table of Symbols): Reactivate the
9503 documentation for %lex-param, and %parse-param.
9504
9505 2003-03-02 Akim Demaille <akim@epita.fr>
9506
9507 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9508 generate verbose error messages.
9509 Use the number of tokens as an upper bound in yytname, as it
9510 cannot be a non terminal.
9511
9512 2003-03-02 Akim Demaille <akim@epita.fr>
9513
9514 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9515 message.
9516
9517 2003-03-02 Akim Demaille <akim@epita.fr>
9518
9519 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9520 Use them to exercise yycheck overrun.
9521 Based on Andrew Suffield's grammar.
9522
9523 2003-03-02 Akim Demaille <akim@epita.fr>
9524
9525 Create tests/local.at for Bison generic testing macros.
9526
9527 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9528 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9529 This new file.
9530 * tests/calc.at (AT_CHECK_CALC): Adjust.
9531 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9532 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9533 * tests/local.at: here.
9534 (AT_COMPILE_CXX): Tags the tests using it as c++.
9535 Ignore the test if CXX is not functional.
9536
9537 2003-03-01 Paul Eggert <eggert@twinsun.com>
9538
9539 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9540 not loc->end, since loc->end might contain garbage and this leads
9541 to undefined behavior on some platforms.
9542 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9543 depend on *loc, so that the reader doesn't give the the false
9544 impression that *loc is initialized.
9545 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9546 does not survive the return.
9547
9548 2003-03-01 Akim Demaille <akim@epita.fr>
9549
9550 * src/scan-gram.l (code_start): Always initialize it when entering
9551 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9552 yylex invocation. An alternative would be making it static, but
9553 then it starts with the second %%'s beginning, instead of its end.
9554
9555 2003-02-28 Paul Eggert <eggert@twinsun.com>
9556
9557 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9558 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9559 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9560
9561 2003-02-26 Paul Eggert <eggert@twinsun.com>
9562
9563 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9564 Remove Sequent/Pyramid discussion (nobody uses them any more).
9565 Merge VMS and MS-DOS discussion; these ports may well be dead
9566 but let's keep mentioning them for now. Put <> around email
9567 addresses. Add copyright notice.
9568
9569 2003-02-24 Paul Eggert <eggert@twinsun.com>
9570
9571 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9572 to avoid collision with flex use of yylineno.
9573 Problem reported by Bruce Lilly in
9574 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9575 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9576 * data/yacc.c (yy_reduce_print): Likewise.
9577
9578 * config/depcomp: Sync with Automake 1.7.3.
9579
9580 2003-02-21 Akim Demaille <akim@epita.fr>
9581
9582 * data/lalr1.cc: Use temporary variables instead of casts to
9583 change integer types.
9584 Suggested by Paul Eggert.
9585
9586 2003-02-21 Akim Demaille <akim@epita.fr>
9587
9588 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9589 to avoid confusions with lalr1.cc's notion of Position.
9590 Suggested by Paul Eggert.
9591
9592 2003-02-20 Akim Demaille <akim@epita.fr>
9593
9594 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9595 before initial_columns.
9596 (location.hh): Use consistent variable names when defining the
9597 operator<<.
9598 Use "last" so that we subtract from Positions, not from unsigned.
9599
9600 2003-02-20 Akim Demaille <akim@epita.fr>
9601
9602 * data/lalr1.cc (position.hh): New subfile, including the extended
9603 and Doxygen'ed documentation of class Position.
9604 (location.hh): Use it.
9605 Document a` la Doxygen.
9606 With the help of Benoit Perrot.
9607
9608 2003-02-20 Akim Demaille <akim@epita.fr>
9609
9610 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9611 AT_YACC_IF.
9612 Redefine AT_YYERROR_SEES_LOC_IF using it.
9613 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9614 not defined.
9615 Don't use the location in yy::Parser::error_ and
9616 yy::Parser::print_ when not %locations.
9617 Activate more lalr1.cc tests.
9618
9619 2003-02-19 Akim Demaille <akim@epita.fr>
9620
9621 * data/lalr1.cc: When displaying a line number, be sure to make it
9622 an int.
9623
9624 2003-02-19 Akim Demaille <akim@epita.fr>
9625
9626 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9627 Remove, useless.
9628 (YYABORT, YYACCEPT, YYERROR): New.
9629 * tests/calc.at: Renable the lalr1.cc test.
9630
9631 2003-02-19 Akim Demaille <akim@epita.fr>
9632
9633 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9634 error recovery, mixing with/without pops and discarding of the
9635 lookahead.
9636 Exercise YYERROR.
9637 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9638
9639 2003-02-17 Paul Eggert <eggert@twinsun.com>
9640
9641 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9642 * tests/testsuite.at (AT_COMPILE): Use them.
9643 This fixes the testsuite problem reported by Robert Lentz in
9644 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9645
9646 2003-02-12 Paul Eggert <eggert@twinsun.com>
9647
9648 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9649 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9650 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9651 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9652 Check for malloc failure, for consistency with yacc.c.
9653 (yytname_size): Remove, for consistency with yacc.c.
9654
9655 The bug still remains in data/lalr1.cc, as I didn't have time
9656 to fix it there.
9657
9658 2003-02-06 Akim Demaille <akim@epita.fr>
9659
9660 * configure.ac (GXX): Rename as...
9661 (CXX): this, to keep the original Autoconf semantics.
9662 Require 2.57.
9663 * data/lalr1.cc: Fix b4_copyright invocations.
9664 If YYDEBUG is not defined, don't depend upon name_ being defined.
9665 (location.hh): Include string and iostream.
9666 (Position::filename): New member.
9667 (Position::Position ()): New.
9668 (operator<< (Position)): New.
9669 (operator- (Position, int)): New.
9670 (Location::first, Location::last): Rename as...
9671 (Location::begin, Location::end): these, to mock the conventional
9672 iterator names.
9673 (operator<< (Location)): New.
9674 * tests/atlocal.in (CXX): New.
9675 * tests/testsuite.at (AT_COMPILE_CXX): New.
9676 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9677 locations in a more synthetic way.
9678 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9679 lalr1.cc is used.
9680 Adjust the C locations to match those from Emacs: first column is
9681 column 0.
9682 Change all the expected results.
9683 Conform to the GCS: simplify the locations when applicable.
9684 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9685 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9686 these CPP macros with the m4 macros new defined by...
9687 (AT_CHECK_PUSHDEFS): this, i.e.:
9688 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9689 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9690 New macros.
9691 (AT_CHECK_POPDEFS): Undefine them.
9692 (AT_CHECK_CALC_LALR1_CC): New.
9693 Use it for the first lalr1.cc test.
9694
9695 2003-02-04 Akim Demaille <akim@epita.fr>
9696
9697 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9698 Location as is defined.
9699
9700 2003-02-04 Akim Demaille <akim@epita.fr>
9701
9702 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9703 name_ being defined.
9704
9705 2003-02-03 Paul Eggert <eggert@twinsun.com>
9706
9707 * src/gram.h (start_symbol): Remove unused decl.
9708
9709 Use more-consistent naming conventions for local vars.
9710
9711 * src/derives.c (derives_compute): Change type of local var from
9712 int to rule_number.
9713 * src/gram.c (grammar_rules_partial_print): Likewise.
9714 * src/print.c (print_core): Likewise.
9715 * src/reduce.c (reduce_grammar_tables): Likewise.
9716
9717 * src/gram.c (grammar_dump): Change name of item_number *
9718 local var from r to rp.
9719 * src/nullable.c (nullable_compute): Likewise.
9720
9721 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9722
9723 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9724 for symbol or symbol_number var.
9725 * src/reader.c (grammar_start_symbol_set): Likewise.
9726 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9727 Likewise.
9728 * src/state.c (transitions_to): Likewise.
9729 * src/state.h: Likewise.
9730 * src/tables.c (symbol_number_to_vector_number): Likewise.
9731
9732 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9733 char * var.
9734
9735 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9736 var.
9737
9738 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9739 var.
9740
9741 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9742 Use str, not s, for char * var. Use ch, not c, for character var.
9743 Use size for size var.
9744
9745 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9746 char * var.
9747 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9748 uniqstr var.
9749 * src/uniqstr.h: Likewise.
9750
9751 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9752 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9753 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9754 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9755 param to have same name as that of enum, so that we don't use
9756 "s" to stand for a non-state.
9757
9758 2003-02-02 Akim Demaille <akim@epita.fr>
9759
9760 * src/scan-skel.l: Scan more than one inert character per yylex
9761 invocation.
9762
9763 2003-02-01 Paul Eggert <eggert@twinsun.com>
9764
9765 Version 1.875a.
9766
9767 * po/LINGUAS: Add ms.
9768
9769 2003-01-30 Akim Demaille <akim@epita.fr>
9770
9771 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9772
9773 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9774
9775 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9776 of $1.
9777
9778 Changes in response to error report by S. Eken: GLR mode does not
9779 handle negative $ indices or $ indices in embedded rules correctly.
9780 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9781
9782 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9783 (b4_rhs_location): Ditto.
9784 (yyfill): New function to copy from stack tree into array
9785 incrementally.
9786 (yyuserAction): Modify to allow incremental move of semantic values
9787 to rhs array when in GLR mode.
9788 Define YYFILL to use in user-defined actions to fill semantic array
9789 as needed.
9790 Remove dummy use of yystack, as there is now a guaranteed use.
9791 (yydoAction): Modify to allow incremental move of semantic values
9792 to rhs array when in GLR mode.
9793 (yyresolveAction): Ditto.
9794 (yyglrShiftDefer): Update comment.
9795 (yyresolveStates): Use X == NULL for pointers, not !X.
9796 (yyglrReduce): Ditto.
9797 (yydoAction): Ditto
9798
9799 * tests/glr-regr1.at: Rename to ...
9800 * tests/glr-regression.at: Add new regression test for the problems
9801 described above (adapted from S. Eken).
9802 Update copyright notice.
9803 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9804 * tests/Makefile.am: Ditto.
9805
9806 2003-01-28 Paul Eggert <eggert@twinsun.com>
9807
9808 * data/lalr1.cc: Do not use @output_header_name@ unless
9809 b4_defines_flag is set. This fixes two bugs reported by
9810 Tim Van Holder in
9811 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9812 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9813
9814 2003-01-21 Paul Eggert <eggert@twinsun.com>
9815
9816 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9817 we don't need to worry about yyerrlab1 being reported as an
9818 "unused label" by non-GCC C compilers. The downside is that if
9819 locations are used then a couple of statements are duplicated each
9820 time YYERROR is invoked, but the upside is that the warnings
9821 should vanish.
9822 (yyerrlab1): Move code to YERROR.
9823 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9824 This reverts some of the 2002-12-27 change.
9825
9826 2003-01-17 Paul Eggert <eggert@twinsun.com>
9827
9828 * src/output.c (symbol_printers_output): Fix typo that led
9829 to core dump. Problem reported by Antonio Rus in
9830 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9831
9832 2003-01-13 Akim Demaille <akim@epita.fr>,
9833 Quoc Peyrot <chojin@lrde.epita.fr>,
9834 Robert Anisko <anisko_r@lrde.epita.fr>
9835
9836 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9837 when the stacks contain one element, as the loop would otherwise
9838 free the last state, and then use the top state (the one we just
9839 popped). This means that the initial elements will not be freed
9840 explicitly, as is the case in yacc.c; it is not a problem, as
9841 these elements have fake values.
9842
9843 2003-01-11 Paul Eggert <eggert@twinsun.com>
9844
9845 * NEWS: %expect-violations are now just warnings, reverting
9846 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9847 bootstrapping problem reported by Matthias Klose; see
9848 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9849 * src/conflicts.c (conflicts_print): Likewise.
9850 * tests/conflicts.at (%expect not enough, %expect too much,
9851 %expect with reduce conflicts): Likewise.
9852 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9853 that the warning is enabled if the number of conflicts changes
9854 (not necessarily increases).
9855
9856 * src/getargs.c (version): Update copyright year.
9857
9858 2003-01-09 Akim Demaille <akim@epita.fr>
9859
9860 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9861
9862 2003-01-08 Paul Eggert <eggert@twinsun.com>
9863
9864 * Makefile.maint (WGETFLAGS):
9865 New macro, containing "-C off" to disable proxy caches.
9866 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9867 (rel-check): Use $(WGET) instead of wget.
9868
9869 2003-01-06 Paul Eggert <eggert@twinsun.com>
9870
9871 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9872 the GLR paper of Scott, Johnstone and Hussain.
9873
9874 2003-01-04 Paul Eggert <eggert@twinsun.com>
9875
9876 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9877 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9878 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9879 (EXTRA_LIBRARIES): New var, for liby.a.
9880 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9881 (EXTRA_SCRIPTS): New var, for yacc.
9882
9883 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9884 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9885 Problem reported by Nelson H. F. Beebe.
9886
9887 2003-01-03 Paul Eggert <eggert@twinsun.com>
9888
9889 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9890 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9891 when compiling Bison 1.875's `bitset bset = obstack_alloc
9892 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9893
9894 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9895 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9896 grow to a huge size with typical invocation.
9897
9898 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9899 Use the pattern recommended by Autoconf 2.57, except also protect
9900 against double-definition.
9901 * src/system.h: Likewise.
9902 Portability issues reported by Nelson H. F. Beebe.
9903
9904 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9905 All uses changed. Provide a definition in both C and C++.
9906 (yytrue, yyfalse): Define even if defined (__cplusplus).
9907
9908 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9909 Reported by Nelson H. F. Beebe.
9910
9911 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9912
9913 2003-01-02 Paul Eggert <eggert@twinsun.com>
9914
9915 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9916 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9917 Bug reported by Nelson H. F. Beebe.
9918
9919 2003-01-01 Paul Eggert <eggert@twinsun.com>
9920
9921 * Version 1.875.
9922
9923 2002-12-30 Paul Eggert <eggert@twinsun.com>
9924
9925 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9926 Moved here from...
9927 (<INITIAL>","): Here. This causes stray "," to be treated
9928 more uniformly.
9929
9930 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9931 last brace in braced code when not in Yacc mode, for compatibility
9932 with Bison 1.35. This resurrects the 2001-12-15 patch to
9933 src/reader.c.
9934
9935 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9936 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9937
9938 2002-12-28 Paul Eggert <eggert@twinsun.com>
9939
9940 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9941 that of SYM's type. This fixes Debian bug 168069, reported by
9942 Thomas Olsson.
9943
9944 2002-12-28 Paul Eggert <eggert@twinsun.com>
9945
9946 Version 1.75f.
9947
9948 Switch back to the Yacc style of conflict reports, undoing some
9949 of the 2002-07-30 change.
9950 * doc/bison.texinfo (Understanding): Use Yacc style for
9951 conflict reports. Also, use new way of locating rules.
9952 * src/conflicts.c (conflict_report):
9953 Renamed from conflict_report_yacc, removing the old
9954 'conflict_report'. Translate the entire conflict report at once,
9955 so that we don't assume that "," has the same interpretation in
9956 all languages.
9957 (conflicts_output): Use Yacc-style conflict report for each state,
9958 instead of our more-complicated style.
9959 (conflicts_print): Use Yacc-style conflict report, except print
9960 the input file name when not emulating Yacc.
9961 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9962 Conflicted Reduction, %expect not enough, %expect too much,
9963 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9964 * tests/existing.at (GNU Cim Grammar): Likewise.
9965 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9966
9967 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9968 fatal): Don't invoke fflush; it's not needed and it might even be
9969 harmful for stdout, as stdout might not be open.
9970 * src/reduce.c (reduce_print): Likewise.
9971
9972 2002-12-27 Paul Eggert <eggert@twinsun.com>
9973
9974 Fix a bug where error locations were not being recorded correctly.
9975 This problem was originally reported by Paul Hilfinger in
9976 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9977
9978 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9979 top of the location stack's error locations.
9980 (yyerrlab): Set it. When discarding a token, push its location
9981 onto yylerrsp so that we don't lose track of the error's end.
9982 (yyerrlab1): Now is only the target of YYERROR, so that we can
9983 properly record the location of the action that failed. For GCC
9984 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9985 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9986 (yyerrlab2): New label, which yyerrlab now falls through to.
9987 Compute the error's location by applying YYLLOC_DEFAULT to
9988 the locations of all the symbols that went into the error.
9989 * doc/bison.texinfo (Location Default Action): Mention that
9990 YYLLOC_DEFAULT is also invoked for syntax errors.
9991 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9992 Error locations include the locations of all the tokens that were
9993 discarded, not just the last token.
9994
9995 2002-12-26 Paul Eggert <eggert@twinsun.com>
9996
9997 * src/files.c: Include quote.h.
9998 (compute_output_file_names): Warn if we detect conflicting
9999 outputs to the same file. This should catch the misunderstanding
10000 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10001
10002 * src/conflicts.c (conflicts_print): If the user specifies
10003 "%expect N", report an error if there are any reduce/reduce
10004 conflicts. This is what the manual says should happen.
10005 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10006 * tests/conflicts.at (%expect with reduce conflicts): New test.
10007
10008 Don't use m4_include on relative file names, as it doesn't work as
10009 desired if there happens to be a file with that name under ".".
10010
10011 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10012 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10013 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10014 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10015 * src/output.c (output_skeleton): Use full path names when
10016 specifying a file to include; don't rely on include path, as
10017 it's unreliable when the working file contains a file with
10018 that name.
10019
10020 2002-12-25 Paul Eggert <eggert@twinsun.com>
10021
10022 Remove obsolete references to bison.simple and bison.hairy.
10023 Problem mentioned by Aubin Mahe in
10024 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
10025 * data/glr.c: Comment fix.
10026 * doc/bison.1: Remove references. Also, mention "yacc".
10027
10028 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10029 with -g option.
10030
10031 * src/parse-gram.y (declaration): Use enum "report_states" rather
10032 than its numeric value 1.
10033
10034 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10035 opening a new one. This fixes Debian bug 165349, reported by
10036 Bruce Stephens.
10037
10038 2002-12-24 Paul Eggert <eggert@twinsun.com>
10039
10040 Version 1.75e.
10041
10042 * Makefile.maint (cvs-update): Don't assume that the shell
10043 supports $(...), as Solaris sh doesn't.
10044
10045 * src/parse-gram.y (lloc_default): Remove test for empty
10046 nonterminals at the end, since it didn't change the result.
10047
10048 2002-12-24 Paul Eggert <eggert@twinsun.com>
10049
10050 If the user does not define YYSTYPE as a macro, Bison now declares it
10051 using typedef instead of defining it as a macro. POSIX requires this.
10052 For consistency, YYLTYPE is also declared instead of defined.
10053
10054 %union directives can now have a tag before the `{', e.g., the
10055 directive `%union foo {...}' now generates the C code
10056 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10057 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10058 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10059 instead of `yyltype'.
10060
10061 `yystype' and `yyltype' are now obsolescent macros instead of being
10062 typedefs or tags; they are no longer documented and will be
10063 withdrawn in a future release.
10064
10065 * data/glr.c (b4_location_type): Remove.
10066 (YYSTYPE): Renamed from yystype.
10067 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10068 (struct YYLTYPE): Renamed from struct yyltype.
10069 (YYLTYPE): Renamed from yyltype.
10070 (yyltype, yystype): New (and obsolescent) macros,
10071 for backward compatibility.
10072 * data/yacc.c: Likewise.
10073
10074 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10075 does not specify a union tag. This is for compatibility with
10076 Solaris 9 yacc.
10077
10078 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10079 const *, since it is now modified by stripping surrounding { }.
10080 (current_braced_code): Remove.
10081 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10082 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10083 trailing " {...}". Now of type <chars>.
10084 (grammar_declaration): Adjust to bundled tokens.
10085 (code_content): Remove; stripping is now done by add_param.
10086 (print_token_value): Print contents of bundled tokens.
10087 (token_name): New function.
10088
10089 * src/reader.h (braced_code, current_braced_code): Remove.
10090 (token_name): New decl.
10091
10092 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10093 token_type, not braced_code code_kind. All uses changed.
10094 (SC_PRE_CODE): New state, for scanning after a keyword that
10095 has (or usually has) an immediately-following braced code.
10096 (token_type): New local var, to keep track of which token type
10097 to return when scanning braced code.
10098 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
10099 <INITIAL>"%parse-param", <INITIAL>"%printer",
10100 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10101 instead of returning a token type immediately.
10102 (<INITIAL>"{"): Set token type.
10103 (<SC_BRACED_CODE>"}"): Use it.
10104 (handle_action_dollar, handle_action_at): Now returns bool
10105 indicating success. Fail if ! current_rule; this prevents a core dump.
10106 (handle_symbol_code_dollar, handle_symbol_code_at):
10107 Remove; merge body into caller.
10108 (handle_dollar, handle_at): Complain in invalid contexts.
10109
10110 * NEWS, doc/bison.texinfo: Document the above.
10111 * NEWS: Fix years and program names in copyright notice.
10112
10113 2002-12-17 Paul Eggert <eggert@twinsun.com>
10114
10115 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10116 Reporting, Table of Symbols): Omit mentions of %lex-param and
10117 %parse-param from the documentation for now.
10118
10119 2002-12-15 Paul Eggert <eggert@twinsun.com>
10120
10121 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10122 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10123 lookahead symbol, and which sets yychar in parser actions) and it
10124 disagreed with the Bison documentation. Bug
10125 reported by Andrew Walrond.
10126
10127 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10128 as the caller now does that.
10129 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10130 (YYEMPTY): Parenthesize right hand side, since others use it.
10131 (yyparse): Don't assume that our generated code is the only code
10132 that sets yychar.
10133
10134 2002-12-13 Paul Eggert <eggert@twinsun.com>
10135
10136 Version 1.75d.
10137
10138 POSIX requires a "yacc" command.
10139 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10140 (MOSTLYCLEANFILES): Add yacc.
10141 (yacc): New rule.
10142 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
10143 as an alias for bison y.
10144
10145 * po/LINGUAS: Add da.
10146
10147 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10148 problem with latest <getopt.h>.
10149 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10150
10151 * doc/fdl.texi: Upgrade to 1.2.
10152 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10153 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10154 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10155 gnulib.
10156 * config/install-sh: Sync with autotools.
10157
10158 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
10159 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10160 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10161 locations are requested.
10162 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10163 locations are requested.
10164
10165 2002-12-12 Paul Eggert <eggert@twinsun.com>
10166
10167 Remove unportable casts and storage allocation tricks.
10168 While we're at it, remove almost all casts, since they
10169 usually aren't needed and are a sign of trouble.
10170
10171 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10172
10173 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10174 the pointer DSET returned by malloc; this isn't portable.
10175 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10176 Similarly for DERIVES.
10177 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10178 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10179 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10180
10181 * src/derives.c (derives_compute): Do not bother invoking
10182 int_of_rule_number, since rule numbers are integers.
10183
10184 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10185 rather than XMALLOC (char, N).
10186
10187 * src/files.c (filename_split): Rewrite to avoid cast.
10188
10189 * src/gram.h (symbol_number_as_item_number,
10190 item_number_as_symbol_number, rule_number_as_item_number,
10191 item_number_as_rule_number):
10192 Now inline functions rather than macros, to avoid casts.
10193 * src/state.h (state_number_as_int): Likewise.
10194 * src/tables.c (state_number_to_vector_number,
10195 symbol_number_to_vector_number): Likewise.
10196
10197 * src/gram.h (int_of_rule_number): Remove; no longer used.
10198
10199 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10200 since the resulting storage is always stored into.
10201
10202 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10203 where it's needed.
10204
10205 * src/muscle_tab.c (muscle_m4_output):
10206 Now inline. Return bool, not int.
10207 * src/state.c (state_compare): Likewise.
10208 * src/symtab.c (symbol_check_defined,
10209 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10210 hash_compare_symbol, hash_symbol):
10211 Likewise.
10212 * src/uniqstr.c (uniqstr_print): Likewise.
10213 * src/muscle_tab.c (muscle_m4_output_processor):
10214 New function, to avoid casts.
10215 * src/state.c (state_comparator, stage_hasher): Likewise.
10216 * src/symtab.c (symbol_check_defined_processor,
10217 symbol_check_alias_consistency_processor, symbol_pack_processor,
10218 symbol_translation_processor, hash_symbol_comparator,
10219 hash_symbol_hasher): Likewise.
10220 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10221 * src/muscle_tab.c (muscles_m4_output):
10222 Use new functions instead of casting old functions unportably.
10223 * src/state.c (state_hash_new): Likewise.
10224 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10225 symbols_token_translations_init):
10226 Likewise.
10227 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10228
10229 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10230 var instead of casting to long, to avoid casts.
10231 (prepare_states): Use MALLOC rather than alloca, so that we don't
10232 have to worry about alloca.
10233 * src/state.c (state_hash_lookup): Likewise.
10234
10235 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10236 local var instead of casting to unsigned char, to avoid casts.
10237
10238 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10239 STATE_ALLOC): Remove.
10240 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10241 rather than calloc, and use offsetof to avoid allocating slightly
10242 too much storage.
10243 (state_new): Initialize all members.
10244
10245 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10246
10247 * src/symtab.c (symbol_free): Remove; unused.
10248 (symbol_get): Remove cast in lhs of assignment.
10249 (symbols_do): Now static. Accept generic arguments, not
10250 hashing-related ones.
10251
10252 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10253 (symbol_processor): Remove.
10254 (symbols_do): Remove decl; now static.
10255
10256 * src/system.h (alloca): Remove; decl no longer needed.
10257 (<stddef.h>): Include, for offsetof.
10258 (<inttypes.>, <stdint.h>): Include if available.
10259 (uintptr_t): New type, if system lacks it.
10260 (CALLOC, MALLOC, REALLOC): New macros.
10261 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10262 new macros.
10263
10264 * src/tables.c (table_size): Now int, to pacify GCC.
10265 (table_grow, table_ninf_remap): Use signed table size.
10266 (save_row): Don't bother initializing locals when not needed.
10267 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10268 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10269
10270 * src/vcg.h: Correct misspellings.
10271
10272 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10273
10274
10275 * src/getargs.c (getargs): Don't assume EOF == -1.
10276
10277 2002-12-09 Paul Eggert <eggert@twinsun.com>
10278
10279 Change identifier spellings to avoid collisions with names
10280 that are reserved by POSIX.
10281
10282 Don't use names ending in _t, since POSIX reserves them.
10283 For consistency, remove _e and _s endings -- they're weren't
10284 needed to remove ambiguity. All uses changed.
10285 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10286 turn was just renamed from struniq_t.
10287 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10288 which in turn was just renamed from struniq_processor_t.
10289 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10290 in turn was renamed from hash_compare_struniq_t.
10291 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10292 (state_list): Renamed from state_list_t.
10293 * src/assoc.h (assoc): Renamed from assoc_t.
10294 * src/conflicts.c (enum conflict_resolution): Renamed from
10295 enum conflict_resolution_e.
10296 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10297 (rule_list): Renamed from rule_list_t.
10298 * src/getargs.h (enum trace): Renamed from enum trace_e.
10299 (enum report): Renamed from enum report_e.
10300 * src/gram.h (item_number): Renamed from item_number_t.
10301 (rule_number): Renamed from rule_number_t.
10302 (struct rule_s): Remove the "rule_s" part; not used.
10303 (rule): Renamed from rule_t.
10304 (rule_filter): Renamed from rule_filter_t.
10305 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10306 (goto_list): Renamed from goto_list_t.
10307 * src/lalr.h (goto_number): Renamed from goto_number_t.
10308 * src/location.h (location): Renamed from location_t.
10309 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10310 and moved here from:
10311 * src/muscle_tab.h (muscle_entry_t): here.
10312 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10313 (rule_list): Renamed from rule_list_t.
10314 * src/print_graph.c (static_graph): Renamed from graph.
10315 * src/reader.h (braced_code): Renamed from braced_code_t.
10316 Remove brace_code_e tag.
10317 * src/relation.h (relation_node): Renamed from relation_node_t.
10318 (relation_nodes): Renamed from relation_nodes_t.
10319 (relation): Renamed from relation_t.
10320 * src/state.h (state_number): Renamed from state_number_t.
10321 (struct state): Renamed from struct state_s.
10322 (state): Renamed from state_t.
10323 (transitions): Renamed from transitions_t. Unused (and
10324 misspelled) transtion_s tag removed.
10325 (errs): Renamed from errs_t. Unused errs_s tag removed.
10326 (reductions): Renamed from reductions_t. Unused tag
10327 reductions_s removed.
10328 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10329 (struct symbol_list): Renamed from struct symbol_list_s.
10330 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10331 (struct symbol): Renamed from struct symbol_s.
10332 (symbol): Renamed from symbol_t.
10333 * src/tables.c (vector_number): Renamed from vector_number_t.
10334 (action_number): Renamed from action_t.
10335 * src/tables.h (base_number): Renamed from base_t.
10336 * src/vcg.h (enum color): Renamed from enum color_e.
10337 (enum textmode): Renamed from enum textmode_e.
10338 (enum shape): Renamed from enum shape_e.
10339 (struct colorentry): Renamed from struct colorentry_s.
10340 (struct classname): Renamed from struct classname_s.
10341 (struct infoname): Renamed from struct infoname_s.
10342 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10343 (enum decision): Renamed from enum decision_e.
10344 (enum orientation): Renamed from enum orientation_e.
10345 (enum alignment): Renamed from enum alignment_e.
10346 (enum arrow_mode): Renamed from enum arrow_mode_e.
10347 (enum crossing_type): Renamed from enum crossing_type_e.
10348 (enum view): Renamed from enum view_e.
10349 (struct node): Renamed from struct node_s.
10350 (node): Renamed from node_t.
10351 (enum linestyle): Renamed from enum linestyle_e.
10352 (enum arrowstyle): Renamed from enum arrowstyle_e.
10353 (struct edge): Renamed from struct edge.
10354 (edge): Renamed from edge_t.
10355 (struct graph): Renamed from struct graph_s.
10356 (graph): Renamed from graph_t.
10357 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10358 Rename value_t -> value.
10359 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10360 value_t_as_yystype -> value_as_yystype.
10361
10362 Don't include <errno.h> in the mainstream code, since it
10363 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10364 * lib/get-errno.c, lib/get-errno.h: New files.
10365 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10366 get-errno.c.
10367 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10368 * src/output.c (output_skeleton): Likewise.
10369 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10370 instead of errno.
10371 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10372 Likewise.
10373 (handle_action_dollar, handle_action_at): Likewise.
10374 * src/system.h: Do not include <errno.h>.
10375 (TAB_EXT): Renamed from EXT_TAB.
10376 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10377
10378 Avoid str[a-z]*, since <string.h> reserves that name space.
10379 Change all instances of "struniq" in names to "uniqstr", and
10380 likewise for "STRUNIQ" and "UNIQSTR".
10381 * src/uniqstr.c: Renamed from src/struniq.c.
10382 * src/uniqstr.h: Renamed from src/struniq.h.
10383 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10384 * src/files.c (strsuffix): Remove; unused.
10385 (concat2): Renamed from stringappend. Now static.
10386 * src/files.h (strsuffix, stringappend): Remove; unused.
10387 * src/parse-gram.y (<chars>): Renamed from <string>.
10388 (<uniqstr>): Renamed from <struniq>.
10389 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10390 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10391 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10392 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10393 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10394 (N_EXPAND): Renamed from N_STRETCH.
10395
10396 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10397 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10398 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10399 Remove; unused.
10400 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10401 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10402 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10403 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10404 (BASE_MAXIMUM): Renamed from BASE_MAX.
10405 (BASE_MINIMUM): Renamed from BASE_MIN.
10406 (ACTION_MAX): Remove; unused.
10407 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10408 Unnecessary casts removed from above defines.
10409
10410
10411 Fix misspelling in names.
10412 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10413 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10414 G_NODE_ALIGNEMENT.
10415
10416
10417 * lib/timevar.c (timevar_report): Renamed from time_report,
10418 for consistency with other names.
10419 * lib/timevar.h (timevar_report): New decl.
10420 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10421
10422
10423 Sort include-file uses.
10424
10425 Reorder all include files under src to be in the order "system.h".
10426 then the ../lib include files in angle brackets (alphabetized),
10427 then the . include files in double-quotes (alphabetized). Fix
10428 dependency breakages encountered in this process, as follows:
10429 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10430 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10431 * src/state.h: Include "symtab.h".
10432
10433 2002-12-08 Paul Eggert <eggert@twinsun.com>
10434
10435 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10436 since this causes problems when __file__ contains character
10437 sequences like "@" that are treated specially by src/scan-skel.l.
10438 Instead, just use the file's basename. This fixes the bug
10439 reported by Martin Mokrejs in
10440 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10441
10442 2002-12-06 Paul Eggert <eggert@twinsun.com>
10443
10444 Add support for rules that do not have trailing semicolons, as
10445 POSIX requires. Improve the quality of locations in Bison
10446 diagnostics.
10447
10448 * src/location.c: Include <quotearg.h>.
10449 (empty_location): Now const.
10450 (location_print): New function. Follow the recommendation of the
10451 GNU Coding Standards for locations that span file boundaries.
10452 * src/location.h: Do not include <quotearg.h>; no longer needed.
10453 (boundary): New type.
10454 (location_t): Use it. This allows locations to span file boundaries.
10455 All member uses changed: file -> start.file or end.file (as needed),
10456 first_line -> start.line, first_column -> start.column,
10457 last_line -> end.line, last_column -> end.column.
10458 (equal_boundaries): New function.
10459 (LOCATION_RESET, LOCATION_STEP): Remove.
10460 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10461 (empty_location): Now const.
10462 (location_print): New decl.
10463 * src/parse-gram.y (lloc_default): New function, which handles
10464 empty locations more accurately.
10465 (YYLLOC_DEFAULT): Use it.
10466 (%token COLON): Remove.
10467 (%token ID_COLON): New token.
10468 (rules): Use it.
10469 (declarations, rules): Remove trailing semicolon.
10470 (declaration, rules_or_grammar_declaration):
10471 Allow empty (";") declaration.
10472 (symbol_def): Remove empty actions; no longer needed.
10473 (rules_or_grammar_declaration): Remove trailing semicolon.
10474 (semi_colon.opt): Remove.
10475 * src/reader.h: Include location.h.
10476 (scanner_cursor): New decl.
10477 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10478 rolling our own.
10479 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10480 of *loc.
10481 (STEP): Remove. No longer needed, now that adjust_location does
10482 the work. All uses removed.
10483 (scanner_cursor): New var.
10484 (adjust_location): Renamed from extend_location. It now sets
10485 *loc and adjusts the scanner cursor. All uses changed.
10486 Don't bother testing for CR.
10487 (handle_syncline): Remove location arg; now updates scanner cursor.
10488 All callers changed.
10489 (unexpected_end_of_file): Now accepts start boundary of token or
10490 comment, not location. All callers changed. Update scanner cursor,
10491 not the location.
10492 (SC_AFTER_IDENTIFIER): New state.
10493 (context_state): Renamed from c_context. All uses changed.
10494 (id_loc, code_start, token_start): New local vars.
10495 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10496 processing of Yacc white space and equivalents here.
10497 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10498 instead of returning ID immediately, since we need to search for
10499 a subsequent colon.
10500 (<INITIAL>"'", "\""): Save token_start.
10501 (<INITIAL>"%{", "{", "%%"): Save code_start.
10502 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10503 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10504 BEGIN context_state at end, not INITIAL.
10505 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10506 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10507 Return correct token start.
10508 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10509 the start of a character, string or multiline comment is found.
10510 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10511 Reduction): Adjust reported locations to match the more-precise
10512 results now expected.
10513 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10514 * tests/reduce.at (Useless Rules, Reduced Automaton,
10515 Underivable Rules): Likewise.
10516 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10517 or "|"' now that so many other tokens are allowed by the new grammar.
10518
10519 * src/complain.h (current_file): Remove duplicate decl;
10520 current_file is now owned by files.h.
10521 * src/complain.c, src/scan-gram.l: Include files.h.
10522
10523 2002-12-06 Paul Eggert <eggert@twinsun.com>
10524
10525 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10526 promotes to int; it might be unsigned int.
10527 * data/yacc.c (yy_reduce_print): Likewise.
10528
10529 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10530 be #defined in the prologue, not in the Bison declarations.
10531 This fixes Debian Bug 102878, reported by Shaul Karl.
10532
10533 2002-12-02 Paul Eggert <eggert@twinsun.com>
10534
10535 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10536 * lib/strtoul.c: New file, from gnulib.
10537 This fixes a porting bug reported by Peter Klein in
10538 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10539
10540 2002-11-30 Paul Eggert <eggert@twinsun.com>
10541
10542 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10543 and put only a forward declaration in the prologue. This is for
10544 consistency with the other scanner helper functions.
10545
10546 Type clashes now generate warnings, not errors, since it
10547 appears that POSIX may allow some grammars with type clashes.
10548 * src/reader.c (grammar_current_rule_check): Warn about
10549 type clashes instead of complaining.
10550 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10551
10552 Add Yacc library, since POSIX requires it.
10553 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10554 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10555 * lib/main.c, lib/yyerror.c: New files.
10556
10557 gram_error can be static; it need not be extern.
10558 * src/reader.h (gram_error): Remove decl.
10559 * src/parse-gram.y (gram_error): Now static. Add static decl.
10560 (print_token_value): Omit parameter names from forward decl,
10561 for consistency.
10562
10563 2002-11-29 Paul Eggert <eggert@twinsun.com>
10564
10565 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10566 be declared before being used. E.g., one should typically
10567 declare them in the prologue. Use GNU coding style in examples.
10568 Put "const" consistently after the type it modifies. Mention
10569 that C99 supports "inline". Mention that yyerror traditionally
10570 returns "int".
10571
10572 %parse-param and %lex-param now take just one argument, the
10573 declaration; the argument name is deduced from the declaration.
10574
10575 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10576 Reporting, Table of Symbols): Document this.
10577 * src/parse-gram.y (add_param): New function.
10578 (COMMA): Remove.
10579 (declaration): Implement new rule for %parse-param and %lex-param.
10580 * src/scan-gram.l: "," now elicits a warning, rather than being
10581 a token; this is more compatible with byacc.
10582 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10583
10584 2002-11-27 Paul Eggert <eggert@twinsun.com>
10585
10586 Rename identifiers to avoid real and potential collisions.
10587
10588 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10589 to avoid collision with lex macro described by Bruce Lilly in
10590 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10591 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10592 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10593 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10594 All uses changed.
10595 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10596 The name "yycontrol" violates the name space rules, and this stuff
10597 wasn't being used anyway.
10598 (input): Remove action; this stuff wasn't being used.
10599 (gram_error): Rename local variable yylloc -> loc.
10600 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10601 (YY_DECL): Don't use "yy" at start of local variables.
10602 All uses changed, e.g., yylloc -> loc.
10603 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10604 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10605 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10606 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10607
10608 * src/parse-gram.y (gram_error): loc is now const *.
10609 * src/reader.h (gram_error): Likewise.
10610
10611 2002-11-24 Paul Eggert <eggert@twinsun.com>
10612
10613 Version 1.75c.
10614
10615 * tests/actions.at (Actions after errors): Use an output format
10616 more similar to that of the Printers and Destructors test.
10617 Test the position of the ';' token too.
10618 (Printers and Destructors): Likewise.
10619 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10620 unnecessarily alarming people when the test fails.
10621
10622 * data/yacc.c (yyerrlab1): Move this label down, so that the
10623 parser does not discard the lookahead token if the user code
10624 invokes YYERROR. This change is required for POSIX conformance.
10625
10626 * lib/error.c: Sync with gnulib.
10627
10628 2002-11-22 Paul Eggert <eggert@twinsun.com>
10629
10630 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10631 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10632 * lib/xmalloc.c: Likewise.
10633
10634 2002-11-20 Paul Eggert <eggert@twinsun.com>
10635
10636 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10637
10638 2002-11-20 Paul Eggert <eggert@twinsun.com>
10639
10640 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10641 should use `if (! x) abort ();' rather than `assert (x);', and
10642 anyway it's one less thing to worry about configuring.
10643
10644 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10645 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10646 and replace all instances of assert with abort.
10647 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10648 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10649
10650 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10651 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10652 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10653 hash_find_entry, hash_rehash, hash_insert): Likewise.
10654 * src/conflicts.c (resolve_sr_conflict): Likewise.
10655 * src/lalr.c (set_goto_map, map_goto): Likewise.
10656 * src/nullable.c (nullable_compute): Likewise.
10657 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10658 * src/reader.c (packgram, reader): Likewise.
10659 * src/state.c (state_new, state_free, state_transitions_set,
10660 state_reduction_find): Likewise.
10661 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10662 symbol_pack): Likewise.
10663 * src/tables.c (conflict_row, pack_vector): Likewise.
10664 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10665 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10666 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10667 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10668
10669 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10670 (ARGMATCH_CONSTRAINT): New macro.
10671 (ARGMATCH_ASSERT): Use it.
10672
10673 * src/system.h (verify): New macro.
10674 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10675 rather than assert.
10676 * src/tables.c (tables_generate): Likewise.
10677
10678 * src/struniq.c (struniq_assert): Now returns void, and aborts
10679 if the assertion is false.
10680 (struniq_assert_p): Remove.
10681 * src/struniq.h: Likewise.
10682
10683 2002-11-18 Paul Eggert <eggert@twinsun.com>
10684
10685 * data/glr.c (yygetLRActions): Replace `yyindex' with
10686 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10687 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10688 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10689
10690 2002-11-18 Akim Demaille <akim@epita.fr>
10691
10692 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10693 space.
10694 From Tim Van Holder.
10695
10696 2002-11-17 Paul Eggert <eggert@twinsun.com>
10697
10698 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10699 to "SyntaxError" for consistency with my 2002-11-15 change.
10700
10701 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10702 not define to {}, since this breaks the common use of `YYDPRINTF
10703 ((...));' if a single statement is desired (e.g. before `else').
10704 Work around GCC warnings by surrounding corresponding calls with
10705 {} if needed.
10706 (yyhasResolvedValue): Remove unused function.
10707 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10708 loop body.
10709 (yyreportSyntaxError): Renamed from yyreportParseError.
10710 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10711 All uses changed.
10712 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10713 extern when possible. Remove unused initializations.
10714
10715 2002-11-16 Akim Demaille <akim@epita.fr>
10716
10717 Augment the similarity between GLR and LALR traces.
10718
10719 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10720 (YY_REDUCE_PRINT): New.
10721 (yyparse): Use them.
10722 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10723 YYDPRINT here.
10724 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10725 state reached after the reduction/recovery, since...
10726 (yyparse, yyprocessOneStack): Report the state we are entering in.
10727
10728 2002-11-16 Akim Demaille <akim@epita.fr>
10729
10730 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10731 Add support for --trace=skeleton.
10732 * src/scan-skel.l: %option debug.
10733 Scan strings of non-@ or \n instead of character by character.
10734 (scan_skel): Handle trace_skeleton.
10735 (QPUTS): New.
10736 (@output_parser_name@, @output_header_name@): ``Restore'' their
10737 support (used to be M4 macros).
10738 * data/yacc.c: Quote larger chunks, a la glr.c.
10739 * data/lalr1.cc: Likewise.
10740 The header guards are no longer available, so use some other
10741 string than `YYLSP_NEEDED'.
10742
10743 2002-11-16 Akim Demaille <akim@epita.fr>
10744
10745 Make the ``Printers and Destructors'' test more verbose, taking
10746 `yacc.c''s behavior as (possibly wrong) reference.
10747
10748 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10749 instead of fprint on stdout.
10750 Set and report the last_line of the symbols.
10751 Consistently display values and locations.
10752
10753 2002-11-16 Paul Eggert <eggert@twinsun.com>
10754
10755 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10756
10757 2002-11-15 Paul Eggert <eggert@twinsun.com>
10758
10759 * tests/actions.at (Actions after errors): New test case.
10760
10761 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10762 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10763 tests/action.at, tests/calc.at, tests/conflicts.at,
10764 tests/cxx-type.at, tests/regression.at:
10765 "parse error" -> "syntax error" for POSIX compatibility.
10766 "parsing stack overflow..." -> "parser stack overflow" so
10767 that code matches Bison documentation.
10768
10769 2002-11-15 Akim Demaille <akim@epita.fr>
10770
10771 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10772 take two BRACED_CODE, not two string_content.
10773 Free the scanner's obstack when we are done.
10774 (code_content): New.
10775 * tests/calc.at: Adjust.
10776 * doc/bison.texinfo: Adjust.
10777 Also, make sure to include the `,' for these declarations.
10778
10779 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10780
10781 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10782 definition; avoids potential autoreconf problems.
10783
10784 2002-11-15 Akim Demaille <akim@epita.fr>
10785
10786 Always check the value returned by yyparse.
10787
10788 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10789 returned by yyparse.
10790 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10791 Adjust calls.
10792 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10793 returned by yyparse.
10794
10795 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10796
10797 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10798 on input.at test.
10799
10800 2002-11-14 Paul Eggert <eggert@twinsun.com>
10801
10802 * src/output.c (output_skeleton): Call xfopen instead of
10803 duplicating xfopen's body.
10804
10805 Fix bugs reported by Nelson H. F. Beebe in
10806 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10807
10808 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10809 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10810 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10811 file twice in the grammar, as an extra check.
10812
10813 * tests/input.at (Torturing the Scanner): Surround the
10814 backslash-newline tests with "#if 0", to make it less likely that
10815 we'll run into compiler bugs. Bring back solitary \ inside
10816 comment, but add a closing comment to work around HP C bug. Don't
10817 test backslash-newline in C character constant.
10818
10819 2002-11-14 Akim Demaille <akim@epita.fr>
10820
10821 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10822 status of the compiler.
10823 Calling `exit 1' is no longer needed.
10824 Reported by Nelson H. F. Beebe.
10825
10826 2002-11-14 Akim Demaille <akim@epita.fr>
10827
10828 * tests/atlocal.in (CPPFLAGS): We have config.h.
10829 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10830 New.
10831 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10832 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10833 * tests/regression.at, tests/torture.at: Use them for all the
10834 grammars that are to be compiled.
10835 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10836 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10837 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10838
10839 2002-11-14 Akim Demaille <akim@epita.fr>
10840
10841 * doc/bison.texinfo: Various formatting changes (alignments in
10842 samples, additional @group/@end group, GCS in samples.
10843 Use @deffn instead of simple @table to define the directives,
10844 macros, variables etc.
10845
10846 2002-11-13 Paul Eggert <eggert@twinsun.com>
10847
10848 Fix some bugs reported by Albert Chin-A-Young in
10849 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10850
10851 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10852 -o c"; the HP C compiler chatters during compilation.
10853 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10854 * tests/headers.at (export YYLTYPE): Likewise.
10855
10856 * tests/input.at (Torturing the Scanner): Remove lines containing
10857 solitary backslashes, as they tickle a bug in the HP C compiler.
10858
10859 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10860 comments, since they're not portable. Use GNU coding style.
10861
10862 2002-11-13 Akim Demaille <akim@epita.fr>
10863
10864 * data/yacc.c: Leave bigger chunks of quoted text.
10865 (YYDSYMPRINTF): New.
10866 Use it to report symbol activities.
10867 * data/glr.c (YYDSYMPRINTF): New.
10868 Use it.
10869
10870 2002-11-12 Paul Eggert <eggert@twinsun.com>
10871
10872 Version 1.75b.
10873
10874 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10875 (yyglrReduce): Return yyok, not 0.
10876 This should avoid the enumerated-type warnings reported
10877 by Nelson H. F. Beebe in
10878 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10879
10880 * lib/bbitset.h (BITSET_INLINE): Remove.
10881 * lib/bitset.h [! BITSET_INLINE]: Remove.
10882 (bitset_set, bitset_reset, bitset_test): Rename local vars
10883 to avoid shadowing warnings by GCC.
10884
10885 * data/glr.c (inline): Remove #define. It's the user's
10886 responsibility to #define it away, just like 'const'.
10887 This fixes one of the bugs reported by Nelson H. F. Beebe in
10888 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10889
10890 * Makefile.maint (po-check): Scan .l and .y files instead of the
10891 .c and the .h files that they generate. This fixes the bug
10892 reported by Tim Van Holder in:
10893 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10894 Look for N_ as well as for _. Try to avoid matching #define for
10895 N_ and _.
10896 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10897 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10898 * src/scan-gram.l: Revamp regular expressions so that " and '
10899 do not confuse xgettext.
10900
10901 * src/struniq.h (struniq_new): Do not declare the return type
10902 to be 'const'; this violates the C standard.
10903 * src/struniq.c (struniq_new): Likewise.
10904
10905 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10906
10907 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10908 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10909 linker.
10910
10911 2002-11-12 Akim Demaille <akim@epita.fr>
10912
10913 * Makefile.maint: Sync with Autoconf:
10914 (local_updates): New.
10915
10916 2002-11-12 Akim Demaille <akim@epita.fr>
10917
10918 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10919
10920 2002-11-12 Akim Demaille <akim@epita.fr>
10921
10922 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10923 locations.
10924
10925 2002-11-12 Akim Demaille <akim@epita.fr>
10926
10927 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10928 not yyvalue.
10929
10930 2002-11-12 Akim Demaille <akim@epita.fr>
10931
10932 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10933 Use it to test the GLR parser.
10934
10935 2002-11-12 Akim Demaille <akim@epita.fr>
10936
10937 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10938 defines it.
10939 * data/glr.c (yystos): New.
10940 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10941 (YYDSYMPRINT): New.
10942 (yyval): Don't define it, it is handled via M4.
10943 (yyrecoverParseError): Free verbosely the discarded symbols.
10944 * data/yacc.c (yysymprint): Remove, rather...
10945 (b4_yysymprint_generate): invoke.
10946 * data/c.m4 (b4_yysymprint_generate): New.
10947 Accept pointers as arguments, as opposed to the version from
10948 yacc.c.
10949 (b4_yydestruct_generate): Likewise.
10950 * tests/cations.at (Printers and Destructors): Use Bison directives
10951 instead of CPP macros.
10952 Don't rely on internal details.
10953
10954 2002-11-12 Akim Demaille <akim@epita.fr>
10955
10956 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10957 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10958 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10959 it against YYEMPTY and so forth), work on yytoken (i.e., set
10960 it to YYEMPTY etc.).
10961 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10962 (b4_symbol_actions): Remove.
10963 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10964 for 0, end-of-input.
10965
10966 2002-11-12 Akim Demaille <akim@epita.fr>
10967
10968 * doc/bison.texinfo (Destructor Decl): New.
10969
10970 2002-11-12 Akim Demaille <akim@epita.fr>
10971
10972 * src/tables.c (tables_generate): Use free for pointers that
10973 cannot be NULL, not XFREE.
10974 (pack_vector): Use assert, not fatal, for bound violations.
10975 * src/state.c (state_new): Likewise.
10976 * src/reader.c (reader): Likewise.
10977 * src/lalr.c (set_goto_map): Likewise.
10978 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10979 the file name.
10980
10981 2002-11-12 Akim Demaille <akim@epita.fr>
10982
10983 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10984 Restore.
10985 * src/scan-gram.l (last_string): Is global to the file, not to
10986 yylex.
10987 * src/parse-gram.y (input): Don't append the epilogue here,
10988 (epilogue.opt): do it here, and free the scanner's obstack.
10989 * src/reader.c (epilogue_set): Rename as...
10990 (epilogue_augment): this.
10991 * data/c.m4 (b4_epilogue): Defaults to empty.
10992
10993 2002-11-12 Akim Demaille <akim@epita.fr>
10994
10995 * src/getargs.c (long_options): Remove duplicates.
10996 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10997 Remove.
10998 * doc/bison.rnh: Remove.
10999 * doc/bison.texinfo (VMS Invocation): Remove.
11000
11001 2002-11-12 Akim Demaille <akim@epita.fr>
11002
11003 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11004 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11005
11006 Use struniq for symbols.
11007
11008 * src/symtab.h (symbol_t): The tag member is a struniq.
11009 (symbol_type_set): Adjust.
11010 * src/symtab.c (symbol_new): Takes a struniq.
11011 (symbol_free): Don't free the tag member.
11012 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11013 (hash_compare_symbol, hash_symbol): these.
11014 Use the fact that tags as struniqs.
11015 (symbol_get): Use struniq_new.
11016 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11017 Returns a strniq.
11018 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11019 and type members are struniqs.
11020 * src/reader.c (get_merge_function)
11021 (grammar_current_rule_merge_set): Adjust.
11022 (TYPE, current_type): Are struniq.
11023
11024 Use struniq for file names.
11025
11026 * src/files.h, src/files.c (infile): Split into...
11027 (grammar_file, current_file): these.
11028 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11029 * src/reduce.c (reduce_print): Likewise.
11030 * src/getargs.c (getargs): Likewise.
11031 * src/complain.h, src/complain.c: Likewise.
11032 * src/main.c (main): Call struniqs_new early enough to use it for
11033 file names.
11034 Don't free the input file name.
11035
11036 2002-11-12 Akim Demaille <akim@epita.fr>
11037
11038 * src/symtab.c (symbol_free): Remove dead deactivated code:
11039 type_name are properly removed.
11040 Don't use XFREE to free items that cannot be NULL.
11041 * src/struniq.h, src/struniq.c: New.
11042 * src/main.c (main): Initialize/free struniqs.
11043 * src/parse-gram.y (%union): Add astruniq member.
11044 (yyprint): Adjust.
11045 * src/scan-gram.l (<{tag}>): Return a struniq.
11046 Free the obstack bit that used to store it.
11047 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11048
11049 2002-11-11 Paul Eggert <eggert@twinsun.com>
11050
11051 Revamp to fix many (but not all) of the C- and M4-related quoting
11052 problems. Among other things, this fixes the Bison bug reported
11053 by Jan Hubicka when processing the Bash grammar; see:
11054 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
11055
11056 Use new @ escapes consistently. Represent brackets with @{ and @}
11057 rather than @<:@ and @:>@, since this works a bit better with dumb
11058 editors like vi. Represent @ with @@, since @ is now consistently
11059 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11060 __ofile__, to avoid unexpected expansions. Similarly, use @output
11061 rather than #output.
11062
11063 * data/c.m4 (b4_copyright): Omit file name from comment, since
11064 the file name could contain "*/".
11065 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11066 be quoted. All uses changed.
11067
11068 * data/glr.c: Use new @ escapes consistently.
11069 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11070 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11071 Remove, since they couldn't handle arbitrary characters in file
11072 names.
11073 * data/lalr1.cc: Likewise.
11074 * data/yacc.c: Likewise.
11075
11076 * src/files.c (output_infix): Remove; all uses removed.
11077 * src/files.h: Likewise.
11078
11079 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11080 mishandled funny characters in file names, and anyway it isn't
11081 needed any more.
11082 * data/yacc.c: Likewise.
11083 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11084
11085 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11086 * data/yacc.c: Likewise.
11087
11088 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11089 strings now.
11090 (muscle_init): Quote filename as a C string.
11091 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11092 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11093 * src/output.c (escaped_file_name_output): New function.
11094 (prepare_symbols): Quote tokens for M4.
11095 (prepare): Don't insert output_infix, output_prefix,
11096 output_parser_name, output_header_name; this is now down by scan-skel.
11097 Insert skeleton as a C string.
11098
11099 * src/output.c (user_actions_output, symbol_destructors_output,
11100 symbol_printers_output): Quote filenames for C and M4.
11101 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11102
11103 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11104 escapes other than \\ and \'; this simplifies the code.
11105 (<SC_STRING>): Likewise, for \\ and \".
11106 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11107 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11108 Use new escapes @{ and @} for [ and ].
11109
11110 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11111 them with auto vars.
11112 Switch to new escape scheme, where @ is the escape character uniformly.
11113 Abort if a stray escape character is found. Avoid unbounded input
11114 buffer when parsing non-escaped text.
11115
11116 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11117 __oline__, #output, $@, and @{ do not have unintended meanings.
11118
11119 2002-11-09 Paul Eggert <eggert@twinsun.com>
11120
11121 Fix the test failure due to GCC warnings described in
11122 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
11123 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11124 evaluate to 0 if it's impossible for NINF to be in the respective
11125 table.
11126 (yygetLRActions, yyrecoverParseError): Use them.
11127
11128 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11129 counted in the token inserted at end of file. Now takes
11130 location_t *, not location_t, so that the location can be
11131 adjusted. All uses changed.
11132
11133 * tests/regression.at (Invalid inputs): Adjust wording in
11134 diagnostic to match the new behavior.
11135
11136 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11137 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11138 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11139 abort ();'. This reduces the runtime of the "Many lookaheads"
11140 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11141 GCC 3.2.
11142
11143 2002-11-07 Paul Eggert <eggert@twinsun.com>
11144
11145 * src/parse-gram.y (CHARACTER): Remove unused token.
11146 All uses removed.
11147
11148 * src/scan-gram.l: Remove stack option. We no longer use the
11149 stack, since the stack was never deeper than 1; instead, use the
11150 new auto var c_context to record the stacked value.
11151
11152 Remove nounput option. At an unexpected end of file, we now unput
11153 the minimal input necessary to end cleanly; this simplifies the
11154 code.
11155
11156 Avoid unbounded token sizes where this is easy.
11157
11158 (unexpected_end_of_file): New function.
11159 Use it to systematize the error message on unexpected EOF.
11160 (last-string): Now auto, not static.
11161 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11162 (scanner_last_string_free): Remove; not used.
11163 (percent_percent_count): Move decl to just before use.
11164 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11165 not the (never otherwised-used) CHARACTER.
11166
11167 2002-11-07 Akim Demaille <akim@epita.fr>
11168
11169 Let yyerror always receive the msg as last argument, so that
11170 yyerror can be variadic.
11171
11172 * data/yacc.c (b4_yyerror_args): New.
11173 Use it when calling yyerror.
11174 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11175 Use it when calling yyerror.
11176 * doc/bison.texinfo (Error Reporting): Adjust.
11177 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11178 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11179
11180 2002-11-06 Akim Demaille <akim@epita.fr>
11181
11182 #line should have quoted strings.
11183 Ideally, this should be done by m4_quotearg.
11184
11185 * src/scan-skel.l: Include quotearg.h.
11186 Quote __ofile__.
11187 * src/output.c (symbol_printers_output)
11188 (symbol_destructors_output): Quote the file name.
11189
11190 2002-11-06 Akim Demaille <akim@epita.fr>
11191
11192 * tests/regression.at (Invalid inputs): Adjust to the recent
11193 messages.
11194
11195 2002-11-06 Akim Demaille <akim@epita.fr>
11196
11197 Restore --no-lines.
11198 Reported by Jim Kent.
11199
11200 * data/c.m4 (b4_syncline): New.
11201 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11202 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11203 * src/output.c (user_actions_output): Likewise.
11204 (prepare): Define 'b4_synclines_flag'.
11205 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
11206
11207 2002-11-06 Akim Demaille <akim@epita.fr>
11208
11209 * src/main.c (main): Free `infile'.
11210 * src/scan-gram.l (handle_syncline): New.
11211 Recognize `#line'.
11212 * src/output.c (user_actions_output, symbol_destructors_output)
11213 (symbol_printers_output): Use the location's file name, not
11214 infile.
11215 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11216
11217 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11218
11219 * src/tables.c (matching_state): Don't allow states to match if
11220 either has GLR conflict entries.
11221
11222 2002-11-05 Paul Eggert <eggert@twinsun.com>
11223
11224 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11225 "integer out of range" rather than "invalid value".
11226 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11227 accordingly.
11228
11229 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11230 Also, remove one static variable in the scanner.
11231
11232 * src/scan-gram.l (braces_level): Now auto, not static.
11233 Initialize to zero if the compiler is being picky.
11234 (INITIAL): Clear braces_level instead of incrementing it.
11235 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11236 as POSIX 1003.1-2001 requires.
11237 * src/system.h (IF_LINT): New macro, taken from coreutils.
11238 * configure.ac: Define "lint" if --enable-gcc-warnings.
11239
11240 2002-11-05 Akim Demaille <akim@epita.fr>
11241
11242 * src/scan-gram.l: When it starts with `%', complain about the
11243 whole directive, not just that `invalid character: %'.
11244
11245 2002-11-04 Akim Demaille <akim@epita.fr>
11246
11247 * Makefile.maint: Update from Autoconf.
11248 (update, cvs-update, po-update, do-po-update): New.
11249
11250 2002-11-04 Akim Demaille <akim@epita.fr>
11251
11252 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11253 and yyerror.
11254 Have yyerror `use' its arguments.
11255 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11256 returns true when location & yacc & pure & parse-param.
11257 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11258
11259 2002-11-04 Akim Demaille <akim@epita.fr>
11260
11261 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11262 clashes.
11263 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11264 font-lock-mode.
11265 Use complain_at.
11266 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11267 slot 0.
11268
11269 2002-11-03 Paul Eggert <eggert@twinsun.com>
11270
11271 * src/reader.c (get_merge_function, grammar_current_rule_check):
11272 Use consistent diagnostics for reporting type name clashes.
11273 Quote the types with <>, for consistency with Yacc.
11274 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11275
11276 2002-11-03 Akim Demaille <akim@epita.fr>
11277
11278 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11279 New.
11280 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11281 (b4_parse_param): Remove.
11282 Use b4_identification.
11283 Propagate b4_pure_args where needed to pass them to yyerror.
11284 * data/glr.m4 (b4_parse_param): Remove.
11285 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11286 (b4_lpure_formals): New.
11287 Use b4_identification.
11288 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11289 b4_user_formals and b4_user_args.
11290 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11291 (yyreportAmbiguity): When using a pure parser, also need
11292 the location, and the parse-params.
11293 Adjust callers.
11294 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11295 When using a pure parser, also need the parse-params.
11296 Adjust callers.
11297 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11298 (%pure-parser + %parse-param) LALR and GLR parsers.
11299 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11300 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11301 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11302 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11303 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11304 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11305 * doc/bison.texinfo: Untabify the whole file.
11306 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11307 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11308 (Error Reporting): Adjust to these new directives.
11309 Document %error-verbose, deprecate YYERROR_VERBOSE.
11310
11311 2002-11-03 Akim Demaille <akim@epita.fr>
11312
11313 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11314 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11315 command line options.
11316 * tests/cxx-type.at: Formatting changes.
11317
11318 2002-11-03 Paul Eggert <eggert@twinsun.com>
11319
11320 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11321 to count columns correctly, and to check for invalid inputs.
11322
11323 Use mbsnwidth to count columns correctly. Account for tabs, too.
11324 Include mbswidth.h.
11325 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11326 (extend_location): New function.
11327 (YY_LINES): Remove.
11328
11329 Handle CRLF in C code rather than in Lex code.
11330 (YY_INPUT): New macro.
11331 (no_cr_read): New function.
11332
11333 Scan UCNs, even though we don't fully handle them yet.
11334 (convert_ucn_to_byte): New function.
11335
11336 Handle backslash-newline correctly in C code.
11337 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11338 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11339 all uses changed.
11340 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11341 Use {splice} wherever C allows backslash-newline.
11342 YY_STEP after space, newline, vertical-tab.
11343 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
11344
11345 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11346
11347 ({int}, handle_action_dollar, handle_action_at): Check for integer
11348 overflow.
11349
11350 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11351
11352 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11353 as well as \000. Check for UCHAR_MAX, not 255.
11354 Allow \x with an arbitrary positive number of digits, as in C.
11355 Check for overflow here.
11356 Allow \? and UCNs, for compatibility with C.
11357
11358 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11359 with quote slot used by complain_at.
11360
11361 * tests/input.at: Add tests for backslash-newline, m4 quotes
11362 in symbols, long literals, and funny escapes in strings.
11363
11364 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11365 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11366 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11367 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11368 * m4/mbswidth.m4: New file, from GNU coreutils.
11369
11370 * doc/bison.texinfo (Grammar Outline): Document // comments.
11371 (Symbols): Document that trigraphs have no special meaning in Bison,
11372 nor is backslash-newline allowed.
11373 (Actions): Document that trigraphs have no special meaning.
11374
11375 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11376 no longer used.
11377
11378 2002-11-02 Paul Eggert <eggert@twinsun.com>
11379
11380 * src/reader.c: Don't include quote.h; not needed.
11381 (get_merge_function): Reword warning to be consistent with
11382 type clash diagnostic in grammar_current_rule_check.
11383
11384 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11385 bug in trigraph handling.
11386
11387 * src/output.c (prepare_symbols): When printing token names,
11388 escape "[" as "@<:@" and likewise for "]".
11389
11390 * src/system.h (errno): Remove declaration, as we are now
11391 assuming C89 or better, and C89 guarantees errno.
11392
11393 2002-10-30 Paul Eggert <eggert@twinsun.com>
11394
11395 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11396 Check for close failures.
11397 * src/files.h (xfclose): Return void, not int, since it always
11398 returned zero.
11399 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11400 indicates one.
11401 * src/output.c (output_skeleton): Use xfclose rather than fclose
11402 and ferror. xfclose now checks ferror.
11403
11404 * data/glr.c (YYLEFTMOST_STATE): Remove.
11405 (yyreportTree): Use a stack-based leftmost state. This avoids
11406 our continuing battles with bogus warnings about initializers.
11407
11408 2002-10-30 Akim Demaille <akim@epita.fr>
11409
11410 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11411 #if.
11412
11413 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11414
11415 * tests/glr-regr1.at: New test for reported regressions.
11416 * tests/testsuite.at: Add glr-regr1.at test.
11417 * tests/Makefile.am: Add glr-regr1.at test.
11418
11419 2002-10-24 Paul Eggert <eggert@twinsun.com>
11420
11421 Version 1.75a.
11422
11423 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11424 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11425 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11426 Don't assume strdup exists; POSIX says its an XSI extension.
11427 Check for buffer overflow on input.
11428
11429 2002-10-24 Akim Demaille <akim@epita.fr>
11430
11431 * src/output.c (output_skeleton): Don't disable M4sugar comments
11432 too soon: it results in comments being expanded.
11433 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11434 first output.
11435
11436 2002-10-24 Akim Demaille <akim@epita.fr>
11437
11438 * data/yacc.c (m4_int_type): New.
11439 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11440 char' as only yacc.c wants K&R portability.
11441 * data/glr.c (yysigned_char): Remove.
11442 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11443 Reported by Quoc Peyrot.
11444
11445 2002-10-23 Paul Eggert <eggert@twinsun.com>
11446
11447 * src/main.c (main): With --trace=time, report times even if a
11448 non-fatal error occurs. Formerly, the times were reported in some
11449 such cases but not in others.
11450 * src/reader.c (reader): Just return if a complaint has been issued,
11451 instead of exiting, so that 'main' can report times.
11452
11453 2002-10-22 Akim Demaille <akim@epita.fr>
11454
11455 * src/system.h: Include sys/types.
11456 Reported by Bert Deknuydt.
11457
11458 2002-10-23 Paul Eggert <eggert@twinsun.com>
11459
11460 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11461 Suggested by Art Haas.
11462
11463 2002-10-22 Paul Eggert <eggert@twinsun.com>
11464
11465 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11466 decl; not needed any more.
11467 * src/main.c (main): Use return to exit, undoing yesterday's change.
11468 The last OS that we could find where this wouldn't work is
11469 SunOS 3.5, and that's too old to worry about now.
11470
11471 * data/glr.c (struct yyltype): Define members even when not
11472 doing locations. This is more consistent with yacc.c, and it
11473 works around the following bug reports:
11474 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11475 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
11476
11477 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11478 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11479 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11480
11481 2002-10-22 Akim Demaille <akim@epita.fr>
11482
11483 * data/README: New.
11484
11485 2002-10-21 Paul Eggert <eggert@twinsun.com>
11486
11487 Be consistent about 'bool'; the old code used an enum in one
11488 module and an int in another, and this violates the C standard.
11489 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11490 * configure.ac (AC_HEADER_STDBOOL): Add.
11491 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11492 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11493 * src/symtab.c (hash_compare_symbol_t): Likewise.
11494 * src/system.h (bool, false, true): Use a definition consistent
11495 with ../lib/hash.c. All uses changed.
11496
11497 * src/complain.c (warning_issued): Renamed from warn_message_count,
11498 so that we needn't worry about integer overflow (!).
11499 Now of type bool. All uses changed.
11500 (complaint_issued): Renamed from complain_message_count; likewise.
11501
11502 * src/main.c (main): Use exit to exit with failure.
11503
11504 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11505 rather than 1 and 0.
11506 * src/main.c (main): Likewise.
11507 * src/getargs.c (getargs): Likewise.
11508 * src/reader.c (reader): Likewise.
11509
11510 * src/getarg.c (getargs): Remove duplicate code for
11511 "Try `bison --help'".
11512
11513 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11514 What was that "2" for?
11515
11516 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11517 * src/getargs.c (usage): Likewise.
11518
11519 * src/getargs.c (getargs): When there are too few operands, report
11520 the last one. When there are too many, report the first extra
11521 one. This is how diffutils does it.
11522
11523 2002-10-20 Paul Eggert <eggert@twinsun.com>
11524
11525 Remove K&R vestiges.
11526 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11527 * src/complain.c (VA_START): Remove. Assume prototypes.
11528 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11529 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11530 fatal): Assume prototypes.
11531 * src/complain.h: Assume prototypes.
11532 * src/system.h (PARAMS): Remove.
11533 Include <limits.h> unconditionally, since it's guaranteeed even
11534 for a freestanding C89 compiler.
11535 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11536 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11537
11538 2002-10-20 Akim Demaille <akim@epita.fr>
11539
11540 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11541 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11542 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11543 (yyresolveStates, yyresolveAction, yyresolveStack)
11544 (yyprocessOneStack): Use them.
11545 (yy_reduce_print): New.
11546 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11547
11548 2002-10-20 Akim Demaille <akim@epita.fr>
11549
11550 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11551 arguments and output `void'.
11552 (b4_c_function): Rename as...
11553 (b4_c_function_def): this.
11554 (b4_c_function_decl, b4_c_ansi_function_def)
11555 (b4_c_ansi_function_decl): New.
11556 Change the interpretation of the arguments: before `int, foo', now
11557 `int foo, foo'.
11558 * data/yacc.c (yyparse): Prototype and define thanks to these.
11559 Adjust b4_c_function_def uses.
11560 * data/glr.c (yyparse): Likewise, but ANSI only.
11561
11562 2002-10-20 Akim Demaille <akim@epita.fr>
11563
11564 * src/output.c (prepare): Move the definition of `tokens_number',
11565 `nterms_number', `undef_token_number', `user_token_number_max'
11566 to...
11567 (prepare_tokens): Here.
11568 (prepare_tokens): Rename as...
11569 (prepare_symbols): this.
11570 (prepare): Move the definition of `rules_number' to...
11571 (prepare_rules): here.
11572 (prepare): Move the definition of `last', `final_state_number',
11573 `states_number' to...
11574 (prepare_states): here.
11575 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11576
11577 2002-10-20 Akim Demaille <akim@epita.fr>
11578
11579 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11580
11581 2002-10-20 Akim Demaille <akim@epita.fr>
11582
11583 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11584 * data/c.m4: here.
11585
11586 2002-10-20 Akim Demaille <akim@epita.fr>
11587
11588 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11589 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11590 `pair'.
11591 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11592 `name' to...
11593 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11594 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11595 These.
11596
11597 2002-10-19 Paul Eggert <eggert@twinsun.com>
11598
11599 Do not create a temporary file, as that involves security and
11600 cleanup headaches. Instead, use a pair of pipes.
11601 Derived from a suggestion by Florian Krohm.
11602 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11603 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11604 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11605 (BISON_PREREQ_SUBPIPE): Add.
11606 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11607 Add subpipe.h, subpipe.c.
11608 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11609 * po/POTFILES.in: Add lib/subpipe.c.
11610 * src/output.c: Include "subpipe.h".
11611 (m4_invoke): Remove decl.
11612 (scan_skel): New decl.
11613 (output_skeleton): Use pipe rather than temporary file for m4 input.
11614 Check that m4sugar.m4 is readable, to avoid deadlock.
11615 Check for pipe I/O error.
11616 * src/scan-skel.l (readpipe): Remove decl.
11617 (scan_skel): New function, to be used in place of m4_invoke.
11618 Read from stream rather than file.
11619
11620 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11621 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11622 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11623 this generates a more-accurate value anyway.
11624
11625 * lib/timevar.c (timervar_accumulate): Rename locals to
11626 avoid confusion with similarly-named more-global.
11627 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11628
11629 * src/output.c (prepare): Use xstrdup to convert char const *
11630 to char *, to avoid GCC warning.
11631
11632 2002-10-19 Akim Demaille <akim@epita.fr>
11633
11634 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11635 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11636 Use them to have `calc.y' ready for %pure-parser.
11637 * data/yacc.c (YYLEX): Pass a yylex return type to
11638 b4_c_function_call.
11639
11640 2002-10-19 Akim Demaille <akim@epita.fr>
11641
11642 Prototype support of %lex-param and %parse-param.
11643
11644 * src/parse-gram.y: Add the definition of the %lex-param and
11645 %parse-param tokens, plus their rules.
11646 Drop the `_' version of %glr-parser.
11647 Add the "," token.
11648 * src/scan-gram.l (INITIAL): Scan them.
11649 * src/muscle_tab.c: Comment changes.
11650 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11651 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11652 (muscle_entry_s): The `value' member is no longer const.
11653 Adjust all dependencies.
11654 * src/muscle_tab.c (muscle_init): Adjust: use
11655 MUSCLE_INSERT_STRING.
11656 Initialize the obstack earlier.
11657 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11658 (muscle_pair_list_grow): New.
11659 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11660 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11661 * tests/calc.at: Use %locations, not --locations.
11662 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11663
11664 2002-10-19 Akim Demaille <akim@epita.fr>
11665
11666 * src/getargs.c (usage): Take status as argument and exit
11667 accordingly.
11668 Report the traditional `Try ... --help' message when status != 0.
11669 (usage, version): Don't take a FILE * as arg, it is pointless.
11670 (getargs): When there is an incorrect number of arguments, make it
11671 an error, and report it GNUlically thanks to `usage ()'.
11672
11673 2002-10-18 Paul Eggert <eggert@twinsun.com>
11674
11675 * data/glr.c (yyreportParseError): Don't assume that sprintf
11676 yields the length of the printed string, as this is not true
11677 on SunOS 4.1.4. Reported by Peter Klein.
11678
11679 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11680 * tests/conflicts.at (%nonassoc and eof): Likewise.
11681 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11682
11683 2002-10-17 Akim Demaille <akim@epita.fr>
11684
11685 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11686 * src/getargs.c (trace_types, trace_args): Adjust.
11687 * src/reader.c (grammar_current_rule_prec_set)
11688 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11689 Standardize error messages.
11690 And s/@prec/%prec/!
11691 (reader): Use trace_flag to enable scanner/parser debugging,
11692 instead of an adhoc scheme.
11693 * src/scan-gram.l: Remove trailing debugging code.
11694
11695 2002-10-16 Paul Eggert <eggert@twinsun.com>
11696
11697 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11698 MUSCLE_TAB_H.
11699
11700 * NEWS: Officially drop support for building Bison with K&R C,
11701 since it didn't work anyway and it's not worth worrying about.
11702 * Makefile.maint (wget_files): Remove ansi2knr.c.
11703 (ansi2knr.c-url_prefix): Remove.
11704 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11705 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11706 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11707
11708 2002-10-15 Paul Eggert <eggert@twinsun.com>
11709
11710 Stop using the "enum_" trick for K&R-style function definitions;
11711 it confused me, and I was the author! Instead, assume that people
11712 who want to use K&R C compilers (when using these modules in GCC,
11713 perhaps?) will run ansi2knr.
11714
11715 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11716 All uses of "enum_" changed to "enum ".
11717 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11718 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11719
11720 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11721 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11722 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11723 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11724 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11725 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11726 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11727 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11728 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11729 Use function prototypes; this removes the need for declaring
11730 static functions simply to provide their prototypes.
11731 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11732 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11733 bitset_count_, bitset_create, bitset_dump, bitset_first,
11734 bitset_free, bitset_init, bitset_last, bitset_next,
11735 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11736 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11737 bitset_print, bitset_release_memory, bitset_toggle_,
11738 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11739 debug_bitset): Likewise.
11740 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11741 * lib/bitset_stats.c (bitset_log_histogram_print,
11742 bitset_percent_histogram_print, bitset_stats_and,
11743 bitset_stats_and_cmp, bitset_stats_and_or,
11744 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11745 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11746 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11747 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11748 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11749 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11750 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11751 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11752 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11753 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11754 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11755 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11756 bitset_stats_zero): Likewise.
11757 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11758 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11759 bitsetv_dump, debug_bitsetv): Likewise.
11760 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11761 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11762 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11763 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11764 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11765 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11766 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11767 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11768 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11769 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11770 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11771 Likewise.
11772 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11773 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11774 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11775 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11776 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11777 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11778 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11779 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11780 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11781 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11782 lbitset_xor_cmp, lbitset_zero): Likewise.
11783
11784 2002-10-14 Akim Demaille <akim@epita.fr>
11785
11786 Version 1.75.
11787
11788 2002-10-14 Akim Demaille <akim@epita.fr>
11789
11790 * tests/Makefile.am (maintainer-check-posix): New.
11791
11792 2002-10-14 Akim Demaille <akim@epita.fr>
11793
11794 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11795 member.
11796
11797 2002-10-14 Akim Demaille <akim@epita.fr>
11798
11799 * src/tables.c (table_ninf_remap): base -> tab.
11800 Reported by Matt Rosing.
11801
11802 2002-10-14 Paul Eggert <eggert@twinsun.com>
11803
11804 * tests/action.at, tests/calc.at, tests/conflicts.at,
11805 tests/cxx-type.at, tests/headers.at, tests/input.at,
11806 tests/regression.at, tests/synclines.at, tests/torture.at:
11807 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11808 so that the tests still work even if POSIXLY_CORRECT is set.
11809 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11810
11811 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11812 for portability to K&R hosts. Fix typo: signed char is guaranteed
11813 only to 127, not to 128.
11814 * data/glr.c (yysigned_char): New type.
11815 * data/yacc.c (yysigned_char): Likewise.
11816 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11817
11818 2002-10-13 Paul Eggert <eggert@twinsun.com>
11819
11820 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11821 true due to limited range of data type" warning from GCC.
11822
11823 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11824 by wrapping enum yytokentype's definition inside #ifndef
11825 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11826
11827 2002-10-13 Akim Demaille <akim@epita.fr>
11828
11829 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11830 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11831
11832 2002-10-13 Akim Demaille <akim@epita.fr>
11833
11834 * Makefile.maint: Update from Autoconf 2.54.
11835 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11836
11837 2002-10-13 Akim Demaille <akim@epita.fr>
11838
11839 * src/print.c (print_state): Separate the list of solved conflicts
11840 from the other items.
11841 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11842
11843 2002-10-13 Akim Demaille <akim@epita.fr>
11844
11845 Let nondeterministic skeletons be usable with deterministic
11846 tables.
11847
11848 With the patch, GAWK compiled by GCC without -O2 passes its test
11849 suite using a GLR parser driven by LALR tables. It fails with -O2
11850 because `struct stat' gives two different answers on my machine:
11851 88 (definition of an auto var) and later 96 (memset on this var).
11852 Hence the stack is badly corrumpted. The headers inclusion is to
11853 blame: if I move the awk.h inclusion before GLR's system header
11854 inclusion, the two struct stat have the same size.
11855
11856 * src/tables.c (pack_table): Always create conflict_table.
11857 (token_actions): Always create conflict_list.
11858 * data/glr.c (YYFLAG): Remove, unused.
11859
11860 2002-10-13 Akim Demaille <akim@epita.fr>
11861
11862 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11863 (O0FLAGS): New.
11864 (VALGRIND, GXX): New.
11865 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11866 * tests/bison.in: Run $PREBISON a pre-command.
11867 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11868 (maintainer-check-g++): New.
11869 * Makefile.am (maintainer-check): New.
11870
11871 2002-10-13 Akim Demaille <akim@epita.fr>
11872
11873 * data/glr.c: Formatting changes.
11874 Tweak some trace messages to match yacc.c's.
11875
11876 2002-10-13 Akim Demaille <akim@epita.fr>
11877
11878 GLR parsers sometimes raise parse errors instead of performing the
11879 default reduction.
11880 Reported by Charles-Henry de Boysson.
11881
11882 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11883 check the length of the traces when %glr.
11884 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11885 GLR's traces.
11886 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11887 Test GLR parsers.
11888 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11889 (yyltype): Remove the yy prefix from the member names.
11890 (yytable): Complete its comment.
11891 (yygetLRActions): Map error action number from YYTABLE from
11892 YYTABLE_NINF to 0.
11893 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11894 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11895 not satisfying as we could compare an YYACTION computed from
11896 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11897 only value for error actions.
11898 (yyreportParseError): In verbose parse error messages, don't issue
11899 `error' in the list of expected tokens.
11900 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11901 next action to perform to match glr.c's decoding.
11902 (yytable): Complete its comment.
11903
11904 2002-10-13 Paul Eggert <eggert@twinsun.com>
11905
11906 Fix problem reported by Henrik Grubbstroem in
11907 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11908 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11909 because the Bison parser reads the second action before reducing
11910 the first one.
11911 * src/scan-gram.l (rule_length): New static var.
11912 Use it to keep track of the rule length in the scanner, since
11913 we can't expect the parser to be in lock-step sync with the scanner.
11914 (handle_action_dollar, handle_action_at): Use this var.
11915 * tests/actions.at (Exotic Dollars): Test for the problem.
11916
11917 2002-10-12 Paul Eggert <eggert@twinsun.com>
11918
11919 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11920 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11921 Include <sys/time.h> when checking for clock_t and struct tms.
11922 Use same include order as source.
11923 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11924 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11925
11926 * lib/timevar.c: Update copyright date and clarify comments.
11927 (get_time) [IN_GCC]: Keep the GCC version for reference.
11928
11929 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11930 GCC version as of today, then merge Bison's changes.
11931 Change "GCC" to "Bison" in copyright notice. timevar.def's
11932 author is Akim, so change that too.
11933
11934 * src/reader.c (grammar_current_rule_check):
11935 Don't worry about the default action if $$ is untyped.
11936 Prevents bogus warnings reported by Jim Gifford in
11937 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11938
11939 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11940 * data/glr.c, data/lalr1.cc, data/yacc.c:
11941 Output token definitions before the first part of user declarations.
11942 Fixes compatibility problem reported by Jim Gifford for kbd in
11943 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11944
11945 2002-10-11 Paul Eggert <eggert@twinsun.com>
11946
11947 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11948 (yyparse): here. This undoes some of the 2002-07-25 change.
11949 Compatibility problem reported by Ralf S. Engelschall with
11950 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11951
11952 2002-10-11 Akim Demaille <akim@epita.fr>
11953
11954 * tests/regression.at Characters Escapes): New.
11955 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11956 characters.
11957 Reported by Jan Nieuwenhuizen.
11958
11959 2002-10-11 Akim Demaille <akim@epita.fr>
11960
11961 * po/id.po: New.
11962
11963 2002-10-10 Paul Eggert <eggert@twinsun.com>
11964
11965 Portability fixes for bitsets; this also avoids several GCC
11966 warnings.
11967
11968 * lib/abitset.c: Include <stddef.h>, for offsetof.
11969 * lib/lbitset.c: Likewise.
11970
11971 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11972 properly for vectors of objects. Do not assume that adding a
11973 header size to a multiple of a word size yields a value that is
11974 properly aligned for the whole union.
11975 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11976
11977 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11978 unique names for structures.
11979 * lib/ebitset.c (ebitset_bytes): Likewise.
11980 * lib/lbitset.c (lbitset_bytes): Likewise.
11981
11982 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11983 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11984 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11985 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11986 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11987 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11988 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11989 to improve the type-checking that GCC can do.
11990 * lib/bitset.c (bitset_op4_cmp): Likewise.
11991 * lib/bitset_stats.c (bitset_stats_count,
11992 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11993 bitset_stats_copy, bitset_stats_disjoint_p,
11994 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11995 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11996 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11997 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11998 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11999 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12000 bitset_stats_or_and_cmp): Likewise.
12001 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12002 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12003 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12004 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12005
12006 * lib/abitset.h: Include bitset.h, not bbitset.h.
12007 * lib/ebitset.h: Likewise.
12008 * lib/lbitset.h: Likewise.
12009
12010 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12011 All instances of parameters of type enum bitset_opts are now of
12012 type enum_bitset_opts, to conform to the C Standard, and similarly
12013 for enum_bitset_type.
12014 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12015 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12016
12017 Do not use "struct bitset_struct" to mean different things in
12018 different modules. Not only is this confusing, it violates
12019 the C Standard, which requires that structure types in different
12020 modules must be compatible if one is to be passed to the other.
12021 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12022 All instances of "struct bitset_struct *" replaced with "bitset".
12023 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12024 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12025 struct lbitset_struct, struct bitset_stats_struct): New types.
12026 All uses of struct bitset_struct changed to union bitset_union,
12027 etc.
12028 * lib/abitset.c (struct abitset_struct, abitset,
12029 struct bitset_struct): Remove.
12030 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12031 struct bitset_struct): Remove.
12032 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12033 bitset_struct): Remove.
12034 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12035 Likewise.
12036
12037 Do not call a function of type T using a call that assumes the
12038 function is of a different type U. Standard C requires that a
12039 function must be called with a type that is compatible with its
12040 definition.
12041 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12042 New decls.
12043 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12044 New functions.
12045 * lib/ebitset.c (PFV): Remove.
12046 * lib/lbitset.c (PFV): Likewise.
12047 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12048 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12049 decls.
12050 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12051 (ebitset_vtable): Use them.
12052 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12053 lbitset_xor): New functions.
12054 (lbitset_vtable): Use them.
12055
12056 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12057 Declare.
12058
12059 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12060 GCC warning.
12061 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12062 Use offsetof, for simplicity.
12063
12064 2002-10-06 Paul Eggert <eggert@twinsun.com>
12065
12066 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12067 the same width as int. This reapplies a hunk of the 2002-08-12 patch
12068 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
12069 which was inadvertently undone by the 2002-09-30 patch.
12070 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12071 the same width as int.
12072
12073 2002-10-04 Paul Eggert <eggert@twinsun.com>
12074
12075 Version 1.50.
12076
12077 * configure.ac (AC_INIT), NEWS: Increment version number.
12078
12079 * doc/bison.texinfo: Minor spelling, grammar, and white space
12080 fixes.
12081 (Symbols): Mention that any negative value returned from yylex
12082 signifies end-of-input. Warn about negative chars. Mention
12083 the portable Standard C character set.
12084
12085 The GNU coding standard says CFLAGS and YFLAGS are reserved
12086 for the installer to set.
12087 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12088 * src/Makefile.am (AM_CFLAGS): Likewise.
12089 (AM_YFLAGS): Renamed from YFLAGS.
12090
12091 Fix some MAX and MIN problems.
12092 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12093 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12094 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12095 * src/reader.c (reader): Use it.
12096
12097 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12098 POSIX 1003.1-2001 has removed fgrep.
12099
12100 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12101
12102 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12103 interpreted as signed.
12104 * lib/ebitset.c (ebitset_list): Fix bug.
12105
12106 2002-10-01 Paul Eggert <eggert@twinsun.com>
12107
12108 More fixes for 64-bit hosts and large bitsets.
12109
12110 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12111 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12112 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12113 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12114 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12115 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12116 bitset_count_): Likewise.
12117 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12118 bitset_first, bitset_last): Likewise.
12119 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12120 bitset_stats_list_reverse, bitset_stats_size,
12121 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12122 Likewise.
12123 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12124 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12125 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12126 bitsetv_reflexive_transitive_closure): Likewise.
12127 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12128 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12129 Likewise.
12130 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12131 Likewise.
12132
12133 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12134 Use size_t, not unsigned int, to count bytes.
12135 * lib/abitset.h (abitset_bytes): Likewise.
12136 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12137 Likewise.
12138 * lib/bitset.h (bitset_bytes): Likewise.
12139 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12140 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12141 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12142 * lib/ebitset.c (ebitset_bytes): Likewise.
12143 * lib/ebitset.h (ebitset_bytes): Likewise.
12144 * lib/lbitset.c (lbitset_bytes): Likewise.
12145 * lib/lbitset.h (lbitset_bytes): Likewise.
12146
12147 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12148 abitset_subset_p, abitset_disjoint_p, abitset_and,
12149 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12150 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12151 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12152 abitset_or_and, abitset_or_and_cmp):
12153 Use bitset_windex instead of unsigned int.
12154 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12155 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12156 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12157 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12158 Likewise.
12159 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
12160
12161 * lib/bitset.c (bitset_print):
12162 Use proper printf formats for widths of integer types.
12163 * lib/bitset_stats.c (bitset_percent_histogram_print,
12164 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12165 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12166 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12167 * lib/lbitset.c (lbitset_bytes): Likewise.
12168
12169 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12170 BITSET_SIZE_MAX): New macros.
12171 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12172 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12173 to BITSET_WINDEX_MAX.
12174
12175 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12176 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12177 since we now return the bitset_bindex type (not int).
12178
12179 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12180 when computing sizes.
12181 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12182
12183 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12184 and avoid cast to unsigned.
12185
12186 2002-09-30 Akim Demaille <akim@epita.fr>
12187
12188 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12189 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12190 Updates from Michael Hayes.
12191
12192 2002-09-30 Art Haas <ahaas@neosoft.com>
12193
12194 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12195 invocations.
12196 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12197 defined.
12198
12199 2002-09-27 Akim Demaille <akim@epita.fr>
12200
12201 Version 1.49c.
12202
12203 2002-09-27 Akim Demaille <akim@epita.fr>
12204
12205 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12206 (Because of AC_LIBSOURCE).
12207
12208 2002-09-27 Akim Demaille <akim@epita.fr>
12209
12210 Playing with Autoscan.
12211
12212 * configure.ac: Remove the old LIBOBJ tweaks.
12213 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12214 * lib/strrchr.c: New.
12215 * lib/strtol.c: New, from the Coreutils 4.5.1.
12216
12217 2002-09-27 Akim Demaille <akim@epita.fr>
12218
12219 Playing with Autoscan.
12220
12221 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12222 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12223 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12224 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12225 Coreutils 4.5.1.
12226
12227 2002-09-24 Akim Demaille <akim@epita.fr>
12228
12229 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12230 (Frequently Asked Questions, Parser Stack Overflow): New.
12231
12232 2002-09-13 Akim Demaille <akim@epita.fr>
12233
12234 Playing with autoscan.
12235
12236 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12237 * src/files.c (skeleton_find): Remove, unused.
12238 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12239 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12240
12241 2002-09-13 Akim Demaille <akim@epita.fr>
12242
12243 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12244 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12245
12246 2002-09-13 Akim Demaille <akim@epita.fr>
12247
12248 * configure.ac: Require 2.54.
12249 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12250 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12251 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12252 Remove, provided by Autoconf macros.
12253
12254 2002-09-12 Akim Demaille <akim@epita.fr>
12255
12256 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12257
12258 2002-09-12 Akim Demaille <akim@epita.fr>
12259
12260 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12261 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12262 Reported by Martin Mokrejs.
12263
12264 2002-09-10 Akim Demaille <akim@epita.fr>
12265
12266 * src/parse-gram.y: Associate a human readable string to each
12267 token type.
12268 * tests/regression.at (Invalid inputs): Adjust.
12269
12270 2002-09-10 Gary V. Vaughan <gary@gnu.org>
12271
12272 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12273 with an Autoconf-2.5x style configure.ac.
12274
12275 2002-09-06 Paul Eggert <eggert@twinsun.com>
12276
12277 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12278 exception applies only to yacc.c. This is a modification of a
12279 patch originally suggested by Akim Demaille.
12280
12281 2002-09-06 Akim Demaille <akim@epita.fr>
12282
12283 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12284 here to...
12285 * data/yacc.c: here.
12286
12287 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12288 LocationType.
12289 (b4_ltype): Default to yy::Location from location.hh.
12290
12291 2002-09-04 Jim Meyering <jim@meyering.net>
12292
12293 * data/yacc.c: Guard the declaration of yytoknum also with
12294 `#ifdef YYPRINT', so it is declared only when used.
12295
12296 2002-09-04 Akim Demaille <akim@epita.fr>
12297
12298 * configure.in: Rename as...
12299 * configure.ac: this.
12300 Bump to 1.49c.
12301
12302 2002-09-04 Akim Demaille <akim@epita.fr>
12303
12304 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12305 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12306 translate maintainer only messages.
12307
12308 2002-08-12 Paul Eggert <eggert@twinsun.com>
12309
12310 Version 1.49b.
12311
12312 * Makefile.am (SUBDIRS): Remove intl.
12313 (DISTCLEANFILES): Remove.
12314 * NEWS: Mention that GNU M4 is now required. Clarify what is
12315 meant by "larger grammars". Mention the pt_BR translation.
12316 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12317 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12318 Bump version from 0.11.2 to 0.11.5.
12319 (BISON_PREREQ_STAGE): Remove.
12320 (AM_GNU_GETTEXT): Use external gettext.
12321 (AC_OUTPUT): Remove intl/Makefile.
12322
12323 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12324
12325 * data/glr.c: Include string.h, for strlen.
12326 (yyreportParseError): Use size_t for yysize.
12327 (yy_yypstack): No longer nested inside yypstates, as nested
12328 functions are not portable. Do not assume size_t is the
12329 same width as int.
12330 (yypstates): Do not assume that ptrdiff_t is the same width
12331 as int, and similarly for yyposn and YYINDEX.
12332
12333 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12334
12335 * lib/Makefile.am (INCLUDES): Do not include from the intl
12336 directory, which has been removed.
12337 * src/Makefile.am (INCLUDES): Likewise.
12338
12339 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12340 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12341 New vars.
12342
12343 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12344 * tests/Makefile.am (EXTRA_DIST): Likewise.
12345
12346 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12347 Do not assume that bitset_windex is the same width as unsigned.
12348
12349 * lib/abitset.c (abitset_unused_clear): Do not assume that
12350 bitset_word is the same width as int.
12351 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12352 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12353 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12354 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12355 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12356
12357 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12358 portability to one's complement hosts!).
12359 * lib/ebitset.c (ebitset_op1): Likewise.
12360 * lib/lbitset.c (lbitset_op1): Likewise.
12361
12362 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12363 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12364 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12365 Sync with fileutils.
12366 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12367 lib/gettext.h: Sync with diffutils.
12368
12369 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12370 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12371
12372 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12373 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12374 check for void *.
12375
12376 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12377 size_t; the old version tried to do this but casted improperly.
12378 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12379 (bitset_test): Now returns int, not unsigned long.
12380
12381 * lib/bitset_stats.c: Include "gettext.h".
12382 (_): New macro.
12383 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12384 name locals "index", as it generates unnecessary warnings on some
12385 hosts that have an "index" function.
12386
12387 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12388 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12389 they need translation.
12390 * src/LR0.c (state_list_append, new_itemsets, get_state,
12391 append_states, generate_states): Likewise.
12392 * src/assoc.c (assoc_to_string): Likewise.
12393 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12394 * src/gram.c (grammar_dump): Likewise.
12395 * src/injections.c (injections_compute): Likewise.
12396 * src/lalr.c (lookaheads_print): Likewise.
12397 * src/relation.c (relation_transpose): Likewise.
12398 * src/scan-gram.l: Likewise.
12399 * src/tables.c (table_grow, pack_vector): Likewise.
12400
12401 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12402 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12403 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12404 * m4/mbstate_t.m4: Sync with fileutils.
12405 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12406
12407 * po/LINGUAS: Add pt_BR.
12408 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12409 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12410 lib/timevar.c.
12411 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12412 manual recommends.
12413 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12414
12415 * src/complain.c (strerror_r): Remove decl; not needed.
12416 (strerror): Use same pattern as ../lib/error.c.
12417
12418 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12419
12420 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12421
12422 * src/main.c (main): Cast result of bindtextdomain and textdomain
12423 to void, to avoid a GCC warning when --disable-nls is in effect.
12424
12425 * src/scan-gram.l: Use strings rather than escapes when possible,
12426 to minimize the number of warnings from xgettext.
12427 (handle_action_dollar, handle_action_at): Don't use isdigit,
12428 as it mishandles negative chars and it may not work as expected
12429 outside the C locale.
12430
12431 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12432 this is a GCC extension and is not portable to other compilers.
12433
12434 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12435 Do not include <ctype.h>; no longer needed.
12436 Do not include <malloc.h>; no longer needed (and generates
12437 warnings on OpenBSD 3.0).
12438
12439 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12440 it's not portable.
12441
12442 * tests/regression.at: Do not use 'cc -c input.c -o input';
12443 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12444
12445 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12446 exit status as failure, not just exit status 1. Sun C exits
12447 with status 2 sometimes.
12448
12449 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12450 Use it for the two large tests.
12451
12452 2002-08-02 Akim Demaille <akim@epita.fr>
12453
12454 * src/conflicts.c (conflicts_output): Don't output rules never
12455 reduced here, since anyway that computation doesn't work.
12456 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12457 (rule_useless_p, rule_never_reduced_p): New.
12458 (grammar_rules_partial_print): Use a filter instead of a range.
12459 Display the title only if needed.
12460 (grammar_rules_print): Adjust.
12461 (grammar_rules_never_reduced_report): New.
12462 * src/tables.c (action_row): Move the computation of rules never
12463 reduced to...
12464 (token_actions): here.
12465 * src/main.c (main): Make the parser before making the report, so
12466 that rules never reduced are computed.
12467 Call grammar_rules_never_reduced_report.
12468 * src/print.c (print_results): Report rules never reduced.
12469 * tests/conflicts.at, tests/reduce.at: Adjust.
12470
12471 2002-08-01 Akim Demaille <akim@epita.fr>
12472
12473 Instead of attaching lookaheads and duplicating the rules being
12474 reduced by a state, attach the lookaheads to the reductions.
12475
12476 * src/state.h (state_t): Remove the `lookaheads',
12477 `lookaheads_rule' member.
12478 (reductions_t): Add a `lookaheads' member.
12479 Use a regular array for the `rules'.
12480 * src/state.c (reductions_new): Initialize the lookaheads member
12481 to 0.
12482 (state_rule_lookaheads_print): Adjust.
12483 * src/state.h, src/state.c (state_reductions_find): New.
12484 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12485 (count_rr_conflicts): Adjust.
12486 * src/lalr.c (LArule): Remove.
12487 (add_lookback_edge): Adjust.
12488 (state_lookaheads_count): New.
12489 (states_lookaheads_initialize): Merge into...
12490 (initialize_LA): this.
12491 (lalr_free): Adjust.
12492 * src/main.c (main): Don't free nullable and derives too early: it
12493 is used by --verbose.
12494 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12495
12496 2002-08-01 Akim Demaille <akim@epita.fr>
12497
12498 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12499 `rule_number_t**'.
12500 (set_derives, free_derives): Rename as...
12501 (derives_compute, derives_free): this.
12502 Adjust all dependencies.
12503 * src/nullable.c (set_nullable, free_nullable): Rename as...
12504 (nullable_compute, nullable_free): these.
12505 (rule_list_t): Store rule_t *, not rule_number_t.
12506 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12507 pointers, instead of their numbers.
12508 * src/main.c (main): Call nullable_free, and derives_free earlier,
12509 as they were lo longer used.
12510
12511 2002-08-01 Akim Demaille <akim@epita.fr>
12512
12513 * lib/timevar.c (get_time): Include children time.
12514 * src/lalr.h (LA, LArule): Don't export them: used with the
12515 state_t.
12516 * src/lalr.c (LA, LArule): Static.
12517 * src/lalr.h, src/lalr.c (lalr_free): New.
12518 * src/main.c (main): Call it.
12519 * src/tables.c (pack_vector): Check whether loc is >= to the
12520 table_size, not >.
12521 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12522 (tables_generate): do it, since that's also it which allocates
12523 them.
12524 Don't free LA and LArule, main does.
12525
12526 2002-07-31 Akim Demaille <akim@epita.fr>
12527
12528 Separate parser tables computation and output.
12529
12530 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12531 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12532 (yydefgoto, yydefact, high): Move to...
12533 * src/tables.h, src/tables.c: here.
12534 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12535 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12536 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12537 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12538 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12539 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12540 (action_row, save_row, token_actions, save_column, default_goto)
12541 (goto_actions, sort_actions, matching_state, pack_vector)
12542 (table_ninf_remap, pack_table, prepare_actions): Move to...
12543 * src/tables.c: here.
12544 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12545 * src/output.c (token_actions, output_base, output_conflicts)
12546 (output_check): Merge into...
12547 (prepare_actions): this.
12548 (actions_output): Rename as...
12549 (user_actions_output): this.
12550 * src/main.c (main): Call tables_generate and tables_free.
12551
12552 2002-07-31 Akim Demaille <akim@epita.fr>
12553
12554 Steal GCC's --time-report support.
12555
12556 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12557 stolen/adjusted from GCC.
12558 * m4/stage.m4: Remove time related checks.
12559 * m4/timevar.m4: New.
12560 * configure.in: Adjust.
12561 * src/system.h: Adjust to using timevar.h.
12562 * src/getargs.h, src/getargs.c: Support trace_time for
12563 --trace=time.
12564 * src/main.c (stage): Remove.
12565 (main): Replace `stage' invocations with timevar calls.
12566 * src/output.c: Insert pertinent timevar calls.
12567
12568 2002-07-31 Akim Demaille <akim@epita.fr>
12569
12570 Let --trace have arguments.
12571
12572 * src/getargs.h (enum trace_e): New.
12573 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12574 (long_options, short_options): --trace/-T takes an optional
12575 argument.
12576 Change all the uses of trace_flag to reflect the new flags.
12577 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12578
12579 Strengthen `stage' portability.
12580
12581 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12582 * configure.in: Use it.
12583 Don't check for malloc.h and sys/times.h.
12584 * src/system.h: Include them when appropriate.
12585 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12586 times and struct tms are available.
12587
12588 2002-07-30 Akim Demaille <akim@epita.fr>
12589
12590 In verbose parse error message, don't report `error' as an
12591 expected token.
12592 * tests/actions.at (Printers and Destructors): Adjust.
12593 * tests/calc.at (Calculator $1): Adjust.
12594 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12595 error message, do not report the parser accepts the error token in
12596 that state.
12597
12598 2002-07-30 Akim Demaille <akim@epita.fr>
12599
12600 Normalize conflict related messages.
12601
12602 * src/complain.h, src/complain.c (warn, complain): New.
12603 * src/conflicts.c (conflicts_print): Use them.
12604 (conflict_report_yacc): New, extracted from...
12605 (conflicts_print): here.
12606 * tests/conflicts.at, tests/existing.at: Adjust.
12607
12608 2002-07-30 Akim Demaille <akim@epita.fr>
12609
12610 Report rules which are never reduced by the parser: those hidden
12611 by conflicts.
12612
12613 * src/LR0.c (save_reductions): Don't make the final state too
12614 different: save its reduction (accept) instead of having a state
12615 without any action (no shift or goto, no reduce).
12616 Note: the final state is now a ``regular'' state, i.e., the
12617 parsers now contain `reduce 0' as default reduction.
12618 Nevertheless, since they decide to `accept' when yystate =
12619 final_state, they still will not reduce rule 0.
12620 * src/print.c (print_actions, print_reduction): Adjust.
12621 * src/output.c (action_row): Track reduced rules.
12622 (token_actions): Report rules never reduced.
12623 * tests/conflicts.at, tests/regression.at: Adjust.
12624
12625 2002-07-30 Akim Demaille <akim@epita.fr>
12626
12627 `stage' was accidently included in a previous patch.
12628 Initiate its autoconfiscation.
12629
12630 * configure.in: Look for malloc.h and sys/times.h.
12631 * src/main.c (stage): Adjust.
12632 Report only when trace_flag.
12633
12634 2002-07-29 Akim Demaille <akim@epita.fr>
12635
12636 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12637 state_number_t.
12638 (errs_t): symbol_t*, not symbol_number_t.
12639 (reductions_t): rule_t*, not rule_number_t.
12640 (FOR_EACH_SHIFT): New.
12641 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12642 * src/print.c, src/print_graph.c: Adjust.
12643
12644 2002-07-29 Akim Demaille <akim@epita.fr>
12645
12646 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12647
12648 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12649 (endtoken, accept): these.
12650 * src/reader.c (reader): Set endtoken's default tag to "$end".
12651 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12652 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12653 Adjust.
12654
12655 2002-07-29 Akim Demaille <akim@epita.fr>
12656
12657 * src/reduce.c (reduce_grammar): When the language is empty,
12658 complain about the start symbol, not the axiom.
12659 Use its location.
12660 * tests/reduce.at (Empty Language): New.
12661
12662 2002-07-26 Akim Demaille <akim@epita.fr>
12663
12664 * src/reader.h, src/reader.c (gram_error): ... can't get
12665 yycontrol without making too strong assumptions on the parser
12666 itself.
12667 * src/output.c (prepare_tokens): Use the real 0th value of
12668 token_translations instead of `0'.
12669 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12670 visible here.
12671 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12672 for the time being: %locations ought to provide it to yyerror.
12673
12674 2002-07-25 Akim Demaille <akim@epita.fr>
12675
12676 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12677 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12678 * tests/regression.at (Web2c Actions): Adjust.
12679
12680 2002-07-25 Akim Demaille <akim@epita.fr>
12681
12682 Stop storing rules from 1 to nrules + 1.
12683
12684 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12685 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12686 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12687 Iterate from 0 to nrules.
12688 Use rule_number_as_item_number and item_number_as_rule_number.
12689 Adjust to `derive' now containing possibly 0.
12690 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12691 Handle the `- 1' part in rule numbers from/to item numbers.
12692 * src/conflicts.c (log_resolution): Fix the message which reversed
12693 shift and reduce.
12694 * src/output.c (action_row): Initialize default_rule to -1.
12695 (token_actions): Adjust.
12696 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12697 expected output.
12698 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12699
12700 2002-07-25 Akim Demaille <akim@epita.fr>
12701
12702 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12703 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12704 (b4_c_knr_arg_decl): New.
12705 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12706 yyreport_parse_error.
12707
12708 2002-07-25 Akim Demaille <akim@epita.fr>
12709
12710 * data/yacc.c (yyreport_parse_error): New, extracted from...
12711 (yyparse): here.
12712 (yydestruct, yysymprint): Move above yyparse.
12713 Be K&R compliant.
12714
12715 2002-07-25 Akim Demaille <akim@epita.fr>
12716
12717 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12718 replace...
12719 (b4_sint_type, b4_uint_type): these.
12720 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12721 * tests/regression.at (Web2c Actions): Adjust.
12722
12723 2002-07-25 Akim Demaille <akim@epita.fr>
12724
12725 * src/gram.h (TIEM_NUMBER_MAX): New.
12726 (item_number_of_rule_number, rule_number_of_item_number): Rename
12727 as...
12728 (rule_number_as_item_number, item_number_as_rule_number): these.
12729 Adjust dependencies.
12730 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12731 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12732 (symbol_number_to_vector_number): New.
12733 (order): Of vector_number_t* type.
12734 (base_t, BASE_MAX, BASE_MIN): New.
12735 (froms, tos, width, pos, check): Of base_t type.
12736 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12737 (actrow): Of action_number_t type.
12738 (conflrow): Of unsigned int type.
12739 (table_ninf, base_ninf): New.
12740 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12741 (muscle_insert_int_table, muscle_insert_base_table)
12742 (muscle_insert_rule_number_table): New.
12743 (prepare_tokens): Output `toknum' as int_table.
12744 (action_row): Returns a rule_number_t.
12745 Use ACTION_MIN, not SHRT_MIN.
12746 (token_actions): yydefact is rule_number_t*.
12747 (table_ninf_remap): New.
12748 (pack_table): Use it for `base' and `table'.
12749 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12750 replaced with...
12751 (YYPACT_NINF, YYTABLE_NINF): these.
12752 (yypact, yytable): Compute their types instead of hard-coded
12753 `short'.
12754 * tests/regression.at (Web2c Actions): Adjust.
12755
12756 2002-07-19 Akim Demaille <akim@epita.fr>
12757
12758 * src/scan-gram.l (id): Can start with an underscore.
12759
12760 2002-07-16 Akim Demaille <akim@epita.fr>
12761
12762 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12763 Adjust all former `associativity' dependencies.
12764 * src/symtab.c (symbol_new): Default associativity is `undef', not
12765 `right'.
12766 (symbol_check_alias_consistence): Adjust.
12767
12768 2002-07-09 Akim Demaille <akim@epita.fr>
12769
12770 * doc/bison.texinfo: Properly set the ``header'' part.
12771 Use @dircategory ``GNU programming tools'' as per Texinfo's
12772 documentation.
12773 Use @copying.
12774
12775 2002-07-09 Akim Demaille <akim@epita.fr>
12776
12777 * lib/quotearg.h: Protect against multiple inclusions.
12778 * src/location.h (location_t): Add a `file' member.
12779 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12780 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12781 `error_one_per_line' support.
12782
12783 2002-07-09 Akim Demaille <akim@epita.fr>
12784
12785 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12786 * src/reader.c (lineno): Remove.
12787 Adjust all dependencies.
12788 (get_merge_function): Take a location and use complain_at.
12789 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12790 * tests/regression.at (Invalid inputs, Mixing %token styles):
12791 Adjust.
12792
12793 2002-07-09 Akim Demaille <akim@epita.fr>
12794
12795 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12796 recovery rule, and forbid extensions when --yacc.
12797 (gram_error): Use complain_at.
12798 * src/reader.c (reader): Exit if there were parse errors.
12799
12800 2002-07-09 Akim Demaille <akim@epita.fr>
12801
12802 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12803 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12804 Reported by R Blake <blakers@mac.com>.
12805
12806 2002-07-09 Akim Demaille <akim@epita.fr>
12807
12808 * data/yacc.c: Output the copyright notive in the header.
12809
12810 2002-07-03 Akim Demaille <akim@epita.fr>
12811
12812 * src/output.c (froms, tos): Are state_number_t.
12813 (save_column): sp, sp1, and sp2 are state_number_t.
12814 (prepare): Rename `final' as `final_state_number', `nnts' as
12815 `nterms_number', `nrules' as `rules_number', `nstates' as
12816 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12817 unused.
12818 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12819 * data/lalr1.cc (nsym_): Remove, unused.
12820
12821 2002-07-03 Akim Demaille <akim@epita.fr>
12822
12823 * src/lalr.h, src/lalr.c (goto_number_t): New.
12824 * src/lalr.c (goto_list_t): New.
12825 Propagate them.
12826 * src/nullable.c (rule_list_t): New.
12827 Propagate.
12828 * src/types.h: Remove.
12829
12830 2002-07-03 Akim Demaille <akim@epita.fr>
12831
12832 * src/closure.c (print_fderives): Use rule_rhs_print.
12833 * src/derives.c (print_derives): Use rule_rhs_print.
12834 (rule_list_t): New, replaces `shorts'.
12835 (set_derives): Add comments.
12836 * tests/sets.at (Nullable, Firsts): Adjust.
12837
12838 2002-07-03 Akim Demaille <akim@epita.fr>
12839
12840 * src/output.c (prepare_actions): Free `tally' and `width'.
12841 (prepare_actions): Allocate and free `order'.
12842 * src/symtab.c (symbols_free): Free `symbols'.
12843 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12844 * src/output.c (m4_invoke): Move to...
12845 * src/scan-skel.l: here.
12846 (<<EOF>>): Close yyout, and free its name.
12847
12848 2002-07-03 Akim Demaille <akim@epita.fr>
12849
12850 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12851
12852 * src/LR0.c (new_state): Merge into...
12853 (state_list_append): this.
12854 (new_states): Merge into...
12855 (generate_states): here.
12856 (set_states): Don't ensure a proper `errs' state member here, do it...
12857 * src/conflicts.c (conflicts_solve): here.
12858 * src/state.h, src/state.c: Comment changes.
12859 (state_t): Rename member `shifts' as `transitions'.
12860 Adjust all dependencies.
12861 (errs_new): For consistency, also take the values as argument.
12862 (errs_dup): Remove.
12863 (state_errs_set): New.
12864 (state_reductions_set, state_transitions_set): Assert that no
12865 previous value was assigned.
12866 (state_free): New.
12867 (states_free): Use it.
12868 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12869 temporary storage: use `errs' and `nerrs' as elsewhere.
12870 (set_conflicts): Allocate and free this `errs'.
12871
12872 2002-07-02 Akim Demaille <akim@epita.fr>
12873
12874 * lib/libiberty.h: New.
12875 * lib: Update the bitset implementation from upstream.
12876 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12877 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12878 * src/main.c: Adjust bitset stats calls.
12879
12880 2002-07-01 Paul Eggert <eggert@twinsun.com>
12881
12882 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12883 char, so that negative chars don't collide with $.
12884
12885 2002-06-30 Akim Demaille <akim@epita.fr>
12886
12887 Have the GLR tests be `warning' checked, and fix the warnings.
12888
12889 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12890 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12891 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12892 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12893 (yyaddDeferredAction): static.
12894 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12895 (yyreportParseError): yyprefix is const.
12896 yytokenp is used only when verbose.
12897 (yy__GNUC__): Replace with __GNUC__.
12898 (yypdumpstack): yyi is size_t.
12899 (yypreference): Un-yy local variables and arguments, to avoid
12900 clashes with `yyr1'. Anyway, we are not in the user name space.
12901 (yytname_size): be an int, as is compared with ints.
12902 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12903 Use them.
12904 * tests/cxx-gram.at: Use quotation to protect $1.
12905 Use AT_COMPILE to enable warnings hunts.
12906 Prototype yylex and yyerror.
12907 `Use' argc.
12908 Include `string.h', not `strings.h'.
12909 Produce and prototype stmtMerge only when used.
12910 yylex takes a location.
12911
12912 2002-06-30 Akim Demaille <akim@epita.fr>
12913
12914 We spend a lot of time in quotearg, in particular when --verbose.
12915
12916 * src/symtab.c (symbol_get): Store a quoted version of the key.
12917 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12918 Adjust all callers.
12919
12920 2002-06-30 Akim Demaille <akim@epita.fr>
12921
12922 * src/state.h (reductions_t): Rename member `nreds' as num.
12923 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12924 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12925
12926 2002-06-30 Akim Demaille <akim@epita.fr>
12927
12928 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12929 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12930 (shifts_to): Rename as...
12931 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12932 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12933 (TRANSITION_IS_DISABLED, transitions_to): these.
12934
12935 2002-06-30 Akim Demaille <akim@epita.fr>
12936
12937 * src/print.c (print_shifts, print_gotos): Merge into...
12938 (print_transitions): this.
12939 (print_transitions, print_errs, print_reductions): Align the
12940 lookaheads columns.
12941 (print_core, print_transitions, print_errs, print_state,
12942 print_grammar): Output empty lines separator before, not after.
12943 (state_default_rule_compute): Rename as...
12944 (state_default_rule): this.
12945 * tests/conflicts.at (Defaulted Conflicted Reduction),
12946 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12947 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12948
12949 2002-06-30 Akim Demaille <akim@epita.fr>
12950
12951 Display items as we display rules.
12952
12953 * src/gram.h, src/gram.c (rule_lhs_print): New.
12954 * src/gram.c (grammar_rules_partial_print): Use it.
12955 * src/print.c (print_core): Likewise.
12956 * tests/conflicts.at (Defaulted Conflicted Reduction),
12957 (Unresolved SR Conflicts): Adjust.
12958 (Unresolved SR Conflicts): Adjust and rename as...
12959 (Resolved SR Conflicts): this, as was meant.
12960 * tests/regression.at (Web2c Report): Adjust.
12961
12962 2002-06-30 Akim Demaille <akim@epita.fr>
12963
12964 * src/print.c (state_default_rule_compute): New, extracted from...
12965 (print_reductions): here.
12966 Pessimize, but clarify the code.
12967 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12968
12969 2002-06-30 Akim Demaille <akim@epita.fr>
12970
12971 * src/output.c (action_row): Let default_rule be always a rule
12972 number.
12973
12974 2002-06-30 Akim Demaille <akim@epita.fr>
12975
12976 * src/closure.c (print_firsts, print_fderives, closure):
12977 Use BITSET_EXECUTE.
12978 * src/lalr.c (lookaheads_print): Likewise.
12979 * src/state.c (state_rule_lookaheads_print): Likewise.
12980 * src/print_graph.c (print_core): Likewise.
12981 * src/print.c (print_reductions): Likewise.
12982 * src/output.c (action_row): Likewise.
12983 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12984
12985 2002-06-30 Akim Demaille <akim@epita.fr>
12986
12987 * src/print_graph.c: Use report_flag.
12988
12989 2002-06-30 Akim Demaille <akim@epita.fr>
12990
12991 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12992 to...
12993 * src/relation.h, src/relation.c (traverse, relation_digraph)
12994 (relation_print, relation_transpose): New.
12995
12996 2002-06-30 Akim Demaille <akim@epita.fr>
12997
12998 * src/state.h, src/state.c (shifts_to): New.
12999 * src/lalr.c (build_relations): Use it.
13000
13001 2002-06-30 Akim Demaille <akim@epita.fr>
13002
13003 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13004 (item_number_of_rule_number, rule_number_of_item_number): New.
13005 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13006 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13007 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13008 Propagate their use.
13009 Much remains to be done, in particular wrt `shorts' from types.h.
13010
13011 2002-06-30 Akim Demaille <akim@epita.fr>
13012
13013 * src/symtab.c (symbol_new): Initialize the `printer' member.
13014
13015 2002-06-30 Akim Demaille <akim@epita.fr>
13016
13017 * src/LR0.c (save_reductions): Remove, replaced by...
13018 * src/state.h, src/state.c (state_reductions_set): New.
13019 (reductions, errs): Rename as...
13020 (reductions_t, errs_t): these.
13021 Adjust all dependencies.
13022
13023 2002-06-30 Akim Demaille <akim@epita.fr>
13024
13025 * src/LR0.c (state_list_t, state_list_append): New.
13026 (first_state, last_state): Now symbol_list_t.
13027 (this_state): Remove.
13028 (new_itemsets, append_states, save_reductions): Take a state_t as
13029 argument.
13030 (set_states, generate_states): Adjust.
13031 (save_shifts): Remove, replaced by...
13032 * src/state.h, src/state.c (state_shifts_set): New.
13033 (shifts): Rename as...
13034 (shifts_t): this.
13035 Adjust all dependencies.
13036 * src/state.h (state_t): Remove the `next' member.
13037
13038 2002-06-30 Akim Demaille <akim@epita.fr>
13039
13040 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13041 escaped in slot 0.
13042
13043 2002-06-30 Akim Demaille <akim@epita.fr>
13044
13045 Use hash.h for the state hash table.
13046
13047 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13048 (allocate_storage): Use state_hash_new.
13049 (free_storage): Use state_hash_free.
13050 (new_state, get_state): Adjust.
13051 * src/lalr.h, src/lalr.c (states): Move to...
13052 * src/states.h (state_t): Remove the `link' member, no longer
13053 used.
13054 * src/states.h, src/states.c: here.
13055 (state_hash_new, state_hash_free, state_hash_lookup)
13056 (state_hash_insert, states_free): New.
13057 * src/states.c (state_table, state_compare, state_hash): New.
13058 * src/output.c (output_actions): Do not free states now, since we
13059 still need to know the final_state number in `prepare', called
13060 afterwards. Do it...
13061 * src/main.c (main): here: call states_free after `output'.
13062
13063 2002-06-30 Akim Demaille <akim@epita.fr>
13064
13065 * src/state.h, src/state.c (state_new): New, extracted from...
13066 * src/LR0.c (new_state): here.
13067 * src/state.h (STATE_ALLOC): Move to...
13068 * src/state.c: here.
13069 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13070 * src/state.h, src/state.c: here.
13071
13072 2002-06-30 Akim Demaille <akim@epita.fr>
13073
13074 * src/reader.c (gensym): Rename as...
13075 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13076 (getsym): Rename as...
13077 (symbol_get): this.
13078
13079 2002-06-30 Akim Demaille <akim@epita.fr>
13080
13081 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13082 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13083 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13084 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13085
13086 2002-06-30 Akim Demaille <akim@epita.fr>
13087
13088 Make the test suite pass with warnings checked.
13089
13090 * tests/actions.at (Printers and Destructors): Improve.
13091 Avoid unsigned vs. signed issues.
13092 * tests/calc.at: Don't exercise the scanner here, do it...
13093 * tests/input.at (Torturing the Scanner): here.
13094
13095 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13096
13097 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
13098 reorganize first lines parallel to yacc.c.
13099
13100 2002-06-28 Akim Demaille <akim@epita.fr>
13101
13102 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13103 (b4_token_enum, b4_token_defines): New, factored from...
13104 * data/lalr1.cc, data/yacc.c, glr.c: here.
13105
13106 2002-06-28 Akim Demaille <akim@epita.fr>
13107
13108 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13109 unused variables.
13110 * src/output.c (merger_output): static.
13111
13112 2002-06-28 Akim Demaille <akim@epita.fr>
13113
13114 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
13115 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13116 pacify GCC.
13117 * src/output.c (save_row): Initialize all the variables to pacify GCC.
13118
13119 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13120
13121 Accumulated changelog for new GLR parsing features.
13122
13123 * src/conflicts.c (count_total_conflicts): Change name to
13124 conflicts_total_count.
13125 * src/conflicts.h: Ditto.
13126 * src/output.c (token_actions): Use the new name.
13127 (output_conflicts): Change conflp => conflict_list_heads, and
13128 confl => conflict_list for better readability.
13129 * data/glr.c: Use the new names.
13130 * NEWS: Add self to GLR announcement.
13131
13132 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13133
13134 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13135 Akim Demaille.
13136
13137 * data/bison.glr: Change name to glr.c
13138 * data/glr.c: Renamed from bison.glr.
13139 * data/Makefile.am: Add glr.c
13140
13141 * src/getargs.c:
13142
13143 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
13144 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
13145
13146 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13147
13148 * data/bison.glr: Be sure to restore the
13149 current #line when returning to the skeleton contents after having
13150 exposed the input file's #line.
13151
13152 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13153
13154 * data/bison.glr: Bring up to date with changes to bison.simple.
13155
13156 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13157
13158 * data/bison.glr: Correct definitions that use b4_prefix.
13159 Various reformatting.
13160 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13161 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13162 yytokenp argument; now part of stack.
13163 (yychar): Define to behave as documented.
13164 (yyclearin): Ditto.
13165
13166 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13167
13168 * src/reader.h: Add declaration for free_merger_functions.
13169
13170 * src/reader.c (merge_functions): New variable.
13171 (get_merge_function): New function.
13172 (free_merger_functions): New function.
13173 (readgram): Check for %prec that is not followed by a symbol.
13174 Handle %dprec and %merge declarations.
13175 (packgram): Initialize dprec and merger fields in rules array.
13176
13177 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13178 conflict_list_cnt, conflict_list_free): New variables.
13179 (table_grow): Also grow conflict_table.
13180 (prepare_rules): Output dprec and merger tables.
13181 (conflict_row): New function.
13182 (action_row): Output conflict lists for GLR parser. Don't use
13183 default reduction in conflicted states for GLR parser so that there
13184 are spaces for the conflict lists.
13185 (save_row): Also save conflict information.
13186 (token_actions): Allocate conflict list.
13187 (merger_output): New function.
13188 (pack_vector): Pack conflict table, too.
13189 (output_conflicts): New function to output yyconflp and yyconfl.
13190 (output_check): Allocate conflict_tos.
13191 (output_actions): Output conflict tables, also.
13192 (output_skeleton): Output b4_mergers definition.
13193 (prepare): Output b4_max_rhs_length definition.
13194 Use 'bison.glr' as default skeleton for GLR parsers.
13195
13196 * src/gram.c (glr_parser): New flag.
13197 (grammar_free): Call free_merger_functions.
13198
13199 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13200 all pairs of conflicting reductions, rather than just all tokens
13201 causing conflicts. Needed to size conflict tables.
13202 (conflicts_output): Modify call to count_rr_conflicts for new
13203 interface.
13204 (conflicts_print): Ditto.
13205 (count_total_conflicts): New function.
13206
13207 * src/reader.h (merger_list): New type.
13208 (merge_functions): New variable.
13209
13210 * src/lex.h (tok_dprec, tok_merge): New token types.
13211
13212 * src/gram.h (rule_s): Add dprec and merger fields.
13213 (glr_parser): New flag.
13214
13215 * src/conflicts.h (count_total_conflicts): New function.
13216
13217 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13218
13219 * doc/bison.texinfo (Generalized LR Parsing): New section.
13220 (GLR Parsers): New section.
13221 (Language and Grammar): Mention GLR parsing.
13222 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13223 Correct typo ("tge" -> "the").
13224
13225 * data/bison.glr: New skeleton for GLR parsing.
13226
13227 * tests/cxx-gram.at: New tests for GLR parsing.
13228
13229 * tests/testsuite.at: Include cxx-gram.at.
13230
13231 * tests/Makefile.am: Add cxx-gram.at.
13232
13233 * src/parse-gram.y:
13234
13235 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13236
13237 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
13238
13239 2002-06-27 Akim Demaille <akim@epita.fr>
13240
13241 * src/options.h, src/options.c: Remove.
13242 * src/getargs.c (short_options, long_options): New.
13243
13244 2002-06-27 Akim Demaille <akim@epita.fr>
13245
13246 * data/bison.simple, data/bison.c++: Rename as...
13247 * data/yacc.c, data/lalr1.cc: these.
13248 * doc/bison.texinfo (Environment Variables): Remove.
13249
13250 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13251
13252 * src/getargs.c (report_argmatch): Initialize strtok().
13253
13254 2002-06-20 Akim Demaille <akim@epita.fr>
13255
13256 * data/bison.simple (b4_symbol_actions): New, replaces...
13257 (b4_symbol_destructor, b4_symbol_printer): these.
13258 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13259 user token numbers.
13260
13261 2002-06-20 Akim Demaille <akim@epita.fr>
13262
13263 * data/bison.simple (yydestructor): Rename as...
13264 (yydestruct): this.
13265
13266 2002-06-20 Akim Demaille <akim@epita.fr>
13267
13268 * src/symtab.h, src/symtab.c (symbol_type_set)
13269 (symbol_destructor_set, symbol_precedence_set): The location is
13270 the last argument.
13271 Adjust all callers.
13272
13273 2002-06-20 Akim Demaille <akim@epita.fr>
13274
13275 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13276 internals.
13277 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13278 Takes a location.
13279 * src/symtab.h, src/symtab.c (symbol_class_set)
13280 (symbol_user_token_number_set): Likewise.
13281 Adjust all callers.
13282 Promote complain_at.
13283 * tests/input.at (Type Clashes): Adjust.
13284
13285 2002-06-20 Akim Demaille <akim@epita.fr>
13286
13287 * data/bison.simple (YYLEX): Fix the declaration when
13288 %pure-parser.
13289
13290 2002-06-20 Akim Demaille <akim@epita.fr>
13291
13292 * data/bison.simple (yysymprint): Don't print the token number,
13293 just its name.
13294 * tests/actions.at (Destructors): Rename as...
13295 (Printers and Destructors): this.
13296 Also exercise %printer.
13297
13298 2002-06-20 Akim Demaille <akim@epita.fr>
13299
13300 * data/bison.simple (YYDSYMPRINT): New.
13301 Use it to remove many of the #if YYDEBUG/if (yydebug).
13302
13303 2002-06-20 Akim Demaille <akim@epita.fr>
13304
13305 * src/symtab.h, src/symtab.c (symbol_t): printer and
13306 printer_location are new members.
13307 (symbol_printer_set): New.
13308 * src/parse-gram.y (PERCENT_PRINTER): New token.
13309 Handle its associated rule.
13310 * src/scan-gram.l: Adjust.
13311 (handle_destructor_at, handle_destructor_dollar): Rename as...
13312 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13313 * src/output.c (symbol_printers_output): New.
13314 (output_skeleton): Call it.
13315 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13316 since there are already many grammar files with a user `yyprint'.
13317 Replace the calls to YYPRINT to calls to yysymprint.
13318 * tests/calc.at: Adjust.
13319 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13320 taking advantage of parser very internal details (stack size!).
13321
13322 2002-06-20 Akim Demaille <akim@epita.fr>
13323
13324 * src/scan-gram.l: Complete the scanner with the missing patterns
13325 to pacify Flex.
13326 Use `quote' and `symbol_tag_get' where appropriate.
13327
13328 2002-06-19 Akim Demaille <akim@epita.fr>
13329
13330 * tests/actions.at (Destructors): Augment to test locations.
13331 * data/bison.simple (yydestructor): Pass it the current location
13332 if locations are enabled.
13333 Prototype only when __STDC__ or C++.
13334 Change the argument names to move into the yy name space: there is
13335 user code here.
13336
13337 2002-06-19 Akim Demaille <akim@epita.fr>
13338
13339 * data/bison.simple (b4_pure_if): New.
13340 Use it instead of #ifdef YYPURE.
13341
13342 2002-06-19 Akim Demaille <akim@epita.fr>
13343
13344 * data/bison.simple (b4_location_if): New.
13345 Use it instead of #ifdef YYLSP_NEEDED.
13346
13347 2002-06-19 Akim Demaille <akim@epita.fr>
13348
13349 Prepare @$ in %destructor, but currently don't bind it in the
13350 skeleton, as %location use is not cleaned up yet.
13351
13352 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13353 (handle_action_at): New.
13354 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13355 a braced_code_t and a location as additional arguments.
13356 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13357 unquote one when outputting `b4_dollar_dollar'.
13358 Adjust callers.
13359 * data/bison.simple (b4_eval): Remove.
13360 (b4_symbol_destructor): Adjust.
13361 * tests/input.at (Invalid @n): Adjust.
13362
13363 2002-06-19 Zack Weinberg <zack@codesourcery.com>
13364
13365 * doc/bison.texinfo: Document ability to have multiple
13366 prologue sections.
13367
13368 2002-06-18 Akim Demaille <akim@epita.fr>
13369
13370 * src/files.c (compute_base_names): When computing the output file
13371 names from the input file name, strip the directory part.
13372
13373 2002-06-18 Akim Demaille <akim@epita.fr>
13374
13375 * data/bison.simple.new: Comment changes.
13376 Reported by Andreas Schwab.
13377
13378 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13379
13380 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13381 there are no `label `yyoverflowlab' defined but not used' warnings
13382 when yyoverflow is defined.
13383
13384 2002-06-18 Akim Demaille <akim@epita.fr>
13385
13386 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13387 new member.
13388 (symbol_destructor_set): Adjust.
13389 * src/output.c (symbol_destructors_output): Output the destructor
13390 locations.
13391 Output the symbol name.
13392 * data/bison.simple (b4_symbol_destructor): Adjust.
13393
13394 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13395 and Akim Demaille <akim@epita.fr>
13396
13397 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13398 what's left on the stack when the error recovery hits EOF.
13399 * tests/actions.at (Destructors): Complete to exercise this case.
13400
13401 2002-06-17 Akim Demaille <akim@epita.fr>
13402
13403 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13404 arguments is really empty, not only equal to `[]'.
13405 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13406 member.
13407 (symbol_destructor_set): New.
13408 * src/output.c (symbol_destructors_output): New.
13409 * src/reader.h (brace_code_t, current_braced_code): New.
13410 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13411 (handle_dollar): Rename as...
13412 (handle_action_dollar): this.
13413 (handle_destructor_dollar): New.
13414 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13415 (grammar_declaration): Use it.
13416 * data/bison.simple (yystos): Is always defined.
13417 (yydestructor): New.
13418 * tests/actions.at (Destructors): New.
13419 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13420
13421 2002-06-17 Akim Demaille <akim@epita.fr>
13422
13423 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13424 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13425 rule_length only when needed.
13426 * src/output.c (actions_output, token_definitions_output): Output
13427 the full M4 block.
13428 * src/symtab.c: Don't access directly to the symbol tag, use
13429 symbol_tag_get.
13430 * src/parse-gram.y: Use symbol_list_free.
13431
13432 2002-06-17 Akim Demaille <akim@epita.fr>
13433
13434 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13435 (symbol_list_prepend, get_type_name): Move to...
13436 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13437 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13438 Adjust all callers.
13439 (symbol_list_free): New.
13440 * src/scan-gram.l (handle_dollar): Takes a location.
13441 * tests/input.at (Invalid $n): Adjust.
13442
13443 2002-06-17 Akim Demaille <akim@epita.fr>
13444
13445 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13446 (symbol_list_prepend): New.
13447 * src/parse-gram.y (%union): `list' is a new member.
13448 (symbols.1): New, replaces...
13449 (terms_to_prec.1, nterms_to_type.1): these.
13450 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13451 Take a location as additional argument.
13452 Adjust all callers.
13453
13454 2002-06-15 Akim Demaille <akim@epita.fr>
13455
13456 * src/parse-gram.y: Move %token in the declaration section so that
13457 we don't depend upon CVS Bison.
13458
13459 2002-06-15 Akim Demaille <akim@epita.fr>
13460
13461 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13462 * src/print.c (print_core): Use it.
13463
13464 2002-06-15 Akim Demaille <akim@epita.fr>
13465
13466 * src/conflicts.c (log_resolution): Accept the rule involved in
13467 the sr conflicts instead of the lookahead number that points to
13468 that rule.
13469 (flush_reduce): Accept the current lookahead vector as argument,
13470 instead of the index in LA.
13471 (resolve_sr_conflict): Accept the current number of lookahead
13472 bitset to consider for the STATE, instead of the index in LA.
13473 (set_conflicts): Adjust.
13474 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13475
13476 2002-06-15 Akim Demaille <akim@epita.fr>
13477
13478 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13479 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13480 Adjust all dependencies.
13481 * src/lalr.c (initialize_lookaheads): Split into...
13482 (states_lookaheads_count, states_lookaheads_initialize): these.
13483 (lalr): Adjust.
13484
13485 2002-06-15 Akim Demaille <akim@epita.fr>
13486
13487 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13488 out of...
13489 (grammar_rules_print): here.
13490 * src/reduce.c (reduce_output): Use it.
13491 * tests/reduce.at (Useless Rules, Reduced Automaton)
13492 (Underivable Rules): Adjust.
13493
13494 2002-06-15 Akim Demaille <akim@epita.fr>
13495
13496 Copy BYacc's nice way to report the grammar.
13497
13498 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13499 New.
13500 Don't print the rules' location, it is confusing and useless.
13501 (rule_print): Use grammar_rhs_print.
13502 * src/print.c (print_grammar): Use grammar_rules_print.
13503
13504 2002-06-15 Akim Demaille <akim@epita.fr>
13505
13506 Complete and rationalize `useless thing' warnings.
13507
13508 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13509 (symbol_tag_print): New.
13510 Use them everywhere in place of accessing directly the tag member.
13511 * src/gram.h, src/gram.c (rule_print): New.
13512 Use it where a rule used to be printed `by hand'.
13513 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13514 (reduce_grammar_tables): Report the useless rules.
13515 (reduce_print): Useless things are a warning, not an error.
13516 Report it as such.
13517 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13518 (Reduced Automaton, Underivable Rules): Adjust.
13519 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13520 * tests/conflicts.at (Unresolved SR Conflicts)
13521 (Solved SR Conflicts): Adjust.
13522
13523 2002-06-15 Akim Demaille <akim@epita.fr>
13524
13525 Let symbols have a location.
13526
13527 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13528 (getsym): Adjust.
13529 Adjust all callers.
13530 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13531 Use location_t, not int.
13532 * src/symtab.c (symbol_check_defined): Take advantage of the
13533 location.
13534 * tests/regression.at (Invalid inputs): Adjust.
13535
13536 2002-06-15 Akim Demaille <akim@epita.fr>
13537
13538 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13539 (input): Don't try to initialize yylloc here, do it in the
13540 scanner.
13541 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13542 * src/gram.h (rule_t): Change line and action_line into location
13543 and action_location, of location_t type.
13544 Adjust all dependencies.
13545 * src/location.h, src/location.c (empty_location): New.
13546 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13547 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13548 (grammar_current_rule_symbol_append)
13549 (grammar_current_rule_action_append): Expect a location as argument.
13550 * src/reader.c (grammar_midrule_action): Adjust to attach an
13551 action's location as dummy symbol location.
13552 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13553 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13554 the line numbers.
13555
13556 2002-06-14 Akim Demaille <akim@epita.fr>
13557
13558 Grammar declarations may be found in the grammar section.
13559
13560 * src/parse-gram.y (rules_or_grammar_declaration): New.
13561 (declarations): Each declaration may end with a semicolon, not
13562 just...
13563 (grammar_declaration): `"%union"'.
13564 (grammar): Branch to rules_or_grammar_declaration.
13565
13566 2002-06-14 Akim Demaille <akim@epita.fr>
13567
13568 * src/main.c (main): Invoke scanner_free.
13569
13570 2002-06-14 Akim Demaille <akim@epita.fr>
13571
13572 * src/output.c (m4_invoke): Extracted from...
13573 (output_skeleton): here.
13574 Free tempfile.
13575
13576 2002-06-14 Akim Demaille <akim@epita.fr>
13577
13578 * src/parse-gram.y (directives, directive, gram)
13579 (grammar_directives, precedence_directives, precedence_directive):
13580 Rename as...
13581 (declarations, declaration, grammar, grammar_declaration)
13582 (precedence_declaration, precedence_declarator): these.
13583 (symbol_declaration): New.
13584
13585 2002-06-14 Akim Demaille <akim@epita.fr>
13586
13587 * src/files.c (action_obstack): Remove, unused.
13588 (output_obstack): Remove it, and all its dependencies, as it is no
13589 longer needed.
13590 * src/reader.c (epilogue_set): Build the epilogue in the
13591 muscle_obstack.
13592 * src/output.h, src/output.c (muscle_obstack): Move to...
13593 * src/muscle_tab.h, src/muscle_tab.h: here.
13594 (muscle_init): Initialize muscle_obstack.
13595 (muscle_free): New.
13596 * src/main.c (main): Call it.
13597
13598 2002-06-14 Akim Demaille <akim@epita.fr>
13599
13600 * src/location.h: New, extracted from...
13601 * src/reader.h: here.
13602 * src/Makefile.am (noinst_HEADERS): Merge into
13603 (bison_SOURCES): this.
13604 Add location.h.
13605 * src/parse-gram.y: Use location_t instead of Bison's.
13606 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13607 Use location_t instead of ints.
13608
13609 2002-06-14 Akim Demaille <akim@epita.fr>
13610
13611 * data/bison.simple, data/bison.c++: Be sure to restore the
13612 current #line when returning to the skeleton contents after having
13613 exposed the input file's #line.
13614
13615 2002-06-12 Akim Demaille <akim@epita.fr>
13616
13617 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13618 eager.
13619 * tests/actions.at (Exotic Dollars): New.
13620
13621 2002-06-12 Akim Demaille <akim@epita.fr>
13622
13623 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13624 ['"/] too eagerly.
13625 * tests/input.at (Torturing the Scanner): New.
13626
13627 2002-06-11 Akim Demaille <akim@epita.fr>
13628
13629 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13630 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13631 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13632 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13633 * src/reader.c (reader): Use it.
13634
13635 2002-06-11 Akim Demaille <akim@epita.fr>
13636
13637 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13638 Adjust all callers.
13639 (scanner_last_string_free): New.
13640
13641 2002-06-11 Akim Demaille <akim@epita.fr>
13642
13643 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13644 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13645 (last_string, YY_OBS_FREE): New.
13646 Use them when returning an ID.
13647
13648 2002-06-11 Akim Demaille <akim@epita.fr>
13649
13650 Have Bison grammars parsed by a Bison grammar.
13651
13652 * src/reader.c, src/reader.h (prologue_augment): New.
13653 * src/reader.c (copy_definition): Remove.
13654
13655 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13656 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13657 (grammar_current_rule_prec_set, grammar_current_rule_check)
13658 (grammar_current_rule_symbol_append)
13659 (grammar_current_rule_action_append): Export.
13660 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13661 (symbol_list_action_append): Remove.
13662 Hook the routines from reader.
13663 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13664 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13665
13666 * src/reader.c (read_declarations): Remove, unused.
13667
13668 * src/parse-gram.y: Handle the epilogue.
13669 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13670 (grammar_start_symbol_set): this.
13671 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13672 * src/reader.c (readgram): Remove, unused.
13673 (reader): Adjust to insert eoftoken and axiom where appropriate.
13674
13675 * src/reader.c (copy_dollar): Replace with...
13676 * src/scan-gram.h (handle_dollar): this.
13677 * src/parse-gram.y: Remove `%thong'.
13678
13679 * src/reader.c (copy_at): Replace with...
13680 * src/scan-gram.h (handle_at): this.
13681
13682 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13683 New.
13684
13685 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13686 time being.
13687
13688 * src/reader.h, src/reader.c (grammar_rule_end): New.
13689
13690 * src/parse.y (current_type, current_class): New.
13691 Implement `%nterm', `%token' support.
13692 Merge `%term' into `%token'.
13693 (string_as_id): New.
13694 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13695 type name.
13696
13697 * src/parse-gram.y: Be sure to handle properly the beginning of
13698 rules.
13699
13700 * src/parse-gram.y: Handle %type.
13701 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13702
13703 * src/parse-gram.y: More directives support.
13704 * src/options.c: No longer handle source directives.
13705
13706 * src/parse-gram.y: Fix %output.
13707
13708 * src/parse-gram.y: Handle %union.
13709 Use the prologue locations.
13710 * src/reader.c (parse_union_decl): Remove.
13711
13712 * src/reader.h, src/reader.c (epilogue_set): New.
13713 * src/parse-gram.y: Use it.
13714
13715 * data/bison.simple, data/bison.c++: b4_stype is now either not
13716 defined, then default to int, or to the contents of %union,
13717 without `union' itself.
13718 Adjust.
13719 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13720
13721 * src/output.c (actions_output): Don't output braces, as they are
13722 already handled by the scanner.
13723
13724 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13725 characters to themselves.
13726
13727 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13728 that the epilogue has a proper #line.
13729
13730 * src/parse-gram.y: Handle precedence/associativity.
13731
13732 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13733 a terminal.
13734 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13735 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13736 at all to define terminals that cannot be emitted.
13737
13738 * src/scan-gram.l: Escape M4 characters.
13739
13740 * src/scan-gram.l: Working properly with escapes in user
13741 strings/characters.
13742
13743 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13744 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13745 grammar.
13746 Use more modest sizes, as for the time being the parser does not
13747 release memory, and therefore the process swallows a huge amount
13748 of memory.
13749
13750 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13751 stricter %token grammar.
13752
13753 * src/symtab.h (associativity): Add `undef_assoc'.
13754 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13755 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13756
13757 * tests/regression.at (Invalid %directive): Remove, as it is now
13758 meaningless.
13759 (Invalid inputs): Adjust to the new error messages.
13760 (Token definitions): The new grammar doesn't allow too many
13761 eccentricities.
13762
13763 * src/lex.h, src/lex.c: Remove.
13764 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13765 (copy_character, copy_string2, copy_string, copy_identifier)
13766 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13767 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13768 (parse_action): Remove.
13769 * po/POTFILES.in: Adjust.
13770
13771 2002-06-11 Akim Demaille <akim@epita.fr>
13772
13773 * src/reader.c (parse_action): Don't store directly into the
13774 rule's action member: return the action as a string.
13775 Don't require `rule_length' as an argument: compute it.
13776 (grammar_current_rule_symbol_append)
13777 (grammar_current_rule_action_append): New, eved out from
13778 (readgram): here.
13779 Remove `action_flag', `rulelength', unused now.
13780
13781 2002-06-11 Akim Demaille <akim@epita.fr>
13782
13783 * src/reader.c (grammar_current_rule_prec_set).
13784 (grammar_current_rule_check): New, eved out from...
13785 (readgram): here.
13786 Remove `xaction', `first_rhs': useless.
13787 * tests/input.at (Type clashes): New.
13788 * tests/existing.at (GNU Cim Grammar): Adjust.
13789
13790 2002-06-11 Akim Demaille <akim@epita.fr>
13791
13792 * src/reader.c (grammar_midrule_action): New, Eved out from
13793 (readgram): here.
13794
13795 2002-06-11 Akim Demaille <akim@epita.fr>
13796
13797 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13798 New.
13799 (readgram): Use them as replacement of inlined code, crule and
13800 crule1.
13801
13802 2002-06-11 Akim Demaille <akim@epita.fr>
13803
13804 * src/reader.c (grammar_end, grammar_symbol_append): New.
13805 (readgram): Use them.
13806 Make the use of `p' as local as possible.
13807
13808 2002-06-10 Akim Demaille <akim@epita.fr>
13809
13810 GCJ's parser requires the tokens to be defined before the prologue.
13811
13812 * data/bison.simple: Output the token definition before the user's
13813 prologue.
13814 * tests/regression.at (Braces parsing, Duplicate string)
13815 (Mixing %token styles): Check the output from bison.
13816 (Early token definitions): New.
13817
13818 2002-06-10 Akim Demaille <akim@epita.fr>
13819
13820 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13821 assigning twice the same user number to a token, so that we can
13822 use it in...
13823 * src/lex.c (lex): here.
13824 Also use `symbol_class_set' instead of hand written code.
13825 * src/reader.c (parse_assoc_decl): Likewise.
13826
13827 2002-06-10 Akim Demaille <akim@epita.fr>
13828
13829 * src/symtab.c, src/symtab.c (symbol_class_set)
13830 (symbol_user_token_number_set): New.
13831 * src/reader.c (parse_token_decl): Use them.
13832 Use a switch instead of ifs.
13833 Use a single argument.
13834
13835 2002-06-10 Akim Demaille <akim@epita.fr>
13836
13837 Remove `%thong' support as it is undocumented, unused, duplicates
13838 `%token's job, and creates useless e-mail traffic with people who
13839 want to know what it is, why it is undocumented, unused, and
13840 duplicates `%token's job.
13841
13842 * src/reader.c (parse_thong_decl): Remove.
13843 * src/options.c (option_table): Remove "thong".
13844 * src/lex.h (tok_thong): Remove.
13845
13846 2002-06-10 Akim Demaille <akim@epita.fr>
13847
13848 * src/symtab.c, src/symtab.c (symbol_type_set)
13849 (symbol_precedence_set): New.
13850 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13851 (value_components_used): Remove, unused.
13852
13853 2002-06-09 Akim Demaille <akim@epita.fr>
13854
13855 Move symbols handling code out of the reader.
13856
13857 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13858 (axiom): Move to...
13859 * src/symtab.h, src/symtab.c: here.
13860
13861 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13862 * src/reader.c (startval): Rename as...
13863 * src/symtab.h, src/symtab.c (startsymbol): this.
13864 * src/reader.c: Adjust.
13865
13866 * src/reader.c (symbol_check_defined, symbol_make_alias)
13867 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13868 (token_translations_init)
13869 Move to...
13870 * src/symtab.c: here.
13871 * src/reader.c (packsymbols): Move to...
13872 * src/symtab.h, src/symtab.c (symbols_pack): here.
13873 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13874 argument.
13875
13876 2002-06-03 Akim Demaille <akim@epita.fr>
13877
13878 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13879 then statements.
13880
13881 2002-06-03 Akim Demaille <akim@epita.fr>
13882
13883 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13884 structs with non literals.
13885 * src/scan-skel.l: never-interactive.
13886 * src/conflicts.c (enum conflict_resolution_e): No trailing
13887 comma.
13888 * src/getargs.c (usage): Split long literal strings.
13889 Reported by Hans Aberg.
13890
13891 2002-05-28 Akim Demaille <akim@epita.fr>
13892
13893 * data/bison.c++: Use C++ ostreams.
13894 (cdebug_): New member.
13895
13896 2002-05-28 Akim Demaille <akim@epita.fr>
13897
13898 * src/output.c (output_skeleton): Be sure to allocate enough room
13899 for `/' _and_ for `\0' in full_skeleton.
13900
13901 2002-05-28 Akim Demaille <akim@epita.fr>
13902
13903 * data/bison.c++: Catch up with bison.simple:
13904 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13905 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13906 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13907 and popping traces.
13908
13909 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13910
13911 * src/output.c (output_skeleton): Put an explicit path in front of
13912 the skeleton file name, rather than relying on the -I directory,
13913 to partially alleviate effects of having a skeleton file lying around
13914 in the current directory.
13915
13916 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13917
13918 * src/conflicts.c (log_resolution): Correct typo:
13919 obstack_printf should be obstack_fgrow1.
13920
13921 2002-05-26 Akim Demaille <akim@epita.fr>
13922
13923 * src/state.h (state_t): `solved_conflicts' is a new member.
13924 * src/LR0.c (new_state): Set it to 0.
13925 * src/conflicts.h, src/conflicts.c (print_conflicts)
13926 (free_conflicts, solve_conflicts): Rename as...
13927 (conflicts_print, conflicts_free, conflicts_solve): these.
13928 Adjust callers.
13929 * src/conflicts.c (enum conflict_resolution_e)
13930 (solved_conflicts_obstack): New, used by...
13931 (log_resolution): this.
13932 Adjust to attach the conflict resolution to each state.
13933 Complete the description with the precedence/associativity
13934 information.
13935 (resolve_sr_conflict): Adjust.
13936 * src/print.c (print_state): Output its solved_conflicts.
13937 * tests/conflicts.at (Unresolved SR Conflicts)
13938 (Solved SR Conflicts): Exercise --report=all.
13939
13940 2002-05-26 Akim Demaille <akim@epita.fr>
13941
13942 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13943 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13944 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13945 (token_number_t, item_number_as_token_number)
13946 (token_number_as_item_number, muscle_insert_token_number_table):
13947 Rename as...
13948 (symbol_number_t, item_number_as_symbol_number)
13949 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13950 these, since it is more appropriate.
13951
13952 2002-05-26 Akim Demaille <akim@epita.fr>
13953
13954 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13955 `Error:' lines.
13956 * data/bison.simple (yystos) [YYDEBUG]: New.
13957 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13958 error recovery.
13959 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13960
13961 2002-05-25 Akim Demaille <akim@epita.fr>
13962
13963 * doc/bison.texinfo (Debugging): Split into...
13964 (Tracing): this new section, its former contents, and...
13965 (Understanding): this new section.
13966 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13967 by...
13968 (report_flag): this.
13969 Adjust all dependencies.
13970 (report_args, report_types, report_argmatch): New.
13971 (usage, getargs): Report/support -r, --report.
13972 * src/options.h
13973 (struct option_table_struct): Rename as..,
13974 (struct option_table_s): this.
13975 Rename the `set_flag' member to `flag' to match with getopt_long's
13976 struct.
13977 * src/options.c (option_table): Split verbose into an entry for
13978 %verbose, and another for --verbose.
13979 Support --report/-r, so remove -r from the obsolete --raw.
13980 * src/print.c: Attach full item sets and lookaheads reports to
13981 report_flag instead of trace_flag.
13982 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13983
13984 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13985 and Paul Eggert <eggert@twinsun.com>
13986
13987 * data/bison.simple (yyparse): Correct error handling to conform to
13988 POSIX and yacc. Specifically, after syntax error is discovered,
13989 do not reduce further before shifting the error token.
13990 Clean up the code a bit by removing the labels yyerrdefault,
13991 yyerrhandle, yyerrpop.
13992 * NEWS: Document the above.
13993
13994 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13995
13996 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13997 type; it isn't always big enough, since it doesn't necessarily
13998 include non-terminals.
13999 (yytranslate): Expand definition of yy_token_number_type, so that
14000 the latter can be removed.
14001 (yy_token_number_type): Remove, only one use.
14002 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14003 don't use TokenNumberType as element type.
14004
14005 * tests/regression.at: Modify expected output to agree with change
14006 to yyr1 and yytranslate.
14007
14008 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14009
14010 * src/reader.c (parse_action): Use copy_character instead of
14011 obstack_1grow.
14012
14013 2002-05-13 Akim Demaille <akim@epita.fr>
14014
14015 * tests/regression.at (Token definitions): Prototype yylex and
14016 yyerror.
14017
14018 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14019
14020 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
14021 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14022 32-bit arithmetic.
14023 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14024
14025 2002-05-07 Akim Demaille <akim@epita.fr>
14026
14027 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14028 avoid GCC warnings.
14029
14030 2002-05-07 Akim Demaille <akim@epita.fr>
14031
14032 Kill GCC warnings.
14033
14034 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14035 over the RHS of each rule.
14036 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14037 * src/state.h (state_t): Member `nitems' is unsigned short.
14038 * src/LR0.c (get_state): Adjust.
14039 * src/reader.c (packgram): Likewise.
14040 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14041 `Type'.
14042 (muscle_insert_int_table): Remove, unused.
14043 (prepare_rules): Remove `max'.
14044
14045 2002-05-06 Akim Demaille <akim@epita.fr>
14046
14047 * src/closure.c (print_firsts): Display of the symbol tags.
14048 (bitmatrix_print): Move to...
14049 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14050 here.
14051 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14052
14053 2002-05-06 Akim Demaille <akim@epita.fr>
14054
14055 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14056 hash_do_for_each.
14057
14058 2002-05-06 Akim Demaille <akim@epita.fr>
14059
14060 * src/LR0.c (new_state, get_state): Instead of using the global
14061 `kernel_size' and `kernel_base', have two new arguments:
14062 `core_size' and `core'.
14063 Adjust callers.
14064
14065 2002-05-06 Akim Demaille <akim@epita.fr>
14066
14067 * src/reader.c (packgram): No longer end `ritem' with a 0
14068 sentinel: it is not used.
14069
14070 2002-05-05 Akim Demaille <akim@epita.fr>
14071
14072 New experimental feature: display the lookaheads in the report and
14073 graph.
14074
14075 * src/print (print_core): When --trace-flag, display the rules
14076 lookaheads.
14077 * src/print_graph.c (print_core): Likewise.
14078 Swap the arguments.
14079 Adjust caller.
14080
14081 2002-05-05 Akim Demaille <akim@epita.fr>
14082
14083 * tests/torture.at (Many lookaheads): New test.
14084
14085 2002-05-05 Akim Demaille <akim@epita.fr>
14086
14087 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14088 (GENERATE_MUSCLE_INSERT_TABLE): this.
14089 (output_int_table, output_unsigned_int_table, output_short_table)
14090 (output_token_number_table, output_item_number_table): Replace with...
14091 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14092 (muscle_insert_short_table, muscle_insert_token_number_table)
14093 (muscle_insert_item_number_table): these.
14094 Adjust all callers.
14095 (prepare_tokens): Don't free `translations', since...
14096 * src/reader.h, src/reader.c (grammar_free): do it.
14097 Move to...
14098 * src/gram.h, src/gram.c (grammar_free): here.
14099 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14100 b4_translate_max.
14101
14102 2002-05-05 Akim Demaille <akim@epita.fr>
14103
14104 * src/output.c (output_unsigned_int_table): New.
14105 (prepare_rules): `i' is unsigned.
14106 `prhs', `rline', `r2' are unsigned int.
14107 Rename muscle `rhs_number_max' as `rhs_max'.
14108 Output muscles `prhs_max', `rline_max', and `r2_max'.
14109 Free rline and r1.
14110 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14111 to compute types instead of constant types.
14112 * tests/regression.at (Web2c Actions): Adjust.
14113
14114 2002-05-04 Akim Demaille <akim@epita.fr>
14115
14116 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14117 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14118 Adjust dependencies.
14119 * src/output.c (token_definitions_output): Be sure not to output a
14120 `#define 'a'' when fed with `%token 'a' "a"'.
14121 * tests/regression.at (Token definitions): New.
14122
14123 2002-05-03 Paul Eggert <eggert@twinsun.com>
14124
14125 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14126 for K&R C.
14127
14128 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14129
14130 * Makefile.am (SUBDIRS): Remove intl.
14131 (EXTRA_DIST): Add config/config.rpath.
14132
14133 2002-05-03 Akim Demaille <akim@epita.fr>
14134
14135 * data/bison.simple (m4_if): Don't output empty enums.
14136 And actually, output valid enum definitions :(.
14137
14138 2002-05-03 Akim Demaille <akim@epita.fr>
14139
14140 * configure.bat: Remove, completely obsolete.
14141 * Makefile.am (EXTRA_DIST): Adjust.
14142 Don't distribute config.rpath...
14143 * config/Makefile.am (EXTRA_DIST): Do it.
14144
14145 2002-05-03 Akim Demaille <akim@epita.fr>
14146
14147 * configure.in (GETTEXT_VERSION): New.
14148 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14149
14150 2002-05-03 Akim Demaille <akim@epita.fr>
14151
14152 * data/bison.simple (b4_token_enum): New.
14153 (b4_token_defines): Use it to output tokens both as #define and
14154 enums.
14155 Suggested by Paul Eggert.
14156 * src/output.c (token_definitions_output): Don't output spurious
14157 white spaces.
14158
14159 2002-05-03 Akim Demaille <akim@epita.fr>
14160
14161 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14162
14163 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
14164
14165 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14166 Update the stack class, give a try to deque as the default container.
14167
14168 2002-05-02 Akim Demaille <akim@epita.fr>
14169
14170 * data/bison.simple (yyparse): Do not implement @$ = @1.
14171 (YYLLOC_DEFAULT): Adjust to do it.
14172 * doc/bison.texinfo (Location Default Action): Fix.
14173
14174 2002-05-02 Akim Demaille <akim@epita.fr>
14175
14176 * src/reader.c (parse_braces): Merge into...
14177 (parse_action): this.
14178
14179 2002-05-02 Akim Demaille <akim@epita.fr>
14180
14181 * configure.in (ALL_LINGUAS): Remove.
14182 * po/LINGUAS, hr.po: New.
14183
14184 2002-05-02 Akim Demaille <akim@epita.fr>
14185
14186 Remove the so called hairy (semantic) parsers.
14187
14188 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14189 * src/gram.h, src/gram.c (semantic_parser): Remove.
14190 (rule_t): Remove the guard and guard_line members.
14191 * src/lex.h (token_t): remove tok_guard.
14192 * src/options.c (option_table): Remove %guard and %semantic_parser
14193 support.
14194 * src/output.c, src/output.h (guards_output): Remove.
14195 (prepare): Adjust.
14196 (token_definitions_output): Don't output the `T'
14197 tokens (???).
14198 (output_skeleton): Don't output the guards.
14199 * src/files.c, src/files.c (attrsfile): Remove.
14200 * src/reader.c (symbol_list): Remove the guard and guard_line
14201 members.
14202 Adjust dependencies.
14203 (parse_guard): Remove.
14204 * data/bison.hairy: Remove.
14205 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14206 BISON_HAIRY.
14207
14208 2002-05-02 Akim Demaille <akim@epita.fr>
14209
14210 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14211 (parse_guard): Rename the formal argument `stack_offset' as
14212 `rule_length', which is more readable.
14213 Adjust callers.
14214 (copy_at, copy_dollar): Instead of outputting the hard coded
14215 values of $$, $n and so forth, output invocation to b4_lhs_value,
14216 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
14217 Note: this patch partially drops `semantic-parser' support: it
14218 always does `rule_length - n', where semantic parsers ought to
14219 always use `-n'.
14220 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14221 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14222
14223 2002-05-02 Akim Demaille <akim@epita.fr>
14224
14225 * configure.in (AC_INIT): Bump to 1.49b.
14226 (AM_INIT_AUTOMAKE): Short invocation.
14227
14228 2002-05-02 Akim Demaille <akim@epita.fr>
14229
14230 Version 1.49a.
14231
14232 2002-05-01 Akim Demaille <akim@epita.fr>
14233
14234 * src/skeleton.h: Remove.
14235
14236 2002-05-01 Akim Demaille <akim@epita.fr>
14237
14238 * src/skeleton.h: Fix the #endif.
14239 Reported by Magnus Fromreide.
14240
14241 2002-04-26 Paul Eggert <eggert@twinsun.com>
14242
14243 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14244 Define if we define YYSTYPE and YYLTYPE, respectively.
14245 (YYCOPY): Fix [] quoting problem in the non-GCC case.
14246
14247 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
14248
14249 * src/scan-skel.l: Postprocess quadrigraphs.
14250
14251 * src/reader.c (copy_character): New function, used to output
14252 single characters while replacing `[' and `]' with quadrigraphs, to
14253 avoid troubles with M4 quotes.
14254 (copy_comment): Output characters with copy_character.
14255 (read_additionnal_code): Likewise.
14256 (copy_string2): Likewise.
14257 (copy_definition): Likewise.
14258
14259 * tests/calc.at: Exercise M4 quoting.
14260
14261 2002-04-25 Akim Demaille <akim@epita.fr>
14262
14263 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14264 between `!' and the command.
14265 Reported by Paul Eggert.
14266
14267 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
14268
14269 * tests/calc.at: Exercise prologue splitting.
14270
14271 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14272 `b4_post_prologue' instead of `b4_prologue'.
14273
14274 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14275 muscles.
14276 (output): Free pre_prologue_obstack and post_prologue_obstack.
14277 * src/files.h, src/files.c (attrs_obstack): Remove.
14278 (pre_prologue_obstack, post_prologue_obstack): New.
14279 * src/reader.c (copy_definition): Add a parameter to specify the
14280 obstack to fill, instead of using attrs_obstack unconditionally.
14281 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14282 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14283
14284 2002-04-23 Paul Eggert <eggert@twinsun.com>
14285
14286 * data/bison.simple: Remove unnecessary commentary and white
14287 space differences from 1_29-branch.
14288 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14289
14290 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14291 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14292 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14293 constructors or destructors.
14294
14295 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14296
14297 2002-04-23 Akim Demaille <akim@epita.fr>
14298
14299 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14300 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14301 location with columns.
14302 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14303 All reported by Paul Eggert.
14304
14305 2002-04-22 Akim Demaille <akim@epita.fr>
14306
14307 * src/reduce.c (dump_grammar): Move to...
14308 * src/gram.h, src/gram.c (grammar_dump): here.
14309 Be sure to separate long item numbers.
14310 Don't read the members of a rule's prec if its nil.
14311
14312 2002-04-22 Akim Demaille <akim@epita.fr>
14313
14314 * src/output.c (table_size, table_grow): New.
14315 (MAXTABLE): Remove, replace uses with table_size.
14316 (pack_vector): Instead of dying when the table is too big, grow it.
14317
14318 2002-04-22 Akim Demaille <akim@epita.fr>
14319
14320 * data/bison.simple (yyr1): Its type is that of a token number.
14321 * data/bison.c++ (r1_): Likewise.
14322 * tests/regression.at (Web2c Actions): Adjust.
14323
14324 2002-04-22 Akim Demaille <akim@epita.fr>
14325
14326 * src/reader.c (token_translations_init): 256 is now the default
14327 value for the error token, i.e., it will be assigned another
14328 number if the user assigned 256 to one of her tokens.
14329 (reader): Don't force 256 to error.
14330 * doc/bison.texinfo (Symbols): Adjust.
14331 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14332 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14333 etc. instead of 10, 20, 30 (which was used to `jump' over error
14334 (256) and undefined (2)).
14335
14336 2002-04-22 Akim Demaille <akim@epita.fr>
14337
14338 Propagate more token_number_t.
14339
14340 * src/gram.h (token_number_as_item_number)
14341 (item_number_as_token_number): New.
14342 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14343 Use it to create output_item_number_table and
14344 output_token_number_table.
14345 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14346 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14347 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14348 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14349
14350 2002-04-22 Akim Demaille <akim@epita.fr>
14351
14352 * src/output.h, src/output.c (get_lines_number): Remove.
14353
14354 2002-04-19 Akim Demaille <akim@epita.fr>
14355
14356 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14357 as Lex/Flex'.
14358 (Debugging): More details about enabling the debugging features.
14359 (Table of Symbols): Describe $$, $n, @$, and @n.
14360 Suggested by Tim Josling.
14361
14362 2002-04-19 Akim Demaille <akim@epita.fr>
14363
14364 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14365
14366 2002-04-10 Akim Demaille <akim@epita.fr>
14367
14368 * src/system.h: Rely on HAVE_LIMITS_H.
14369 Suggested by Paul Eggert.
14370
14371 2002-04-09 Akim Demaille <akim@epita.fr>
14372
14373 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14374 full stderr, and strip it according to the bison options, instead
14375 of composing the error message from different bits.
14376 This makes it easier to check for several error messages.
14377 Adjust all the invocations.
14378 Add an invocation exercising the error token.
14379 Add an invocation demonstrating a stupid error message.
14380 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14381 Adjust the tests.
14382 Error message are for stderr, not stdout.
14383
14384 2002-04-09 Akim Demaille <akim@epita.fr>
14385
14386 * src/gram.h, src/gram.c (error_token_number): Remove, use
14387 errtoken->number.
14388 * src/reader.c (reader): Don't specify the user token number (2)
14389 for $undefined, as it uselessly prevents using it.
14390 * src/gram.h (token_number_t): Move to...
14391 * src/symtab.h: here.
14392 (state_t.number): Is a token_number_t.
14393 * src/print.c, src/reader.c: Use undeftoken->number instead of
14394 hard coded 2.
14395 (Even though this 2 is not the same as above: the number of the
14396 undeftoken remains being 2, it is its user token number which
14397 might not be 2).
14398 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14399 `user_token_number_max'.
14400 Output `undef_token_number'.
14401 * data/bison.simple, data/bison.c++: Use them.
14402 Be sure to map invalid yylex return values to
14403 `undef_token_number'. This saves us from gratuitous SEGV.
14404
14405 * tests/conflicts.at (Solved SR Conflicts)
14406 (Unresolved SR Conflicts): Adjust.
14407 * tests/regression.at (Web2c Actions): Adjust.
14408
14409 2002-04-08 Akim Demaille <akim@epita.fr>
14410
14411 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14412 Adding #line.
14413 Remove the duplicate `typedefs'.
14414 (RhsNumberType): Fix the declaration and various other typos.
14415 Use __ofile__.
14416 * data/bison.simple: Use __ofile__.
14417 * src/scan-skel.l: Handle __ofile__.
14418
14419 2002-04-08 Akim Demaille <akim@epita.fr>
14420
14421 * src/gram.h (item_number_t): New, the type of item numbers in
14422 RITEM. Note that it must be able to code symbol numbers as
14423 positive number, and the negation of rule numbers as negative
14424 numbers.
14425 Adjust all dependencies (pretty many).
14426 * src/reduce.c (rule): Remove this `short *' pointer: use
14427 item_number_t.
14428 * src/system.h (MINSHORT, MAXSHORT): Remove.
14429 Include `limits.h'.
14430 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14431 (shortcpy): Remove.
14432 (MAXTABLE): Move to...
14433 * src/output.c (MAXTABLE): here.
14434 (prepare_rules): Use output_int_table to output rhs.
14435 * data/bison.simple, data/bison.c++: Adjust.
14436 * tests/torture.at (Big triangle): Move the limit from 254 to
14437 500.
14438 * tests/regression.at (Web2c Actions): Ajust.
14439
14440 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14441 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14442 passes, but produces negative #line number, once fixed, GCC is
14443 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14444 C), it passes.
14445 * src/state.h (state_h): Code input lines on ints, not shorts.
14446
14447 2002-04-08 Akim Demaille <akim@epita.fr>
14448
14449 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14450 and then the grammar.
14451
14452 2002-04-08 Akim Demaille <akim@epita.fr>
14453
14454 * src/system.h: No longer using strndup.
14455
14456 2002-04-07 Akim Demaille <akim@epita.fr>
14457
14458 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14459 * src/output.c (output_table_data): Return the longest number.
14460 (prepare_tokens): Output `token_number_max').
14461 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14462 New.
14463 Use them to define yy_token_number_type/TokenNumberType.
14464 Use this type for yytranslate.
14465 * tests/torture.at (Big triangle): Push the limit from 124 to
14466 253.
14467 * tests/regression.at (Web2c Actions): Adjust.
14468
14469 2002-04-07 Akim Demaille <akim@epita.fr>
14470
14471 * tests/torture.at (Big triangle): New.
14472 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14473 * tests/existing.at: here.
14474
14475 2002-04-07 Akim Demaille <akim@epita.fr>
14476
14477 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14478 nritems.
14479 Adjust dependencies.
14480
14481 2002-04-07 Akim Demaille <akim@epita.fr>
14482
14483 * src/reader.c: Normalize increments to prefix form.
14484
14485 2002-04-07 Akim Demaille <akim@epita.fr>
14486
14487 * src/reader.c, symtab.c: Remove debugging code.
14488
14489 2002-04-07 Akim Demaille <akim@epita.fr>
14490
14491 Rename all the `bucket's as `symbol_t'.
14492
14493 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14494 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14495 * src/symtab.c, src/symtab.h (bucket): Rename as...
14496 (symbol_t): this.
14497 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14498 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14499 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14500 (buckets_new, buckets_free, buckets_do): Rename as...
14501 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14502 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14503 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14504 (symbols_new, symbols_free, symbols_do): these.
14505
14506 2002-04-07 Akim Demaille <akim@epita.fr>
14507
14508 Use lib/hash for the symbol table.
14509
14510 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14511 EOF.
14512 * src/lex.c (lex): Set the `number' member of new terminals.
14513 * src/reader.c (bucket_check_defined, bucket_make_alias)
14514 (bucket_check_alias_consistence, bucket_translation): New.
14515 (reader, grammar_free, readgram, token_translations_init)
14516 (packsymbols): Adjust.
14517 (reader): Number the predefined tokens.
14518 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14519 for predefined tokens.
14520 * src/symtab.h (bucket): Remove all the hash table related
14521 members.
14522 * src/symtab.c (symtab): Replace by...
14523 (bucket_table): this.
14524 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14525 (buckets_new, buckets_do): New.
14526
14527 2002-04-07 Akim Demaille <akim@epita.fr>
14528
14529 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14530 (start_symbol, max_user_token_number, semantic_parser)
14531 (error_token_number): Initialize.
14532 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14533 Initialize.
14534 (reader): Don't.
14535 (errtoken, eoftoken, undeftoken, axiom): Extern.
14536
14537 2002-04-07 Akim Demaille <akim@epita.fr>
14538
14539 * src/gram.h (rule_s): prec and precsym are now pointers
14540 to the bucket giving the priority/associativity.
14541 Member `associativity' removed: useless.
14542 * src/reduce.c, src/conflicts.c: Adjust.
14543
14544 2002-04-07 Akim Demaille <akim@epita.fr>
14545
14546 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14547 Properly escape the symbols' TAG when outputting them.
14548
14549 2002-04-07 Akim Demaille <akim@epita.fr>
14550
14551 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14552
14553 2002-04-07 Akim Demaille <akim@epita.fr>
14554
14555 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14556 (LArule): this, which is an array to rule_t*.
14557 * src/print.c, src/conflicts.c: Adjust.
14558
14559 2002-04-07 Akim Demaille <akim@epita.fr>
14560
14561 * src/gram.h (rule_t): Rename `number' as `user_number'.
14562 `number' is a new member.
14563 Adjust dependencies.
14564 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14565
14566 2002-04-07 Akim Demaille <akim@epita.fr>
14567
14568 As a result of the previous patch, it is no longer needed
14569 to reorder ritem itself.
14570
14571 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14572
14573 2002-04-07 Akim Demaille <akim@epita.fr>
14574
14575 Be sure never to walk through RITEMS, but use only data related to
14576 the rules themselves. RITEMS should be banished.
14577
14578 * src/output.c (output_token_translations): Rename as...
14579 (prepare_tokens): this.
14580 In addition to `translate', prepare the muscles `tname' and
14581 `toknum', which were handled by...
14582 (output_rule_data): this.
14583 Remove, and move the remainder of its outputs into...
14584 (prepare_rules): this new routines, which also merges content from
14585 (output_gram): this.
14586 (prepare_rules): Be sure never to walk through RITEMS.
14587 (output_stos): Rename as...
14588 (prepare_stos): this.
14589 (output): Always invoke prepare_states, after all, just don't use it
14590 in the output if you don't need it.
14591
14592 2002-04-07 Akim Demaille <akim@epita.fr>
14593
14594 * src/LR0.c (new_state): Display `nstates' as the name of the
14595 newly created state.
14596 Adjust to initialize first_state and last_state if needed.
14597 Be sure to distinguish the initial from the final state.
14598 (new_states): Create the itemset of the initial state, and use
14599 new_state.
14600 * src/closure.c (closure): Now that the initial state has its
14601 items properly set, there is no need for a special case when
14602 creating `ruleset'.
14603
14604 As a result, now the rule 0, reducing to $axiom, is visible in the
14605 outputs. Adjust the test suite.
14606
14607 * tests/conflicts.at (Solved SR Conflicts)
14608 (Unresolved SR Conflicts): Adjust.
14609 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14610 * tests/conflicts.at (S/R in initial): New.
14611
14612 2002-04-07 Akim Demaille <akim@epita.fr>
14613
14614 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14615 the RHS of the rules.
14616 * src/output.c (output_gram): Likewise.
14617
14618 2002-04-07 Akim Demaille <akim@epita.fr>
14619
14620 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14621 bucket.
14622 Adjust all dependencies.
14623 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14624 `number' of the buckets too.
14625 * src/gram.h: Include `symtab.h'.
14626 (associativity): Move to...
14627 * src/symtab.h: here.
14628 No longer include `gram.h'.
14629
14630 2002-04-07 Akim Demaille <akim@epita.fr>
14631
14632 * src/gram.h, src/gram.c (rules_rhs_length): New.
14633 (ritem_longest_rhs): Use it.
14634 * src/gram.h (rule_t): `number' is a new member.
14635 * src/reader.c (packgram): Set it.
14636 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14637 the end of `rules', and count them out of `nrules'.
14638 (reduce_output, dump_grammar): Adjust.
14639 * src/print.c (print_grammar): It is no longer needed to check for
14640 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14641 * tests/reduce.at (Reduced Automaton): New test.
14642
14643 2002-04-07 Akim Demaille <akim@epita.fr>
14644
14645 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14646 lacking `+ 1' to nrules, Bison reported as useless a token if it
14647 was used solely to set the precedence of the last rule...
14648
14649 2002-04-07 Akim Demaille <akim@epita.fr>
14650
14651 * data/bison.c++, data/bison.simple: Don't output the current file
14652 name in #line, to avoid useless diffs between two identical
14653 outputs under different names.
14654
14655 2002-04-07 Akim Demaille <akim@epita.fr>
14656
14657 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14658 Normalize loops to using `< nrules + 1', not `<= nrules'.
14659
14660 2002-04-07 Akim Demaille <akim@epita.fr>
14661
14662 * TODO: Update.
14663
14664 2002-04-07 Akim Demaille <akim@epita.fr>
14665
14666 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14667 bucket.value as bucket.number.
14668
14669 2002-04-07 Akim Demaille <akim@epita.fr>
14670
14671 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14672 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14673 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14674 RHS, instead of being an index in RITEMS.
14675
14676 2002-04-04 Paul Eggert <eggert@twinsun.com>
14677
14678 * doc/bison.texinfo: Update copyright date.
14679 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14680 (Symbols): Warn about running Bison in one character set,
14681 but compiling and/or running in an incompatible one.
14682 Warn about character code 256, too.
14683
14684 2002-04-03 Paul Eggert <eggert@twinsun.com>
14685
14686 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14687 YYERROR_VERBOSE is nonzero, not whether it is defined.
14688
14689 Merge changes from bison-1_29-branch.
14690
14691 2002-03-20 Paul Eggert <eggert@twinsun.com>
14692
14693 Merge fixes from Debian bison_1.34-1.diff.
14694
14695 * configure.in (AC_PREREQ): 2.53.
14696
14697 2002-03-20 Akim Demaille <akim@epita.fr>
14698
14699 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14700
14701 2002-03-19 Paul Eggert <eggert@twinsun.com>
14702
14703 * src/bison.simple (YYCOPY): New macro.
14704 (YYSTACK_RELOCATE): Use it.
14705 Remove Type arg; no longer needed. All callers changed.
14706 (yymemcpy): Remove; no longer needed.
14707
14708 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14709 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14710
14711 2002-03-19 Akim Demaille <akim@epita.fr>
14712
14713 Test and fix the #line outputs.
14714
14715 * tests/atlocal.at (GCC): New.
14716 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14717 (Prologue synch line, %union synch line, Postprologue synch line)
14718 (Action synch line, Epilogue synch line): New tests.
14719 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14720 * data/bison.simple, data/bison.c++: Use it.
14721
14722 2002-03-19 Akim Demaille <akim@epita.fr>
14723
14724 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14725 (Solved SR Conflicts, %expect not enough, %expect right)
14726 (%expect too much): Move to...
14727 * tests/conflicts.at: this new file.
14728
14729 2002-03-19 Akim Demaille <akim@epita.fr>
14730
14731 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14732 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14733 that we can move to enums for instance.
14734 * src/output.c (token_definitions_output): Output a list of
14735 `token-name, token-number' instead of the #define.
14736 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14737
14738 2002-03-14 Akim Demaille <akim@epita.fr>
14739
14740 Use Gettext 0.11.1.
14741
14742 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
14743
14744 * data/bison.c++: Make the user able to add members to the generated
14745 parser by subclassing.
14746
14747 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
14748
14749 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14750 a character.
14751 Reported by Nicolas Tisserand and Nicolas Burrus.
14752
14753 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14754
14755 * src/reader.c: Warn about lacking semi-colons, do not complain.
14756
14757 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14758
14759 * data/bison.c++: Remove a debug line.
14760
14761 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14762
14763 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14764 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14765 provide a default implementation.
14766
14767 2002-03-04 Akim Demaille <akim@epita.fr>
14768
14769 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14770 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14771 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14772 * tests/semantic.at (Parsing Guards): Similarly.
14773 * src/reader.at (readgram): Complain if the last rule is not ended
14774 with a semi-colon.
14775
14776 2002-03-04 Akim Demaille <akim@epita.fr>
14777
14778 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14779 * src/closure.c: here.
14780 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14781 RTC.
14782 * src/warshall.h, src/warshall.c: Remove.
14783 * tests/sets.at (Broken Closure): Adjust.
14784
14785 2002-03-04 Akim Demaille <akim@epita.fr>
14786
14787 * src/output.c (output_skeleton): tempdir is const.
14788 bytes_read is unused.
14789
14790 2002-03-04 Akim Demaille <akim@epita.fr>
14791
14792 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14793 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14794 Update.
14795 From Michael Hayes.
14796
14797 2002-03-04 Akim Demaille <akim@epita.fr>
14798
14799 * src/closure.c (closure): `r' is unused.
14800
14801 2002-03-04 Akim Demaille <akim@epita.fr>
14802
14803 * tests/sets.at (Broken Closure): Add the ending `;'.
14804 * src/reader.at (readgram): Complain if a rule is not ended with a
14805 semi-colon.
14806
14807 2002-03-04 Akim Demaille <akim@epita.fr>
14808
14809 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14810 (count_sr_conflicts): Use bitset_count.
14811 * src/reduce.c (inaccessable_symbols): Ditto.
14812 (bits_size): Remove.
14813 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14814
14815 2002-03-04 Akim Demaille <akim@epita.fr>
14816
14817 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14818 * src/reduce.c: Remove the `bitset_zero's following the
14819 `bitset_create's, as now it is performed by the latter.
14820
14821 2002-03-04 Akim Demaille <akim@epita.fr>
14822
14823 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14824 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14825 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14826 latest sources from Michael.
14827
14828 2002-03-04 Akim Demaille <akim@epita.fr>
14829
14830 * src/output.c (output): Don't free the grammar.
14831 * src/reader.c (grammar_free): New.
14832 * src/main.c (main): Call it and don't free symtab here.
14833
14834 2002-03-04 Akim Demaille <akim@epita.fr>
14835
14836 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14837 before returning.
14838 Reported by Benoit Perrot.
14839
14840 2002-03-04 Akim Demaille <akim@epita.fr>
14841
14842 Use bitset operations when possible, not loops over bits.
14843
14844 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14845 bitset_or.
14846 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14847 * src/reduce.c (useless_nonterminals): Formatting changes.
14848 * src/warshall.c (TC): Use bitset_or.
14849
14850 2002-03-04 Akim Demaille <akim@epita.fr>
14851
14852 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14853 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14854 Ditto.
14855
14856 2002-03-04 Akim Demaille <akim@epita.fr>
14857
14858 * src/lalr.c (F): Now a bitset*.
14859 Adjust all dependencies.
14860
14861 2002-03-04 Akim Demaille <akim@epita.fr>
14862
14863 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14864 Adjust all dependencies.
14865
14866 2002-03-04 Akim Demaille <akim@epita.fr>
14867
14868 * src/L0.c, src/LR0.h (nstates): Be size_t.
14869 Adjust comparisons (signed vs unsigned).
14870 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14871 bitset*.
14872 Adjust all dependencies.
14873
14874 2002-03-04 Akim Demaille <akim@epita.fr>
14875
14876 * src/closure.c (firsts): Now, also a bitset.
14877 Adjust all dependencies.
14878 (varsetsize): Remove, now unused.
14879 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14880
14881 2002-03-04 Akim Demaille <akim@epita.fr>
14882
14883 * src/print.c: Convert to use bitset.h, not hand coded iterations
14884 over ints.
14885
14886 2002-03-04 Akim Demaille <akim@epita.fr>
14887
14888 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14889
14890 2002-03-04 Akim Demaille <akim@epita.fr>
14891
14892 * src/closure.c (ruleset): Be a bitset.
14893 (rulesetsize): Remove.
14894
14895 2002-03-04 Akim Demaille <akim@epita.fr>
14896
14897 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14898 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14899 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14900 * src/closure.c (fderives): Be an array of bitsets.
14901
14902 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
14903
14904 * data/bison.c++: Merge the two generated headers. Insert a copyright
14905 notice in each output file.
14906
14907 2002-02-28 Akim Demaille <akim@epita.fr>
14908
14909 * data/bison.c++: Copy the prologue of bison.simple to fetch
14910 useful M4 definitions, such as b4_header_guard.
14911
14912 2002-02-25 Akim Demaille <akim@epita.fr>
14913
14914 * src/getargs.c (version): Give the name of the authors, and use a
14915 translator friendly scheme for the bgr
14916 copyright notice.
14917
14918 2002-02-25 Akim Demaille <akim@epita.fr>
14919
14920 * src/output.c (header_output): Remove, now handled completely via
14921 M4.
14922
14923 2002-02-25 Akim Demaille <akim@epita.fr>
14924
14925 * m4/m4.m4: New, from CVS Autoconf.
14926 * configure.in: Invoke it.
14927 * src/output.c (output_skeleton): Use its result instead of the
14928 hard coded name.
14929
14930 2002-02-25 Akim Demaille <akim@epita.fr>
14931
14932 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14933 Fileutils 4.1.5.
14934 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14935 * src/output.c (output_skeleton): Use mkstemp to create a real
14936 temporary file.
14937 Move the filling of `skeleton' and its muscle to...
14938 (prepare): here.
14939 (output): Move the definition of the prologue muscle to...
14940 (prepare): here.
14941 * src/system.h (DEFAULT_TMPDIR): New.
14942
14943 2002-02-14 Paul Eggert <eggert@twinsun.com>
14944
14945 Remove the support for C++ namespace cleanliness; it was
14946 causing more problems than it was curing, since it didn't work
14947 properly on some nonstandard C++ compilers. This can wait
14948 for a proper C++ parser.
14949
14950 * NEWS: Document this.
14951 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14952 of C++, as it's treated like C now.
14953 * src/bison.simple (YYSTD): Remove.
14954 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14955 Treat C++ just like Standard C instead of trying to support
14956 namespace cleanliness.
14957
14958 2002-02-14 Akim Demaille <akim@epita.fr>
14959
14960 * tests/regression.at (else): Adjust to Andreas' change.
14961
14962 2002-02-14 Akim Demaille <akim@epita.fr>
14963
14964 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14965
14966 2002-02-13 Andreas Schwab <schwab@suse.de>
14967
14968 * src/output.c (output_rule_data): Don't output NULL, it might
14969 not be defined yet.
14970
14971 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
14972
14973 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14974 (Copyright notice): Update.
14975
14976 2002-02-11 Akim Demaille <akim@epita.fr>
14977
14978 * tests/regression.at (%nonassoc and eof): Don't include
14979 nonportable headers.
14980
14981 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
14982
14983 * data/bison.c++: Correct error recovery. Make the user able to
14984 initialize the starting location.
14985
14986 2002-02-07 Akim Demaille <akim@epita.fr>
14987
14988 * tests/input.at: New.
14989
14990 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14991
14992 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14993 more consistent when naming methods and variables. Put preprocessor
14994 directives around tables only needed for debugging.
14995
14996 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
14997
14998 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14999 C++ parsers.
15000 (yy::b4_name::parse): Use print_.
15001
15002 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15003
15004 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15005
15006 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15007
15008 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15009 C++ parsers.
15010 (yy::b4_name::parse): Build verbose error messages, and use error_.
15011
15012 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15013
15014 * data/bison.c++: Fix m4 quoting in comments.
15015
15016 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15017
15018 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15019 not expanded by m4.
15020
15021 2002-02-05 Akim Demaille <akim@epita.fr>
15022
15023 * data/bison.c++: Adjust to the M4 back end.
15024 More is certainly needed.
15025
15026 2002-02-05 Akim Demaille <akim@epita.fr>
15027
15028 Give a try to M4 as a back end.
15029
15030 * lib/readpipe.c: New, from wdiff.
15031 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15032 BISON_HAIRY.
15033 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15034 specific values. Now it is m4 that performs the lookup.
15035 * src/parse-skel.y: Remove.
15036 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15037 * src/output.c (actions_output, guards_output)
15038 (token_definitions_output): No longer keeps track of the output
15039 line number, hence remove the second argument.
15040 (guards_output): Check against the guard member of a rule, not the
15041 action member.
15042 Adjust callers.
15043 (output_skeleton): Don't look for the skeleton location, let m4 do
15044 that.
15045 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15046 file will be used.
15047 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15048 (prepare): Given that for the time being changesyntax is not
15049 usable in M4, rename the muscles using `-' to `_'.
15050 Define `defines_flag', `output_parser_name' and `output_header_name'.
15051 * src/output.h (actions_output, guards_output)
15052 (token_definitions_output): Adjust prototypes.
15053 * src/scan-skel.l: Instead of scanning the skeletons, it now
15054 processes the output of m4: `__oline__' and `#output'.
15055 * data/bison.simple: Adjust to be used by M4(sugar).
15056 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15057 to date.
15058 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15059 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15060 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15061 shamelessly stolen from CVS Autoconf.
15062
15063 2002-02-05 Akim Demaille <akim@epita.fr>
15064
15065 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15066 * configure.in: Check for the declarations of free and malloc.
15067 * src/muscle_tab.c: Adjust.
15068
15069 2002-02-05 Akim Demaille <akim@epita.fr>
15070
15071 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15072 which have no values.
15073
15074 2002-02-05 Akim Demaille <akim@epita.fr>
15075
15076 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15077 * data/: here.
15078
15079 2002-01-29 Paul Eggert <eggert@twinsun.com>
15080
15081 * src/bison.simple (YYSIZE_T): Do not define merely because
15082 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15083 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15084
15085 2002-01-27 Akim Demaille <akim@epita.fr>
15086
15087 Fix `%nonassoc and eof'.
15088
15089 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15090 which were not properly copied! Replace
15091 memcpy (res->errs, src->errs, src->nerrs);
15092 with
15093 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15094 !!!
15095 * tests/regression.at (%nonassoc and eof): Adjust to newest
15096 Autotest: `.' is not in the PATH.
15097
15098 2002-01-27 Akim Demaille <akim@epita.fr>
15099
15100 * tests/sets.at (AT_EXTRACT_SETS): New.
15101 (Nullable): Use it.
15102 (Firsts): New.
15103
15104 2002-01-26 Akim Demaille <akim@epita.fr>
15105
15106 * tests/actions.at, tests/calc.at, tests/headers.at,
15107 * tests/torture.at: Adjust to the newest Autotest which no longer
15108 forces `.' in the PATH.
15109
15110 2002-01-25 Akim Demaille <akim@epita.fr>
15111
15112 * tests/regression.at (%nonassoc and eof): New.
15113 Suggested by Robert Anisko.
15114
15115 2002-01-24 Akim Demaille <akim@epita.fr>
15116
15117 Bison dumps core when trying to complain about broken input files.
15118 Reported by Cris van Pelt.
15119
15120 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15121 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15122 into...
15123 (Invalid inputs): Strengthen: exercise parse_percent_token.
15124
15125 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
15126
15127 * src/Makefile.am: Add bison.c++.
15128 * src/bison.c++: New skeleton.
15129
15130 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
15131
15132 * po/it.po: New.
15133
15134 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15135
15136 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15137
15138 2002-01-20 Marc Autret <marc@gnu.org>
15139
15140 * src/files.c (compute_output_file_names): Fix
15141
15142 2002-01-20 Marc Autret <marc@gnu.org>
15143
15144 * tests/output.at: New test.
15145 * src/files.c (compute_base_names): Don't map extensions when
15146 the YACC flag is set, use defaults.
15147 Reported by Evgeny Stambulchik.
15148
15149 2002-01-20 Marc Autret <marc@gnu.org>
15150
15151 * src/system.h: Need to define __attribute__ away for non-GCC
15152 compilers as well (i.e., the vendor C compiler).
15153 Suggested by Albert Chin-A-Young.
15154
15155 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15156
15157 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15158 canonical definition.
15159 * src/system.h: Use the canonical definition for PARAMS (avoids
15160 a conflict with the macro from lib/hash.h).
15161
15162 2002-01-11 Akim Demaille <akim@epita.fr>
15163
15164 * configure.in: Use AC_FUNC_STRNLEN.
15165 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
15166
15167 2002-01-09 Akim Demaille <akim@epita.fr>
15168
15169 * src/files.c, src/files.h (output_infix): New.
15170 (tab_extension): Remove.
15171 (compute_base_names): Compute the former, drop the latter.
15172 * src/output.c (prepare): Insert the muscles `output-infix', and
15173 `output-suffix'.
15174 * src/parse-skel.y (string, string.1): New.
15175 (section.header): Use it.
15176 (section.yacc): Remove.
15177 (prefix): Remove too.
15178 * src/scan-skel.l: Adjust.
15179 * src/bison.simple, src/bison.hairy: Adjust.
15180
15181 2002-01-09 Akim Demaille <akim@epita.fr>
15182
15183 * configure.in (WERROR_CFLAGS): Compute it.
15184 * src/Makefile.am (CFLAGS): Pass it.
15185 * tests/atlocal.in (CFLAGS): Idem.
15186 * src/files.c: Fix a few warnings.
15187 (get_extension_index): Remove, unused.
15188
15189 2002-01-08 Akim Demaille <akim@epita.fr>
15190
15191 * src/getargs.c (AS_FILE_NAME): New.
15192 (getargs): Use it to convert DOSish file names.
15193 * src/files.c (base_name): Rename as full_base_name to avoid
15194 clashes with `base_name ()'.
15195 (filename_split): New.
15196 (compute_base_names): N-th rewrite, using filename_split.
15197
15198 2002-01-08 Akim Demaille <akim@epita.fr>
15199
15200 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15201 New, stolen from the Fileutils 4.1.
15202 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15203 * configure.in: Check for the presence of memrchr, and of its
15204 prototype.
15205
15206 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15207
15208 * lib/hash.h (__P): Added definition for this macro.
15209 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15210 BUILT_SOURCES, to ensure they are generated first.
15211 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15212 %error-verbose to allow bootstrapping with bison 1.30x.
15213
15214 2002-01-06 Akim Demaille <akim@epita.fr>
15215
15216 * src/reader.c (parse_braces): Don't fetch the next char, the
15217 convention is to fetch on entry.
15218 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15219 'switch' without a following semicolon.
15220 * tests/regression.at (braces parsing): New.
15221
15222 2002-01-06 Akim Demaille <akim@epita.fr>
15223
15224 Bison is dead wrong in its RR conflict reports.
15225
15226 * tests/torture.at (GNU Cim Grammar): New.
15227 * src/conflicts.c (count_rr_conflicts): Fix.
15228
15229 2002-01-06 Akim Demaille <akim@epita.fr>
15230
15231 Creating package.m4 from configure.ac causes too many problems.
15232
15233 * tests/Makefile.am (package.m4): Create it by hand,
15234 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15235
15236 2002-01-06 Akim Demaille <akim@epita.fr>
15237
15238 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15239 skeleton.h.
15240
15241 2002-01-04 Paul Eggert <eggert@twinsun.com>
15242
15243 * doc/bison.texinfo (Debugging):
15244 Remove YYSTDERR; it's no longer defined or used.
15245 Also, s/cstdio.h/cstdio/.
15246
15247 2002-01-03 Akim Demaille <akim@epita.fr>
15248
15249 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15250
15251 2002-01-03 Akim Demaille <akim@epita.fr>
15252
15253 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15254 tracing code to --trace, wait for a better --trace option, with
15255 args.
15256
15257 2002-01-03 Akim Demaille <akim@epita.fr>
15258
15259 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15260 The ISO C++ standard is extremely clear about it: stderr is
15261 considered a macro, not a regular symbol (see table 94 `Header
15262 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15263 Therefore std:: does not apply to it. It still does with fprintf.
15264 Also, s/cstdio.h/cstdio/.
15265
15266 2002-01-03 Akim Demaille <akim@epita.fr>
15267
15268 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15269 for non system headers.
15270
15271 2002-01-02 Akim Demaille <akim@epita.fr>
15272
15273 Equip the skeleton chain with location tracking, runtime trace,
15274 pure parser and scanner.
15275
15276 * src/parse-skel.y: Request a pure parser, locations, and prefix
15277 renaming.
15278 (%union): Having several members with the same type does not help
15279 type mismatches, simplify.
15280 (YYPRINT, yyprint): New.
15281 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15282 (skel_error): this.
15283 Handle locations.
15284 * src/scan-skel.l: Adjust to these changes.
15285 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15286 (LOCATION_PRINT, skel_control_t): New.
15287
15288 2001-12-30 Akim Demaille <akim@epita.fr>
15289
15290 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15291 replace `gb' with BLANKS.
15292 * src/scan-skel.l: Adjust.
15293
15294 2001-12-30 Akim Demaille <akim@epita.fr>
15295
15296 * src/system.h: We don't need nor want bcopy.
15297 Throw away MS-DOS crap: we don't need getpid.
15298 * configure.in: We don't need strndup. It was even causing
15299 problems: because Flex includes the headers *before* us,
15300 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15301 not visible.
15302 * lib/xstrndup.c: New.
15303 * src/scan-skel.l: Use it.
15304 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15305 * src/parse-skel.y: Use %directives instead of #defines.
15306
15307 2001-12-30 Akim Demaille <akim@epita.fr>
15308
15309 * src/skeleton.h: New.
15310 * src/output.c (output_parser, output_master_parser): Remove, dead
15311 code.
15312 * src/output.h (get_lines_number, actions_output, guards_output)
15313 (token_definitions_output): Prototype them.
15314 * src/parse-skel.y: Add the license notice.
15315 Include output.h and skeleton.h.
15316 (process_skeleton): Returns void, and takes a single parameter.
15317 * src/scan-skel.l: Add the license notice.
15318 Include skeleton.h.
15319 Don't use %option yylineno: it seems that then Flex imagines
15320 REJECT has been used, and therefore it won't reallocate its
15321 buffers (which makes no other sense to me than a bug). It results
15322 in warnings for `unused: yy_flex_realloc'.
15323
15324 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
15325
15326 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15327 (MUSCLE_INSERT_PREFIX): ...to there.
15328 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15329 (MUSCLE_INSERT_PREFIX): Move from here...
15330
15331 * src/bison.hairy: Add a section directive. Put braces around muscle
15332 names. This parser skeleton is still broken, but Bison should not
15333 choke on a bad muscle 'syntax'.
15334 * src/bison.simple: Add a section directive. Put braces around muscle
15335 names.
15336
15337 * src/files.h (strsuffix, stringappend): Add declarations.
15338 (tab_extension): Add declaration.
15339 (short_base_name): Add declaration.
15340
15341 * src/files.c (strsuffix, stringappend): No longer static. These
15342 functions are used in the skeleton parser.
15343 (tab_extension): New.
15344 (compute_base_names): Use the computations done in this function
15345 to guess if the generated parsers should have '.tab' in their
15346 names.
15347 (short_base_name): No longer static.
15348
15349 * src/output.c (output_skeleton): New.
15350 (output): Disable call to output_master_parser, and give a try to
15351 a new skeleton handling system.
15352 (guards_output, actions_output): No longer static.
15353 (token_definitions_output, get_lines_number): No longer static.
15354
15355 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15356
15357 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
15358 parse-skel.y.
15359
15360 * src/parse-skel.y: New file.
15361 * src/scan-skel.l: New file.
15362
15363 2001-12-29 Akim Demaille <akim@epita.fr>
15364
15365 %name-prefix is broken.
15366
15367 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15368 Adjust all dependencies.
15369 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15370 %name-prefix.
15371
15372 Renaming yylval but not yylloc is not consistent. Now we do.
15373
15374 * src/bison.simple: Prefix yylloc if used.
15375 * doc/bison.texinfo (Decl Summary): Document that.
15376
15377 2001-12-29 Akim Demaille <akim@epita.fr>
15378
15379 * doc/bison.texinfo: Promote `%long-directive' over
15380 `%long_directive'.
15381 Remove all references to fixed-output-files, yacc is enough.
15382
15383 2001-12-29 Akim Demaille <akim@epita.fr>
15384
15385 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15386 user prologue. These are defaults.
15387 * tests/actions.at (Mid-rule actions): Make sure the user can
15388 define YYDEBUG and YYERROR_VERBOSE.
15389
15390 2001-12-29 Akim Demaille <akim@epita.fr>
15391
15392 * src/output.c (header_output): Don't forget to export YYLTYPE and
15393 yylloc.
15394 * tests/headers.at (export YYLTYPE): New, make sure it does.
15395 * tests/regression.at (%union and --defines, Invalid CPP headers):
15396 Move to...
15397 * tests/headers.at: here.
15398
15399 2001-12-29 Akim Demaille <akim@epita.fr>
15400
15401 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15402
15403 2001-12-29 Akim Demaille <akim@epita.fr>
15404
15405 * tests/actions.at (Mid-rule actions): Output on a single line
15406 instead of several.
15407
15408 2001-12-29 Akim Demaille <akim@epita.fr>
15409
15410 * doc/bison.texinfo: Formatting changes.
15411
15412 2001-12-29 Akim Demaille <akim@epita.fr>
15413
15414 Don't store the token defs in a muscle, just be ready to output it
15415 on command. Now possible via `symbols'. Fixes a memory leak.
15416
15417 * src/output.c (token_definitions_output): New.
15418 (output_parser, header_output): Use it.
15419 * src/reader.c (symbols_save): Remove.
15420
15421 2001-12-29 Akim Demaille <akim@epita.fr>
15422
15423 * src/bison.simple: Do not provide a default for YYSTYPE and
15424 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15425 default.
15426
15427 2001-12-29 Akim Demaille <akim@epita.fr>
15428
15429 Mid-rule actions are simply... ignored!
15430
15431 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15432 the empty-rule associated to the dummy symbol, not to the host
15433 rule.
15434 * tests/actions.at (Mid-rule actions): New.
15435
15436 2001-12-29 Akim Demaille <akim@epita.fr>
15437
15438 Memory leak.
15439
15440 * src/reader.c (reader): Free grammar.
15441
15442 2001-12-29 Akim Demaille <akim@epita.fr>
15443
15444 Memory leak.
15445
15446 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15447 since it allocates it for each state, although only one is needed.
15448 (allocate_storage): Do it here.
15449
15450 2001-12-29 Akim Demaille <akim@epita.fr>
15451
15452 * src/options.h, src/options.c (create_long_option_table): Rename
15453 as...
15454 (long_option_table_new): this, with a clearer prototype.
15455 (percent_table): Remove, unused,
15456 * src/getargs.c (getargs): Adjust.
15457
15458 2001-12-29 Akim Demaille <akim@epita.fr>
15459
15460 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15461 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15462 as states.
15463
15464 2001-12-29 Akim Demaille <akim@epita.fr>
15465
15466 * src/lalr.c (build_relations): Rename `states' as `states1'.
15467 Sorry, I don't understand exactly what it is, no better name...
15468
15469 2001-12-29 Akim Demaille <akim@epita.fr>
15470
15471 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15472 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15473 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15474 as rules.
15475
15476 2001-12-29 Akim Demaille <akim@epita.fr>
15477
15478 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15479 ago.
15480
15481 2001-12-29 Akim Demaille <akim@epita.fr>
15482
15483 * src/reader.c, src/reader.h (user_toknums): Remove.
15484 Adjust all users to use symbols[i]->user_token_number.
15485
15486 2001-12-29 Akim Demaille <akim@epita.fr>
15487
15488 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15489 Adjust all users to use symbols[i]->prec or ->assoc.
15490
15491 2001-12-29 Akim Demaille <akim@epita.fr>
15492
15493 * src/reader.c, src/reader.h (tags): Remove.
15494 Adjust all users to use symbols[i]->tag.
15495
15496 2001-12-29 Akim Demaille <akim@epita.fr>
15497
15498 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15499 and rule_table.
15500 * src/reader.c (packsymbols): Fill this table.
15501 Drop sprec.
15502 * src/conflicts.c (resolve_sr_conflict): Adjust.
15503 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15504 single table.
15505 Use symbols[i]->tag instead of tags[i].
15506
15507 2001-12-29 Akim Demaille <akim@epita.fr>
15508
15509 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15510 In addition, put a comment in there, to replace...
15511 * tests/regression.at (%union and C comments): Remove.
15512
15513 2001-12-29 Akim Demaille <akim@epita.fr>
15514
15515 * tests/regression.at (Web2c Actions): Blindly move the actual
15516 output as expected output. The contents *seem* right to me, but I
15517 can't pretend reading perfectly parser tables... Nonetheless, all
15518 the other tests pass correctly, the table look OK, even though the
15519 presence of `$axiom' is to be noted: AFAICS it is useless (but
15520 harmless).
15521
15522 2001-12-29 Akim Demaille <akim@epita.fr>
15523
15524 * src/reader.c (readgram): Don't add the rule 0 if there were no
15525 rules read. In other words, add it _after_ having performed
15526 grammar sanity checks.
15527 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15528
15529 2001-12-29 Akim Demaille <akim@epita.fr>
15530
15531 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15532 visible, and some states have now a different number.
15533
15534 2001-12-29 Akim Demaille <akim@epita.fr>
15535
15536 * src/reader.c (readgram): Bind the initial rule's lineno to that
15537 of the first rule.
15538 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15539 (Solved SR Conflicts): Adjust rule 0's line number.
15540
15541 2001-12-29 Akim Demaille <akim@epita.fr>
15542
15543 Fix the `GAWK Grammar' failure.
15544
15545 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15546 the reductions of the first state which was mistakenly confused
15547 with the final state because precisely final_state was initialized
15548 to 0.
15549 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15550 now noticed by Bison.
15551 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15552 have a reduction on $default.
15553
15554 2001-12-29 Akim Demaille <akim@epita.fr>
15555
15556 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15557 rule line numbers.
15558 * src/closure.c (print_closure): Likewise.
15559 * src/derives.c (print_derives): Likewise.
15560 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15561 now.
15562
15563 2001-12-29 Akim Demaille <akim@epita.fr>
15564
15565 * src/lalr.c (lookaheads_print): New.
15566 (lalr): Call it when --trace-flag.
15567 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15568 are dumped.
15569
15570 2001-12-29 Akim Demaille <akim@epita.fr>
15571
15572 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15573 when walking through ritem, even via rule->rhs.
15574 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15575 (useful_production, useless_nonterminals): Likewise.
15576 (reduce_grammar_tables): Likewise, plus update nritems.
15577 * src/nullable.c (set_nullable): Likewise.
15578 * src/lalr.c (build_relations): Likewise.
15579 * tests/sets.at (Nullable): Adjust.
15580 Fortunately, now, the $axiom is no longer nullable.
15581
15582 2001-12-29 Akim Demaille <akim@epita.fr>
15583
15584 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15585 the 0-sentinel.
15586 * src/gram.c (ritem_longest_rhs): Likewise.
15587 * src/reduce.c (nonterminals_reduce): Likewise.
15588 * src/print_graph.c (print_graph): Likewise.
15589 * src/output.c (output_rule_data): Likewise.
15590 * src/nullable.c (set_nullable): Likewise.
15591
15592 2001-12-29 Akim Demaille <akim@epita.fr>
15593
15594 * src/output.c: Comment changes.
15595
15596 2001-12-27 Paul Eggert <eggert@twinsun.com>
15597
15598 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15599 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15600 Sparc, as they were causing more porting problems than the
15601 (minor) performance improvement was worth.
15602
15603 Also, catch up with 1.31's YYSTD.
15604
15605 2001-12-27 Akim Demaille <akim@epita.fr>
15606
15607 * src/output.c (output_gram): Rely on nritems, not the
15608 0-sentinel. See below.
15609 Use -1 as separator, not 0.
15610 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15611 Rely on -1 as separator in yyrhs, instead of 0.
15612 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15613 twice `Now at end of input', therefore there are two lines less to
15614 expect.
15615
15616 2001-12-27 Akim Demaille <akim@epita.fr>
15617
15618 * tests/regression.at (Unresolved SR Conflicts):
15619 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15620 below.
15621
15622 2001-12-27 Akim Demaille <akim@epita.fr>
15623
15624 * src/LR0.c (new_state): Recognize the final state by the fact it
15625 is reached by eoftoken.
15626 (insert_start_shifting_state, insert_eof_shifting_state)
15627 (insert_accepting_state, augment_automaton): Remove, since now
15628 these states are automatically computed from the initial state.
15629 (generate_states): Adjust.
15630 * src/print.c: When reporting a rule number to the user, substract
15631 1, so that the axiom rule is rule 0, and the first user rule is 1.
15632 * src/reduce.c: Likewise.
15633 * src/print_graph.c (print_core): For the time being, just as for
15634 the report, depend upon --trace-flags to dump the full set of
15635 items.
15636 * src/reader.c (readgram): Once the grammar read, insert the rule
15637 0: `$axiom: START-SYMBOL $'.
15638 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15639 number of the states has changed (the final state is no longer
15640 necessarily the last), catch up.
15641
15642 2001-12-27 Akim Demaille <akim@epita.fr>
15643
15644 Try to make the use of the eoftoken valid. Given that its value
15645 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15646 is used instead of > 0 where appropriate, (ii), depend upon nritems
15647 instead of the 0-sentinel.
15648
15649 * src/gram.h, src/gram.c (nritems): New.
15650 Expected to be duplication of nitems, but for the time being...
15651 * src/reader.c (packgram): Assert nritems and nitems are equal.
15652 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15653 * src/closure.c (print_closure, print_fderives): Likewise.
15654 * src/gram.c (ritem_print): Likewise.
15655 * src/print.c (print_core, print_grammar): Likewise.
15656 * src/print_graph.c: Likewise.
15657
15658 2001-12-27 Akim Demaille <akim@epita.fr>
15659
15660 * src/main.c (main): If there are complains after grammar
15661 reductions, then output the report anyway if requested, then die.
15662 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15663 * src/reader.c (eoftoken): New.
15664 (parse_token_decl): If the token being defined has value `0', it
15665 is the eoftoken.
15666 (packsymbols): No longer hack `tags' to insert `$' by hand.
15667 Be sure to preserve the value of the eoftoken.
15668 (reader): Make sure eoftoken is defined.
15669 Initialize nsyms to 0: now eoftoken is created just like the others.
15670 * src/print.c (print_grammar): Don't special case the eof token.
15671 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15672 lie anyway, albeit pleasant.
15673 * tests/calc.at: Exercise error messages with eoftoken.
15674 Change the grammar so that empty input is invalid.
15675 Adjust expectations.
15676 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15677
15678 2001-12-27 Akim Demaille <akim@epita.fr>
15679
15680 * configure.in: Check the protos of strchr ans strspn.
15681 Replace strchr if needed.
15682 * src/system.h: Provide the protos of strchr, strspn and memchr if
15683 missing.
15684 * lib/strchr.c: New.
15685 * src/reader.c (symbols_save): Use strchr.
15686
15687 2001-12-27 Akim Demaille <akim@epita.fr>
15688
15689 * src/print.c, src/print_graph.c (escape): New.
15690 Use it to quote the TAGS outputs.
15691 * src/print_graph.c (print_state): Now errors are in red, and
15692 reductions in green.
15693 Prefer high to wide: output the state number on a line of its own.
15694
15695 2001-12-27 Akim Demaille <akim@epita.fr>
15696
15697 * src/state.h, src/state.c (reductions_new): New.
15698 * src/LR0.c (set_state_table): Let all the states have a
15699 `reductions', even if reduced to 0.
15700 (save_reductions): Adjust.
15701 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15702 * src/print.c (print_reductions, print_actions): Adjust.
15703 * src/output.c (action_row): Adjust.
15704
15705 2001-12-27 Akim Demaille <akim@epita.fr>
15706
15707 * src/state.h, src/state.c (errs_new, errs_dup): New.
15708 * src/LR0.c (set_state_table): Let all the states have an errs,
15709 even if reduced to 0.
15710 * src/print.c (print_errs, print_reductions): Adjust.
15711 * src/output.c (output_actions, action_row): Adjust.
15712 * src/conflicts.c (resolve_sr_conflict): Adjust.
15713
15714 2001-12-27 Akim Demaille <akim@epita.fr>
15715
15716 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15717
15718 2001-12-27 Akim Demaille <akim@epita.fr>
15719
15720 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15721 * src/print.c: here.
15722 (lookaheadset, shiftset): New, used as additional storage by
15723 print_reductions.
15724 (print_results): Adjust.
15725 (print_shifts, print_gotos, print_errs): New, extracted from...
15726 (print_actions): here.
15727 * src/print_graph.c (print_actions): Remove dead code.
15728
15729 2001-12-27 Akim Demaille <akim@epita.fr>
15730
15731 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15732 `$n' and `@n'.
15733
15734 2001-12-27 Akim Demaille <akim@epita.fr>
15735
15736 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15737 (build_relations): Adjust.
15738
15739 2001-12-27 Akim Demaille <akim@epita.fr>
15740
15741 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15742 duplication.
15743
15744 2001-12-27 Akim Demaille <akim@epita.fr>
15745
15746 * src/reader.c (packgram): Catch nitems overflows.
15747
15748 2001-12-27 Akim Demaille <akim@epita.fr>
15749
15750 * src/files.c, src/files.h (guard_obstack): Remove.
15751 * src/output.c (output): Adjust.
15752 * src/reader.c (parse_braces): New, factoring...
15753 (copy_action, copy_guard): these two which are renamed as...
15754 (parse_action, parse_guard): these.
15755 As a voluntary consequence, using braces around guards is now
15756 mandatory.
15757
15758 2001-12-27 Akim Demaille <akim@epita.fr>
15759
15760 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15761 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15762 members.
15763 (symbol_list_new): Adjust.
15764 (copy_action): action_line is the first line, not the last.
15765 (copy_guard): Just as for actions, store the `action' only, not
15766 the switch/case/break flesh.
15767 Don't parse the user action that might follow the guard, let...
15768 (readgram): do it, i.e., now, there can be an action after a
15769 guard.
15770 In other words the guard is just explicitly optional.
15771 (packgram): Adjust.
15772 * src/output.c (guards_output): New.
15773 (output_parser): Call it when needed.
15774 (output): Also free the guard and attrs obstacks.
15775 * src/files.c, src/files.h (obstack_save): Remove.
15776 (output_files): Remove.
15777 As a result, if one needs the former `.act' file, using an
15778 appropriate skeleton which requires actions and guards is now
15779 required.
15780 * src/main.c (main): Adjust.
15781 * tests/semantic.at: New.
15782 * tests/regression.at: Use `input.y' as input file name.
15783 Avoid 8+3 problems by requiring input.c when the test needs the
15784 parser.
15785
15786 2001-12-27 Akim Demaille <akim@epita.fr>
15787
15788 * src/reader.c (symbol_list_new): Be sure to initialize all the
15789 fields.
15790
15791 2001-12-27 Akim Demaille <akim@epita.fr>
15792
15793 All the hacks using a final pseudo state are now useless.
15794
15795 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15796 * src/lalr.c (nLA): New.
15797 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15798 instead of lookaheadsp from the pseudo state (nstate + 1).
15799
15800 2001-12-27 Akim Demaille <akim@epita.fr>
15801
15802 * src/output.c (action_row, token_actions): Use a state_t instead
15803 of a integer, and nlookaheads instead of the following state's
15804 lookaheadsp.
15805
15806 2001-12-27 Akim Demaille <akim@epita.fr>
15807
15808 * src/conflicts.c (log_resolution, flush_shift)
15809 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15810 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15811 (conflicts_print, print_reductions): Use a state_t instead of an
15812 integer when referring to a state.
15813 As much as possible, depend upon nlookaheads, instead of the
15814 `lookaheadsp' member of the following state (since lookaheads of
15815 successive states are successive, the difference between state n + 1
15816 and n served as the number of lookaheads for state n).
15817 * src/lalr.c (add_lookback_edge): Likewise.
15818 * src/print.c (print_core, print_actions, print_state)
15819 (print_results): Likewise.
15820 * src/print_graph.c (print_core, print_actions, print_state)
15821 (print_graph): Likewise.
15822 * src/conflicts.h: Adjust.
15823
15824 2001-12-27 Akim Demaille <akim@epita.fr>
15825
15826 * src/bison.hairy: Formatting/comment changes.
15827 ANSIfy.
15828 Remove `register' indications.
15829 Add plenty of `static'.
15830
15831 2001-12-27 Akim Demaille <akim@epita.fr>
15832
15833 * src/output.c (prepare): Drop the muscle `ntbase' which
15834 duplicates ntokens.
15835 * src/bison.simple: Formatting/comment changes.
15836 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15837 is an undocumented synonym.
15838
15839 2001-12-22 Akim Demaille <akim@epita.fr>
15840
15841 * src/output.c (output_table_data): Change the prototype to use
15842 `int' for array ranges: some invocations do pass an int, not a
15843 short.
15844 Reported by Wayne Green.
15845
15846 2001-12-22 Akim Demaille <akim@epita.fr>
15847
15848 Some actions of web2c.y are improperly triggered.
15849 Reported by Mike Castle.
15850
15851 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15852 * tests/regression.at (Web2c): Rename as...
15853 (Web2c Report): this.
15854 (Web2c Actions): New.
15855
15856 2001-12-22 Akim Demaille <akim@epita.fr>
15857
15858 Reductions in web2c.y are improperly reported.
15859 Reported by Mike Castle.
15860
15861 * src/conflicts.c (print_reductions): Fix.
15862 * tests/regression.at (Web2c): New.
15863
15864 2001-12-18 Akim Demaille <akim@epita.fr>
15865
15866 Some host fail on `assert (!"foo")', which expands to
15867 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15868 Reported by Nelson Beebee.
15869
15870 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15871 `#define it_succeeded 0' and `assert (it_succeeded)'.
15872
15873 2001-12-17 Marc Autret <autret_m@epita.fr>
15874
15875 * src/bison.simple: Don't hard code the skeleton line and filename.
15876 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15877 New line counter 'skeleton_line' (skeleton-line muscle).
15878
15879 2001-12-17 Paul Eggert <eggert@twinsun.com>
15880
15881 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15882 YYDEBUG must be defined to a nonzero value.
15883
15884 * src/bison.simple (yytname): Do not assume that the user defines
15885 YYDEBUG to a properly parenthesized expression.
15886
15887 2001-12-17 Akim Demaille <akim@epita.fr>
15888
15889 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15890 nlookaheads is a new member.
15891 Adjust all users.
15892 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15893 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15894 state.
15895
15896 2001-12-17 Akim Demaille <akim@epita.fr>
15897
15898 * src/files.h, src/files.c (open_files, close_files): Remove.
15899 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15900 let...
15901 * src/reader.c (reader): Do it.
15902
15903 2001-12-17 Akim Demaille <akim@epita.fr>
15904
15905 * src/conflicts.c (print_reductions): Formatting changes.
15906
15907 2001-12-17 Akim Demaille <akim@epita.fr>
15908
15909 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15910 (flush_reduce): New.
15911 (resolve_sr_conflict): Adjust.
15912
15913 2001-12-17 Akim Demaille <akim@epita.fr>
15914
15915 * src/output.c (output_obstack): Be static and rename as...
15916 (format_obstack): this, to avoid any confusion with files.c's
15917 output_obstack.
15918 * src/reader.h (muscle_obstack): Move to...
15919 * src/output.h: here, since it's defined in output.c.
15920
15921 2001-12-17 Akim Demaille <akim@epita.fr>
15922
15923 * src/output.c (action_row, save_column, default_goto)
15924 (sort_actions, matching_state, pack_vector): Better variable
15925 locality.
15926
15927 2001-12-17 Akim Demaille <akim@epita.fr>
15928
15929 * src/output.c: Various formatting changes.
15930
15931 2001-12-17 Akim Demaille <akim@epita.fr>
15932
15933 * src/files.c (output_files): Free the output_obstack.
15934 * src/main.c (main): Call print and print_graph conditionally.
15935 * src/print.c (print): Work unconditionally.
15936 * src/print_graph.c (print_graph): Work unconditionally.
15937 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15938
15939 2001-12-16 Marc Autret <autret_m@epita.fr>
15940
15941 * src/output.c (actions_output): Fix. When we use %no-lines,
15942 there is one less line per action.
15943
15944 2001-12-16 Marc Autret <autret_m@epita.fr>
15945
15946 * src/bison.simple: Remove a useless #line directive.
15947 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15948 * src/output.c (get_lines_number): New.
15949 (output_parser): Adjust, now takes care about the lines of a
15950 output muscles.
15951 Fix line numbering.
15952 (actions_output): Computes the number of lines taken by actions.
15953 (output_master_parser): Insert new skeleton which is the name of
15954 the output parser file name.
15955
15956 2001-12-15 Marc Autret <autret_m@epita.fr>
15957
15958 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15959
15960 2001-12-15 Marc Autret <autret_m@epita.fr>
15961
15962 * src/output.c (output_gram): Keep track of the hairy one.
15963
15964 2001-12-15 Akim Demaille <akim@epita.fr>
15965
15966 Make `make distcheck' work.
15967
15968 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15969 system.h which uses libgettext.h.
15970
15971 2001-12-15 Akim Demaille <akim@epita.fr>
15972
15973 * src/nullable.c (set_nullable): Useless rules must be skipped,
15974 otherwise, since we range over their symbols, we might look at a
15975 nonterminal which no longer ``exists'', i.e., it is not counted in
15976 `nvars', hence we overflow our arrays.
15977
15978 2001-12-15 Akim Demaille <akim@epita.fr>
15979
15980 The header can also be produced directly, without any obstack!
15981 Yahoo!
15982
15983 * src/files.c, src/files.h (defines_obstack): Remove.
15984 (compute_header_macro): Global.
15985 (defines_obstack_save): Remove.
15986 * src/reader.c (parse_union_decl): No longer output to
15987 defines_obstack: its content can be found in the `stype' muscle
15988 anyway.
15989 (output_token_translations): Merge into...
15990 (symbols_output): this.
15991 Rename as...
15992 (symbols_save): this.
15993 (reader): Adjust.
15994 * src/output.c (header_output): New.
15995 (output): Call it.
15996
15997 2001-12-15 Akim Demaille <akim@epita.fr>
15998
15999 * src/reader.c (parse_union_decl): Instead of handling two obstack
16000 simultaneously, use one to define the `stype' muscle, and use the
16001 value of the latter to fill defines_obstack.
16002 (copy_comment): Remove.
16003 (copy_comment2): Work for a single obstack.
16004 Rename as...
16005 (copy_comment): this.
16006
16007 2001-12-15 Akim Demaille <akim@epita.fr>
16008
16009 * src/lex.c, src/lex.h (xgetc): No longer static.
16010 * src/reader.c (parse_union_decl): Revamp.
16011
16012 2001-12-15 Akim Demaille <akim@epita.fr>
16013
16014 Still making progress in separating Bison into (i) input, (ii)
16015 process, (iii) output: now we can directly output the parser file
16016 without using table_obstack at all.
16017
16018 * src/files.c, src/files.h (table_obstack): Bye bye.
16019 (parser_file_name): New.
16020 * src/files.c (compute_output_file_names): Compute it.
16021 * src/output.c (actions_output, output_parser)
16022 (output_master_parser): To a file instead of an obstack.
16023
16024 2001-12-15 Akim Demaille <akim@epita.fr>
16025
16026 Attach actions to rules, instead of pre-outputting them to
16027 actions_obstack.
16028
16029 * src/gram.h (rule_t): action and action_line are new members.
16030 * src/reader.c (symbol_list): Likewise.
16031 (copy_action): Save the actions within the rule.
16032 (packgram): Save them in rule_table.
16033 * src/output.c (actions_output): New.
16034 (output_parser): Use it on `%%actions'.
16035 (output_rule_data): Don't free rule_table.
16036 (output): Do it.
16037 (prepare): Don't save the `action' muscle.
16038 * src/bison.simple: s/%%action/%%actions/.
16039
16040 2001-12-15 Akim Demaille <akim@epita.fr>
16041
16042 * src/reader.c (copy_action): When --yacc, don't append a `;'
16043 to the user action: let it fail if lacking.
16044 Suggested by Arnold Robbins and Tom Tromey.
16045
16046 2001-12-14 Akim Demaille <akim@epita.fr>
16047
16048 * src/lex.c (literalchar): Simply return the char you decoded, non
16049 longer mess around with obstacks and int pointers.
16050 Adjust all callers.
16051
16052 2001-12-14 Akim Demaille <akim@epita.fr>
16053
16054 * src/lex.c (literalchar): Don't escape the special characters,
16055 just decode them, and keep them as char (before, eol was output as
16056 the 2 char string `\n' etc.).
16057 * src/output.c (output_rule_data): Use quotearg to output the
16058 token strings.
16059
16060 2001-12-13 Paul Eggert <eggert@twinsun.com>
16061
16062 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16063 Do not infringe on the global user namespace when using C++.
16064 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16065 All uses of `fprintf' and `stderr' changed.
16066
16067 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16068
16069 2001-12-13 Akim Demaille <akim@epita.fr>
16070
16071 The computation of nullable is broken: it doesn't handle empty
16072 RHS's properly.
16073
16074 * tests/torture.at (GNU AWK Grammar): New.
16075 * tests/sets.at (Nullable): New.
16076 * src/nullable.c (set_nullable): Instead of blindly looping over
16077 `ritems', loop over the rules, and then over their rhs's.
16078
16079 Work around Autotest bugs.
16080
16081 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16082 frame, because Autotest understand lines starting with a `+' as
16083 traces from the shell. Then, they are not processed properly.
16084 Admittedly an Autotest bug, but we don't have time to wait for
16085 Autotest to catch up.
16086 * tests/regression.at (Broken Closure): Adjust to the new table
16087 frames.
16088 Move to...
16089 * tests/sets.at: here.
16090
16091 2001-12-13 Akim Demaille <akim@epita.fr>
16092
16093 * src/closure.c (closure): Use nrules instead of playing tricks
16094 with BITS_PER_WORD.
16095
16096 2001-12-13 Akim Demaille <akim@epita.fr>
16097
16098 * src/print.c (print_actions): Output the handling of `$' as the
16099 traces do: shifting the token EOF. Before EOF was treated as a
16100 nonterminal.
16101 * tests/regression.at: Adjust some tests.
16102 * src/print_graph.c (print_core): Complete the set of items via
16103 closure. The next-to-final and final states are still unsatisfying,
16104 but that's to be addressed elsewhere.
16105 No longer output the rule numbers, but do output the state number.
16106 A single loop for the shifts + gotos is enough, but picked a
16107 distinct color for each.
16108 (print_graph): Initialize and finalize closure.
16109
16110 2001-12-13 Akim Demaille <akim@epita.fr>
16111
16112 * src/reader.c (readgram): Remove dead code, an strip useless
16113 braces.
16114 (get_type): Remove, unused.
16115
16116 2001-12-12 Akim Demaille <akim@epita.fr>
16117
16118 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16119 on that of lib/error.c.
16120
16121 2001-12-12 Akim Demaille <akim@epita.fr>
16122
16123 Some hosts don't like `/' in includes.
16124
16125 * src/system.h: Include libgettext.h without qualifying the path.
16126 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16127 $(top_srcdir).
16128
16129 2001-12-11 Marc Autret <autret_m@epita.fr>
16130
16131 * src/output.c (output_parser): Remove useless muscle.
16132
16133 2001-12-11 Marc Autret <autret_m@epita.fr>
16134
16135 * src/bison.simple: Remove #line just before %%epilogue. It
16136 is now handled in ...
16137 * src/reader.c (read_additionnal_code): Add the output of a
16138 #line for the epilogue.
16139
16140 2001-12-10 Marc Autret <autret_m@epita.fr>
16141
16142 * src/reader.c (copy_definition): Re-use CPP-outed code which
16143 replace precedent remove.
16144 * src/bison.simple: Remove #line before %%prologue because
16145 %%input-line is wrong at this time.
16146
16147 2001-12-10 Marc Autret <autret_m@epita.fr>
16148
16149 * src/reader.c (symbols_output): Clean up.
16150 * src/output.c (output_gram, output): Clean up.
16151
16152 2001-12-10 Akim Demaille <akim@epita.fr>
16153
16154 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16155 * src/LR0.c (set_state_table): here.
16156 * src/lalr.c (lalr): Call it.
16157
16158 2001-12-10 Akim Demaille <akim@epita.fr>
16159
16160 * src/state.h (shifts): Remove the `number' member: shifts are
16161 attached to state, hence no longer need to be labelled with a
16162 state number.
16163
16164 2001-12-10 Akim Demaille <akim@epita.fr>
16165
16166 Now that states have a complete set of members, the linked list of
16167 shifts is useless: just fill directly the state's shifts member.
16168
16169 * src/state.h (shifts): Remove the `next' member.
16170 * src/LR0.c (first_state, last_state): Remove.
16171 Adjust the callers.
16172 (augment_automaton): Don't look for the shifts that must be added
16173 a shift on EOF: it is those of the state we looked for! But now,
16174 since shifts are attached, it is no longer needed to looking
16175 merely by its id: its number.
16176
16177 2001-12-10 Akim Demaille <akim@epita.fr>
16178
16179 * src/LR0.c (augment_automaton): Better variable locality.
16180 Remove an impossible branch: if there is a state corresponding to
16181 the start symbol being shifted, then there is shift for the start
16182 symbol from the initial state.
16183
16184 2001-12-10 Akim Demaille <akim@epita.fr>
16185
16186 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16187 only when appropriate: when insert_start_shifting_state' is not
16188 invoked.
16189 * tests/regression.at (Rule Line Numbers): Adjust.
16190
16191 2001-12-10 Akim Demaille <akim@epita.fr>
16192
16193 * src/LR0.c (augment_automaton): Now that all states have shifts,
16194 merge the two cases addition shifts to the initial state.
16195
16196 2001-12-10 Akim Demaille <akim@epita.fr>
16197
16198 * src/lalr.c (set_state_table): Move to...
16199 * src/LR0.c: here.
16200 * src/lalr.c (lalr): Don't call it...
16201 * src/LR0.c (generate_states): do it.
16202 * src/LR0.h (first_state): Remove, only the table is used.
16203
16204 2001-12-10 Akim Demaille <akim@epita.fr>
16205
16206 * src/LR0.h (first_shift, first_reduction): Remove.
16207 * src/lalr.c: Don't use first_shift: find shifts through the
16208 states.
16209
16210 2001-12-10 Akim Demaille <akim@epita.fr>
16211
16212 * src/LR0.c: Attach shifts to states as soon as they are
16213 computed.
16214 * src/lalr.c (set_state_table): Instead of assigning shifts to
16215 state, just assert that the mapping was properly done.
16216
16217 2001-12-10 Akim Demaille <akim@epita.fr>
16218
16219 * src/LR0.c (insert_start_shift): Rename as...
16220 (insert_start_shifting_state): this.
16221 (insert_eof_shifting_state, insert_accepting_state): New.
16222 (augment_automaton): Adjust.
16223 Better locality of the variables.
16224 When looking if the start_symbol is shifted from the initial
16225 state, using `while (... symbol != start_symbol ...)' sounds
16226 better than `while (... symbol < start_symbol ...)': If fail
16227 to see how the order between symbols could be relevant!
16228
16229 2001-12-10 Akim Demaille <akim@epita.fr>
16230
16231 * src/getargs.h: Don't declare `spec_name_prefix' and
16232 `spec_file_prefix', declared by src/files.h.
16233 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16234 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16235 * src/output.c (prepare): Adjust.
16236 * src/reader.c (symbols_output): Likewise.
16237 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16238
16239 2001-12-10 Akim Demaille <akim@epita.fr>
16240
16241 * src/muscle_tab.c (muscle_init): NULL is a better default than
16242 `"0"'.
16243
16244 2001-12-10 Akim Demaille <akim@epita.fr>
16245
16246 * src/reader.c (reader): Calling symbols_output once is enough.
16247
16248 2001-12-10 Akim Demaille <akim@epita.fr>
16249
16250 Now that states have a complete set of members, the linked list of
16251 reductions is useless: just fill directly the state's reductions
16252 member.
16253
16254 * src/state.h (struct reductions): Remove member `number' and
16255 `next'.
16256 * src/LR0.c (first_reduction, last_reduction): Remove.
16257 (save_reductions): Don't link the new reductions, store them in
16258 this_state.
16259 * src/lalr.c (set_state_table): No need to attach reductions to
16260 states, it's already done.
16261 * src/output.c (output_actions): No longer free the shifts, then
16262 the reductions, then the states: free all the states and their
16263 members.
16264
16265 2001-12-10 Akim Demaille <akim@epita.fr>
16266
16267 * src/options.c (OPTN, DRTV, BOTH): New.
16268 (option_table): Use them.
16269
16270 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16271 the job of system.h.
16272 * src/options.c: Don't include stdio.h and xalloc.h for the same
16273 reasons.
16274
16275 2001-12-10 Akim Demaille <akim@epita.fr>
16276
16277 * src/output.c (output, prepare): Make sure the values of the
16278 muscles `action' and `prologue' are 0-terminated.
16279
16280 2001-12-10 Akim Demaille <akim@epita.fr>
16281
16282 Clean up GCC warnings.
16283
16284 * src/reader.c (copy_action): `buf' is not used.
16285 (parse_skel_decl): Be static.
16286 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16287 * src/options.h (create_long_option_table): Have a real prototype.
16288 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16289 (hash_delete_at): Return const void *.
16290 Adjust casts to preserve the const.
16291
16292 2001-12-10 Akim Demaille <akim@epita.fr>
16293
16294 * configure.in: Require 2.52g.
16295 M4 is not needed, but AUTOM4TE is.
16296 * m4/m4.m4: Remove.
16297 * tests/Makefile.am: Adjust.
16298
16299 2001-12-10 Akim Demaille <akim@epita.fr>
16300
16301 One structure for states is enough, even though theoretically
16302 there are LR(0) states and LALR(1) states.
16303
16304 * src/lalr.h (state_t): Remove.
16305 (state_table): Be state_t **, not state_t *.
16306 * src/state.h (core, CORE_ALLOC): Rename as...
16307 (state_t, STATE_ALLOC): this.
16308 Add the LALR(1) members: shifts, reductions, errs.
16309 * src/LR0.c (state_table): Rename as...
16310 (state_hash): this, to avoid name clashes with the global
16311 `state_table'.
16312 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16313 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16314
16315 2001-12-10 Akim Demaille <akim@epita.fr>
16316
16317 Bison dumps core on bash.y.
16318 Reported by Pascal Bart.
16319
16320 * src/warshall.c (bitmatrix_print): New.
16321 (TC): Use it.
16322 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
16323 j must be the outer loop.
16324 * tests/regression.at (Broken Closure): New.
16325
16326 2001-12-05 Akim Demaille <akim@epita.fr>
16327
16328 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16329 its argument.
16330 Reported by Peter Hamorsky.
16331
16332 2001-12-05 Akim Demaille <akim@epita.fr>
16333
16334 * src/conflicts.c (err_table): Remove.
16335 (resolve_sr_conflict): Adjust.
16336 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16337 Rename as...
16338 (state_t.reductions, state_t.shifts): this.
16339
16340 2001-12-05 Akim Demaille <akim@epita.fr>
16341
16342 * src/reduce.c (reduce_grammar_tables): No longer disable the
16343 removal of useless rules via CPP but via `if (0)', so that the
16344 compiler still check the code is valid.
16345 For instance, it should have noticed `rline' no longer exists: use
16346 the `line' member of rule_t.
16347 * src/gram.c (dummy, rline): Remove, unused.
16348
16349 2001-12-05 Akim Demaille <akim@epita.fr>
16350
16351 * src/output.c (pack_vector): Use assert, not berror.
16352 * src/main.c (berror): Remove, unused.
16353
16354 2001-12-05 Akim Demaille <akim@epita.fr>
16355
16356 New experimental feature: if --verbose --trace output all the
16357 items of a state, not only its kernel.
16358
16359 * src/print.c (print_core): If `trace_flag', then invoke closure
16360 before outputting the items of the state (print_core is no longer
16361 a correct name them).
16362 (print_results): Invoke new_closure/free_closure if needed.
16363
16364 2001-12-05 Akim Demaille <akim@epita.fr>
16365
16366 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16367 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16368 (nitemset): for consistency with the rest of the project.
16369
16370 2001-12-05 Akim Demaille <akim@epita.fr>
16371
16372 * src/closure.c (print_closure): Improve.
16373 (closure): Use it for printing input and output.
16374
16375 2001-12-05 Akim Demaille <akim@epita.fr>
16376
16377 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16378 indexed by nonterminals.
16379
16380 2001-12-05 Akim Demaille <akim@epita.fr>
16381
16382 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16383 what it was!).
16384 * src/warshall.h: Remove accidental duplication of the content.
16385
16386 2001-12-05 Akim Demaille <akim@epita.fr>
16387
16388 * src/closure.c (set_fderives): De-obfuscate.
16389
16390 2001-12-05 Akim Demaille <akim@epita.fr>
16391
16392 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16393
16394 2001-12-05 Akim Demaille <akim@epita.fr>
16395
16396 * src/closure.c (set_firsts): De-obfuscate.
16397
16398 2001-12-05 Akim Demaille <akim@epita.fr>
16399
16400 * src/output.c (action_row): De-obfuscate
16401 using the good o' techniques: arrays not pointers, variable
16402 locality, BITISSET, RESETBIT etc.
16403
16404 2001-12-05 Akim Demaille <akim@epita.fr>
16405
16406 Pessimize the code to simplify it: from now on, all the states
16407 have a valid SHIFTS, which NSHIFTS is possibly 0.
16408
16409 * src/LR0.c (shifts_new): Be global and move to..
16410 * src/state.c, src/state.h: here.
16411 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16412 * src/print_graph: Adjust.
16413
16414 2001-12-05 Akim Demaille <akim@epita.fr>
16415
16416 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16417 * src/conflicts.c: Use it.
16418 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16419 incorrectly ``simplified''.
16420
16421 2001-12-05 Akim Demaille <akim@epita.fr>
16422
16423 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16424 using the good o' techniques: arrays not pointers, variable
16425 locality, BITISSET, RESETBIT etc.
16426
16427 2001-12-05 Akim Demaille <akim@epita.fr>
16428
16429 * src/state.h (SHIFT_SYMBOL): New.
16430 * src/conflicts.c: Use it to deobfuscate.
16431
16432 2001-12-05 Akim Demaille <akim@epita.fr>
16433
16434 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16435 (print_reductions): De-obfuscate using the good o' techniques:
16436 arrays not pointers, variable locality, BITISSET.
16437
16438 2001-12-05 Akim Demaille <akim@epita.fr>
16439
16440 * src/conflicts.c (print_reductions): Arrays, not pointers.
16441 Use BITISSET.
16442
16443 2001-12-05 Akim Demaille <akim@epita.fr>
16444
16445 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16446
16447 2001-12-05 Akim Demaille <akim@epita.fr>
16448
16449 * src/conflicts.c (print_reductions): Improve variable locality.
16450
16451 2001-12-05 Akim Demaille <akim@epita.fr>
16452
16453 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16454
16455 2001-12-05 Akim Demaille <akim@epita.fr>
16456
16457 * src/conflicts.c (print_reductions): Improve variable locality.
16458
16459 2001-12-05 Akim Demaille <akim@epita.fr>
16460
16461 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16462 * src/lalr.c: Use them.
16463
16464 2001-12-05 Akim Demaille <akim@epita.fr>
16465
16466 * src/LR0.c (augment_automaton): Formatting changes.
16467 Better variable locality.
16468
16469 2001-12-05 Akim Demaille <akim@epita.fr>
16470
16471 * src/lalr.c (matrix_print): New.
16472 (transpose): Use it.
16473 Use arrays instead of pointers.
16474
16475 2001-12-05 Akim Demaille <akim@epita.fr>
16476
16477 * src/lalr.c (maxrhs): Move to...
16478 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16479 * src/lalr.c (build_relations): Adjust.
16480
16481 2001-12-05 Akim Demaille <akim@epita.fr>
16482
16483 * src/lalr.c (transpose): Free the memory allocated to the
16484 argument, as it is replaced by the results by the unique caller.
16485 (build_relations): Merely invoke transpose: it handles the memory
16486 deallocation.
16487 Improve variable locality.
16488 Avoid variables used as mere abbreviations.
16489 (compute_lookaheads): Use arrays instead of pointers.
16490
16491 2001-12-05 Akim Demaille <akim@epita.fr>
16492
16493 * src/lalr.c (initialize_F): Improve variable locality.
16494 Avoid variables used as mere abbreviations.
16495
16496 2001-12-05 Akim Demaille <akim@epita.fr>
16497
16498 * src/derives.c (print_derives): Display the ruleno.
16499 * src/lalr.c (initialize_F, transpose): Better variable locality
16500 to improve readability.
16501 Avoid variables used as mere abbreviations.
16502
16503 2001-12-05 Akim Demaille <akim@epita.fr>
16504
16505 * src/lalr.c (traverse): Use arrays instead of pointers.
16506
16507 2001-12-05 Akim Demaille <akim@epita.fr>
16508
16509 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16510 the handling of squeue.
16511 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16512
16513 2001-12-05 Akim Demaille <akim@epita.fr>
16514
16515 Because useless nonterminals are now kept alive (instead of being
16516 `destroyed'), we now sometimes examine them, and store information
16517 related to them. Hence we need to know their number, and adjust
16518 memory allocations.
16519
16520 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16521 static.
16522 * src/LR0.c (allocate_itemsets): The memory allocated to
16523 `symbol_count' was used for two different purpose: once to count
16524 the number of occurrences of each symbol, and later reassigned to
16525 `shift_symbol', containing the symbol that can be shifted from a
16526 given state.
16527 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16528 only, and...
16529 (new_itemsets): Allocate `shift_symbol' here.
16530 (allocate_itemsets): symbol_count includes useless nonterminals.
16531 Make room for them.
16532 (free_storage): Use `free', not `XFREE', for pointers that cannot
16533 be null.
16534
16535 2001-12-05 Akim Demaille <akim@epita.fr>
16536
16537 * src/nullable.c (set_nullable): Deobfuscate the handling of
16538 ritem.
16539 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16540
16541 2001-12-05 Akim Demaille <akim@epita.fr>
16542
16543 * src/gram.c, src/gram.h (ritem_print): New.
16544 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16545 (This useless function was defined only to work around VMS linkers
16546 that can't handle compilation units with variables only).
16547 * src/reduce.c (dump_grammar): Use it to trace the construction of
16548 ritem.
16549
16550 2001-12-04 Paul Eggert <eggert@twinsun.com>
16551
16552 * src/bison.simple (union yyalloc): Change member names
16553 to be the same as the stack names.
16554 (yyparse): yyptr is now union yyalloc *, not char *.
16555 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16556 and may generate better code on some machines.
16557 (yystpcpy): Use prototype if __STDC__ is defined, not just
16558 if __cplusplus is defined.
16559
16560 2001-11-30 Akim Demaille <akim@epita.fr>
16561
16562 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16563 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16564 Gettext doesn't compile cleanly, and dies with -Werror.
16565 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16566 Include WARNING_CFLAGS here.
16567 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16568 before being defined.
16569
16570 2001-11-27 Paul Eggert <eggert@twinsun.com>
16571
16572 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16573 First arg is int, not unsigned.
16574 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16575 (SIZE_MAX, UINT_MAX): New macros.
16576 (quotearg_n_options): Abort if N is negative.
16577 Avoid overflow check on hosts where size_t is 64 bits and int
16578 is 32 bits, as overflow is impossible there.
16579 Fix off-by-one typo that caused unnecessary reallocation.
16580
16581 2001-11-29 Paul Eggert <eggert@twinsun.com>
16582
16583 Name space cleanup in generated parser.
16584
16585 * doc/bison.texinfo (Bison Parser): Discuss system headers
16586 and their effect on the user name space.
16587
16588 * src/bison.simple:
16589 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16590 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16591 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16592
16593 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16594 on user names when possible.
16595
16596 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16597 Simplify test for whather <alloca.h> exists.
16598
16599 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16600
16601 (<stdio.h>): Include if YYDEBUG.
16602
16603 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16604 ! defined (yyoverflow) && ! defined (yymemcpy).
16605
16606 (yymemcpy, yyparse): Rename local variables as needed so that
16607 they all begin with 'yy'.
16608
16609 (yystrlen, yystpcpy): New functions.
16610
16611 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16612 All uses changed.
16613
16614 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16615 instead of relying on string.h functions. Use YYSTACK_ALLOC
16616 and YYSTACK_FREE instead of malloc and free.
16617
16618 2001-11-30 Akim Demaille <akim@epita.fr>
16619
16620 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16621 before their first uses.
16622 (YYBISON, YYPURE): Move to the top of the output.
16623
16624 2001-11-30 Akim Demaille <akim@epita.fr>
16625
16626 * tests/reduce.at (Useless Nonterminals): Fix.
16627
16628 2001-11-30 Akim Demaille <akim@epita.fr>
16629
16630 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16631 if body instead of `;' to pacify GCC's warnings.
16632
16633 2001-11-30 Akim Demaille <akim@epita.fr>
16634
16635 Instead of mapping the LHS of unused rules to -1, keep the LHS
16636 valid, but flag the rules as invalid.
16637
16638 * src/gram.h (rule_t): `useful' is a new member.
16639 * src/print.c (print_grammar): Adjust.
16640 * src/derives.c (set_derives): Likewise.
16641 * src/reader.c (packgram, reduce_output): Likewise.
16642 * src/reduce.c (reduce_grammar_tables): Likewise.
16643 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16644
16645 2001-11-30 Akim Demaille <akim@epita.fr>
16646
16647 * src/reduce.c (reduce_output): Formatting changes.
16648 * src/print.c (print_results, print_grammar): Likewise.
16649 * tests/regression.at (Rule Line Numbers)
16650 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16651
16652 2001-11-30 Akim Demaille <akim@epita.fr>
16653
16654 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16655 useless nonterminals, move them at the end of the symbol arrays.
16656 (reduce_output): Adjust.
16657 * tests/reduce.at (Useless Nonterminals): Adjust.
16658
16659 2001-11-30 Akim Demaille <akim@epita.fr>
16660
16661 * src/reduce.c: Various comment/formatting changes.
16662 (nonterminals_reduce): New, extracted from...
16663 (reduce_grammar_tables): here.
16664 (reduce_grammar): Call nonterminals_reduce.
16665
16666 2001-11-29 Paul Eggert <eggert@twinsun.com>
16667
16668 * src/bison.simple (YYSTACK_REALLOC): Remove.
16669 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16670 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16671 New macros.
16672 (union yyalloc): New type.
16673 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16674 an arbitrary restriction on hosts where size_t is wider than int.
16675
16676 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16677 a parser stack overflow. Allocate just one block of memory for all
16678 three stacks, instead of allocating three blocks; this typically is
16679 faster and reduces fragmentation.
16680
16681 Do not limit the number of items in the stack to a value that fits
16682 in 'int', as this is an arbitrary limit on hosts with 64-bit
16683 size_t and 32-bit int.
16684
16685 2001-11-29 Marc Autret <autret_m@epita.fr>
16686
16687 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16688 of defining YYERROR_VERBOSE.
16689 [AT_DATA]: $4 is now out of C declarations in the prologue.
16690
16691 2001-11-28 Marc Autret <autret_m@epita.fr>
16692
16693 * src/reader.c (parse_dquoted_param): New.
16694 (parse_skel_decl): Use it.
16695 * src/lex.h: Add its prototype.
16696 * src/lex.c (literalchar): Become not static.
16697
16698 2001-11-28 Marc Autret <autret_m@epita.fr>
16699
16700 * src/output.h: And put its extern declaration here.
16701 * src/output.c (error_verbose): Define here.
16702 (prepare): Echo name modification.
16703 * src/getargs.h: Clean its extern declaration.
16704 * src/getargs.c (error_verbose_flag): Remove.
16705 (getargs): Remove case 'e'.
16706 * src/options.c (option_table): 'error-verbose' is now seen as simple
16707 percent option.
16708 Include output.h.
16709
16710 * src/reader.c (read_declarations): Remove case tok_include.
16711 (parse_include_decl): Remove.
16712 * src/lex.h (token_t): Remove tok_include.
16713 * src/options.c (option_table): 'include' is now a simple command line
16714 option.
16715
16716 2001-11-28 Marc Autret <autret_m@epita.fr>
16717
16718 * src/bison.simple: Adjust muscle names.
16719 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16720 * src/output.c (prepare): s/_/-/ for the muscles names.
16721 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16722
16723 2001-11-28 Marc Autret <autret_m@epita.fr>
16724
16725 * src/bison.simple: Fix debug.
16726 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16727
16728 2001-11-28 Akim Demaille <akim@epita.fr>
16729
16730 * src/LR0.c (shifts_new): New.
16731 (save_shifts, insert_start_shift, augment_automaton): Use it.
16732
16733 2001-11-28 Akim Demaille <akim@epita.fr>
16734
16735 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16736 keep ruleno only.
16737
16738 2001-11-28 Akim Demaille <akim@epita.fr>
16739
16740 * src/closure.c (closure): Instead of looping over word in array
16741 then bits in words, loop over bits in array.
16742
16743 2001-11-28 Akim Demaille <akim@epita.fr>
16744
16745 * src/closure.c (closure): No longer optimize the special case
16746 where all the bits of `ruleset[r]' are set to 0, to make the code
16747 clearer.
16748
16749 2001-11-28 Akim Demaille <akim@epita.fr>
16750
16751 * src/closure.c (closure): `r' and `c' are new variables, used to
16752 de-obfuscate accesses to RULESET and CORE.
16753
16754 2001-11-28 Akim Demaille <akim@epita.fr>
16755
16756 * src/reduce.c (reduce_print): Use ngettext.
16757 (dump_grammar): Improve the trace accuracy.
16758
16759 2001-11-28 Akim Demaille <akim@epita.fr>
16760
16761 * src/reduce.c (dump_grammar): Don't translate trace messages.
16762
16763 2001-11-28 Akim Demaille <akim@epita.fr>
16764
16765 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16766 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16767 as all tags are free'ed afterwards.
16768 From Enrico Scholz.
16769
16770 2001-11-27 Paul Eggert <eggert@twinsun.com>
16771
16772 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16773 use alloca when we didn't want to, and vice versa.
16774
16775 2001-11-27 Marc Autret <autret_m@epita.fr>
16776
16777 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16778 initialization.
16779 * src/output.c (prepare): Remove its update.
16780
16781 2001-11-27 Marc Autret <autret_m@epita.fr>
16782
16783 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16784 Use %error-verbose.
16785
16786 2001-11-27 Marc Autret <autret_m@epita.fr>
16787
16788 * src/bison.simple: Remove YYERROR_VERBOSE using.
16789 Use %%error_verbose.
16790 (yyparse): Likewise.
16791 * src/output.c (prepare): Give its final value.
16792 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16793 * src/getargs.h: Add its extern declaration.
16794 * src/getargs.c (error_verbose_flag): New int.
16795 (getargs): Update to catch new case.
16796 * src/options.c (option_table): 'error-verbose' is a new option.
16797 (shortopts): Update.
16798
16799 2001-11-27 Akim Demaille <akim@epita.fr>
16800
16801 * src/system.h: Use intl/libgettext.h.
16802 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16803
16804 2001-11-27 Akim Demaille <akim@epita.fr>
16805
16806 * tests/torture.at (Exploding the Stack Size with Malloc):
16807 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16808
16809 2001-11-27 Akim Demaille <akim@epita.fr>
16810
16811 * src/files.c: Include error.h.
16812 Reported by Hans Aberg.
16813
16814 2001-11-26 Marc Autret <autret_m@epita.fr>
16815
16816 * src/reader.c (parse_include_decl): New, not yet implemented.
16817 (read_declarations): Add case tok_include.
16818 * src/getargs.h (include): Add its extern definition.
16819 * src/getargs.c (include): New const char *.
16820 (getargs): Add case '-I'.
16821 * src/options.c (option_table): Add include as command line and
16822 percent option.
16823 * src/lex.h (token_t): Add tok_include.
16824
16825 2001-11-26 Akim Demaille <akim@epita.fr>
16826
16827 * src/reader.c (readgram): Make sure rules for mid-rule actions
16828 have a lineno equal to that of their host rule.
16829 Reported by Hans Aberg.
16830 * tests/regression.at (Rule Line Numbers): New.
16831
16832 2001-11-26 Akim Demaille <akim@epita.fr>
16833
16834 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16835 size_ts.
16836
16837 2001-11-26 Akim Demaille <akim@epita.fr>
16838
16839 * src/complain.c, src/complain.h (error): Remove, provided by
16840 lib/error.[ch].
16841
16842 2001-11-26 Akim Demaille <akim@epita.fr>
16843
16844 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16845 issue an error message.
16846 * tests/regression.at (Invalid %directive): New.
16847 Reported by Hans Aberg.
16848
16849 2001-11-26 Akim Demaille <akim@epita.fr>
16850
16851 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16852 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16853
16854 2001-11-26 Akim Demaille <akim@epita.fr>
16855
16856 * src/conflicts.c (conflicts_print): Don't complain at all when
16857 there are no reduce/reduce conflicts, and as many shift/reduce
16858 conflicts as expected.
16859 * tests/regression.at (%expect right): Adjust.
16860
16861 2001-11-23 Akim Demaille <akim@epita.fr>
16862
16863 * lib/alloca.c: Update, from fileutils.
16864
16865 2001-11-23 Akim Demaille <akim@epita.fr>
16866
16867 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16868
16869 2001-11-23 Akim Demaille <akim@epita.fr>
16870
16871 * src/system.h: Include alloca.h.
16872 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16873
16874 2001-11-23 Akim Demaille <akim@epita.fr>
16875
16876 * src/print_graph.c (print_actions): Remove `rule', unused.
16877 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16878 pacify GCC's signed < unsigned warnings.
16879 * src/closure.c (itemsetsize): Likewise.
16880 * src/reader.c (symbol_list_new): Static.
16881
16882 2001-11-23 Akim Demaille <akim@epita.fr>
16883
16884 Attaching lineno to buckets is stupid, since only one copy of each
16885 symbol is kept, only the line of the first occurrence is kept too.
16886
16887 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16888 * src/reader.c (rline_allocated): Remove, unused.
16889 (symbol_list): Have a `line' member.
16890 (symbol_list_new): New.
16891 (readgram): Use it.
16892 * src/print.c (print_grammar): Output the rule line numbers.
16893 * tests/regression.at (Solved SR Conflicts)
16894 (Unresolved SR Conflicts): Adjust.
16895 Reported by Hans Aberg.
16896
16897 2001-11-22 Marc Autret <autret_m@epita.fr>
16898
16899 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16900
16901 2001-11-22 Marc Autret <autret_m@epita.fr>
16902
16903 * src/muscle_tab.c (muscle_init): Remove initialization of
16904 skeleton muscle.
16905 * src/output.c (output_master_parser): Do it here.
16906
16907 2001-11-20 Akim Demaille <akim@epita.fr>
16908
16909 * po/sv.po: New.
16910 * configure.in (ALL_LINGUAS): Adjust.
16911 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16912 longer contains strings to translate.
16913
16914 2001-11-19 Akim Demaille <akim@epita.fr>
16915
16916 * src/conflicts.c (conflicts_print): Add a missing \n.
16917
16918 2001-11-19 Akim Demaille <akim@epita.fr>
16919
16920 * src/nullable.c (nullable_print): New.
16921 (set_nullable): Call it when tracing.
16922 Better locality of variables.
16923
16924 2001-11-19 Akim Demaille <akim@epita.fr>
16925
16926 * src/print.c (print_actions): Better locality of variables.
16927
16928 2001-11-19 Akim Demaille <akim@epita.fr>
16929
16930 * src/derives.c (print_derives): Fix and enrich.
16931 * src/closure.c (print_fderives): Likewise.
16932
16933 2001-11-19 Akim Demaille <akim@epita.fr>
16934
16935 * src/closure.c (itemsetend): Remove, replaced with...
16936 (itemsetsize): new.
16937
16938 2001-11-19 Akim Demaille <akim@epita.fr>
16939
16940 * src/LR0.c (kernel_end): Remove, replaced with...
16941 (kernel_size): new.
16942
16943 2001-11-19 Akim Demaille <akim@epita.fr>
16944
16945 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16946 to clarify.
16947
16948 2001-11-19 Akim Demaille <akim@epita.fr>
16949
16950 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16951
16952 2001-11-19 Akim Demaille <akim@epita.fr>
16953
16954 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16955 trace messages.
16956 * src/LR0.c: Likewise.
16957 (allocate_itemsets): Use arrays instead of pointers to clarify.
16958
16959 2001-11-19 Akim Demaille <akim@epita.fr>
16960
16961 * src/getargs.c (statistics_flag): Replace with...
16962 (trace_flag): New.
16963 (longopts): Accept --trace instead of --statistics.
16964 * src/getargs.h, src/options.c: Adjust.
16965 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16966 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16967
16968 2001-11-19 Akim Demaille <akim@epita.fr>
16969
16970 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16971 pointers to clarify the code.
16972 (save_reductions, save_shifts): Factor common parts of alternatives.
16973
16974 2001-11-19 Akim Demaille <akim@epita.fr>
16975
16976 * src/LR0.c (new_state, get_state): Complete TRACE code.
16977 * src/closure.c: Include `reader.h' to get `tags', needed by the
16978 trace code.
16979 Rename the conditional DEBUG as TRACE.
16980 Output consistently TRACEs to stderr, not stdout.
16981 * src/derives.c: Likewise.
16982 * src/reduce.c: (inaccessable_symbols): Using if is better style
16983 than goto.
16984 Use `#if TRACE' instead of `#if 0' for tracing code.
16985
16986 2001-11-19 Akim Demaille <akim@epita.fr>
16987
16988 * src/system.h (LIST_FREE, shortcpy): New.
16989 * src/LR0.c: Use them.
16990 * src/output.c (free_itemsets, free_reductions, free_shifts):
16991 Remove, replaced by LIST_FREE.
16992
16993 2001-11-19 Akim Demaille <akim@epita.fr>
16994
16995 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16996 (REDUCTIONS_ALLOC): New.
16997 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16998 allocation.
16999
17000 2001-11-19 Akim Demaille <akim@epita.fr>
17001
17002 * src/LR0.c (new_state): Complete trace code.
17003 * src/nullable.c (set_nullable): Don't translate traces.
17004
17005 2001-11-19 Akim Demaille <akim@epita.fr>
17006
17007 * src/print_graph.c (print_core): Better locality of variables.
17008 * src/print.c (print_core): Likewise.
17009
17010 2001-11-19 Akim Demaille <akim@epita.fr>
17011
17012 * src/vcg.c: You do the output, so you are responsible of the
17013 handling of VCG syntax, in particular: use quotearg.
17014 * src/print_graph.c: Don't.
17015 (print_actions): Don't output the actions as part of the nodes,
17016 since that's the job of the edges.
17017 (print_state): Don't output by hand: fill the node description,
17018 and ask for its output.
17019
17020 2001-11-19 Akim Demaille <akim@epita.fr>
17021
17022 * src/bison.simple (yyparse): When verbosely reporting an error,
17023 no longer put additional quotes around token names.
17024 * tests/calc.at: Adjust.
17025
17026 2001-11-19 Akim Demaille <akim@epita.fr>
17027
17028 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17029 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17030 * src/output.c: Adjust.
17031
17032 2001-11-19 Akim Demaille <akim@epita.fr>
17033
17034 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17035 (rule_t): this.
17036 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17037
17038 2001-11-19 Akim Demaille <akim@epita.fr>
17039
17040 * src/gram.h (rule_t): New.
17041 (rule_table): New.
17042 (rrhs, rlhs): Remove, part of state_t.
17043 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17044 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17045 * src/reader.c, src/reduce.c: Adjust.
17046
17047 2001-11-19 Akim Demaille <akim@epita.fr>
17048
17049 * src/reader.c (symbols_output): New, extracted from...
17050 (packsymbols): Here.
17051 (reader): Call it.
17052
17053 2001-11-19 Akim Demaille <akim@epita.fr>
17054
17055 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17056 (maxrhs): this new function.
17057
17058 2001-11-19 Akim Demaille <akim@epita.fr>
17059
17060 * src/lalr.c (F): New macro to access the variable F.
17061 Adjust.
17062
17063 2001-11-19 Akim Demaille <akim@epita.fr>
17064
17065 * src/lalr.h (LA): New macro to access the variable LA.
17066 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17067 * src/lalr.c: Adjust.
17068
17069 2001-11-19 Akim Demaille <akim@epita.fr>
17070
17071 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17072 (set_state_table): handle the `lookaheads' members.
17073
17074 2001-11-19 Akim Demaille <akim@epita.fr>
17075
17076 * src/lalr.h (lookaheads): Removed array, whose contents is now
17077 a member of...
17078 (state_t): this structure.
17079 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17080 Adjust.
17081
17082 2001-11-19 Akim Demaille <akim@epita.fr>
17083
17084 * src/lalr.h (consistent): Removed array, whose contents is now
17085 a member of...
17086 (state_t): this structure.
17087 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17088 Adjust.
17089
17090 2001-11-19 Akim Demaille <akim@epita.fr>
17091
17092 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17093 contents are now members of...
17094 (state_t): this structure.
17095 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17096 Adjust.
17097
17098 2001-11-19 Akim Demaille <akim@epita.fr>
17099
17100 * src/lalr.h (state_t): New.
17101 (state_table): Be a state_t * instead of a core **.
17102 (accessing_symbol): Remove, part of state_t.
17103 * src/lalr.c: Adjust.
17104 (set_accessing_symbol): Merge into...
17105 (set_state_table): this.
17106 * src/print_graph.c, src/conflicts.c: Adjust.
17107
17108 2001-11-14 Akim Demaille <akim@epita.fr>
17109
17110 * tests/calc.at, tests/output.at, tests/regression.at,
17111 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17112 now the tests are run in private dirs, therefore AC_CLEANUP and
17113 family can be simplified to 0-ary.
17114 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17115 use abs. path to find config.h.
17116 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17117 stderr, there can be way too much random noise.
17118 Instead pass -Werror to GCC and rely on the exit status.
17119 Reported by Wolfram Wagner.
17120
17121 2001-11-14 Akim Demaille <akim@epita.fr>
17122
17123 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17124 defined only if yyoverflow is defined, to avoid `warning: unused
17125 variable `yyvs1''.
17126 Reported by The Test Suite.
17127
17128 2001-11-14 Akim Demaille <akim@epita.fr>
17129
17130 * src/print.c: Include reduce.h.
17131 Reported by Hans Aberg.
17132
17133 2001-11-14 Akim Demaille <akim@epita.fr>
17134
17135 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17136 Revert a previous patch: these are really const.
17137 * src/conflicts.c (conflict_report): Additional useless pair of
17138 braces to pacify GCC's warnings for `if () if () {} else {}'.
17139 * src/lex.c (parse_percent_token): Replace equal_offset with
17140 arg_offset.
17141 arg is const.
17142 Be sure to strdup `arg' when used, since there is no reason for
17143 token_buffer not to change.
17144
17145 2001-11-14 Akim Demaille <akim@epita.fr>
17146
17147 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17148 definition.
17149 * src/main.c (main): Use them.
17150 Suggested by Hans Aberg.
17151
17152 2001-11-12 Akim Demaille <akim@epita.fr>
17153
17154 * src/system.h (ngettext): Now that we use ngettext, be sure to
17155 provide a default definition when NLS are not used.
17156
17157 2001-11-12 Akim Demaille <akim@epita.fr>
17158
17159 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17160 Use @kbd to denote user input.
17161 (Language and Grammar): ANSIfy the example.
17162 Adjust its layout for info/notinfo.
17163 (Location Tracking Calc): Output error messages to stderr.
17164 Output locations in a more GNUtically correct way.
17165 Fix a couple of Englishos.
17166 Adjust @group/@end group pairs.
17167
17168 2001-11-12 Akim Demaille <akim@epita.fr>
17169
17170 %expect was not functioning at all.
17171
17172 * src/conflicts.c (expected_conflicts): Set to -1.
17173 (conflict_report): Use ngettext.
17174 (conflicts_print): Check %expect and make its violation an error.
17175 * doc/bison.texinfo (Expect Decl): Adjust.
17176 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17177 * tests/regression.at (%expect not enough, %expect right)
17178 (%expect too much): New.
17179
17180 2001-11-12 Akim Demaille <akim@epita.fr>
17181
17182 * tests/regression.at (Conflicts): Rename as...
17183 (Unresolved SR Conflicts): this.
17184 (Solved SR Conflicts): New.
17185
17186 2001-11-12 Akim Demaille <akim@epita.fr>
17187
17188 * src/reduce.c (print_results): Rename as...
17189 (reduce_output): This.
17190 Output to OUT, passed as argument, instead of output_obstack.
17191 (dump_grammar): Likewise.
17192 (reduce_free): New.
17193 Also free V1.
17194 (reduce_grammar): No longer call reduce_output, since...
17195 * src/print.c (print_results): do it.
17196 * src/main.c (main): Call reduce_free;
17197
17198 2001-11-12 Akim Demaille <akim@epita.fr>
17199
17200 * src/conflicts.c (print_reductions): Accept OUT as argument.
17201 Output to it, not to output_obstack.
17202 * src/print.c (print_actions): Adjust.
17203
17204 2001-11-12 Akim Demaille <akim@epita.fr>
17205
17206 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17207 the result instead of using...
17208 (src_total, rrc_total, src_count, rrc_count): Remove.
17209 (any_conflicts): Remove.
17210 (print_conflicts): Split into...
17211 (conflicts_print, conflicts_output): New.
17212 * src/conflicts.h: Adjust.
17213 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
17214 * src/print.c (print_grammar): Issue `\n' between two rules.
17215 * tests/regression.at (Conflicts): New.
17216 Reported by Tom Lane.
17217
17218 2001-11-12 Akim Demaille <akim@epita.fr>
17219
17220 * tests/regression.at (Invalid input): Remove, duplicate with
17221 ``Invalid input: 1''.
17222
17223 2001-11-12 Akim Demaille <akim@epita.fr>
17224
17225 * tests/torture.at (AT_DATA_STACK_TORTURE)
17226 (Exploding the Stack Size with Alloca)
17227 (Exploding the Stack Size with Malloc): New.
17228
17229 2001-11-12 Akim Demaille <akim@epita.fr>
17230
17231 * src/bison.simple (YYSTACK_REALLOC): New.
17232 (yyparse) [!yyoverflow]: Use it and free the old stack.
17233 Reported by Per Allansson.
17234
17235 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
17236
17237 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17238 define CPP macro, which substitute YYSTYPE by yystype.
17239 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17240 with yyltype/YYLTYPE. This allows inclusion of the generated
17241 header within the parser if the compiler, such as GGC, accepts
17242 multiple equivalent #defines.
17243 From Akim.
17244
17245 2001-11-05 Akim Demaille <akim@epita.fr>
17246
17247 * src/reader.c (symbols_output): New, extracted from...
17248 (packsymbols): here.
17249 (reader): Adjust.
17250
17251 2001-11-05 Akim Demaille <akim@epita.fr>
17252
17253 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17254
17255 2001-11-05 Akim Demaille <akim@epita.fr>
17256
17257 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17258 pattern.
17259
17260 2001-11-05 Akim Demaille <akim@epita.fr>
17261
17262 * src/options.h (struct option_table_struct): set_flags is void*.
17263 * src/options.c (longopts): Support `--output' and `%output'.
17264 (usage): Adjust.
17265 * src/lex.h (tok_setopt): Remove, replaced with...
17266 (tok_intopt, tok_stropt): these new guys.
17267 * src/lex.c (getopt.h): Not needed.
17268 (token_buffer, unlexed_token_buffer): Not const.
17269 (percent_table): Promote `-' over `_' in directive names.
17270 Active `%name-prefix', `file-prefix', and `output'.
17271 (parse_percent_token): Accept possible arguments to directives.
17272 Promote `-' over `_' in directive names.
17273
17274 2001-11-04 Akim Demaille <akim@epita.fr>
17275
17276 * doc/bison.texinfo (Decl Summary): Split the list into
17277 `directives for grammars' and `directives for bison'.
17278 Sort'em.
17279 Add description of `%name-prefix', `file-prefix', and `output'.
17280 Promote `-' over `_' in directive names.
17281 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17282 Simplify the description of `--name-prefix'.
17283 Promote `-' over `_' in directive names.
17284 Promote `--output' over `--output-file'.
17285 Fix the description of `--defines'.
17286 * tests/output.at: Exercise %file-prefix and %output.
17287
17288 2001-11-02 Akim Demaille <akim@epita.fr>
17289
17290 * doc/refcard.tex: Update.
17291
17292 2001-11-02 Akim Demaille <akim@epita.fr>
17293
17294 * src/symtab.h (SUNDEF): New.
17295 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17296 stand for `uninitialized', instead of 0.
17297 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17298 * src/lex.c (lex): Adjust.
17299
17300 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17301 Number it 0.
17302 Let yylex return it instead of a plain 0.
17303 Reported by Dick Streefland.
17304
17305 2001-11-02 Akim Demaille <akim@epita.fr>
17306
17307 * tests/regression.at (Mixing %token styles): New test.
17308
17309 2001-11-02 Akim Demaille <akim@epita.fr>
17310
17311 * src/reader.c (parse_thong_decl): Formatting changes.
17312 (token_translations_init): New, extracted from...
17313 (packsymbols): Here.
17314 Adjust.
17315
17316 2001-11-01 Akim Demaille <akim@epita.fr>
17317
17318 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17319 Check that `9foo.y' produces correct cpp guards.
17320 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17321 guards.
17322 Reported by Wwp.
17323
17324 2001-11-01 Akim Demaille <akim@epita.fr>
17325
17326 * tests/regression.at (Invalid input: 2): New.
17327 * src/lex.c (unlexed_token_buffer): New.
17328 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17329 too.
17330 Reported by Wwp.
17331
17332 2001-11-01 Akim Demaille <akim@epita.fr>
17333
17334 * tests/calc.at: Catch up with 1.30.
17335 * configure.in: Bump to 1.49a.
17336 Adjust to newer Autotest.
17337
17338 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
17339
17340 * src/conflicts.c: Move global variables rrc_total and src_total ...
17341 (print_conflicts): here.
17342 * src/output.c (output): Free global variable user_toknums.
17343 * src/lex.c (token_obstack): Become static.
17344
17345 2001-10-18 Akim Demaille <akim@epita.fr>
17346
17347 * tests/atlocal.in (GCC): Add.
17348 * tests/calc.at: s/m4_match/m4_bmatch/.
17349 s/m4_patsubst/m4_bpatsubst/.
17350 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17351 * configure.in: AC_SUBST(GCC).
17352
17353 2001-10-14 Marc Autret <autret_m@epita.fr>
17354
17355 * src/options.c (create_long_option_table): Fix.
17356
17357 2001-10-10 Akim Demaille <akim@epita.fr>
17358
17359 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17360
17361 2001-10-04 Akim Demaille <akim@epita.fr>
17362
17363 * src/reader.c (parse_union_decl): Push the caracters in
17364 union_obstack, not attrs_obstack.
17365
17366 2001-10-04 Akim Demaille <akim@epita.fr>
17367
17368 Merge in the branch 1.29.
17369
17370 * src/reader.c (packsymbols): Use a temporary obstack for
17371 `%%tokendef', since output_stack is already used elsewhere.
17372
17373 2001-10-02 Akim Demaille <akim@epita.fr>
17374
17375 Bump 1.29d.
17376
17377 2001-10-02 Akim Demaille <akim@epita.fr>
17378
17379 Version 1.29c.
17380
17381 2001-10-02 Akim Demaille <akim@epita.fr>
17382
17383 * tests/regression.at (Invalid CPP headers): New.
17384 From Alexander Belopolsky.
17385 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17386
17387 2001-10-02 Akim Demaille <akim@epita.fr>
17388
17389 * tests/regression.at (Invalid input): New.
17390 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17391 Reported by Shura.
17392
17393 2001-10-02 Akim Demaille <akim@epita.fr>
17394
17395 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17396
17397 2001-10-02 Akim Demaille <akim@epita.fr>
17398
17399 * src/output.c (output_parser): Assert `skeleton'.
17400 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17401 systems.
17402 From Shura.
17403
17404 2001-10-01 Marc Autret <autret_m@epita.fr>
17405
17406 * src/lex.h: Echo modifications.
17407 * src/lex.c (unlex): Parameter is now token_t.
17408 From Hans Aberg.
17409
17410 2001-10-01 Marc Autret <autret_m@epita.fr>
17411
17412 * src/main.c: Include lex.h.
17413 From Hans Aberg.
17414
17415 2001-09-29 Akim Demaille <akim@epita.fr>
17416
17417 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17418
17419 2001-09-28 Akim Demaille <akim@epita.fr>
17420
17421 * tests/testsuite.at: Update to newer Autotest.
17422 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17423
17424 2001-09-27 Akim Demaille <akim@epita.fr>
17425
17426 Position independent wrapper.
17427
17428 * tests/bison: Remove.
17429 * tests/bison.in: New.
17430 * configure.in: Adjust.
17431
17432 2001-09-27 Paul Eggert <eggert@twinsun.com>
17433
17434 Port quotearg fixes from tar 1.13.24.
17435
17436 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17437 tm to be declared.
17438 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17439 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17440
17441 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17442 * m4/mbrtowc.m4: New file.
17443 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17444 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17445
17446 2001-09-27 Akim Demaille <akim@epita.fr>
17447
17448 Bump to 1.29c.
17449
17450 2001-09-27 Akim Demaille <akim@epita.fr>
17451
17452 Version 1.29b.
17453
17454 2001-09-25 Akim Demaille <akim@epita.fr>
17455
17456 * src/system.h: Include `xalloc.h'.
17457 Remove it from the C files.
17458 * src/files.c (output_files): Free the obstacks.
17459 * src/lex.c (init_lex): Rename as...
17460 (lex_init): this.
17461 (lex_free): New.
17462 * src/main.c (main): Use it.
17463
17464 2001-09-24 Marc Autret <autret_m@epita.fr>
17465
17466 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17467 to output informations in fout (FILE*).
17468 (open_graph, close_graph): Likewise.
17469 (output_graph, output_edge, output_node): Likewise.
17470 * src/vcg.h: Update function prototypes.
17471 * src/print_graph.c (print_graph): Open output graph file.
17472 (print_actions): Adjust.
17473 * src/files.h: Remove extern declaration.
17474 * src/files.c: Remove graph_obstack declaration.
17475 (open_files): Remove graph_obstack initialization.
17476 (output_files): Remove graph_obstack saving.
17477
17478 2001-09-24 Marc Autret <autret_m@epita.fr>
17479
17480 * src/files.c (compute_output_file_names): Fix.
17481
17482 2001-09-24 Marc Autret <autret_m@epita.fr>,
17483 Akim Demaille <akim@epita.fr>
17484
17485 * src/reader.c (reader): Remove call to free_symtab ().
17486 * src/main.c (main): Call it here.
17487 Include symtab.h.
17488 * src/conflicts.c (initialize_conflicts): Rename as...
17489 (solve_conflicts): this.
17490 * src/print.c (print_core, print_actions, print_state)
17491 (print_grammar): Dump to a file instead a `output_obstack'.
17492 (print_results): Dump `output_obstack', and then proceed with the
17493 FILE *.
17494 * src/files.c (compute_output_file_names, close_files): New.
17495 (output_files): Adjust.
17496 * src/main.c (main): Adjust.
17497
17498 2001-09-23 Marc Autret <autret_m@epita.fr>
17499
17500 * src/files.c (compute_header_macro): Computes header macro name
17501 from spec_defines_file when given.
17502
17503 2001-09-23 Marc Autret <autret_m@epita.fr>
17504
17505 * src/files.c (output_files): Add default extensions.
17506
17507 2001-09-22 Akim Demaille <akim@epita.fr>
17508
17509 * src/conflicts.c (finalize_conflicts): Rename as...
17510 (free_conflicts): this.
17511
17512 2001-09-22 Akim Demaille <akim@epita.fr>
17513
17514 * src/gram.c (gram_free): Rename back as...
17515 (dummy): this.
17516 (output_token_translations): Free `token_translations'.
17517 * src/symtab.c (free_symtab): Free the tag field.
17518
17519 2001-09-22 Akim Demaille <akim@epita.fr>
17520
17521 Remove `translations' as it is always set to true.
17522
17523 * src/gram.h: Adjust.
17524 * src/reader.c (packsymbols, parse_token_decl): Adjust
17525 * src/print.c (print_grammar): Adjust.
17526 * src/output.c (output_token_translations): Adjust.
17527 * src/lex.c (lex): Adjust.
17528 * src/gram.c: Be sure the set pointers to NULL.
17529 (dummy): Rename as...
17530 (gram_free): this.
17531
17532 2001-09-22 Akim Demaille <akim@epita.fr>
17533
17534 * configure.in: Invoke AM_LIB_DMALLOC.
17535 * src/system.h: Use dmalloc.
17536 * src/LR0.c: Be sure to have pointers initialized to NULL.
17537 (allocate_itemsets): Allocate kernel_items only if needed.
17538
17539 2001-09-22 Akim Demaille <akim@epita.fr>
17540
17541 * configure.in: Bump to 1.29b.
17542 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17543 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17544 need xmalloc.c in calc.y.
17545 From Pascal Bart.
17546
17547 2001-09-21 Akim Demaille <akim@epita.fr>
17548
17549 Version 1.29a.
17550 * Makefile.maint, config/config.guess, config/config.sub,
17551 * config/missing: Update from masters.
17552 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17553 upon package.m4.
17554 * configure.in (ALL_LINGUAS): Add `tr'.
17555
17556 2001-09-21 Akim Demaille <akim@epita.fr>
17557
17558 * tests/Makefile.am (package.m4): Move to...
17559 ($(srcdir)/$(TESTSUITE)): here.
17560
17561 2001-09-20 Akim Demaille <akim@epita.fr>
17562
17563 * src/complain.c: No longer try to be standalone: use system.h.
17564 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17565 * src/complain.h: Likewise.
17566 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17567 Remove the unused variable `n'.
17568 From Albert Chin-A-Young.
17569
17570 2001-09-18 Marc Autret <autret_m@epita.fr>
17571
17572 * doc/bison.1: Update.
17573 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17574 descriptions.
17575 (Option Cross Key): Update.
17576 Add --graph.
17577
17578 2001-09-18 Marc Autret <autret_m@epita.fr>
17579
17580 * tests/regression.at: New test (comment in %union).
17581
17582 2001-09-18 Marc Autret <autret_m@epita.fr>
17583
17584 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17585 do that.
17586 Reported by Keith Browne.
17587
17588 2001-09-18 Marc Autret <autret_m@epita.fr>
17589
17590 * tests/output.at: Add tests for --defines and --graph.
17591
17592 2001-09-18 Marc Autret <autret_m@epita.fr>
17593
17594 * tests/output.at: Removes tests of %{header,src}_extension features.
17595
17596 2001-09-18 Akim Demaille <akim@epita.fr>
17597
17598 * tests/Makefile.am (package.m4): New.
17599 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17600 (_AT_CHECK_CALC_ERROR): Likewise.
17601 Factor the `, ' part of verbose error messages.
17602
17603 2001-09-18 Marc Autret <autret_m@epita.fr>
17604
17605 * src/getargs.c (longopts): Declare --defines and --graph as options
17606 with optional arguments.
17607 * src/files.h: Add extern declarations.
17608 * src/files.c (spec_graph_file, spec_defines_file): New.
17609 (output_files): Update.
17610 Remove CPP-outed code.
17611
17612 2001-09-18 Marc Autret <autret_m@epita.fr>
17613
17614 Turn off %{source,header}_extension feature.
17615
17616 * src/files.c (compute_exts_from_gf): Update.
17617 (compute_exts_from_src): Update.
17618 (output_files): CPP-out useless code.
17619 * src/files.h: Remove {header,source}_extension extern declarations.
17620 * src/reader.c (parse_dquoted_param): CPP-out.
17621 (parse_header_extension_decl): Remove.
17622 (parse_source_extension_decl): Remove.
17623 (read_declarations): Remove cases tok_{hdrext,srcext}.
17624 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17625 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17626
17627 2001-09-10 Akim Demaille <akim@epita.fr>
17628
17629 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17630 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17631 (AT_CHECK_OUTPUT): this.
17632 Merely check ls' exit status, its output is useless.
17633
17634 2001-09-10 Akim Demaille <akim@epita.fr>
17635
17636 * tests/calc.at: Use m4_match.
17637 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17638
17639 2001-09-10 Marc Autret <autret_m@epita.fr>,
17640 Akim Demaille <akim@epita.fr>
17641
17642 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17643 enum color_e.
17644 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17645 to `normal'.
17646 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17647 * src/lex.h: Adjust prototype.
17648 (token_t): Add `tok_undef'.
17649 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17650 (parse_percent_token): Now returns token_t.
17651 Add default statement in switch.
17652 (lex): Separate `c' as an input variable, from the token_t result
17653 part.
17654 (unlexed): Is a token_t.
17655
17656 2001-09-10 Akim Demaille <akim@epita.fr>
17657
17658 * configure.in: Bump to 1.29a.
17659
17660 2001-09-07 Akim Demaille <akim@epita.fr>
17661
17662 Version 1.29.
17663
17664 2001-08-30 Akim Demaille <akim@epita.fr>
17665
17666 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17667 * m4/atconfig.m4: Remove.
17668 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17669 * tests/bison: New.
17670 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17671 m4_if, m4_patsubst, and m4_regexp.
17672 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17673 `input' file instead of echo.
17674
17675 2001-08-29 Akim Demaille <akim@epita.fr>
17676
17677 Bump to 1.28e.
17678
17679 2001-08-29 Akim Demaille <akim@epita.fr>
17680
17681 Version 1.28d.
17682
17683 2001-08-29 Paul Eggert <eggert@twinsun.com>
17684
17685 * src/bison.simple (yyparse): Don't take the address of an
17686 item before the start of an array, as that doesn't conform to
17687 the C Standard.
17688
17689 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17690
17691 * doc/bison.texinfo (Location Tracking Calc): New node.
17692
17693 2001-08-29 Paul Eggert <eggert@twinsun.com>
17694
17695 * src/output.c (output): Do not define const, as this now
17696 causes more problems than it cures.
17697
17698 2001-08-29 Akim Demaille <akim@epita.fr>
17699
17700 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17701 the nodes.
17702 Be sure to tag the `detailmenu'.
17703
17704 2001-08-29 Akim Demaille <akim@epita.fr>
17705
17706 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17707 download in a tmp dir.
17708
17709 2001-08-28 Marc Autret <autret_m@epita.fr>
17710
17711 * config/depcomp: New file.
17712
17713 2001-08-28 Marc Autret <autret_m@epita.fr>
17714
17715 * doc/bison.1 (mandoc): Adjust.
17716 From Juan Manuel Guerrero.
17717
17718 2001-08-28 Marc Autret <autret_m@epita.fr>
17719
17720 * src/print_graph.c (print_state): Fix.
17721
17722 2001-08-27 Marc Autret <autret_m@epita.fr>
17723
17724 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17725 char * members.
17726 Echo modifications to the functions prototypes.
17727 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17728
17729 2001-08-27 Marc Autret <autret_m@epita.fr>
17730
17731 * src/vcg.c: Include `xalloc.h'.
17732 (add_colorentry): New.
17733 (add_classname): New.
17734 (add_infoname): New.
17735 * src/vcg.h: Add new prototypes.
17736
17737 2001-08-27 Akim Demaille <akim@epita.fr>
17738
17739 * Makefile.maint: Sync. again with CVS Autoconf.
17740
17741 2001-08-27 Akim Demaille <akim@epita.fr>
17742
17743 * Makefile.maint: Formatting changes.
17744 (po-update, cvs-update, update): New targets.
17745 (AMTAR): Remove.
17746
17747 2001-08-27 Akim Demaille <akim@epita.fr>
17748
17749 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17750 * Makefile.maint: Sync. with CVS Autoconf.
17751
17752 2001-08-27 Marc Autret <autret_m@epita.fr>
17753
17754 * src/vcg.h (struct infoname_s): New.
17755 (struct colorentry_s): New.
17756 (graph_s): New fields {vertical,horizontal}_order in structure.
17757 Add `infoname' field.
17758 Add `colorentry' field;
17759 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17760 (G_HORIZONTAL_ORDER): New.
17761 (G_INFONAME): New.
17762 (G_COLORENTRY): New.
17763 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17764 Add output of `infoname'.
17765 Add output of `colorentry'.
17766
17767 2001-08-27 Marc Autret <autret_m@epita.fr>
17768
17769 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17770 This one shadowed a global parameter.
17771
17772 2001-08-24 Marc Autret <autret_m@epita.fr>
17773
17774 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17775 instead of `unsigned'.
17776 (print_state): Do not call obstack_object_size () in obstack_grow ()
17777 to avoid macro variables shadowing.
17778
17779 2001-08-23 Marc Autret <autret_m@epita.fr>
17780
17781 * src/lex.c (percent_table): Typo: s/naem/name/.
17782 Add graph option.
17783 Normalize new options declarations.
17784
17785 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17786
17787 * tests/suite.at: Exercise %header_extension and %source_extension.
17788
17789 2001-08-16 Marc Autret <autret_m@epita.fr>
17790
17791 * src/reader.c (parse_dquoted_param): New.
17792 (parse_header_extension_decl): Use it.
17793 (parse_source_extension_decl): Likewise.
17794
17795 2001-08-16 Marc Autret <autret_m@epita.fr>
17796
17797 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17798 (get_xxxx_str): Use assert () instead of complain ().
17799 Remove return invokations in default cases.
17800 (get_decision_str): Modify default behaviour. Remove second argument.
17801 Echo modifications on calls.
17802 (output_graph): Fix.
17803
17804 2001-08-16 Marc Autret <autret_m@epita.fr>
17805
17806 * src/getargs.c (usage): Update with ``-g, --graph''.
17807
17808 2001-08-16 Marc Autret <autret_m@epita.fr>
17809
17810 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17811 (Option Cross Key): Likewise.
17812 * doc/bison.1: Update.
17813
17814 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
17815
17816 * src/output.c (output_master_parser): Don't finish action_obstack.
17817 (output_parser): Don't care about the muscle action, here.
17818 (prepare): Copy the action_obstack in the action muscle.
17819 (output): Free action_obstack.
17820
17821 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17822
17823 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17824 will contain `%union' declaration.
17825 (parse_union_decl): Delete #line directive output.
17826 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17827 informations about %union.
17828 (parse_union_decl): Copy the union_obstack in the muscle stype.
17829 * src/bison.simple: Add new #line directive.
17830 Add typdef %%stype YYSTYPE.
17831
17832 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17833
17834 * src/bison.simple: Add new `#line' directive.
17835
17836 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
17837
17838 * src/bison.simple: New `#line' directive.
17839 * src/output.c (output_parser): Support new dynamic muscle input_line.
17840
17841 2001-09-22 Marc Autret <autret_m@epita.fr>
17842
17843 * src/output.c (output_master_parser): New.
17844 (output_parser): Be more re-entrant.
17845
17846 2001-09-21 Marc Autret <autret_m@epita.fr>
17847
17848 * src/reader.c (copy_definition, parse_union_decl): Update and use
17849 `linef' muscle.
17850 (copy_action): Likewise.
17851 Use obstack_1grow ().
17852 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17853
17854 2001-09-21 Marc Autret <autret_m@epita.fr>
17855
17856 * src/options.c (option_table): Adjust.
17857 * src/lex.c (parse_percent_token): Fix.
17858
17859 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17860
17861 * src/options.c (symtab.h): Include it, need by lex.h.
17862
17863 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17864
17865 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17866 is now an option_table_struct*.
17867 (option_strcmp): New function option_strcmp.
17868 (parse_percent_token): Call option_strcmp.
17869 * src/getargs.c (xalloc.h, options.h): Include it.
17870 (getargs): Call create_long_option_table.
17871 (getargs): Free longopts at the end of the function.
17872 (shortopts): Move in options.c.
17873 * src/options.c (create_long_option_table): New function. Convert
17874 information from option_table to option structure.
17875 * src/reader.c (options.h): Include it.
17876
17877 * src/Makefile.am: Adjust.
17878 * src/options.c (option_table): Create from longopts and percent_table.
17879 * src/getargs.c (longopts): Delete.
17880 * src/lex.c (struct percent_table_struct): Delete.
17881 (percent_table): Delete.
17882 (options.h): Include it.
17883 * src/options.c: Create.
17884 * src/options.h: Create.
17885 Declare enum opt_access_e.
17886 Define struct option_table_struct.
17887
17888 2001-09-20 Marc Autret <autret_m@epita.fr>
17889
17890 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17891 sections of Bison.
17892
17893 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
17894
17895 * src/bison.simple: s/%%filename/%%skeleton.
17896 * src/muscle_tab.c (getargs.h): Include it.
17897 (muscle_init): Insert new muscle skeleton.
17898
17899 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
17900
17901 * src/output.c (output_parser): Delete unused variable actions_dumped.
17902
17903 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
17904
17905 * src/output.c (output): Delete call to reader_output_yylsp.
17906 * src/reader.c (reader): Likewise.
17907 * src/reader.h: Delete declaration of reader_output_yylsp.
17908
17909 2001-09-02 Marc Autret <autret_m@epita.fr>
17910
17911 * src/reader.c: Include muscle_tab.h.
17912 (parse_union_decl): Update.
17913 (parse_macro_decl): Rename parse_muscle_decl.
17914 Update to use renamed functions and variable.
17915 (read_declarations, copy_action, read_additionnal_code, : Updated
17916 with correct variables and functions names.
17917 (packsymbols, reader): Likewise.
17918
17919 * src/reader.h (muscle_obstack): Extern declaration update.
17920
17921 * src/output.c: Include muscle_tab.h
17922 In all functions using macro_insert, change by using muscle_insert ().
17923 (macro_obstack): Rename muscle_obstack.
17924 Echo modifications in the whole file.
17925 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17926 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17927 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17928
17929 * src/muscle_tab.h: Update double inclusion macros.
17930 (macro_entry_s): Rename muscle_entry_s.
17931 Update prototypes.
17932
17933 * src/muscle_tab.c: Include muscle_tab.h.
17934 Rename macro_tabble to muscle_table.
17935 (mhash1, mhash2, mcmp): Use muscle_entry.
17936 (macro_init): Rename muscle_init. Update.
17937 (macro_insert): Rename muscle_insert. Update.
17938 (macro_find): Rename muscle_find. Update.
17939
17940 * src/main.c: Include muscle_tab.h.
17941 (main): Call muscle_init ().
17942 * src/Makefile.am (bison_SOURCES): Echo modifications.
17943
17944 2001-09-02 Marc Autret <autret_m@epita.fr>
17945
17946 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17947
17948 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17949
17950 2001-09-02 Marc Autret <autret_m@epita.fr>
17951
17952 * src/macrotab.c, src/macrotab.h: Remove.
17953
17954 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
17955
17956 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17957 filename.
17958
17959 2001-09-01 Marc Autret <autret_m@epita.fr>
17960
17961 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17962 to an explicit value to activate the feature. We do it here.
17963
17964 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17965
17966 * src/output.c (prepare): Delete the `filename' muscule insertion.
17967 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17968 (parse_union_decl): Likewise.
17969 * src/macrotab.c (macro_init): Initialize filename by infile.
17970
17971 2001-08-31 Marc Autret <autret_m@epita.fr>
17972
17973 * src/bison.simple (YYLSP_NEEDED): New definition.
17974 * src/output.c (prepare): Add macro insertion of `locations_flag'
17975
17976 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17977
17978 * src/output.c (prepare): Delete insertion of previous muscles,
17979 and insert the `prefix' muscles.
17980 * src/macrotab.c (macro_init): Likewise.
17981 (macro_init): Initialization prefix directive by `yy'.
17982 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17983 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17984 yylval, yydebug, yyerror, yynerrs and yyparse.
17985 New directive `#define' to substitute yydebug, ... with option
17986 name_prefix.
17987
17988 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17989
17990 * src/main.c (main): Standardize.
17991 * src/output.c (output_table_data, output_parser): Likewise.
17992 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17993
17994 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17995
17996 * src/reader.c (read_additionnal_code): Rename %%user_code to
17997 %%epilogue.
17998 * src/output.c (output): Rename %%declarations to %%prologue.
17999 * src/bison.simple: Echo modifications.
18000
18001 2001-08-31 Marc Autret <autret_m@epita.fr>
18002
18003 * src/reader.c (readgram): CleanUp.
18004 (output_token_defines): Likewise.
18005 (packsymbols): Likewise.
18006 (reader): Likewise.
18007 * src/output.c (output): CPP-out useless code.
18008
18009 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18010
18011 * src/reader.c (reader): Delete obsolete call to function
18012 output_trailers and output_headers.
18013 * src/output.h: Remove obsolete functions prototypes of output_headers
18014 and output_trailers.
18015
18016 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
18017
18018 * src/main.c: Include macrotab.h.
18019 * src/macrotab.h (macro_entry_s): Constify fields.
18020 Adjust functions prototypes.
18021 * src/macrotab.c (macro_insert): Constify key and value.
18022 (macro_find): Constify key.
18023 (macro_insert): Include 'xalloc.h'
18024 (macro_insert): Use XMALLOC.
18025 (macro_find): Constify return value.
18026 * src/output.c (output_table_data): Rename table to table_data.
18027 (output_parser): Constify macro_key, macro_value.
18028
18029 2001-08-30 Marc Autret <autret_m@epita.fr>
18030
18031 * src/reader.c (parse_skel_decl): New.
18032 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
18033 * src/lex.h (token_t): New token `tok_skel'.
18034 * src/lex.c (percent_table): Add skeleton option entry.
18035 Standardize.
18036
18037 2001-08-29 Marc Autret <autret_m@epita.fr>
18038
18039 * src/bison.simple: Add %%user_code directive at the end.
18040 * src/reader.c (read_additionnal_code): New.
18041 (reader): Use it.
18042 * src/output.c (output_program): Remove.
18043 (output): Update.
18044
18045 2001-08-28 Marc Autret <autret_m@epita.fr>
18046
18047 * src/output.c (output_actions): Clean up.
18048 (output_gram): CPP-out useless code.
18049 * src/reader.c (reader): Clean up, CPP-out useless code.
18050
18051 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
18052
18053 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
18054 directive.
18055 * src/bison.simple: Add `%%definitions'.
18056
18057 2001-08-28 Marc Autret <autret_m@epita.fr>
18058
18059 * config/depcomp: New file.
18060
18061 2001-08-27 Paul Eggert <eggert@twinsun.com>
18062
18063 * src/bison.simple (yyparse): Don't take the address of an
18064 item before the start of an array, as that doesn't conform to
18065 the C Standard.
18066
18067 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
18068
18069 * src/output.c (output): Remove the initialization of the macro
18070 obstack. It was done too late here.
18071
18072 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18073 completely wrong.
18074 (reader): Initialize the macro obstack here, since we need it to grow
18075 '%define' directives.
18076
18077 * src/reader.h: Declare the macro obstack as extern.
18078
18079 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
18080
18081 * src/output.c (output_parser): Fix. Store single '%' characters in
18082 the output obstack instead of throwing them away.
18083
18084 2001-08-27 Akim Demaille <akim@epita.fr>
18085
18086 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18087
18088 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18089
18090 * lib/Makefile.am: Adjust.
18091
18092 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18093
18094 * src/bison.simple: Update and add '%%' directives.
18095
18096 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18097
18098 * src/reader.c (reader): Remove calls to 'output_headers' and
18099 'output_trailers'. Remove some C output.
18100 (readgram): Disable a piece of code that was writing a default
18101 definition for 'YYSTYPE'.
18102 (reader_output_yylsp): Remove.
18103 (packsymbols): Output token defintions to a macro.
18104 (copy_definition): Disable C output.
18105
18106 * src/reader.c (parse_macro_decl): New function used to parse macro
18107 declarations.
18108 (copy_string2): Put the body of copy_string into this new function.
18109 Add a parameter to let the caller choose whether he wants to copy the
18110 string delimiters or not.
18111 (copy_string): Be a simple call to copy_string2 with the last argument
18112 bound to true.
18113 (read_declarations): Add case for macro definition.
18114 (copy_identifier): New.
18115 (parse_macro_decl): Read macro identifiers using copy_identifier
18116 rather than lex.
18117
18118 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18119
18120 * src/output.c (prepare): Add prefixed names.
18121 (output_parser): Output semantic actions.
18122 (output_parser): Fix bug on '%%line' directives.
18123
18124 * src/output.c (output_headers): Remove. The C code printed by this
18125 function should now be in the skeletons.
18126 (output_trailers): Remove.
18127 (output): Disable call to 'reader_output_yylsp'.
18128 (output_rule_data): Do not output tables to the table obstack.
18129
18130 * src/output.c: Remove some C dedicated output.
18131 Improve the use of macro and output obstacks.
18132 (output_defines): Remove.
18133
18134 * src/output.c (output_token_translations): Associate 'translate'
18135 table with a macro. No output to the table obstack.
18136 (output_gram): Same for 'rhs' and 'prhs'.
18137 (output_stos): Same for 'stos'.
18138 (output_rule_data): Same for 'r1' and 'r2'.
18139 (token_actions): Same for 'defact'.
18140 (goto_actions): Same for 'defgoto'.
18141 (output_base): Same for 'pact' and 'pgoto'.
18142 (output_table): Same for 'table'.
18143 (output_check): Same for 'check'.
18144
18145 * src/output.c (output_table_data): New function.
18146 (output_short_table): Remove.
18147 (output_short_or_char_table): Remove.
18148
18149 * src/output.c (output_parser): Replace most of the skeleton copy code
18150 with something new. Skeletons are now processed character by character
18151 rather than line by line, and Bison looks for '%%' macros. This is the
18152 first step in making Bison's output process (a lot) more flexible.
18153 (output_parser): Use the macro table.
18154
18155 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18156
18157 * src/main.c (main): Initialize the macro table.
18158
18159 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18160
18161 * src/lex.c (percent_table): Add tok_define.
18162 * src/lex.h: Add tok_define.
18163
18164 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18165
18166 * src/macrotab.c: New file.
18167 * src/macrotab.h: New file.
18168 * src/Makefile.am: Update.
18169
18170 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18171
18172 * lib/hash.c: New file.
18173 * lib/hash.h: New file.
18174 * lib/Makefile.am: Update.
18175
18176 2001-08-15 Akim Demaille <akim@epita.fr>
18177
18178 Version 1.28c.
18179
18180 2001-08-15 Marc Autret <autret_m@epita.fr>
18181
18182 * src/reader.c (readgram): Indent output macro YYSTYPE.
18183 (packsymbols): Likewise.
18184 (output_token_defines): Likewise.
18185 * src/files.c: Standardize.
18186 (compute_header_macro): New.
18187 (defines_obstack_save): New. Use compute_header_macro.
18188 (output_files): Update. Use defines_obstack_save.
18189
18190 2001-08-15 Akim Demaille <akim@epita.fr>
18191
18192 * doc/bison.texinfo (Table of Symbols): Document
18193 YYSTACK_USE_ALLOCA.
18194
18195 2001-08-15 Akim Demaille <akim@epita.fr>
18196
18197 * missing: Update from CVS Automake.
18198 * config/config.guess, config/config.sub, config/texinfo.tex:
18199 Update from gnu.org.
18200
18201 2001-08-15 Akim Demaille <akim@epita.fr>
18202
18203 * Makefile.maint: Sync with CVS Autoconf.
18204
18205 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
18206
18207 * doc/bison.texinfo: Include GNU Free Documentation License from
18208 `fdl.texi'.
18209 * doc/fdl.texi: Add to package.
18210
18211 2001-08-14 Marc Autret <autret_m@epita.fr>
18212
18213 Turn on %{source,header}_extension features.
18214
18215 * src/lex.c (percent_table): Un-CPP out header_extension and
18216 source_extension.
18217 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
18218 (compute_exts_from_src): Remove conditions. It restores priorities
18219 between options.
18220
18221 2001-08-14 Marc Autret <autret_m@epita.fr>
18222
18223 * src/files.c (compute_base_names): Add extensions computing when
18224 `--file-prefix' used.
18225 Standardize function calls.
18226
18227 2001-08-13 Marc Autret <autret_m@epita.fr>
18228
18229 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
18230 defining it (defined but null disables alloca).
18231
18232 2001-08-13 Marc Autret <autret_m@epita.fr>
18233
18234 * src/bison.simple (_yy_memcpy): CPP reformat.
18235
18236 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
18237
18238 * tests/atconfig.in (CPPFLAGS): Fix.
18239
18240 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
18241
18242 * doc/bison.texinfo: Include GNU General Public License from
18243 `gpl.texi'.
18244 * doc/gpl.texi: Add to package.
18245
18246 2001-08-10 Marc Autret <autret_m@epita.fr>
18247
18248 * src/print_graph.h: Fix.
18249 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18250
18251 2001-08-10 Akim Demaille <akim@epita.fr>
18252
18253 * src/system.h: Provide default declarations for stpcpy, strndup,
18254 and strnlen.
18255
18256 2001-08-10 Robert Anisko <anisko_r@epita.fr>
18257
18258 * doc/bison.texinfo (Locations): Update @$ stuff.
18259
18260 2001-08-09 Robert Anisko <anisko_r@epita.fr>
18261
18262 * src/bison.simple (YYLLOC_DEFAULT): Update.
18263 (yyparse): Adjust.
18264
18265 2001-08-08 Marc Autret <autret_m@epita.fr>
18266
18267 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
18268 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18269 Reported by Fabrice Bauzac.
18270
18271 2001-08-08 Marc Autret <autret_m@epita.fr>
18272
18273 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18274 * src/vcg.c (output_node): Fix.
18275 * src/vcg.h: Cleanup.
18276 * src/print_graph.c: Add comments.
18277 (node_output_size): New global variable. Simplify the formatting of
18278 the VCG graph output.
18279 (print_actions): Unused code is now used. It notifies the final state
18280 and no action states in the VCG graph. It also give the reduce actions.
18281 The `shift and goto' edges are red and the `go to state' edges are
18282 blue.
18283 Get the current node name and node_obstack by argument.
18284 (node_obstack): New variable.
18285 (print_state): Manage node_obstack.
18286 (print_core): Use node_obstack given by argument.
18287 A node is not only computed here but in print_actions also.
18288 (print_graph): CPP out useless code instead of commenting it.
18289
18290 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
18291
18292 * tests/atconfig.in (CPPFLAGS): Fix.
18293
18294 2001-08-07 Akim Demaille <akim@epita.fr>
18295
18296 * src/print_graph.c (quote): New.
18297 (print_core): Use it.
18298
18299 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
18300
18301 * src/vcg.c (complain.h): Include it.
18302 Unepitaize `return' invocations.
18303 [NDEBUG] (main): Remove.
18304 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
18305 * src/files.c (open_files): Initialize graph_obstack.
18306 * src/print_graph.c (print_actions): CPP out useless code.
18307 (print_core): Don't output the last `\n' in labels.
18308 Use `quote'.
18309 * src/files.c (output_files): Output the VCG file.
18310 * src/main.c (main): Invoke print_graph ();
18311
18312 2001-08-06 Marc Autret <autret_m@epita.fr>
18313
18314 Automaton VCG graph output.
18315 Using option ``-g'' or long option ``--graph'', you can generate
18316 a gram_filename.vcg file containing a VCG description of the LALR (1)
18317 automaton of your grammar.
18318
18319 * src/main.c: Call to print_graph() function.
18320 * src/getargs.h: Update.
18321 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18322 (graph_flag): New flag.
18323 (longopts): Update.
18324 (getargs): Add case `g'.
18325 * src/files.c (graph_obstack): New obstack struct.
18326 (open_files): Initialize new obstack.
18327 (output_files): Saves graph_obstack if required.
18328 * src/files.h (graph_obstack): New extern declaration.
18329 * src/Makefile.am: Add new source files.
18330
18331 2001-08-06 Marc Autret <autret_m@epita.fr>
18332
18333 * src/print_graph.c, src/print_graph.h (graph): New.
18334 * src/vcg.h: New file.
18335 * src/vcg.c: New file, VCG graph handling.
18336
18337 2001-08-06 Marc Autret <autret_m@epita.fr>
18338
18339 Add of %source_extension and %header_extension which specify
18340 the source or/and the header output file extension.
18341
18342 * src/files.c (compute_base_names): Remove initialisation of
18343 src_extension and header_extension.
18344 (compute_exts_from_gf): Update.
18345 (compute_exts_from_src): Update.
18346 (output_files): Update.
18347 * src/reader.c (parse_header_extension_decl): New.
18348 (parse_source_extension_decl): New.
18349 (read_declarations): New case statements for the new tokens.
18350 * src/lex.c (percent_table): Add entries for %source_extension
18351 and %header_extension.
18352 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18353
18354 2001-08-06 Marc Autret <autret_m@epita.fr>
18355
18356 * configure.in: Bump to 1.28c.
18357 * doc/bison.texinfo: Texinfo thingies.
18358
18359 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
18360
18361 * tests/atconfig.in (CPPFLAGS): Add.
18362 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18363
18364 2001-08-03 Akim Demaille <akim@epita.fr>
18365
18366 Version 1.28b.
18367
18368 2001-08-03 Akim Demaille <akim@epita.fr>
18369
18370 * tests/Makefile.am (check-local): Ship testsuite.
18371 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18372 Include `string.h'.
18373
18374 2001-08-03 Akim Demaille <akim@epita.fr>
18375
18376 * configure.in: Try using -Wformat when compiling.
18377
18378 2001-08-03 Akim Demaille <akim@epita.fr>
18379
18380 * configure.in: Bump to 1.28b.
18381
18382 2001-08-03 Akim Demaille <akim@epita.fr>
18383
18384 * src/complain.c: Adjust strerror_r portability issues.
18385
18386 2001-08-03 Akim Demaille <akim@epita.fr>
18387
18388 Version 1.28a.
18389
18390 2001-08-03 Akim Demaille <akim@epita.fr>
18391
18392 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18393 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18394 * src/getargs.c: Include complain.h.
18395 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18396 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18397
18398 2001-08-03 Akim Demaille <akim@epita.fr>
18399
18400 * src/reader.c (readgram): Display hidden chars in error messages.
18401
18402 2001-08-03 Akim Demaille <akim@epita.fr>
18403
18404 Update to gettext 0.10.39.
18405
18406 2001-08-03 Akim Demaille <akim@epita.fr>
18407
18408 * lib/strspn.c: New.
18409
18410 2001-08-01 Marc Autret <autret_m@epita.fr>
18411
18412 * doc/bison.texinfo: Update.
18413 * doc/bison.1 (mandoc): Update.
18414 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18415 * src/files.c: Support output files extensions computing.
18416 (src_extension): New static variable.
18417 (header_extension): New static variable.
18418 (tr): New function.
18419 (get_extension_index): New function, gets the index of an extension
18420 filename in a string.
18421 (compute_exts_from_gf): New function, computes extensions from the
18422 grammar file extension.
18423 (compute_exts_from_src): New functions, computes extensions from the
18424 C source file extension, file given by ``-o'' option.
18425 (compute_base_names): Update.
18426 (output_files): Update.
18427
18428 2001-08-01 Robert Anisko <anisko_r@epita.fr>
18429
18430 * doc/bison.texi: Document @$.
18431 (Locations): New section.
18432
18433 2001-07-18 Akim Demaille <akim@epita.fr>
18434
18435 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18436 * config/prev-version.txt, config/move-if-change: New.
18437 * Makefile.am: Adjust.
18438
18439 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
18440
18441 * src/bison.simple (yyparse): Suppress warning `comparaison
18442 between signed and unsigned'.
18443
18444 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
18445
18446 * src/getargs.h (raw_flag): Remove.
18447 * src/getargs.c: Die on `-r'/`--raw'.
18448 * src/lex.c (parse_percent_token): Die on `%raw'.
18449 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18450 * tests/calc.at: Suppress test with option `--raw'.
18451
18452 2001-07-14 Akim Demaille <akim@epita.fr>
18453
18454 * config/: New.
18455 * configure.in: Require Autoconf 2.50.
18456 Update to gettext 0.10.38.
18457
18458 2001-03-16 Akim Demaille <akim@epita.fr>
18459
18460 * doc/bison.texinfo: ANSIfy the examples.
18461
18462 2001-03-16 Akim Demaille <akim@epita.fr>
18463
18464 * getargs.c (skeleton): New variable.
18465 (longopts): --skeleton is a new option.
18466 (shortopts, getargs): -S is a new option.
18467 * getargs.h: Declare skeleton.
18468 * output.c (output_parser): Use it.
18469
18470 2001-03-16 Akim Demaille <akim@epita.fr>
18471
18472 * m4/strerror_r.m4: New.
18473 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18474 * lib/error.h, lib/error.c: Update.
18475
18476 2001-03-16 Akim Demaille <akim@epita.fr>
18477
18478 * src/getargs.c (longopts): Clean up.
18479
18480 2001-02-21 Akim Demaille <akim@epita.fr>
18481
18482 * src/reader.c (gensym): `gensym_count' is your own.
18483 Use a static buf to create the symbol name, as token_buffer is no
18484 longer a buffer.
18485
18486 2001-02-08 Akim Demaille <akim@epita.fr>
18487
18488 * src/conflicts.c (conflict_report): Be sure not to append to res
18489 between two calls, which could happen if both first sprintf were
18490 skipped, but not the first cp += strlen.
18491
18492 2001-02-08 Akim Demaille <akim@epita.fr>
18493
18494 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18495 New, from fileutils 4.0.37.
18496 * configure.in: Require Autoconf 2.49c. I took some time before
18497 making this decision. This is the only way out for portability
18498 issues in Bison, it would mean way too much duplicate effort to
18499 import in Bison features implemented in 2.49c since 2.13.
18500 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18501
18502 2001-02-02 Akim Demaille <akim@epita.fr>
18503
18504 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18505 * lib/xalloc.h, lib/xmalloc.c: Update.
18506
18507 2001-01-19 Akim Demaille <akim@epita.fr>
18508
18509 Get rid of the ad hoc handling of token_buffer in the scanner: use
18510 the obstacks.
18511
18512 * src/lex.c (token_obstack): New.
18513 (init_lex): Initialize it. No longer call...
18514 (grow_token_buffer): this. Remove it.
18515 Adjust all the places which used it to use the obstack.
18516
18517 2001-01-19 Akim Demaille <akim@epita.fr>
18518
18519 * src/lex.h: Rename all the tokens:
18520 s/\bENDFILE\b/tok_eof/g;
18521 s/\bIDENTIFIER\b/tok_identifier/g;
18522 etc.
18523 Let them be enums, not #define, to ease debugging.
18524 Adjust all the code.
18525
18526 2001-01-18 Akim Demaille <akim@epita.fr>
18527
18528 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18529 * src/lex.c (maxtoken, grow_token_buffer): Static.
18530
18531 2001-01-18 Akim Demaille <akim@epita.fr>
18532
18533 Since we now use obstacks, more % directives can be enabled.
18534
18535 * src/lex.c (percent_table): Also accept `%yacc',
18536 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18537 `%debug'.
18538 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18539 instead of returning a token.
18540 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18541 * src/reader.c (read_declarations): Adjust.
18542 * src/files.c (open_files): Don't call `compute_base_names', don't
18543 compute `attrsfile' since they depend upon data which might be
18544 *in* the input file now.
18545 (output_files): Do it here.
18546 * src/output.c (output_headers): Document the fact that this patch
18547 introduces a guaranteed SEGV for semantic parsers.
18548 * doc/bison.texinfo: Document them.
18549 * tests/suite.at: Exercise these %options.
18550
18551 2000-12-20 Akim Demaille <akim@epita.fr>
18552
18553 Also handle the output file (--verbose) with obstacks.
18554
18555 * files.c (foutput): Remove.
18556 (output_obstack): New.
18557 Adjust all dependencies.
18558 * src/conflicts.c: Return a string.
18559 * src/system.h (obstack_grow_string): Rename as...
18560 (obstack_sgrow): this. Be ready to work with non literals.
18561 (obstack_fgrow4): New.
18562
18563 2000-12-20 Akim Demaille <akim@epita.fr>
18564
18565 * src/files.c (open_files): Fix the computation of short_base_name
18566 in the case of `-o foo.tab.c'.
18567
18568 2000-12-20 Akim Demaille <akim@epita.fr>
18569
18570 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18571 (copy_dollar): Now that everything uses obstacks, get rid of the
18572 FILE * parameters.
18573
18574 2000-12-20 Akim Demaille <akim@epita.fr>
18575
18576 * src/files.c (open_files): Actually the `.output' file is based
18577 on the short_base_name, not base_name.
18578 * tests/suite.at (Checking output file names): Adjust.
18579
18580 2000-12-20 Akim Demaille <akim@epita.fr>
18581
18582 * src/bison.s1: Remove, we now use directly...
18583 * src/bison.simple: this.
18584 * src/Makefile.am: Use pkgdata instead of data.
18585
18586 2000-12-20 Akim Demaille <akim@epita.fr>
18587
18588 * src/files.c (guard_obstack): New.
18589 (open_files): Initialize it.
18590 (output_files): Dump it...
18591 * src/files.h: Export it.
18592 * src/reader.c (copy_guard): Use it.
18593
18594 2000-12-19 Akim Demaille <akim@epita.fr>
18595
18596 * src/files.c (outfile, defsfile, actfile): Removed as global
18597 vars.
18598 (open_files): Don't compute them.
18599 (output_files): Adjust.
18600 (base_name, short_base_name): Be global.
18601 Adjust dependencies.
18602
18603 2000-12-19 Akim Demaille <akim@epita.fr>
18604
18605 * src/files.c (strsuffix): New.
18606 (stringappend): Be just like strcat but allocate.
18607 (base_names): Eve out from open_files.
18608 Try to simplify the rather hairy computation of base_name and
18609 short_base_name.
18610 (open_files): Use it.
18611 * tests/suite.at (Checking output file names): New test.
18612
18613 2000-12-19 Akim Demaille <akim@epita.fr>
18614
18615 * src/system.h (obstack_grow_literal_string): Rename as...
18616 (obstack_grow_string): this.
18617 * src/output.c (output_parser): Recognize `%% actions' instead of
18618 `$'.
18619 * src/bison.s1: s/$/%% actions/.
18620 * src/bison.hairy: Likewise.
18621
18622 2000-12-19 Akim Demaille <akim@epita.fr>
18623
18624 * src/output.c (output_parser): Compute the `#line' lines when
18625 there are.
18626 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18627 Suggested by Hans Aberg.
18628
18629 2000-12-19 Akim Demaille <akim@epita.fr>
18630
18631 Let the handling of the skeleton files be local to the procedures
18632 that use it.
18633
18634 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18635 longer static.
18636 (fparser, open_extra_files): Remove.
18637 (open_files, output_files): Don't take care of fparser.
18638 * src/files.h: Adjust.
18639 * src/output.c (output_parser): Open and close the file to the
18640 skeleton.
18641 * src/reader.c (read_declarations): When %semantic_parser, open
18642 fguard.
18643
18644 2000-12-19 Akim Demaille <akim@epita.fr>
18645
18646 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18647 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18648
18649 2000-12-19 Akim Demaille <akim@epita.fr>
18650
18651 * src/files.c (open_files): Yipee! We no longer need all the code
18652 looking for `/tmp' since we have no tmp file.
18653
18654 2000-12-19 Akim Demaille <akim@epita.fr>
18655
18656 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18657 New macros.
18658 * src/files.c (open_files): Less dependency on MSDOS etc.
18659
18660 2000-12-14 Akim Demaille <akim@epita.fr>
18661
18662 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18663 Provide a default definition.
18664 Use it when executing the default @ action.
18665 * src/reader.c (reader_output_yylsp): No longer include
18666 `timestamp' and `text' in the default YYLTYPE.
18667
18668 2000-12-12 Akim Demaille <akim@epita.fr>
18669
18670 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18671 (copy_guard): Quote the file names.
18672 Reported by Laurent Mascherpa.
18673
18674 2000-12-12 Akim Demaille <akim@epita.fr>
18675
18676 * src/output.c (output_headers, output_program, output): Be sure
18677 to escape special characters when outputting filenames.
18678 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18679 (output_headers): Don't depend on them, Use ACTSTR.
18680
18681 2000-11-17 Akim Demaille <akim@epita.fr>
18682
18683 * lib/obstack.h: Formatting changes.
18684 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18685 prevents type checking.
18686 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18687 cast the value to (void *): assigning a `foo *' to a `void *'
18688 variable is valid.
18689 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18690 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18691 append characters.
18692
18693 2000-11-17 Akim Demaille <akim@epita.fr>
18694
18695 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18696 as...
18697 (suite.m4, regression.m4, calc.m4): these.
18698 * tests/atgeneral.m4: Update from CVS Autoconf.
18699
18700 2000-11-17 Akim Demaille <akim@epita.fr>
18701
18702 * tests/regression.m4 (%union and --defines): New test,
18703 demonstrating a current bug in the obstack implementation.
18704
18705 2000-11-17 Akim Demaille <akim@epita.fr>
18706
18707 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18708 macros.
18709 Use them to declare the variables which are global or local to
18710 `yyparse'.
18711
18712 2000-11-17 Akim Demaille <akim@epita.fr>
18713
18714 * acconfig.h: Remove, no longer used.
18715
18716 2000-11-07 Akim Demaille <akim@epita.fr>
18717
18718 * src: s/Copyright (C)/Copyright/g.
18719
18720 2000-11-07 Akim Demaille <akim@epita.fr>
18721
18722 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18723 defining.
18724 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18725
18726 2000-11-07 Akim Demaille <akim@epita.fr>
18727
18728 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18729 Merge in a single CPP if/else.
18730
18731 2000-11-07 Akim Demaille <akim@epita.fr>
18732
18733 * src/output.c (output): Remove useless variables.
18734 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18735 argument `data' for consistency with the prototypes.
18736 Qualify it `const'.
18737 (obstack_copy, obstack_copy0): Rename the second argument as
18738 `address' for consistency. Qualify it `const'.
18739 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18740 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18741 `const' their input argument (`data' or `address').
18742 Adjust the corresponding macros to include `const' in casts.
18743
18744 2000-11-03 Akim Demaille <akim@epita.fr>
18745
18746 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18747 s/PFILE1/BISON_HAIRY/.
18748 Adjust dependencies.
18749
18750 2000-11-03 Akim Demaille <akim@epita.fr>
18751
18752 For some reason, this was not applied.
18753
18754 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18755 `unlink': it's no longer used.
18756
18757 2000-11-03 Akim Demaille <akim@epita.fr>
18758
18759 * src/files.c (skeleton_find): New function, eved out of...
18760 (open_files, open_extra_files): here.
18761
18762 2000-11-03 Akim Demaille <akim@epita.fr>
18763
18764 Don't use `atexit'.
18765
18766 * src/files.c (obstack_save): New function.
18767 (done): Rename as...
18768 (output_files): this.
18769 Use `obstack_save'.
18770 * src/main.c (main): Don't use `atexit' to register `done', since
18771 it no longer has to remove tmp files, just call `output_files'
18772 when there are no errors.
18773
18774 2000-11-02 Akim Demaille <akim@epita.fr>
18775
18776 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18777 `unlink': it's no longer used.
18778 * src/files.h: Formatting changes.
18779
18780 2000-11-02 Akim Demaille <akim@epita.fr>
18781
18782 Remove the last uses of mktemp and unlink/delete.
18783
18784 * src/files.c (fdefines, ftable): Removed.
18785 (defines_ostack, table_obstack): New.
18786 Adjust dependencies of the former into uses of the latter.
18787 * src/output.c (output_short_or_char_table, output_short_table):
18788 Convert to using obstacks.
18789 * src/reader.c (copy_comment2): Accept one FILE * and two
18790 obstacks.
18791 (output_token_defines, reader_output_yylsp): Use obstacks.
18792 * src/system.h (obstack_fgrow3): New.
18793 * po/POTFILES.in: Adjust.
18794
18795 2000-11-01 Akim Demaille <akim@epita.fr>
18796
18797 Change each use of `fattrs' into a use of `attrs_obstack'.
18798
18799 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18800 * src/files.c (fattrs): Remove.
18801 (attrs_obstack): New.
18802 Adjust all dependencies.
18803 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18804
18805 2000-11-01 Akim Demaille <akim@epita.fr>
18806
18807 Introduce obstacks.
18808 Change each use of `faction' into a use of `action_obstack'.
18809
18810 * lib/obstack.h, lib/obstack.c: New files.
18811 * src/files.c (faction): Remove.
18812 (action_obstack): New.
18813 Adjust all dependencies.
18814
18815 2000-10-20 Akim Demaille <akim@epita.fr>
18816
18817 * lib/quote.h (PARAMS): New macro. Use it.
18818
18819 2000-10-16 Akim Demaille <akim@epita.fr>
18820
18821 * src/output.c (output_short_or_char_table): New function.
18822 (output_short_table, output_token_translations): Use it.
18823 (goto_actions): Use output_short_table.
18824
18825 2000-10-16 Akim Demaille <akim@epita.fr>
18826
18827 * src/symtab.c (bucket_new): New function.
18828 (getsym): Use it.
18829
18830 * src/output.c (output_short_table): New argument to display the
18831 comment associated with the table.
18832 Adjust dependencies.
18833 (output_gram): Use it.
18834 (output_rule_data): Nicer output layout for YYTNAME.
18835
18836 2000-10-16 Akim Demaille <akim@epita.fr>
18837
18838 * src/lex.c (read_typename): New function.
18839 (lex): Use it.
18840 * src/reader.c (copy_dollar): Likewise.
18841
18842 2000-10-16 Akim Demaille <akim@epita.fr>
18843
18844 * src/reader.c (copy_comment2): Expect the input stream to be on
18845 the `/' which is suspected to open a comment, instead of being
18846 called after `//' or `/*' was read.
18847 (copy_comment, copy_definition, parse_union_decl, copy_action)
18848 (copy_guard): Adjust.
18849
18850 2000-10-16 Akim Demaille <akim@epita.fr>
18851
18852 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18853 `read_signed_integer'.
18854
18855 2000-10-16 Akim Demaille <akim@epita.fr>
18856
18857 * src/reader.c (copy_dollar): New function.
18858 (copy_guard, copy_action): Use it.
18859
18860 2000-10-16 Akim Demaille <akim@epita.fr>
18861
18862 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18863 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18864 New files, from Fileutils 4.0.27.
18865 * src/main.c (printable_version): Remove.
18866 * src/lex.c, src/reader.c: Use `quote'.
18867
18868 2000-10-04 Akim Demaille <akim@epita.fr>
18869
18870 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18871
18872 2000-10-04 Akim Demaille <akim@epita.fr>
18873
18874 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18875
18876 2000-10-04 Akim Demaille <akim@epita.fr>
18877
18878 When a literal string is used to define two different tokens,
18879 `bison -v' segfaults.
18880 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18881
18882 * tests/regression.m4: New file.
18883 Include the core of the sample provided by Piotr Gackiewicz.
18884 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18885 properly.
18886
18887 2000-10-04 Akim Demaille <akim@epita.fr>
18888
18889 * src/reader.c (parse_expect_decl): Keep `count' within the size
18890 of `buffer'.
18891 From Neil Booth.
18892
18893 2000-10-02 Paul Eggert <eggert@twinsun.com>
18894
18895 * bison.s1 (yyparse): Assign the default value
18896 unconditionally, to avoid a GCC warning and make the parser a
18897 tad smaller.
18898
18899 2000-10-02 Akim Demaille <akim@epita.fr>
18900
18901 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18902 options.
18903
18904 2000-10-02 Akim Demaille <akim@epita.fr>
18905
18906 * src/derives.c, src/print.c, src/reduce.c: To ease the
18907 translation, move some `\n' out of the translated strings.
18908
18909 2000-10-02 Akim Demaille <akim@epita.fr>
18910
18911 The location tracking mechanism is precious for parse error
18912 messages. Nevertheless, it is enabled only when `@n' is used in
18913 the grammar, which is a different issue (you can use it in error
18914 message, but not in the grammar per se). Therefore, there should
18915 be another means to enable it.
18916
18917 * src/getargs.c (getargs): Support `--locations'.
18918 (usage): Report it.
18919 * src/getargs.h (locationsflag): Export it.
18920 * src/lex.c (percent_table): Support `%locations'.
18921 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18922 with `locationsflag'.
18923 * doc/bison.texinfo: Document `--locations' and `%locations'.
18924 Sort the options.
18925 * tests/calc.m4: Test it.
18926
18927 For regularity of the names, replace each
18928 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18929 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18930 In addition replace each `flag' with `_flag'.
18931
18932 2000-10-02 Akim Demaille <akim@epita.fr>
18933
18934 Also test parse error messages, including with YYERROR_VERBOSE.
18935
18936 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18937 associative).
18938 Use it to check the computations.
18939 Use it to check `nonassoc' is honored.
18940 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18941 `--yyerror-verbose'.
18942 (_AT_CHECK_CALC): Adjust to this option.
18943 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18944
18945 2000-10-02 Akim Demaille <akim@epita.fr>
18946
18947 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18948 the latter demonstrates a flaw in the handling of non debugging
18949 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18950 was used in order to simplify:
18951
18952 #if YYDEBUG
18953 if (yydebug)
18954 {
18955 ...
18956 }
18957 #endif
18958
18959 into
18960
18961 if (yydebug)
18962 {
18963 ...
18964 }
18965
18966 unfortunately this leads to a CPP conflict when
18967 `--name-prefix=foo' is used since it produces `#define yydebug
18968 foodebug'.
18969
18970 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18971 (YYDPRINTF): New macro.
18972 Spread its use.
18973 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18974 the bison options.
18975 Also test `--verbose', `--defines' and `--name-prefix'.
18976
18977 2000-10-02 Akim Demaille <akim@epita.fr>
18978
18979 Improve the readability of the produced parsers.
18980
18981 * src/bison.s1: Formatting changes.
18982 Improve the comment related to the `$' mark.
18983 (yydefault): Don't fall through to `yyresume': `goto' there.
18984 * src/output.c (output_parser): When the `$' is met, skip the end
18985 of its line.
18986 New variable, `number_of_dollar_signs', to check there's exactly
18987 one `$' in the parser skeleton.
18988
18989 2000-10-02 Akim Demaille <akim@epita.fr>
18990
18991 * lib/xstrdup.c: New file, from the fileutils.
18992 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18993 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18994 instead of strlen + xmalloc + strcpy.
18995 * src/symtab.c (copys): Remove, use xstrdup instead.
18996
18997 2000-10-02 Akim Demaille <akim@epita.fr>
18998
18999 * src/gram.h (associativity): New enum type which replaces the
19000 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19001 `right_assoc', `left_assoc' and `non_assoc'.
19002 Adjust all dependencies.
19003 * src/reader.c: Formatting changes.
19004 (LTYPESTR): Don't define it, use it as a literal in
19005 `reader_output_yylsp'.
19006 * src/symtab.h (symbol_class): New enum type which replaces the
19007 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19008 `sunknown', `stoken and `snterm'.
19009
19010 2000-10-02 Akim Demaille <akim@epita.fr>
19011
19012 * src/getargs.c (fixed_outfiles): Rename as...
19013 (yaccflag): for consistency and accuracy.
19014 Adjust dependencies.
19015
19016 2000-10-02 Akim Demaille <akim@epita.fr>
19017
19018 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19019 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19020 difficult and introduced a lot of core dump. It turns out that
19021 Bison used an implementation of `xmalloc' based on `calloc', and
19022 at various places it does depend upon the initialization to 0. I
19023 have not tried to isolate the pertinent places, and all the former
19024 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19025 someone should address this issue.
19026
19027 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19028 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19029 files.
19030 Adjust dependencies.
19031 * src/warshall.h: New file.
19032 Propagate.
19033
19034 2000-10-02 Akim Demaille <akim@epita.fr>
19035
19036 Various anti-`extern in *.c' changes.
19037
19038 * src/system.h: Include `assert.h'.
19039
19040 2000-10-02 Akim Demaille <akim@epita.fr>
19041
19042 * src/state.h (nstates, final_state, first_state, first_shift)
19043 (first_reduction): Move their exportation from here...
19044 * src/LR0.h: to here.
19045 Adjust dependencies.
19046 * src/getargs.c (statisticsflag): New variable.
19047 Add support for `--statistics'.
19048 Adjust dependencies.
19049
19050 Remove a lot of now useless `extern' statements in most files.
19051
19052 2000-10-02 Akim Demaille <akim@epita.fr>
19053
19054 * src/LR0.h: New file.
19055 Propagate its use.
19056
19057 2000-10-02 Akim Demaille <akim@epita.fr>
19058
19059 * src/print.h: New file.
19060 Propagate its use.
19061 * src/print.c: Formatting and ordering changes.
19062 (verbose, terse): Replace with...
19063 (print_results): this new function.
19064 Adjust dependencies.
19065
19066 2000-10-02 Akim Demaille <akim@epita.fr>
19067
19068 * src/conflicts.c (conflict_report): New function.
19069 (conflict_log, verbose_conflict_log): Replace with...
19070 (print_conflicts): this function.
19071 Adjust dependencies.
19072 * src/conflicts.h: New file.
19073 Propagate its inclusion.
19074
19075 2000-10-02 Akim Demaille <akim@epita.fr>
19076
19077 * src/nullable.h: New file.
19078 Propagate its inclusion.
19079 * src/nullable.c: Formatting changes.
19080
19081 2000-10-02 Akim Demaille <akim@epita.fr>
19082
19083 * src/reduce.h: New file.
19084 Propagate its inclusion.
19085 * src/reduce.c: Topological sort and other formatting changes.
19086 (bool, TRUE, FALSE): Move their definition to...
19087 * src/system.h: here.
19088
19089 2000-10-02 Akim Demaille <akim@epita.fr>
19090
19091 * src/files.c: Formatting changes.
19092 (tryopen, tryclose, openfiles): Rename as...
19093 (xfopen, xfclose, open_files): this.
19094 (stringappend): static.
19095 * src/files.h: Complete the list of exported symbols.
19096 Propagate its use.
19097
19098 2000-10-02 Akim Demaille <akim@epita.fr>
19099
19100 * src/reader.h: New file.
19101 Propagate its use instead of tedious list of `extern' and
19102 prototypes.
19103 * src/reader.c: Formatting changes, topological sort,
19104 s/register//.
19105
19106 2000-10-02 Akim Demaille <akim@epita.fr>
19107
19108 * src/lex.h: Prototype `lex.c' exported functions.
19109 * src/reader.c: Adjust.
19110 * src/lex.c: Formatting changes.
19111 (safegetc): Rename as...
19112 (xgetc): this.
19113
19114 2000-10-02 Akim Demaille <akim@epita.fr>
19115
19116 * src/lalr.h: New file.
19117 Propagate its inclusion instead of prototypes and `extern'.
19118 * src/lalr.c: Formatting changes, topological sorting etc.
19119
19120 2000-10-02 Akim Demaille <akim@epita.fr>
19121
19122 * src/output.c (token_actions): Introduce a temporary array,
19123 YYDEFACT, that makes it possible for this function to use
19124 output_short_table.
19125
19126 2000-10-02 Akim Demaille <akim@epita.fr>
19127
19128 `user_toknums' is output as a `short[]' in `output.c', while it is
19129 defined as a `int[]' in `reader.c'. For consistency with the
19130 other output tables, `user_toknums' is now defined as a table of
19131 shorts.
19132
19133 * src/reader.c (user_toknums): Be a short table instead of an int
19134 table.
19135 Adjust dependencies.
19136
19137 Factor the short table outputs.
19138
19139 * src/output.c (output_short_table): New function.
19140 * src/output.c (output_gram, output_stos, output_rule_data)
19141 (output_base, output_table, output_check): Use it.
19142
19143 2000-10-02 Akim Demaille <akim@epita.fr>
19144
19145 * src/output.c (output): Topological sort of the functions, in
19146 order to get rid of the `static' prototypes.
19147 No longer use `register'.
19148 * src/output.h: New file.
19149 Propagate its inclusion in files explicitly prototyping functions
19150 from output.c.
19151
19152 2000-09-21 Akim Demaille <akim@epita.fr>
19153
19154 * src/atgeneral.m4: Update from Autoconf.
19155
19156 2000-09-21 Akim Demaille <akim@epita.fr>
19157
19158 * src/closure.h: New file.
19159 * src/closure.c: Formatting changes, topological sort over the
19160 functions, use of closure.h.
19161 (initialize_closure, finalize_closure): Rename as...
19162 (new_closure, free_closure): these. Adjust dependencies.
19163 * src/LR0.c: Formatting changes, topological sort, use of
19164 cloture.h.
19165 (initialize_states): Rename as...
19166 (new_states): this.
19167 * src/Makefile.am (noinst_HEADERS): Adjust.
19168
19169 2000-09-20 Akim Demaille <akim@epita.fr>
19170
19171 * src/acconfig.h: Don't protect config.h against multiple
19172 inclusion.
19173 Don't define PARAMS.
19174 * src/system.h: Define PARAMS.
19175 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19176 purpose of config.h. system.h must not try to fix wrong
19177 definitions in config.h.
19178
19179 2000-09-20 Akim Demaille <akim@epita.fr>
19180
19181 * src/derives.h: New file.
19182 * src/main.c, src/derives.h: Use it.
19183 Formatting changes.
19184 * src/Makefile.am (noinst_HEADERS): Adjust.
19185
19186 2000-09-20 Akim Demaille <akim@epita.fr>
19187
19188 * tests/atgeneral.m4: Update from Autoconf.
19189 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19190 (AT_CHECK_CALC): New macros.
19191 Use these macros to test bison with options `', `--raw',
19192 `--debug', `--yacc', `--yacc --debug'.
19193
19194 2000-09-19 Akim Demaille <akim@epita.fr>
19195
19196 * src/output.c: Formatting changes.
19197 * src/machine.h: Remove, leaving its contents in...
19198 * src/system.h: here.
19199 Include stdio.h.
19200 Adjust all dependencies on stdio.h and machine.h.
19201 * src/getargs.h: New file.
19202 Let all `extern' declarations about getargs.c be replaced with
19203 inclusion of `getargs.h'.
19204 * src/Makefile.am (noinst_HEADERS): Adjust.
19205
19206 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19207 scope.
19208 (yyerror): Returns void, not int.
19209 * doc/bison.texinfo: Formatting changes.
19210
19211 2000-09-19 Akim Demaille <akim@epita.fr>
19212
19213 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19214 portable.
19215
19216 2000-09-18 Akim Demaille <akim@epita.fr>
19217
19218 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19219 * src/Makefile.am (INCLUDES): Don't.
19220 Be ready to fetch headers in lib/.
19221
19222 2000-09-18 Akim Demaille <akim@epita.fr>
19223
19224 * doc/bison.texinfo: Update the copyright.
19225 ANSIfy and GNUify the examples.
19226 Remove the old menu.
19227
19228 2000-09-18 Akim Demaille <akim@epita.fr>
19229
19230 First set of tests: use the `calc' example from the documentation.
19231
19232 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19233 is defined only when YYDEBUG is.
19234 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19235 * src/files.c (tryopen, tryclose): Formatting changes.
19236 Move to the top and be static.
19237 * src/reader.c (read_signed_integer): Likewise.
19238 * tests/calc.m4: New file.
19239 * Makefile.am, suite.m4: Adjust.
19240 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19241
19242 2000-09-18 Akim Demaille <akim@epita.fr>
19243
19244 Add support for an Autotest test suite for Bison.
19245
19246 * m4/m4.m4, m4/atconfig.m4: New files.
19247 * m4/Makefile.am (EXTRA_DIST): Adjust.
19248 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19249 files.
19250 * src/getargs.c: Display a more standard --version message.
19251 * src/reader.c (reader): Formatting changes.
19252 No longer depend upon VERSION_STRING.
19253 * configure.in: No longer use `dnl'.
19254 Set up the test suite and the new directory `tests/.
19255 (VERSION_STRING): Remove.
19256
19257 2000-04-14 Akim Demaille <akim@epita.fr>
19258
19259 * src/reader.c (copy_comment2): New function, same as former
19260 `copy_comment', but outputs into two FILE *.
19261 (copy_comment): Use it.
19262 (parse_union_decl): Use it.
19263 (get_type, parse_start_decl): Use the same `invalid' message.
19264 (parse_start_decl, parse_union_decl): Use the same `multiple'
19265 message.
19266 (parse_union_decl, copy_guard, copy_action): Use the same
19267 `unmatched' message.
19268 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19269
19270 2000-03-31 Akim Demaille <akim@epita.fr>
19271
19272 * src/files.c (tryopen, tryclose): Move to the top.
19273 Be static.
19274
19275 2000-03-31 Akim Demaille <akim@epita.fr>
19276
19277 * src/main.c (main): Don't call `done', exit does it.
19278
19279 2000-03-31 Akim Demaille <akim@epita.fr>
19280
19281 * allocate.c: s/return (foo)/return foo/.
19282 * lalr.c: Likewise.
19283 * LR0.c: Likewise.
19284 * output.c: Likewise.
19285 * reader.c: Likewise.
19286 * symtab.c: Likewise.
19287 * vmsgetargs.c: Likewise.
19288
19289 2000-03-31 Akim Demaille <akim@epita.fr>
19290
19291 Clean up the error reporting functions.
19292
19293 * src/report.c: New file.
19294 * src/report.h: Likewise.
19295 * src/Makefile.am: Adjust.
19296 * m4/error.m4: New file.
19297 * m4/Makefile.am: Adjust.
19298 * configure.in (jm_PREREQ_ERROR): Call it.
19299 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19300 Remove.
19301 (fatal, fatals): Remove. All callers use complain.c::fatal.
19302 (warn, warni, warns, warnss, warnss): Remove. All callers use
19303 complain.c::complain.
19304 (toomany): Remove, use fatal instead.
19305 * src/files.c (done): No argument, use complain_message_count.
19306 * src/main.c (main): Register `done' to `atexit'.
19307
19308 * src/getargs.c (usage): More `fputs', less `fprintf'.
19309
19310 2000-03-28 Akim Demaille <akim@epita.fr>
19311
19312 * lib/: New directory.
19313 * Makefile.am (SUBDIRS): Adjust.
19314 * configure.in: Adjust.
19315 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19316 useless.
19317 * src/alloca.c: Moved to lib/.
19318 * src/getopt.c: Likewise.
19319 * src/getopt1.c: Likewise.
19320 * src/getopt.h: Likewise.
19321 * src/ansi2knr.c: Likewise.
19322 * src/ansi2knr.1: Likewise.
19323 * src/Makefile.am: Adjust.
19324 * lib/Makefile.am: New file.
19325
19326 2000-03-28 Akim Demaille <akim@epita.fr>
19327
19328 * src/getargs.c (usage): Refresh the help message.
19329
19330 2000-03-17 Akim Demaille <akim@epita.fr>
19331
19332 * src/getopt1.c: Updated from textutils 2.0e
19333 * src/getopt.c: Likewise.
19334 * src/getopt.h: Likewise.
19335
19336 2000-03-17 Akim Demaille <akim@epita.fr>
19337
19338 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19339 the file name, not the whole `#line LINE FILE'.
19340
19341 2000-03-17 Akim Demaille <akim@epita.fr>
19342
19343 On syntax errors, report the token on which we choked.
19344
19345 * src/bison.s1 (yyparse): In the label yyerrlab, when
19346 YYERROR_VERBOSE, add yychar in msg.
19347
19348 2000-03-17 Akim Demaille <akim@epita.fr>
19349
19350 * src/reader.c (copy_at): New function.
19351 (copy_guard): Use it.
19352 (copy_action): Use it.
19353
19354 2000-03-17 Akim Demaille <akim@epita.fr>
19355
19356 Be kind to translators, save some useless translations.
19357
19358 * src/main.c (banner): New function.
19359 (fatal_banner): Use it.
19360 (warn_banner): Use it.
19361
19362 2000-03-17 Akim Demaille <akim@epita.fr>
19363
19364 * src/reader.c (copy_definition): Use copy_string and
19365 copy_comment. Removed now unused `match', `ended',
19366 `cplus_comment'.
19367 (copy_comment, copy_string): Moved, to be visible from
19368 copy_definition.
19369
19370 2000-03-17 Akim Demaille <akim@epita.fr>
19371
19372 * src/reader.c (copy_string): Declare `static inline'. No
19373 problems with inline, since it is checked by configure.
19374 (copy_comment): Likewise.
19375
19376 2000-03-17 Akim Demaille <akim@epita.fr>
19377
19378 * src/reader.c (packsymbols): Formatting changes.
19379
19380 2000-03-17 Akim Demaille <akim@epita.fr>
19381
19382 * src/reader.c (copy_comment): New function, factored out from:
19383 (copy_action): Use it. Removed now unused `match', `ended',
19384 `cplus_comment'.
19385 (copy_guard): Likewise.
19386
19387 2000-03-17 Akim Demaille <akim@epita.fr>
19388
19389 * src/reader.c (copy_string): New function, factored out from:
19390 (copy_action): Use it.
19391 (copy_guard): Likewise.
19392
19393 2000-03-17 Akim Demaille <akim@epita.fr>
19394
19395 Change the handling of @s so that they behave exactly like $s.
19396 There is now a pseudo variable @$ (readble and writable), location
19397 of the lhs of the rule (by default ranging from the location of
19398 the first symbol of the rhs, to the location of the last symbol,
19399 or, if the rhs is empty, YYLLOC).
19400
19401 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19402 yyval.
19403 (yyparse): When providing a default semantic action, provide a
19404 default location action.
19405 (after the $): No longer change `*YYLSP', just stack YYLOC the
19406 same way you stack YYVAL.
19407 * src/reader.c (read_declarations): Use warns.
19408 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19409 (copy_action, case '@'): Likewise.
19410 Use a standard error message, to save useless work from
19411 translators.
19412
19413 2000-03-17 Akim Demaille <akim@epita.fr>
19414
19415 * src/bison.s1: Formatting and cosmetics changes.
19416 * src/reader.c: Likewise.
19417 Update the Copyright notice.
19418
19419 2000-03-17 Akim Demaille <akim@epita.fr>
19420
19421 * src/bison.s1 (#line): All set to `#line' only, since the
19422 Makefile now handles them.
19423
19424 2000-03-16 Akim Demaille <akim@epita.fr>
19425
19426 * src/output.c (output_rule_data): Output the documentation of
19427 some of the tables.
19428 (Copyright notice): Update.
19429 Formatting changes.
19430
19431 2000-03-16 Akim Demaille <akim@epita.fr>
19432
19433 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19434 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19435 One `#if YYDEBUG' remains, since it uses variables which are
19436 defined only if `YYDEBUG != 0'.
19437
19438 2000-03-16 Akim Demaille <akim@epita.fr>
19439
19440 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19441 and related variables so that the similarities are highlighted.
19442
19443 2000-03-16 Akim Demaille <akim@epita.fr>
19444
19445 * src/bison.s1: Properly indent CPP directives.
19446
19447 2000-03-16 Akim Demaille <akim@epita.fr>
19448
19449 * src/bison.s1: Properly indent the `alloca' CPP section.
19450
19451 2000-03-16 Akim Demaille <akim@epita.fr>
19452
19453 Do not hard code values of directories in `configure.in'.
19454 Update the `configure' tool chain.
19455
19456 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19457 src/makefile.am.
19458 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19459 (AC_OUTPUT): Add m4/Makefile.
19460 Bump to bison 1.28a, 1.29 has never been released.
19461 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19462 handled via src/Makefile.am.
19463 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19464 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19465 autoheader.
19466 * Makefile.am (SUBDIRS): Add m4.
19467 (ACLOCAL_AM_FLAGS): New variable.
19468 (AUTOMAKE_OPTIONS): Add check-news.
19469 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19470 the proper line number and file name.
19471 (DEFS): Propagate the location of bison library files and of the
19472 locale files.
19473 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19474 builddir.
19475 * acinclude.m4: Remove, replaced by the directory m4.
19476 * m4/Makefile.am (EXTRA_DIST): New variable.
19477 * m4/gettext.m4: New file, from the fileutils.
19478 * m4/lcmessage.m4: Likewise
19479 * m4/progtest.m4: Likewise.
19480 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19481
19482 2000-03-10 Akim Demaille <akim@epita.fr>
19483
19484 * src/closure.c:
19485 Formatting changes of various comments.
19486 Respect the GNU coding standards at various places.
19487 Don't use `_()' when no translation is needed.
19488
19489 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19490
19491 * src/files.c:
19492 OS/2 honors TMPDIR environment variable.
19493
19494 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19495
19496 * doc/bison.texinfo: Tweaked spelling and grammar.
19497 Updated ISBN.
19498 Removed reference to price of printed copy.
19499 Mention BISON_SIMPLE and BISON_HAIRY.
19500
19501 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19502
19503 * configure.in, NEWS:
19504 Bison 1.29 released.
19505
19506 1999-10-27 Jesse Thilo <jthilo@gnu.org>
19507
19508 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19509 Added reference card.
19510
19511 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19512
19513 * po/ru.po: Added Russian translation.
19514
19515 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19516
19517 * configure.in: Added Russian translation.
19518
19519 1999-07-06 Jesse Thilo <jthilo@gnu.org>
19520
19521 * configure.in, NEWS, README:
19522 Released version 1.28.
19523
19524 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19525
19526 * src/system.h:
19527 Squashed redefinition warning on some systems.
19528
19529 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19530 Have configure build version string instead of relying on ANSI string
19531 concatentation.
19532
19533 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19534
19535 * po/POTFILES.in: Got rid of version.c.
19536
19537 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19538
19539 * acconfig.h, configure.in:
19540 Have configure build version string instead of relying on ANSI string
19541 concatentation.
19542
19543 1999-06-08 Jesse Thilo <jthilo@gnu.org>
19544
19545 * doc/bison.1:
19546 Dropped mention of `+' for long-named options.
19547
19548 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19549
19550 * src/files.c: Added <unistd.h> for unlink().
19551
19552 * src/Makefile.am, src/system.h:
19553 I18n fixes.
19554
19555 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19556
19557 * README: Added a FAQ list.
19558
19559 * configure.in, acconfig.h:
19560 I18n fixes.
19561
19562 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19563
19564 * doc/FAQ, doc/Makefile.am:
19565 Added a FAQ list.
19566
19567 1999-05-19 Jesse Thilo <jthilo@gnu.org>
19568
19569 * src/alloc.h, src/symtab.h, src/version.c:
19570 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19571
19572 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19573
19574 * src/.cvsignore, src/Makefile.am:
19575 Reorganized: sources in `src', documentation in `doc'.
19576
19577 * src/lex.c (literalchar):
19578 fixed the code for escaping double quotes (thanks
19579 Jonathan Czisny.)
19580
19581 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19582
19583 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19584 Adjusted paths to reflect directory reorganization.
19585
19586 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19587
19588 * doc/.cvsignore, doc/Makefile.am:
19589 Reorganized: sources in `src', documentation in `doc'.
19590
19591 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19592
19593 * configure.in:
19594 Updated AC_INIT file to reflect directory reorganization.
19595
19596 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19597 Reorganized: sources in `src', documentation in `doc'.
19598
19599 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19600
19601 * src/allocate.c:
19602 Don't declare calloc() and realloc() if not necessary.
19603
19604 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19605
19606 * configure.in, acconfig.h, acinclude.m4:
19607 Don't declare calloc() and realloc() if not necessary.
19608
19609 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19610
19611 * po/.cvsignore: Added i18n support.
19612
19613 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19614
19615 * acconfig.h, configure.in, Makefile.am:
19616 Added i18n support.
19617
19618 1999-03-22 Jesse Thilo <jthilo@gnu.org>
19619
19620 * src/bison.s1: Fixed #line numbers.
19621
19622 1999-03-15 Jesse Thilo <jthilo@gnu.org>
19623
19624 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19625 Added PO files from Translation Project.
19626
19627 1999-03-03 Jesse Thilo <jthilo@gnu.org>
19628
19629 * Makefile.am:
19630 Added support for non-ANSI compilers (ansi2knr).
19631
19632 1999-02-16 Jesse Thilo <jthilo@gnu.org>
19633
19634 * configure.in: Bumped version number to 1.27.
19635
19636 * Makefile.am:
19637 Added `bison.simple' to list of files removed by `make distclean'.
19638
19639 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19640
19641 * src/files.c, src/files.h:
19642 Defined locations of parser files in config.h instead of Makefile.
19643
19644 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19645
19646 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19647 Defined locations of parser files in config.h instead of Makefile.
19648
19649 1999-02-09 Jesse Thilo <jthilo@gnu.org>
19650
19651 * Makefile.am:
19652 Removed inappropriate use of $< macro.
19653
19654 1999-02-05 Jesse Thilo <jthilo@gnu.org>
19655
19656 * po/Makefile.in.in, po/POTFILES.in:
19657 Add `po' directory skeleton.
19658
19659 1999-01-27 Jesse Thilo <jthilo@gnu.org>
19660
19661 * README: Document help-bison list.
19662
19663 * configure.in: Add check for mkstemp().
19664
19665 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19666
19667 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19668 Hush a few compiler warnings.
19669
19670 * src/files.c:
19671 Add tryclose(), which verifies that fclose was successful.
19672 Hush a couple of compiler warnings.
19673
19674 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19675
19676 * Makefile.am, OChangeLog:
19677 ChangeLog is now automatically generated. Include the old version as
19678 OChangeLog.
19679
19680 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19681
19682 * 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:
19683 Update FSF address.
19684
19685 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19686
19687 * doc/bison.texinfo: Fix formatting glitch.
19688
19689 * doc/bison.texinfo: Update FSF address.
19690
19691 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19692
19693 * acconfig.h: Update FSF address.
19694
19695 1999-01-08 Jesse Thilo <jthilo@gnu.org>
19696
19697 * src/system.h:
19698 Don't define PACKAGE here, since config.h defines it.
19699
19700 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19701
19702 * src/reader.c: Update copyright date.
19703
19704 * src/main.c:
19705 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19706 favor of output directly to stderr (avoids buffer overruns).
19707
19708 * src/reader.c: Some checks for premature EOF.
19709
19710 * 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:
19711 Use prototypes if the compiler understands them.
19712
19713 * src/files.c: Honor TMPDIR on Unix hosts.
19714 Use prototypes if the compiler understands them.
19715
19716 * src/reader.c:
19717 Fix a couple of buffer overrun bugs.
19718 Use prototypes if the compiler understands them.
19719
19720 * src/system.h: Include unistd.h and ctype.h.
19721 Use #ifdef instead of #if for NLS symbols.
19722
19723 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19724
19725 * doc/bison.texinfo:
19726 Delete comment "consider using @set for edition number, etc..." since
19727 we now are doing so.
19728
19729 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19730
19731 * configure.in:
19732 Use prototypes if the compiler understands them.
19733
19734 * NEWS: Document 1.26 highlights.
19735
19736 * Makefile.am: Require Automake 1.3 or later.
19737
19738 * acconfig.h:
19739 Use prototypes if the compiler understands them.
19740
19741 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19742
19743 * src/version.c:
19744 Use VERSION symbol from automake for version number.
19745
19746 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19747
19748 * acconfig.h, configure.in, version.cin:
19749 Use VERSION symbol from automake for version number.
19750
19751 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19752
19753 * Makefile.am:
19754 Distribute original version of simple parser (bison.s1), not built
19755 version (bison.simple).
19756
19757 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19758
19759 * doc/bison.texinfo: Add info dir entry.
19760
19761 * doc/bison.texinfo:
19762 Let automake put version number into documentation.
19763
19764 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19765
19766 * src/bison.cld, src/build.com, src/vmshlp.mar:
19767 Add non-RCS files from /gd/gnu/bison.
19768
19769 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19770
19771 * doc/bison.1:
19772 Document the BISON_HAIRY and BISON_SIMPLE variables.
19773
19774 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19775
19776 * src/version.c: Build version.c automatically.
19777
19778 * src/reader.c:
19779 Fix token numbering (used to start at 258, not 257).
19780
19781 * src/system.h: Include config.h.
19782
19783 * src/getargs.c: Update bug report address.
19784
19785 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19786 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19787
19788 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19789
19790 * Makefile.am:
19791 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19792
19793 * configure.in, version.cin:
19794 Build version.c automatically.
19795
19796 * AUTHORS: Add AUTHORS file.
19797
19798 * README: Update bug report address.
19799
19800 * bison.simple:
19801 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19802
19803 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19804 Add automake stuff.
19805
19806 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19807
19808 * doc/bison.texinfo: Clean up some formatting.
19809
19810 1998-05-05 Richard Stallman <rms@gnu.org>
19811
19812 * doc/bison.texinfo:
19813 Explain better why to make a pure parser.
19814
19815 1998-01-05 Richard Stallman <rms@gnu.org>
19816
19817 * src/files.c (openfiles):
19818 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19819 find a temporary directory, if possible. Do not unlink files while
19820 they are open.
19821
19822 1997-08-25 Richard Stallman <rms@gnu.org>
19823
19824 * src/reader.c (stack_offset;):
19825 Change some warni to warns.
19826
19827 * src/lex.c (literalchar): Use warns, not warni.
19828
19829 1997-06-28 Richard Stallman <rms@gnu.org>
19830
19831 * src/bison.s1: Add a Bison version comment.
19832
19833 * src/main.c (fatal, warn, berror):
19834 Use program_name.
19835
19836 1997-06-28 Richard Stallman <rms@gnu.org>
19837
19838 * Makefile.in (bison_version): New variable.
19839 (dist): Use that variable.
19840 (bison.s1): Substitute the Bison version into bison.simple.
19841
19842 * bison.simple: Add a Bison version comment.
19843
19844 1997-06-18 Richard Stallman <rms@gnu.org>
19845
19846 * src/main.c (fatal, warn, berror):
19847 Make error messages standard.
19848 (toomany): Improve error message text.
19849
19850 * 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:
19851 new.h renamed to alloc.h.
19852
19853 1997-06-18 Richard Stallman <rms@gnu.org>
19854
19855 * Makefile.in: new.h renamed to alloc.h.
19856
19857 1997-05-24 Richard Stallman <rms@gnu.org>
19858
19859 * src/lex.c (literalchar):
19860 Fix the code for escaping \, " and '.
19861
19862 (lex): Avoid trouble when there are many chars
19863 to discard in a char literal with just several chars in it.
19864
19865 1997-05-17 Richard Stallman <rms@gnu.org>
19866
19867 * src/bison.s1:
19868 Use malloc, if using alloca is troublesome.
19869 (YYSTACK_USE_ALLOCA): New flag macro.
19870 Define it for some systems and compilers.
19871 (YYSTACK_ALLOC): New macro.
19872 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19873 If it was malloc'd, free it.
19874
19875 1997-05-17 Richard Stallman <rms@gnu.org>
19876
19877 * bison.simple:
19878 Use malloc, if using alloca is troublesome.
19879 (YYSTACK_USE_ALLOCA): New flag macro.
19880 Define it for some systems and compilers.
19881 (YYSTACK_ALLOC): New macro.
19882 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19883 If it was malloc'd, free it.
19884
19885 1997-04-23 Richard Stallman <rms@gnu.org>
19886
19887 * src/bison.s1:
19888 (alloca) [__hpux]: Always define as __builtin_alloca.
19889
19890 1997-04-23 Richard Stallman <rms@gnu.org>
19891
19892 * bison.simple:
19893 (alloca) [__hpux]: Always define as __builtin_alloca.
19894
19895 1997-04-22 Richard Stallman <rms@gnu.org>
19896
19897 * src/bison.s1:
19898 [__hpux]: Include alloca.h (right for HPUX 10)
19899 instead of declaring alloca (right for HPUX 9).
19900
19901 * src/bison.s1 (__yy_memcpy):
19902 Declare arg `count' as unsigned int.
19903 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19904
19905 1997-04-22 Richard Stallman <rms@gnu.org>
19906
19907 * bison.simple:
19908 [__hpux]: Include alloca.h (right for HPUX 10)
19909 instead of declaring alloca (right for HPUX 9).
19910
19911 * bison.simple (__yy_memcpy):
19912 Declare arg `count' as unsigned int.
19913 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19914
19915 1997-01-03 Richard Stallman <rms@gnu.org>
19916
19917 * src/allocate.c: [__STDC__ or _MSC_VER]:
19918 Declare calloc and realloc to return void *.
19919
19920 1997-01-02 Richard Stallman <rms@gnu.org>
19921
19922 * src/system.h:
19923 [_MSC_VER]: Include stdlib.h and process.h.
19924 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19925
19926 * src/main.c (main): Return FAILURE as a value.
19927 (printable_version): Declare arg as int, not char.
19928
19929 1997-01-02 Richard Stallman <rms@gnu.org>
19930
19931 * Makefile.in (dist):
19932 Explicitly check for symlinks, and copy them.
19933
19934 1996-12-19 Richard Stallman <rms@gnu.org>
19935
19936 * src/files.c:
19937 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19938
19939 1996-12-18 Paul Eggert <eggert@gnu.org>
19940
19941 * src/bison.s1 (yyparse):
19942 If __GNUC__ and YYPARSE_PARAM are both defined,
19943 declare yyparse to have a void * argument.
19944
19945 1996-12-18 Paul Eggert <eggert@gnu.org>
19946
19947 * bison.simple (yyparse):
19948 If __GNUC__ and YYPARSE_PARAM are both defined,
19949 declare yyparse to have a void * argument.
19950
19951 1996-12-17 Richard Stallman <rms@gnu.org>
19952
19953 * src/reduce.c (nbits): Add some casts.
19954
19955 1996-08-12 Richard Stallman <rms@gnu.org>
19956
19957 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19958
19959 1996-08-12 Richard Stallman <rms@gnu.org>
19960
19961 * bison.simple: Test _MSDOS as well as _MSDOS_.
19962
19963 1996-07-31 Richard Stallman <rms@gnu.org>
19964
19965 * src/bison.s1:
19966 [__sun && __i386]: Include alloca.h.
19967
19968 1996-07-31 Richard Stallman <rms@gnu.org>
19969
19970 * bison.simple:
19971 [__sun && __i386]: Include alloca.h.
19972
19973 1996-07-30 Richard Stallman <rms@gnu.org>
19974
19975 * src/bison.s1: Comment change.
19976
19977 * src/bison.s1: Test _MSDOS_, not MSDOS.
19978
19979 1996-07-30 Richard Stallman <rms@gnu.org>
19980
19981 * bison.simple: Comment change.
19982
19983 * bison.simple: Test _MSDOS_, not MSDOS.
19984
19985 1996-06-01 Richard Stallman <rms@gnu.org>
19986
19987 * 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:
19988 Insert `_' macro around many string constants.
19989
19990 * src/main.c:
19991 Insert `_' macro around many string constants.
19992
19993 (main): Call setlocale, bindtextdomain and textdomain.
19994
19995 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19996 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19997 [ENABLE_NLS]: Include libintl.h.
19998 [ENABLE_NLS] (gettext): Define.
19999 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20000 (N_, PACKAGE, LOCALEDIR): New macros.
20001
20002 1996-06-01 Richard Stallman <rms@gnu.org>
20003
20004 * POTFILES.in: New file.
20005
20006 * Makefile.in (allocate.o):
20007 Define target explicitly.
20008
20009 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20010 (LDFLAGS): Set to @LDFLAGS@.
20011 (configure): Run autoconf only if preceding `cd' succeeds.
20012 (bison.s1): Redirect output to temporary file then move the
20013 temporary to the target, rather than redirecting directly to bison.s1.
20014 (clean): Remove config.status and config.log.
20015 (distclean): Don't remove config.status here.
20016
20017 1996-05-12 Richard Stallman <rms@gnu.org>
20018
20019 * src/bison.s1:
20020 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20021
20022 1996-05-12 Richard Stallman <rms@gnu.org>
20023
20024 * bison.simple:
20025 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20026
20027 1996-05-11 Richard Stallman <rms@gnu.org>
20028
20029 * src/bison.s1 (__yy_memcpy):
20030 Really reorder the args, as was supposedly done on Feb 14 1995.
20031 (yyparse): Calls changed accordingly.
20032
20033 1996-05-11 Richard Stallman <rms@gnu.org>
20034
20035 * Makefile.in (dist): Don't use $(srcdir).
20036
20037 * bison.simple (__yy_memcpy):
20038 Really reorder the args, as was supposedly done on Feb 14 1995.
20039 (yyparse): Calls changed accordingly.
20040
20041 1996-01-27 Richard Stallman <rms@gnu.org>
20042
20043 * src/output.c (output_rule_data):
20044 Test YYERROR_VERBOSE in the conditional
20045 around the definition of ttyname.
20046
20047 1995-12-29 Richard Stallman <rms@gnu.org>
20048
20049 * src/bison.s1:
20050 Fix line numbers in #line commands.
20051
20052 1995-12-29 Richard Stallman <rms@gnu.org>
20053
20054 * bison.simple:
20055 Fix line numbers in #line commands.
20056
20057 1995-12-27 Richard Stallman <rms@gnu.org>
20058
20059 * src/bison.s1 (YYPARSE_PARAM_DECL):
20060 In C++, make it always null.
20061 (YYPARSE_PARAM_ARG): New macro.
20062 (yyparse): Use YYPARSE_PARAM_ARG.
20063
20064 1995-12-27 Richard Stallman <rms@gnu.org>
20065
20066 * bison.simple (YYPARSE_PARAM_DECL):
20067 In C++, make it always null.
20068 (YYPARSE_PARAM_ARG): New macro.
20069 (yyparse): Use YYPARSE_PARAM_ARG.
20070
20071 1995-11-29 Richard Stallman <rms@gnu.org>
20072
20073 * doc/bison.texinfo:
20074 Describe literal string tokens, %raw, %no_lines, %token_table.
20075
20076 1995-11-29 Daniel Hagerty <hag@gnu.org>
20077
20078 * doc/bison.texinfo: Fixed update date
20079
20080 1995-10-16 Richard Stallman <rms@gnu.org>
20081
20082 * src/version.c: Version 1.25.
20083
20084 1995-10-16 Richard Stallman <rms@gnu.org>
20085
20086 * NEWS: *** empty log message ***
20087
20088 1995-10-16 Richard Stallman <rms@gnu.org>
20089
20090 * doc/bison.1, doc/bison.rnh:
20091 Add new options.
20092
20093 1995-10-15 Richard Stallman <rms@gnu.org>
20094
20095 * src/vmsgetargs.c, src/getargs.c:
20096 Added -n, -k, and -raw switches.
20097 (noparserflag, toknumflag, rawtoknumflag): New variables.
20098
20099 * src/symtab.h (SALIAS):
20100 New #define for adding aliases to %token.
20101 (struct bucket): Added `alias' field.
20102
20103 * src/reduce.c (reduce_grammar):
20104 Revise error message.
20105 (print_notices): Remove final `.' from error message.
20106
20107 * src/reader.c (reader_output_yylsp):
20108 New function.
20109 (readgram): Use `#if 0' around code that accepted %command
20110 inside grammar rules: The documentation doesn't allow it,
20111 and it will fail since the %command processors scan for the next %.
20112 (parse_token_decl): Extended the %token
20113 declaration to allow a multi-character symbol as an alias.
20114 (parse_thong_decl): New function.
20115 (read_declarations): Added %thong declarations.
20116 (read_declarations): Handle NOOP to deal with allowing
20117 % declarations as another means to specify the flags.
20118 (readgram): Allow %prec prior to semantics embedded in a rule.
20119 (skip_to_char, read_declarations, copy_definition)
20120 (parse_token_decl, parse_start_decl, parse_type_decl)
20121 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20122 (get_type_name, copy_guard, copy_action, readgram)
20123 (get_type, packsymbols): Revised most error messages.
20124 Changed `fatal' to `warnxxx' to avoid aborting for error.
20125 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20126 (read_declarations): Improve the error message for
20127 an invalid character. Do not abort.
20128 (read_declarations, copy_guard, copy_action): Use
20129 printable_version to avoid unprintable characters in printed output.
20130 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20131 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20132 Allow the type of a non-terminal can be given
20133 more than once, as long as all specifications give the same type.
20134
20135 * src/output.c:
20136 (output_headers, output_trailers, output, output_gram)
20137 (output_rule_data): Implement noparserflag variable.
20138 Implement toknumflag variable.
20139 (output): Call reader_output_yylsp to output LTYPESTR.
20140
20141 * src/main.c (main):
20142 If reader sees an error, don't process the grammar.
20143 (fatals): Updated to not use VARARGS1.
20144 (printable_version, int_to_string, warn, warni, warns, warnss)
20145 (warnsss): New error reporting functions. Avoid abort for error.
20146
20147 * src/lex.h:
20148 Added THONG and NOOP for alias processing.
20149 Added SETOPT for the new code that allows setting options with %flags.
20150
20151 * src/lex.c:
20152 Include getopt.h. Add some extern decls.
20153 (safegetc): New function to deal with EOF gracefully.
20154 (literalchar); new function to deal with reading \ escapes.
20155 (lex): Use literalchar.
20156 (lex): Implemented "..." tokens.
20157 (literalchar, lex, parse_percent_token): Made tokenbuffer
20158 always contain the token. This includes growing the token
20159 buffer while reading an integer.
20160 (parse_percent_token): Replaced if-else statement with percent_table.
20161 (parse_percent_token): Added % declarations as another
20162 way to specify the flags -n, -l, and -r. Also added hooks for
20163 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20164 major changes to files.c.
20165 (lex) Retain in the incoming stream a character following
20166 an incorrect '/'.
20167 (skip_white_space, lex): Revised most error messages
20168 and changed fatal to warn to avoid aborting.
20169 (percent_table): Added %thong declarations.
20170
20171 * src/gram.h: Comment changes.
20172
20173 * src/files.c (openfiles, open_extra_files, done):
20174 Add faction flag
20175 and actfile file. Handle noparserflag. Both for -n switch.
20176
20177 * src/conflicts.c (resolve_sr_conflict):
20178 Remove use of alloca.
20179
20180 1995-06-01 Jim Meyering <meyering@gnu.org>
20181
20182 * doc/bison.texinfo: *** empty log message ***
20183
20184 1995-05-06 Richard Stallman <rms@gnu.org>
20185
20186 * src/bison.s1: Comment change.
20187
20188 1995-05-06 Richard Stallman <rms@gnu.org>
20189
20190 * bison.simple: Comment change.
20191
20192 1995-05-03 Richard Stallman <rms@gnu.org>
20193
20194 * src/version.c: Version now 1.24.
20195
20196 * src/bison.s1: Change distribution terms.
20197
20198 * src/version.c: Version now 1.23.
20199
20200 1995-05-03 Richard Stallman <rms@gnu.org>
20201
20202 * doc/bison.texinfo:
20203 Rewrite "Conditions for Using Bison".
20204 Update version to 1.24.
20205
20206 1995-05-03 Richard Stallman <rms@gnu.org>
20207
20208 * bison.simple: Change distribution terms.
20209
20210 1995-02-23 Richard Stallman <rms@gnu.org>
20211
20212 * src/files.c: Test __VMS_POSIX as well as VMS.
20213
20214 1995-02-14 Jim Meyering <meyering@gnu.org>
20215
20216 * src/bison.s1 (__yy_memcpy):
20217 Renamed from __yy_bcopy to avoid
20218 confusion. Reverse FROM and TO arguments to be consistent with
20219 those of memcpy.
20220
20221 1995-02-14 Jim Meyering <meyering@gnu.org>
20222
20223 * bison.simple (__yy_memcpy):
20224 Renamed from __yy_bcopy to avoid
20225 confusion. Reverse FROM and TO arguments to be consistent with
20226 those of memcpy.
20227
20228 1994-11-10 David J. MacKenzie <djm@gnu.org>
20229
20230 * NEWS: reformat
20231
20232 * NEWS: New file.
20233
20234 * Makefile.in (DISTFILES): Include NEWS.
20235
20236 * Makefile.in (DISTFILES):
20237 Include install-sh, not install.sh.
20238
20239 * configure.in: Update to Autoconf v2 macro names.
20240
20241 1994-10-05 David J. MacKenzie <djm@gnu.org>
20242
20243 * Makefile.in: fix typo
20244
20245 * Makefile.in (prefix, exec_prefix):
20246 Let configure set them.
20247
20248 1994-09-28 David J. MacKenzie <djm@gnu.org>
20249
20250 * Makefile.in: Set datadir to $(prefix)/share.
20251
20252 1994-09-15 Richard Stallman <rms@gnu.org>
20253
20254 * src/bison.s1:
20255 Update copyright notice and GPL version.
20256
20257 1994-09-15 Richard Stallman <rms@gnu.org>
20258
20259 * bison.simple:
20260 Update copyright notice and GPL version.
20261
20262 1994-07-12 Richard Stallman <rms@gnu.org>
20263
20264 * src/reduce.c, src/reader.c:
20265 entered into RCS
20266
20267 1994-05-05 David J. MacKenzie <djm@gnu.org>
20268
20269 * Makefile.in: entered into RCS
20270
20271 1994-03-26 Richard Stallman <rms@gnu.org>
20272
20273 * src/bison.s1: entered into RCS
20274
20275 1994-03-26 Richard Stallman <rms@gnu.org>
20276
20277 * bison.simple: entered into RCS
20278
20279 1994-03-25 Richard Stallman <rms@gnu.org>
20280
20281 * src/main.c: entered into RCS
20282
20283 1994-03-24 Richard Stallman <rms@gnu.org>
20284
20285 * src/conflicts.c: entered into RCS
20286
20287 1994-01-02 Richard Stallman <rms@gnu.org>
20288
20289 * Makefile.in: *** empty log message ***
20290
20291 1993-11-21 Richard Stallman <rms@gnu.org>
20292
20293 * src/bison.s1: *** empty log message ***
20294
20295 1993-11-21 Richard Stallman <rms@gnu.org>
20296
20297 * doc/bison.texinfo: entered into RCS
20298
20299 * doc/bison.texinfo: *** empty log message ***
20300
20301 1993-11-21 Richard Stallman <rms@gnu.org>
20302
20303 * bison.simple: *** empty log message ***
20304
20305 1993-10-25 David J. MacKenzie <djm@gnu.org>
20306
20307 * doc/bison.texinfo: *** empty log message ***
20308
20309 1993-10-19 Richard Stallman <rms@gnu.org>
20310
20311 * src/bison.s1: *** empty log message ***
20312
20313 1993-10-19 Richard Stallman <rms@gnu.org>
20314
20315 * bison.simple: *** empty log message ***
20316
20317 1993-10-14 Richard Stallman <rms@gnu.org>
20318
20319 * src/bison.s1: *** empty log message ***
20320
20321 1993-10-14 Richard Stallman <rms@gnu.org>
20322
20323 * bison.simple: *** empty log message ***
20324
20325 1993-09-14 David J. MacKenzie <djm@gnu.org>
20326
20327 * doc/bison.texinfo: *** empty log message ***
20328
20329 1993-09-13 Noah Friedman <friedman@gnu.org>
20330
20331 * Makefile.in: *** empty log message ***
20332
20333 1993-09-10 Richard Stallman <rms@gnu.org>
20334
20335 * src/conflicts.c: *** empty log message ***
20336
20337 * src/system.h: entered into RCS
20338
20339 1993-09-10 Richard Stallman <rms@gnu.org>
20340
20341 * doc/bison.1: entered into RCS
20342
20343 1993-09-06 Noah Friedman <friedman@gnu.org>
20344
20345 * src/version.c: entered into RCS
20346
20347 1993-09-06 Noah Friedman <friedman@gnu.org>
20348
20349 * Makefile.in: *** empty log message ***
20350
20351 1993-07-30 David J. MacKenzie <djm@gnu.org>
20352
20353 * Makefile.in: *** empty log message ***
20354
20355 1993-07-24 Richard Stallman <rms@gnu.org>
20356
20357 * src/bison.s1: *** empty log message ***
20358
20359 1993-07-24 Richard Stallman <rms@gnu.org>
20360
20361 * bison.simple: *** empty log message ***
20362
20363 1993-07-08 David J. MacKenzie <djm@gnu.org>
20364
20365 * Makefile.in: *** empty log message ***
20366
20367 1993-07-04 Richard Stallman <rms@gnu.org>
20368
20369 * src/bison.s1: *** empty log message ***
20370
20371 1993-07-04 Richard Stallman <rms@gnu.org>
20372
20373 * bison.simple: *** empty log message ***
20374
20375 1993-06-26 David J. MacKenzie <djm@gnu.org>
20376
20377 * src/getargs.c: entered into RCS
20378
20379 1993-06-26 David J. MacKenzie <djm@gnu.org>
20380
20381 * doc/bison.texinfo: *** empty log message ***
20382
20383 * doc/bison.1: New file.
20384
20385 1993-06-25 Richard Stallman <rms@gnu.org>
20386
20387 * src/getargs.c: New file.
20388
20389 1993-06-16 Richard Stallman <rms@gnu.org>
20390
20391 * src/bison.s1: *** empty log message ***
20392
20393 1993-06-16 Richard Stallman <rms@gnu.org>
20394
20395 * bison.simple: *** empty log message ***
20396
20397 1993-06-03 Richard Stallman <rms@gnu.org>
20398
20399 * src/bison.s1: New file.
20400
20401 1993-06-03 Richard Stallman <rms@gnu.org>
20402
20403 * doc/bison.texinfo: *** empty log message ***
20404
20405 1993-06-03 Richard Stallman <rms@gnu.org>
20406
20407 * bison.simple: New file.
20408
20409 1993-05-19 Richard Stallman <rms@gnu.org>
20410
20411 * doc/bison.texinfo: New file.
20412
20413 1993-05-07 Noah Friedman <friedman@gnu.org>
20414
20415 * Makefile.in: *** empty log message ***
20416
20417 1993-04-28 Noah Friedman <friedman@gnu.org>
20418
20419 * src/reader.c: *** empty log message ***
20420
20421 1993-04-23 Noah Friedman <friedman@gnu.org>
20422
20423 * src/alloc.h: entered into RCS
20424
20425 1993-04-20 David J. MacKenzie <djm@gnu.org>
20426
20427 * src/version.c: *** empty log message ***
20428
20429 * src/files.c, src/allocate.c:
20430 entered into RCS
20431
20432 * src/reader.c: *** empty log message ***
20433
20434 * src/lex.c: entered into RCS
20435
20436 * src/conflicts.c: New file.
20437
20438 * src/symtab.c: entered into RCS
20439
20440 * src/alloc.h: New file.
20441
20442 * src/LR0.c: entered into RCS
20443
20444 1993-04-18 Noah Friedman <friedman@gnu.org>
20445
20446 * src/reader.c: New file.
20447
20448 * src/version.c: *** empty log message ***
20449
20450 1993-04-18 Noah Friedman <friedman@gnu.org>
20451
20452 * Makefile.in: *** empty log message ***
20453
20454 1993-04-17 Noah Friedman <friedman@gnu.org>
20455
20456 * Makefile.in: *** empty log message ***
20457
20458 1993-04-15 Richard Stallman <rms@gnu.org>
20459
20460 * src/main.c, src/files.c:
20461 New file.
20462
20463 1993-04-15 Noah Friedman <friedman@gnu.org>
20464
20465 * configure.in: entered into RCS
20466
20467 * configure.in: *** empty log message ***
20468
20469 * configure.in: New file.
20470
20471 1993-04-14 Richard Stallman <rms@gnu.org>
20472
20473 * Makefile.in: New file.
20474
20475 1993-04-13 Richard Stallman <rms@gnu.org>
20476
20477 * src/version.c: New file.
20478
20479 1993-03-25 Richard Stallman <rms@gnu.org>
20480
20481 * src/output.c: entered into RCS
20482
20483 1992-09-25 Richard Stallman <rms@gnu.org>
20484
20485 * configure.bat: entered into RCS
20486
20487 1992-06-22 Richard Stallman <rms@gnu.org>
20488
20489 * src/vmsgetargs.c: entered into RCS
20490
20491 1992-06-22 Richard Stallman <rms@gnu.org>
20492
20493 * doc/bison.rnh: entered into RCS
20494
20495 1992-04-20 David J. MacKenzie <djm@gnu.org>
20496
20497 * README: entered into RCS
20498
20499 1992-01-22 Richard Stallman <rms@gnu.org>
20500
20501 * src/machine.h: entered into RCS
20502
20503 1991-12-21 Richard Stallman <rms@gnu.org>
20504
20505 * src/lalr.c, src/closure.c:
20506 entered into RCS
20507
20508 1991-12-20 Richard Stallman <rms@gnu.org>
20509
20510 * src/state.h: entered into RCS
20511
20512 1991-12-18 Richard Stallman <rms@gnu.org>
20513
20514 * src/print.c, src/nullable.c, src/derives.c:
20515 entered into RCS
20516
20517 1991-11-03 David J. MacKenzie <djm@gnu.org>
20518
20519 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20520 entered into RCS
20521
20522 1988-09-09 Richard Stallman <rms@gnu.org>
20523
20524 * src/bison.hairy: entered into RCS
20525
20526 1987-12-16 Richard Stallman <rms@gnu.org>
20527
20528 * REFERENCES: entered into RCS
20529
20530
20531 -----
20532
20533 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20534 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
20535 Free Software Foundation, Inc.
20536
20537 Copying and distribution of this file, with or without
20538 modification, are permitted provided the copyright notice and this
20539 notice are preserved.
20540
20541 $Id$