]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* data/yacc.c: Reformat m4 a little for readability.
[bison.git] / ChangeLog
... / ...
CommitLineData
12008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 * data/yacc.c: Reformat m4 a little for readability.
4 * src/lalr.c (build_relations): Correct comment.
5
62008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7
8 DJGPP specific issue.
9 * djgpp/config.sed: Fixes required to run configure scripts generated
10 by autoconf 2.62.
11
122008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
13
14 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
15 coordinator@translationproject.org.
16
172008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
18
19 * THANKS: Add Eric Blake.
20
212008-04-23 Eric Blake <ebb9@byu.net>
22
23 Revert prior patch, by working around autoconf regression.
24 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
25 ("Output file name: ("): Uncomment test.
26 ("Output file name: )"): Likewise.
27 Based on an idea from Noah Misch.
28
292008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
30
31 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
32 2.61. Reported by Juan Manuel Guerrero at
33 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
34 * tests/output.at ("Output file name: ("): Comment out test case for
35 now.
36 ("Output file name: )"): Likewise.
37
382008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
39
40 * GNUmakefile: Update git-version-gen invocation so make dist
41 succeeds.
42
432008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
44
45 Update to the current gnulib CVS repository, and fix trigraph handling
46 in Bison.
47 * bootstrap: Update gnulib CVS repository URL.
48 (symlink_to_dir): Encapsulate the code that guarantees the destination
49 directory exists into...
50 (check_dst_dir): ... this new function, and...
51 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
52 fail when copying files into lib/uniwidth/.
53 * src/output.c (prepare_symbols): When writing yytname muscles, where
54 symbol names will be encoded in C-string literals, tell quotearg to
55 escape trigraphs. This used to be the default in gnulib.
56 * tests/regression.at (Token definitions): Because of the change in
57 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
58 escapes trigraphs in symbol names. Thus, yytname no longer has
59 trigraphs unnecessarily doubly escaped. Update test case output.
60 Extend test case to be sure Bison's own error messages will no longer
61 have trigraphs in symbol names unnecessarily escaped once.
62
632008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
64
65 Fix make dist infinite loop reported by Juan Manuel Guerrero at
66 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
67 * .cvsignore: Add .version.
68 * .version.in: New.
69 * bootstrap.conf (gnulib_modules): Add git-version-gen.
70 * configure.ac (AC_CONFIG_FILES): Add .version.
71 * build-aux/.cvsignore: Add git-version-gen.
72
732008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
74
75 * NEWS (2.3a+): Mention that -g now takes an argument.
76 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
77 consistency. Update the -g and -x entries now that they take
78 arguments. Use brackets to indicate optional arguments.
79 * src/getargs.c (usage): Explain the relationship between arguments of
80 long and short options more completely. Document --defines and -d
81 separately since the former takes an argument but, for POSIX Yacc, the
82 latter does not.
83 (short_options): Let -W take an optional argument like --warnings.
84 (getargs): Sort cases.
85
862008-02-28 Akim Demaille <demaille@gostai.com>
87
88 * doc/bison.texinfo: Fix a few typos.
89
902008-02-28 Akim Demaille <akim@epita.fr>
91
92 * doc/bison.texinfo (Bison Options): Document -W.
93 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
94
952008-02-28 Akim Demaille <akim@epita.fr>
96
97 * src/getargs.c (short_options): Split and sort for readability.
98 -g and -x take optional arguments, just like their long options.
99 * build-aux/cross-options.pl: Use /x to make the regexp easier to
100 understand.
101 Fix the handling of $opt which resulted in all the argument to be
102 considered as optional.
103
1042008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
105
106 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
107 say its interface is experimental.
108 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
109 Java.
110 (Bison Options): In the -L and --language entry, mention Java.
111 (Java Bison Interface): Say the interface is experimental.
112 * src/getargs.c (usage): Mention -L and --language.
113
114 * NEWS (2.3a+): Say the push parsing interface is experimental.
115 * doc/bison.texinfo (Push Decl): Likewise.
116 (Decl Summary): Likewise in the "%define api.push_pull" entry.
117 (Push Parser Function): Likewise.
118 (Pull Parser Function): Likewise.
119 (Parser Create Function): Likewise.
120 (Parser Delete Function): Likewise.
121 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
122 yypull_parse, and yypush_parse entries.
123
124 * NEWS (2.3a+): Mention XML support, and say the schema is
125 experimental.
126 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
127 * src/getargs.c (usage): Say the XML schema is experimental.
128
129 * NEWS (2.3a+): Say option instead of flag.
130
1312008-02-21 Wojciech Polak <polak@gnu.org>
132
133 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
134 text.
135
1362008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
137
138 Fix impure push parser compile error reported by Bob Rossi at
139 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
140 * data/yacc.c: Clean up whitespace in the output a little.
141 (yypstate_allocated): Define for impure push parsers regardless of
142 whether the pull interface is also requested.
143 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
144 check impure push parsers without the pull interface.
145
146 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
147 yyerror takes arguments specified by %parse-param while yypstate_new
148 does not.
149 * doc/bison.texinfo (Parser Create Function): Document that
150 yypstate_new returns 0 for multiple impure parser instances.
151 * tests/push.at (Push Parsing: Multiple impure instances): Update
152 expected stderr output.
153
1542008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
155
156 * runtime-po/POTFILES.in (push.c): Remove.
157
1582008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
159
160 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
161 * data/push.c: Rename to...
162 * data/yacc.c: ... this, overwriting it.
163 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
164 `%push-pull-parser' -> `%define api.push_pull "both"'.
165 Remove old yacc.c tests, and update push.c tests to yacc.c.
166
1672008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
168
169 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
170 `"%code top" blocks' instead of `%code "top" blocks'.
171 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
172 Clean up whitespace in the output a little.
173
1742008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
175
176 Fix documentation problems reported by Tim Josling at
177 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
178 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
179 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
180 integers. Explain the effect of literal string aliases on error
181 messages. Copy token 0 documentation from the C++ skeleton
182 documentation.
183
1842008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
185
186 Accept a token number in a %left, %right, or %nonassoc for POSIX
187 conformance. Reported by Tim Josling at
188 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
189 * NEWS (2.3a+): Mention.
190 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
191 and code numbers are treated by precedence declarations.
192 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
193 of symbols.1.
194 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
195 of symbol.
196 (symbol.prec): New, just like symbol but allows INT.
197 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
198 longer holds.
199 * tests/regression.at (Token number in precedence declaration): New
200 test case.
201
2022008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
203
204 DJGPP specific issues.
205 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
206 be changed. Copyright timestamp adjusted.
207 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
208 be changed. Copyright timestamp adjusted.
209 * djgpp/config.site: Copyright timestamp adjusted.
210 * djgpp/config_h.sed: Copyright timestamp adjusted.
211 * djgpp/djunpack.bat: Copyright timestamp adjusted.
212 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
213 filename translation list.
214 * djgpp/subpipe.c (init_subpipe): Check the environment variables
215 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
216 files shall be created. Before trying to use the temp dir where the
217 environment variable points to check that the dir really exists. If
218 not default to the cwd as temp dir. Copyright timestamp adjusted.
219 * djgpp/subpipe.h: Copyright timestamp adjusted.
220 * djgpp/testsuite.sed: Copyright timestamp adjusted.
221
2222008-01-30 Paul Eggert <eggert@cs.ucla.edu>
223
224 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
225
2262008-01-09 Paul Eggert <eggert@cs.ucla.edu>
227
228 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
229 Problem reported by Claudio Saavedra in
230 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
231
2322008-01-05 Wojciech Polak <polak@gnu.org>
233
234 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
235 document's title with the input grammar file name.
236
2372007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
238
239 Automate regression testing of the XML/XSLT implementation. Discussed
240 starting at
241 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
242 * configure.ac (XSLTPROC): New substitution.
243 * Makefile.am (maintainer-xml-check): New phony target invoking...
244 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
245 invoking make maintainer-check with BISON_TEST_XML=1.
246 * tests/atlocal.in (XSLTPROC): New.
247 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
248 not to report reachable memory when Bison is expected to have a
249 non-zero exit status and (2) to compare XML/XSLT output with --graph
250 and --report=all output for every working grammar when
251 BISON_TEST_XML=1.
252 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
253 (AT_BISON_CHECK_XML): New.
254 (AT_QUELL_VALGRIND): New.
255 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
256 (AT_CHECK): ... don't redefine this since this was the old way to
257 quell Valgrind.
258 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
259 AT_BISON_CHECK invocations.
260 * tests/c++.at: Likewise.
261 * tests/calc.at: Likewise.
262 * tests/conflicts.at: Likewise.
263 * tests/cxx-type.at: Likewise.
264 * tests/existing.at: Likewise.
265 * tests/glr-regression.at: Likewise.
266 * tests/headers.at: Likewise.
267 * tests/input.at: Likewise.
268 * tests/java.at: Likewise.
269 * tests/output.at: Likewise.
270 * tests/push.at: Likewise.
271 * tests/reduce.at: Likewise.
272 * tests/regression.at: Likewise.
273 * tests/sets.at: Likewise.
274 * tests/skeletons.at: Likewise.
275 * tests/synclines.at: Likewise.
276 * tests/torture.at: Likewise.
277 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
278 tends to hang xsltproc.
279 (Big horizontal): Likewise.
280
2812007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
282
283 In XML output, remove redundant class attribute on symbol element.
284 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
285 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
286 look up a symbol to determine whether it's a nonterminal or terminal.
287 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
288 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
289
290 Add prec/assoc information to XML output.
291 * src/gram.c (grammar_rules_print_xml): For each rule that has a
292 %prec, add a percent_prec attribute.
293 * src/print-xml.c (print_grammar): For each terminal that has a
294 precedence or associativity, add a prec or assoc attribute.
295 (xml_indent): New.
296 (xml_puts): Use xml_indent.
297 (xml_printf): Use xml_indent.
298 * src/print-xml.h (xml_indent): Prototype.
299
300 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
301 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
302
3032007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
304
305 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
306 (bison:ruleByNumber): ... this for clarity.
307 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
308 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
309 (xsl:template match="reduction"): Update.
310 (xsl:template match="item"): Update.
311 (xsl:template match="reduction"): Update.
312
313 In the XML output, don't print the list of rules where symbols appear.
314 Compute it in XSLT instead. Discussed at
315 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
316 * data/xslt/bison.xsl (bison:ruleByLhs): New.
317 (bison:ruleByRhs): New.
318 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
319 bison:ruleByRhs.
320 (xsl:template match="terminal/rule"): Remove.
321 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
322 bison:ruleByRhs.
323 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
324 Remove.
325 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
326 bison:ruleByRhs and mode="number-link" for rule template.
327 (xsl:template match="terminal/rule"): Remove.
328 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
329 bison:ruleByRhs and mode="number-link" for rule template.
330 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
331 Rewrite as...
332 (xsl:template match="rule" mode="number-link"): ... this.
333 * src/print-xml.c (print_grammar): Don't print the list of rules.
334
3352007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
336
337 Don't let --report affect XML output; always print all information.
338 Discussed at
339 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
340 * src/conflicts.c (log_resolution): Implement.
341 * src/print-xml.c (print_core): Implement.
342 (print_state): Implement.
343 (print_xml): Implement.
344
345 * NEWS (2.3a+): Fix quotes.
346 * src/parse-gram.y (prologue_declaration): For consistency with -v,
347 don't let %verbose clear the list specified by --report.
348
3492007-11-26 Akim Demaille <akim@epita.fr>
350
351 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
352
3532007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
354
355 In the XML output, list useless and unused symbols and rules with the
356 useful ones and add a "usefulness" attribute. Discussed starting at
357 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
358 * src/gram.c (grammar_rules_partial_print_xml): Remove.
359 (grammar_rules_print_xml): Print all rules instead of just those
360 useful in the grammar, and add a "usefulness" attribute.
361 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
362 * src/print-xml.c (print_rules_useless_in_parser): Remove.
363 (print_grammar): Print all nonterminals instead of just useful ones,
364 and add a "usefulness" attribute to nonterminals and terminals.
365 (print_xml): Don't print a separate "reductions" or
366 "rules-useless-in-parser" element.
367 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
368 (reduce_xml): Remove.
369 (reduce_token_unused_in_grammar): New.
370 (reduce_nonterminal_useless_in_grammar): New.
371 * src/reduce.h (reduce_xml): Remove prototype.
372 (reduce_token_unused_in_grammar): Add prototype.
373 (reduce_nonterminal_useless_in_grammar): Add prototype.
374 * data/xslt/xml2text.xsl: Update for XML changes.
375 * data/xslt/xml2xhtml.xsl: Update for XML changes.
376 * tests/reduce.at (Useless Terminals): Update output.
377 (Useless Rules): Update output.
378 (Reduced Automaton): Update output.
379
380 Say "Terminals unused in grammar" instead of "Unused terminals".
381 * NEWS (2.3a+): Update.
382 * doc/bison.texinfo (Understanding): Update example output.
383 * src/reduce.c (reduce_output): Implement.
384 * data/xslt/xml2text.xsl: Implement.
385 * data/xslt/xml2xhtml.xsl: Implement.
386
3872007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
388
389 Accept --report-file=FILE to override the default `.output' filename.
390 * NEWS (2.3a+): Mention.
391 * doc/bison.texinfo (Bison Options): Add an entry.
392 * src/files.c (compute_output_file_names): Don't override
393 spec_verbose_file if already set.
394 * src/getargs.c (usage): Document --report-file.
395 (REPORT_FILE_OPTION): New anonymous enum member.
396 (long_options): Add entry for it.
397 (getargs): Add case for it setting spec_verbose_file.
398
399 * build-aux/cross-options.pl: Don't record a short option just because
400 there's an arg.
401 * doc/.cvsignore: Add yacc.1.
402
4032007-11-14 Akim Demaille <akim@epita.fr>
404
405 * doc/yacc.1.in: New.
406 * configure.ac, doc/Makefile.am: Adjust.
407 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
408 config.h symbol.
409 Use AC_SUBST for assignments too.
410 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
411
4122007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
413
414 * src/gram.c: Remove comments that duplicate comments in gram.h.
415
416 When reporting useless rules and nonterminals, say "useless in grammar"
417 instead of "useless", and say "useless in parser" instead of "never
418 reduced". Discussed starting at
419 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
420 * NEWS (2.3a+): Mention this change.
421 * data/xslt/xml2text.xsl: Update output text and expected input XML
422 element names to match changes below.
423 * data/xslt/xml2xhtml.xsl: Likewise.
424 (xsl:template match="bison-xml-report"): Add missing entry in Table of
425 Contents: "Rules useless in parser due to conflicts".
426 * doc/bison.texinfo (Decl Summary): Reword a little.
427 (Understanding): Update example output for changes below.
428 * src/gram.c: (rule_useful_p): Rename to...
429 (rule_useful_in_grammar_p): ... this.
430 (rule_useless_p): Rename to...
431 (rule_useless_in_grammar_p): ... this.
432 (rule_never_reduced_p): Rename to...
433 (rule_useless_in_parser_p): ... this.
434 (grammar_rules_print): Update for renames.
435 (grammar_rules_print_xml): Update for renames.
436 (grammar_rules_never_reduced_report): Rename to...
437 (grammar_rules_useless_report): ... this since it is used for either
438 kind of useless rule.
439 * src/gram.h: Reword comments and update function names in prototypes.
440 * src/main.c (main): Say "rule useless in parser due to conflicts".
441 * src/print-xml.c (print_rules_never_reduced): Rename to...
442 (print_rules_useless_in_parser): ... this, and rename output XML
443 element "rules-never-reduced" to "rules-useless-in-parser".
444 (print_xml): Update for rename.
445 * src/print.c (print_results): Say "Rules useless in parser due to
446 conflicts".
447 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
448 (nonterminals_reduce): Say "nonterminal useless in grammar".
449 (reduce_output): Say "Nonterminals useless in grammar".
450 Say "Rules useless in grammar".
451 (reduce_xml): Rename output XML element "useless" to
452 "useless-in-grammar".
453 (reduce_print): Don't report the count of grammatically useless rules
454 as "rules never reduced" just because %yacc is specified.
455 In the correct report of this count, say nonterminal(s) and rule(s)
456 "useless in grammar".
457 * tests/conflicts.at (S/R in initial): Update expected output.
458 (Defaulted Conflicted Reduction): Likewise.
459 (Unreachable States After Conflict Resolution): Likewise.
460 * tests/existing.at (GNU pic Grammar): Likewise.
461 * tests/reduce.at (Useless Nonterminals): Likewise.
462 (Useless Rules): Likewise.
463 (Reduced Automaton): Likewise.
464 (Underivable Rules): Likewise.
465 (Empty Language): Likewise.
466
4672007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
468
469 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
470 here document and before the EOF so that BSD's implementation of Bourne
471 shell doesn't parse the delimiter as part of the here document.
472 * doc/.cvsignore: Add cross-options.texi.
473 * src/getargs.c (usage): Add a blank line after the warning categories.
474
4752007-11-08 Paolo Bonzini <bonzini@gnu.org>
476
477 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
478
4792007-11-05 Akim Demaille <akim@epita.fr>
480
481 Remove Id: from bison.1.
482 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
483 (perl -0777 -pi -e 's/\.PP\nId): New.
484 (.x.1): Use it to ignore the version control revision.
485
4862007-11-05 Akim Demaille <demaille@gostai.com>
487
488 * build-aux/Makefile.am: Ship cross-options.pl.
489 * doc/Makefile.am: Always refer to cross-options.texi with
490 $(srcdir).
491 (MAINTAINERCLEANFILES): Add it.
492
4932007-11-04 Akim Demaille <demaille@gostai.com>
494
495 Generate the long/short option cross-table.
496 * build-aux/cross-options.pl: New.
497 * doc/Makefile.am (cross-options.texi): New.
498 * doc/bison.texinfo: Use it.
499
5002007-11-04 Akim Demaille <demaille@gostai.com>
501
502 Generate bison.1 using help2man.
503 * doc/common.x, doc/bison.x: New.
504 * doc/Makefile.am (bison.1, .x.1): New.
505 The code is taken from autoconf-2.61/man/Makefile.am.
506 * configure.ac: Look for help2man.
507
5082007-11-04 Akim Demaille <demaille@gostai.com>
509
510 Complete --help.
511 * src/getargs.c (usage): Document -W, make it clear that -d,
512 -g and -x have optional arguments.
513
5142007-11-04 Akim Demaille <demaille@gostai.com>
515
516 Find sha1sum when named gsha1sum.
517 * bootstrap (find_tool): New.
518 ($SHA1SUM): New.
519
5202007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
521
522 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
523 at
524 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
525 * NEWS (2.3a+): Mention.
526 * data/bison.m4 (b4_pure_if): Don't define it here.
527 * data/c.m4 (b4_identification): Depend on individual skeletons to
528 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
529 values of the %define variables api.pure or api.push_pull. Define
530 YYPURE, YYPUSH, and YYPULL accordingly.
531 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
532 glr.cc has already defined b4_pure_flag.
533 * data/push.c: Define b4_pure_if based on `%define api.pure'.
534 Remove YYPUSH and YYPULL since they're back in b4_identification again.
535 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
536 * doc/bison.texinfo (Pure Decl): Update.
537 (Push Decl): Update.
538 (Decl Summary): Add api.pure to %define entry.
539 In %pure-parser entry, say it's deprecated and reference %define.
540 (Pure Calling): Update.
541 (Error Reporting): Update.
542 (C++ Scanner Interface): Update.
543 (How Can I Reset the Parser): Update.
544 (Table of Symbols): In %pure-parser entry, say it's deprecated and
545 reference %define.
546 * src/getargs.c (pure_parser): Remove global variable.
547 * src/getargs.h (pure_parser): Remove extern.
548 * src/output.c (prepare): Don't define pure_flag muscle.
549 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
550 wrapper around `%define api.pure'.
551 * tests/calc.at (Simple LALR Calculator): Update.
552 (Simple GLR Calculator): Update.
553 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
554 Update.
555 (GLR: Resolve ambiguity, pure, locations): Update.
556 (GLR: Merge conflicting parses, pure, no locations): Update.
557 (GLR: Merge conflicting parses, pure, locations): Update.
558 * tests/glr-regression.at (Uninitialized location when reporting
559 ambiguity): Update
560 * tests/input.at (Unused %define api.pure): New test case.
561 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
562 AT_PURE_IF and AT_PURE_AND_LOC_IF.
563 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
564
5652007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
566
567 %define push_pull -> %define api.push_pull. Discussed starting at
568 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
569 * data/push.c: Expect the new name.
570 * data/yacc.c: Likewise.
571 * doc/bison.texinfo (Push Decl): Update.
572 (Decl Summary): Update %define entry.
573 (Push Parser Function): Update.
574 (Pull Parser Function): Update.
575 (Parser Create Function): Update.
576 (Parser Delete Function): Update.
577 * tests/calc.at (Simple LALR Calculator): Update.
578 * tests/input.at (%define enum variables): Update.
579 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
580 (Push Parsing: Multiple impure instances): Update.
581 (Push Parsing: Unsupported Skeletons): Update.
582 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
583 (Exploding the Stack Size with Malloc): Update.
584
585 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
586 other entries some.
587
5882007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
589
590 For the XML output's terminal element, rename @number to @token-number,
591 and add @symbol-number. In the nonterminal element, rename @number to
592 @symbol-number. Discussed starting at
593 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
594 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
595 renames.
596 (xsl:template match="nonterminal"): Likewise.
597 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
598 (xsl:template match="nonterminal"): Likewise.
599 * src/print-xml.c (print_grammar): Implement.
600
6012007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
602
603 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
604 2007-10-11 change, the child elements here are items not rules.
605 (xsl:template match="item"): New.
606 (xsl:template match="rule"): Update for new reduced itemset.
607 (xsl:template match="point"): Remove.
608 (xsl:template match="empty"): For consistency with --graph, don't
609 output "/* empty */".
610 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
611 line-wrap, don't pass a negative value as first-line-length since this
612 won't work with the following changes.
613 (xsl:template name="line-wrap"): Simplify slightly.
614 (xsl:template name="ws-search"): Eliminate recursion.
615 * src/print_graph.c (print_core): Don't print a reduction's lookahead
616 set next to an item whose dot is not at the end of the RHS even if it
617 happens to be associated with the same rule.
618
6192007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
620
621 Add %define lr.keep_unreachable_states.
622 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
623 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
624 * src/main.c (main): Implement it.
625 * tests/conflicts.at (Unreachable States After Conflict Resolution):
626 Extend to test it, and fix a typo.
627
6282007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
629
630 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
631 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
632 the example .output text.
633 * tests/regression.at (Extra lookahead sets in report): Improve wording
634 of comments.
635
6362007-10-17 Wojciech Polak <polak@gnu.org>
637
638 * src/print-xml.c (print_grammar): Renamed
639 <terminal> and <nonterminal> attributes:
640 "type" to "number" and "symbol" to "name".
641 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
642 Use new attribute names.
643 (xsl:template match="nonterminal"): Likewise.
644 * data/xslt/xml2xhtml.xsl: Likewise.
645
6462007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
647
648 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
649 (Option Cross Key): Likewise.
650
651 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
652 next to an item whose dot is not at the end of the RHS even if it
653 happens to be associated with the same rule.
654 * src/print.c (print_core): Likewise.
655 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
656 (Resolved SR Conflicts): Update output.
657 * tests/regression.at (Extra lookahead sets in report): New test case.
658
6592007-10-11 Wojciech Polak <polak@gnu.org>
660
661 * src/print-xml.c (print_core): Remove item set
662 redundancy.
663 * data/xslt/bison.xsl (bison:ruleNumber): New key.
664 Improve processing time. Suggested by Joel E. Denny.
665 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
666 Write xsl:param "required" attribute as comment.
667 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
668 (xsl:template match="rule"): Support new reduced itemset.
669 (xsl:template match="point"): Remove.
670 * data/xslt/xml2xhtml.xsl: Likewise.
671
6722007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
673
674 * src/getargs.c (version): Update copyright year.
675
6762007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
677
678 Make xml2dot.xsl and --graph produce the same output.
679 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
680 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
681 escaped later.
682 (xsl:template name="output-node"): Use the new escape template instead
683 of the string-replace template directly.
684 (xsl:template name="output-edge"): Likewise.
685 (xsl:template name="escape"): New, escapes backslashes and newlines in
686 addition to quotation marks.
687 * src/graphviz.c (start_graph, output_node, output_edge): Add
688 whitespace to output for legibility.
689
690 Make xml2text.xsl and --report produce the same output, and remove the
691 XML "conflicts" element since a conflict summary is easily extracted
692 from the automaton.
693 * data/xslt/bison.xsl: New.
694 (xsl:template match="state" mode="bison:count-conflicts): New.
695 * data/xslt/xml2text.xsl: Import bison.xsl.
696 (xsl:template match="bison-xml-report"): Instead of styling the
697 "conflicts" element, style the "automaton" element with mode
698 "conflicts". Unlike the former, the latter lists S/R and R/R
699 conflicts for a state on the same line.
700 (xsl:template match="conflicts"): Remove.
701 (xsl:template match="conflict"): Remove.
702 (xsl:template match="terminal"): Line-wrap the list of rules in which
703 the terminal is used.
704 (xsl:template match="nonterminal"): Likewise for nonterminals.
705 (xsl:template match="automaton" mode="conflicts"): New.
706 (xsl:template match="state" mode="conflicts"): New.
707 (xsl:template name="line-wrap"): New.
708 (xsl:template name="ws-search"): New.
709 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
710 (xsl:template match="bison-xml-report"): Instead of styling the
711 "conflicts" element, style the "automaton" element with mode
712 "conflicts."
713 (xsl:template match="conflicts"): Remove.
714 (xsl:template match="conflict"): Remove.
715 (xsl:template match="automaton" mode="conflicts"): New.
716 (xsl:template match="state" mode="conflicts): New.
717 * src/conflicts.c (conflicts_output_xml): Remove.
718 * src/conflicts.h (conflicts_output_xml): Remove prototype.
719 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
720 * src/print.c (print_grammar): Consistently wrap at the 66th column so
721 the corresponding XSLT is easier. Also, never wrap between a word and
722 the comma that follows it.
723
7242007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
725
726 Improve C++ namespace support. Discussed starting at
727 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
728 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
729 b4_namespace_close): New macros that interpret the %define variable
730 "namespace" so its value can contain "::" to indicate nested
731 namespaces.
732 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
733 the above macros.
734 * data/lalr1.cc (b4_namespace): Likewise.
735 * data/location.cc (b4_namespace): Likewise.
736 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
737 inside a new table in the general %define entry. Document `%define
738 namespace' there as well. Point the %name-prefix entry to it since it
739 explains it more completely in the case of C++.
740 (C++ Bison Interface): Mention `%define namespace' instead of
741 %name-prefix.
742 (Table of Symbols): Remove the `%define push_pull' entry. The %define
743 entry suffices.
744 * tests/c++.at (Relative namespace references): New test case.
745 (Absolute namespace references): New test case.
746 (Syntactically invalid namespace references): New test case.
747 * tests/input.at (C++ namespace reference errors): New test case.
748
7492007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
750
751 Add syncline support and location accessor to internal %define
752 interfaces.
753 * data/bison.m4 (b4_percent_define_get_loc): New.
754 (b4_percent_define_get_syncline): New.
755 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
756 (b4_percent_define_default): Record defining location as line 1 rather
757 than 0 for the sake of synchronizing #line's, and define
758 b4_percent_define_syncline(VARIABLE).
759 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
760 * src/muscle_tab.c (muscle_syncline_grow): New.
761 (muscle_code_grow): Use muscle_syncline_grow.
762 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
763 define b4_percent_define_syncline(VARIABLE).
764 (muscle_percent_define_get_loc): New.
765 (muscle_percent_define_get_syncline): New.
766 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
767 remove some unused variables.
768 (muscle_percent_define_default): Record defining location as line 1
769 rather than 0 for the sake of synchronizing #line's, and define
770 b4_percent_define_syncline(VARIABLE).
771 (muscle_percent_define_check_values): Use
772 muscle_percent_define_get_loc.
773 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
774 (muscle_percent_define_get_syncline): Prototype.
775 * tests/skeletons.at (%define Boolean variables: invalid skeleton
776 defaults): Update output for location change.
777 (Complaining during macro argument expansion): Extend to test
778 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
779
7802007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
781
782 Fix some error-reporting macro bugs.
783 * data/bison.m4 (b4_cat): New.
784 (b4_error, b4_error_at): Use b4_cat to send error directives directly
785 to stdout so they don't become arguments to other macros. Update
786 comments and add examples.
787 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
788 add examples.
789 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
790 after printing the error directive so that M4 doesn't report subsequent
791 problems that are induced by this problem.
792 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
793 instead of just in them. Recognize @\n in both places. Both expand to
794 the empty string. Needed by b4_cat.
795 * tests/skeletons.at (Complaining during macro argument expansion):
796 New test case.
797 (Fatal errors make M4 exit immediately): New test case.
798
7992007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
800
801 Implement --print-datadir.
802 * src/getargs.c (usage): Mention.
803 (PRINT_DATADIR_OPTION): New anonymous enum member.
804 (long_options): Add entry for it.
805 (getargs): Add case for it calling compute_pkgdatadir.
806 * src/output.c (output_skeleton): Encapsulate data directory
807 computation from here...
808 (prepare): ... and from here...
809 (compute_pkgdatadir): ... into this new function.
810 * src/output.h (compute_pkgdatadir): Prototype.
811
8122007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
813
814 * src/print-xml.c (escape_bufs): New static global variable
815 replacing...
816 (xml_escape_n): ... the static local variable buf here.
817 (print_xml): Free memory for escape_bufs.
818 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
819
8202007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
821
822 Replace `%push-parser' and `%push-pull-parser' with
823 `%define push_pull "push"' and `%define push_pull "both"'.
824 `%define push_pull "pull"' is the default.
825 * doc/bison.texinfo (Push Decl, Push Parser Function,
826 Pull Parser Function, Parser Create Function, Parser Delete Function):
827 Update declarations.
828 (Decl Summary, Table of Symbols): Replace %push-parser and
829 %push-pull-parser entries with a %define push_pull entry.
830 * data/bison.m4 (b4_percent_define_check_values): New macro.
831 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
832 definitions...
833 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
834 definitions...
835 * data/push.c: ... to here and compute them from the value of the
836 %define variable push_pull.
837 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
838 parsing requests here...
839 * data/yacc.c: ... hack this to switch to push.c any time
840 b4_use_push_pull_flag or the %define variable push_pull is set. This
841 will go away when we mv push.c yacc.c.
842 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
843 push parsing is not supported since unused %define variables are
844 reported anyway.
845 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
846 * src/muscle_tab.h (muscle_percent_define_check_values): Update
847 comments for consistency with b4_percent_define_check_values.
848 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
849 muscles.
850 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
851 Remove.
852 (prologue_declaration): Remove %push-parser and %push-pull-parser
853 rules.
854 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
855 * tests/calc.at: Update declarations.
856 * tests/input.at (%define enum variables): New test case.
857 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
858 declaration.
859 (Push Parsing: Multiple impure instances): Update declaration.
860 (Push Parsing: Unsupported Skeletons): New test case.
861 * tests/torture.at (Exploding the Stack Size with Alloca): Update
862 declaration.
863 (Exploding the Stack Size with Malloc): Update declaration.
864
8652007-09-24 Wojciech Polak <polak@gnu.org>
866
867 Add XSLT transformations.
868
869 * data/xslt/xml2dot.xsl: Transform XML into DOT.
870 * data/xslt/xml2text.xsl: Transform XML into plain text.
871 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
872 * data/Makefile.am (xsltdir): New variable.
873 (dist_xslt_DATA): Add xslt/*.xsl files.
874
8752007-09-23 Paul Eggert <eggert@cs.ucla.edu>
876
877 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
878 Problem reported by Wojciech Polak.
879 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
880 (xml_printf): Undo change I made on 21 September; that is,
881 indent 2 spaces, not 1.
882
8832007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
884
885 Pacify ./configure --enable-gcc-warnings.
886 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
887 `char const *' instead of `char *'.
888 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
889 local variable `sep'.
890
8912007-09-21 Paul Eggert <eggert@cs.ucla.edu>
892
893 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
894 elsewhere.
895 * src/print-xml.c: Prefer "const" after types; that's more consistent.
896 (xml_printf): Indent just 1 space for level.
897 (e_char, xlate_char): Remove.
898 (xml_escape_string): Rewrite to avoid undefined behavior (used
899 storage that was freed from the stack).
900 (xml_escape_n): Don't bother checking for subscript error.
901
9022007-09-21 Wojciech Polak <polak@gnu.org>
903
904 Add Bison XML Automaton Report.
905
906 Add support for an -x option to generate an XML report.
907 It is not documented yet.
908 * src/print-xml.c: New file.
909 * src/print-xml.h: Likewise.
910 * lib/timevar.def (TV_XML): New var.
911 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
912 * src/conflicts.c: Include print-xml.h.
913 (solved_conflicts_xml_obstack): New var.
914 (log_resolution, conflicts_solve, conflicts_free):
915 Add support for XML report.
916 (conflicts_output_val): New function.
917 * src/conflicts.h (conflicts_output_val): New decl.
918 * src/files.c (spec_xml_file): New var.
919 (compute_output_file_names, output_file_names_free): Add XML support.
920 * src/files.h (spec_xml_file): New decl.
921 * src/getargs.c (xml_flag): New var.
922 (usage, short_options, long_options, getargs): Add XML support.
923 * src/getargs.h (xml_flag): New decl.
924 * src/gram.c: Include print-xml.h.
925 (rule_lhs_print_xml, rule_rhs_print_xml):
926 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
927 New functions.
928 * src/gram.h: Declare external ones.
929 * src/main.c: Include print-xml.h.
930 (main): Add XML support.
931 * src/reduce.c: Include print-xml.h.
932 (reduce_xml): New function.
933 * src/reduce.h: Declare it.
934 * src/state.c: Include print-xml.h.
935 (state_new): Add XML support.
936 (state_rule_lookahead_tokens_print_xml): New function.
937 * src/state.h: Declare it.
938 (struct state): New member solved_conflicts_xml.
939 * src/symtab.c (symbol_class_get_string): New function.
940 * src/symtab.h: Declare it.
941
9422007-09-21 Paul Eggert <eggert@cs.ucla.edu>
943
944 * GNUmakefile: Switch to coreutils's version.
945 * bootstrap: Likewise.
946 * Makefile.cfg: Adjust to new GNUmakefile.
947 * README-hacking: Likewise.
948
949 Import from gnulib:
950
951 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
952 Bruno Haible <bruno@clisp.org>
953
954 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
955 and is a script that invokes bison. Tighten the code. Add comments.
956
9572007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
958
959 Spell "boolean" as "Boolean". Reported by Akim Demaille.
960 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
961 * doc/bison.texinfo (Decl Summary): Fix.
962 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
963 * tests/input.at (Boolean %define variables): Update output.
964 * tests/skeletons.at (%define boolean variables: invalid skeleton
965 defaults): Rename to...
966 (%define Boolean variables: invalid skeleton defaults): ... this and
967 update output.
968
9692007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
970
971 In impure push mode, don't allow more than one yypstate to be allocated
972 since multiple impure parsers would corrupt yynerrs.
973 * data/push.c (yypstate_allocated): New static global variable
974 initialized to 0.
975 (yypull_parse): If yypstate_new returns 0, don't report it as memory
976 exhaustion if yypstate_allocated is 1, but still return 2.
977 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
978 already 1. Otherwise, set it to 1.
979 (yypstate_delete): Set it to 0.
980 * tests/push.at (Push Parsing: Multiple impure instances): New test
981 case.
982
9832007-08-17 Bob Rossi <bob@brasko.net>
984
985 * doc/bison.texinfo (Push Decl): Document the push parser.
986 (Table of Symbols): Ditto.
987 (Pure Decl): Ditto.
988 (Decl Summary): Ditto.
989 (Multiple Parsers, Push Parser Function, Pull Parser Function,
990 Parser Create Function, Parser Delete Function):
991 Add new push parser symbols.
992 (Table of Symbols): Document push-parser, push-pull-parser,
993 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
994
9952007-08-15 Paul Eggert <eggert@cs.ucla.edu>
996
997 Update to GPLv3.
998 * doc/gpl-3.0.texi: New file.
999 * doc/gpl.texi: Remove.
1000 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1001 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1002 * README-hacking, TODO, bootstrap, bootstrap.conf:
1003 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1004 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1005 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1006 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1007 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1008 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1009 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1010 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1011 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1012 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1013 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1014 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1015 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1016 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1017 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1018 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1019 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1020 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1021 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1022 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1023 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1024 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1025 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1026 * src/complain.c, src/complain.h, src/conflicts.c:
1027 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1028 * src/files.h, src/flex-scanner.h, src/getargs.c:
1029 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1030 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1031 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1032 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1033 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1034 * src/print.c, src/print.h, src/print_graph.c:
1035 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1036 * src/reduce.h, src/relation.c, src/relation.h:
1037 * src/revision.h, src/scan-code.h, src/scan-code.l:
1038 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1039 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1040 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1041 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1042 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1043 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1044 * tests/existing.at, tests/glr-regression.at:
1045 * tests/headers.at, tests/input.at, tests/java.at:
1046 * tests/local.at, tests/output.at, tests/push.at:
1047 * tests/reduce.at, tests/regression.at, tests/sets.at:
1048 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1049 * tests/torture.at:
1050 Update to GPLv3.
1051
10522007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1053
1054 Get rid of broken %no-parser, -n, and --no-parser implementation and
1055 documentation.
1056 * TODO: Don't mention them.
1057 * doc/bison.1: Likewise.
1058 * doc/bison.texinfo (Decl Summary): Likewise.
1059 (Bison Options): Likewise.
1060 (Option Cross Key): Likewise.
1061 * src/getargs.c (no_parser_flag): Remove global variable.
1062 (usage): Don't print description of -n and --no-parser.
1063 (long_options): Remove --no-parser entry here.
1064 (getargs): Remove -n case in the switch here.
1065 * src/getargs.h (no_parser_flag): Remove extern.
1066 * tests/regression.at (Web2c Actions): Remove comment that mentions
1067 --no-parser.
1068
10692007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1070
1071 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1072 name user variables starting with `yy'. Just pass NULL instead of a
1073 dummy local &yylval to yypush_parse.
1074 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1075 starting with `yy'.
1076
10772007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1078
1079 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1080 true since it's then always used regardless of whether yyoverflow is
1081 defined. Reported by Christian Burger at
1082 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1083 * THANKS: Add Christian Burger.
1084
1085 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1086 node names: say "Decl Summary" not "Bison Declaration Summary".
1087
10882007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1089
1090 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1091 determine whether this function has already complained about an invalid
1092 value for a %define boolean variable, don't check whether Bison has
1093 ever examined the value. As written, the check was a tautology.
1094 Instead, record and check for this complaint using a separate muscle.
1095
10962007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1097
1098 Fix push parsing memory leak reported by Brandon Lucia at
1099 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1100 * THANKS: Add Brandon Lucia.
1101 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1102 but the parse never completed and thus freed it.
1103 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1104 * tests/testsuite.at: Include push.at.
1105 * test/push.at: New.
1106 (Push Parsing: Memory Leak for Early Deletion): New test case.
1107
11082007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1109
1110 Improve handling of multiple S/R conflicts in the same state and of S/R
1111 conflicts involving multiple reductions.
1112 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1113 set for a state here or Bison will abort if it is reassigned on a
1114 later conflicted reduction in the same state.
1115 Similarly, don't finalize and assign the solved conflicts report here
1116 or it will be lost if it is reassigned on a later conflicted reduction
1117 in the same state.
1118 (set_conflicts): Instead, assign them both here after all S/R conflicts
1119 in the state have been fully examined.
1120 * src/print.c (shift_set): Rename to...
1121 (no_reduce_set): ... this.
1122 (print_reductions): Update for rename, and add %nonassoc error action
1123 tokens to no_reduce_set so that, when printing the first remaining
1124 reduction on an error action token, the reduction is enclosed in
1125 brackets.
1126 (print_results): Update for rename.
1127 * tests/conflicts.at (Solved conflicts report for multiple reductions
1128 in a state): New test case.
1129 (%nonassoc error actions for multiple reductions in a state): New test
1130 case.
1131
1132 * src/main.c (main): Don't depend on C99 features.
1133
11342007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1135
1136 * build-aux/.cvsignore: Add compile.
1137 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1138 uniwidth.
1139
11402007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1141
1142 * bootstrap (slurp): Create target directories that don't exist.
1143 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1144
11452007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1146
1147 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1148 than item number.
1149 * closure.c (closure): Likewise.
1150 * state.h (reductions): Comment sorting of rules.
1151 (state): Comment sorting of items.
1152
11532007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1154
1155 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1156 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1157 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1158 definition in order to avoid Gnulib headers since we don't use config.h
1159 here.
1160 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1161 rather than AT_DATA so that config.h is included.
1162
11632007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1164
1165 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1166 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1167 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1168 and so that YYFPRINTF is guaranteed to be defined here.
1169
11702007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1171
1172 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1173 with...
1174 (muscle_percent_define_check_values): ... this more helpful function.
1175 Again, it's not used yet, but it will be.
1176 * src/muscle_tab.h: Likewise.
1177
1178 Improve some comments in parser table construction.
1179 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1180 (generate_states): Don't mention ruleset, which is internal to closure.
1181 * src/closure.c (closure): Explain sorting of core and itemset, which
1182 is required for this function to behave correctly.
1183 * src/closure.h (closure): Mention sorting.
1184
11852007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1186
1187 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1188 move the check for disabled transitions to an aver since conflict
1189 resolution hasn't happened yet.
1190
1191 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1192 labels a state as inconsistent just because it has error transitions.
1193 The original form of this check appeared in revision 1.1 of lalr.c,
1194 which was committed on 1991-12-21. Now (at least), changing the
1195 consistency label on such a state appears to have no useful effect in
1196 any of the places it is examined, which I enumerate below. The key
1197 point to understanding each item in this enumeration is that a state
1198 with an error transition is labelled consistent in the first place only
1199 if it has no rules, so the check cannot matter for states that have
1200 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1201 to try to identify its conflicts, and a state must have *rules* to have
1202 conflicts. (2) Labelling a state as inconsistent will affect how
1203 action_row sets the default *rule* for the state. (3) Labelling a
1204 state as inconsistent will cause build_relations to add lookback edges
1205 to *rules* in that state.
1206 * src/state.h (struct state): Word the comment for member consistent
1207 more carefully.
1208
12092007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1210
1211 Don't depend on C99 features.
1212 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1213 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1214 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1215 * src/state.c (state_mark_reachable_states): Fix for-loop.
1216 (state_remove_unreachable_states): Fix for-loop.
1217
1218 Don't widen struct state with member reachable just to temporarily
1219 record reachability. Instead, use a local bitset.
1220 * src/state.h (struct state): Remove member.
1221 * src/state.c (state_new): Don't initialize it.
1222 (state_mark_reachable_states): Rename to...
1223 (state_record_reachable_states): ... this, and use bitset.
1224 (state_remove_unreachable_states): Use bitset.
1225
12262007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1227
1228 * src/Makefile.am (yacc): Quote target action commands properly so
1229 that the yacc script isn't corrupt. Reported by Hans Aberg at
1230 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1231
1232 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1233 the case of pure parsers. Reported by Frans Englich at
1234 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1235 * THANKS: Add Frans Englich.
1236
1237 * NEWS (2.3a+): In the %code entry, reference section `Bison
1238 Declaration Summary' from the manual now since the %code summary has
1239 moved there.
1240 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1241 in the rules section must be terminated by semicolons.
1242
12432007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1244
1245 Extend the front-end API for %define variables to more completely
1246 mirror the back-end. This will be useful in the future.
1247 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1248 Update comments to mention the new front-end counterparts of these
1249 macros.
1250 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1251 for muscle_string_decode and muscle_location_decode.
1252 (muscle_string_decode): New static function.
1253 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1254 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1255 functions.
1256 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1257 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1258 implementation more closely.
1259 (muscle_percent_define_invalid_value): New function.
1260 * src/muscle_tab.h (muscle_percent_define_get,
1261 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1262 Prototype.
1263
12642007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1265
1266 * NEWS (2.3a+): Mention yesterday's state-removal change.
1267 (2.3a): Remove the %language entry, which was added after 2.3a.
1268 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1269 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1270 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1271 tests/existing.at: Update copyright date.
1272
12732007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1274
1275 If conflict resolution makes states unreachable, remove those states,
1276 report rules that are then unused, and don't report conflicts in those
1277 states.
1278 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1279 New global function.
1280 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1281 function.
1282 * src/main.c (main): After conflict resolution, remove the unreachable
1283 states and update all data structures that reference states by number.
1284 * src/state.c (state_new): Initialize each state's reachable member to
1285 false.
1286 (state_mark_reachable_states): New static function.
1287 (state_remove_unreachable_states): New global function.
1288 * src/state.h (struct state): Add member bool reachable.
1289 (state_remove_unreachable_states): Prototype.
1290 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1291 New test case.
1292 * tests/existing.at (GNU pic Grammar): Update test case output now that
1293 an unused rule is discovered.
1294
12952007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1296
1297 Minor code cleanup in parser table construction.
1298 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1299 (new_itemsets, save_reductions): Update for rename to nitemset.
1300 * src/closure.c (nritemset): Rename to...
1301 (nitemset): ... this since the "r" appears to meaningless and isn't
1302 used in the comments.
1303 (closure): Update for rename.
1304 * src/closure.h (nritemset): Update extern to...
1305 (nitemset): ... this.
1306 * src/lalr.c (LA): Fix a typo in comments.
1307 * src/print.c (print_core): Update for rename to nitemset.
1308 * src/print_graph.c (print_graph): Likewise.
1309 * src/state.h: Fix some typos in header comments.
1310
13112007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1312
1313 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1314 still sticks to ASCII. Sorry!
1315
1316 * README-hacking: New file, taken mostly from coreutils, with changes
1317 for Bison. Contains much of the contents of:
1318 * README-cvs: Remove.
1319 * bootstrap: Sync from gnulib.
1320 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1321 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1322
13232007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1324
1325 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1326 Setzer.
1327 (Java Differences): Fix some typos.
1328 * THANKS: Add Sebastian Setzer.
1329
13302007-03-07 Paolo Bonzini <bonzini@gnu.org>
1331
1332 * data/java.m4 (b4_single_class_if): Remove.
1333 (b4_abstract_if): Look at "%define abstract".
1334 (b4_lexer_if): New.
1335 (b4_union_name): Rename...
1336 (b4_yystype): ... to this. Map to "%define stype".
1337 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1338 b4_maybe_throws): Fix quoting.
1339 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1340 * data/lalr1.java (Lexer interface): Always define.
1341 (Lexer interface within parser class): Remove.
1342 (YYLexer class): New, used when "%code lexer" is present.
1343 (constructor): When "%code lexer" is used, pass %lex-param
1344 to the lexer constructor.
1345 (yylex, yyparse): Remove %lex-param from method invocations
1346 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1347
1348 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1349 abstract". Rename "%define union_name" to "%define stype".
1350 Rename method names according to previous patch.
1351 (Java Scanner Interface): Describe "%code lexer" instead of
1352 "%pure-parser" and "%define single_class".
1353 (Java Differences): Mention "%code lexer".
1354
1355 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1356 Include scanner here, using macros from tests/local.at.
1357 (AT_DATA_CALC_Y): Remove final argument.
1358 (_AT_CHECK_JAVA_CALC): Likewise.
1359 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1360 of %locations and %error-verbose.
1361 (main): Test with and without %lex-param.
1362 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1363 (AT_BISON_OPTION_POPDEFS): Pop it.
1364
13652007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1366
1367 DJGPP spefic issue. Inhibit the use of disallowed characters for
1368 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1369 and concern testsuite case 46.
1370 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1371 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1372 * djgpp/config.bat: Inhibit the use of disallowed characters.
1373
13742007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1375
1376 Miscellaneous %define and %code cleanup.
1377 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1378 values are interpreted.
1379 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1380 documentation a little more.
1381 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1382 muscle_percent_define_insert, muscle_percent_code_grow): New
1383 functions/macros.
1384 * src/muscle_tab.h (muscle_percent_define_insert,
1385 muscle_percent_code_grow): Prototype.
1386 * src/parse-gram.y (prologue_declaration): Use
1387 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1388 %define and %code directives.
1389
1390 Make it easy to share %define boolean variables between the front-end
1391 and back-end. Though not used yet, this will be useful in the future.
1392 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1393 Bison uses of names rather than just skeleton uses of names.
1394 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1395 b4_percent_define_skeleton_variables(VARIABLE) to
1396 b4_percent_define_bison_variables(VARIABLE).
1397 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1398 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1399 b4_percent_code_bison_qualifiers(QUALIFIER).
1400 (b4_check_user_names_wrap): Update for renames.
1401 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1402 muscle_percent_define_default): New functions mimicking
1403 b4_percent_define_flag_if and b4_percent_define_default.
1404
1405 For %define variables, report locations for invalid values and
1406 redefinitions.
1407 * data/bison.m4 (b4_percent_define_flag_if): Read
1408 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1409 value for VARIABLE.
1410 (b4_percent_define_default): Save a special location in
1411 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1412 must later be reported as invalid.
1413 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1414 functions.
1415 (muscle_percent_define_insert): Record the location of VARIABLE in
1416 muscle percent_define_loc(VARIABLE), and use it to report the previous
1417 location for a redefinition.
1418 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1419 (muscle_percent_define_default): Update like b4_percent_define_default.
1420 (muscle_grow_user_name_list): Rename to...
1421 (muscle_user_name_list_grow): ... this for consistency and use
1422 muscle_location_grow.
1423 * src/muscle_tab.h (muscle_location_grow): Prototype.
1424 * tests/input.at (%define errors): Update expected output.
1425 * tests/skeletons.at (%define boolean variables: invalid skeleton
1426 defaults): New test case.
1427
14282007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1429
1430 * src/print.c (lookahead_set, state_default_rule): Remove.
1431 (print_reductions): Replace state_default_rule invocation with
1432 equivalent use of yydefact, which was computed in token_actions in
1433 tables.c.
1434 (print_results): Don't allocate lookahead_set.
1435
14362007-02-27 Paolo Bonzini <bonzini@gnu.org>
1437
1438 * data/lalr1.java: Prefix all private members with yy.
1439
14402007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1441
1442 Use YYFPRINTF instead of fprintf where appropriate. Reported by
1443 Sebastien Fricker at
1444 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
1445 * THANKS: Add Sebastien Fricker.
1446 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1447 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1448 accept a variable number of arguments.
1449
14502007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1451
1452 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1453
14542007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1455
1456 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1457 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1458 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1459
14602007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1461
1462 Undo my 2007-02-07 change, switching back to the c-strcase module
1463 introduced in the 2007-02-03 change. Bruno Haible reported that
1464 the 2007-02-07 change would be dangerous in Turkish if we add a
1465 language whose name contains "i", since "i" is not lowercase "I"
1466 in Turkish.
1467 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1468 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1469 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1470 * m4/.cvsignore: Remove strcase.m4.
1471 * src/getargs.c: Revert 2007-02-07 change, as follows.
1472 Include c-strcase.h.
1473 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1474
14752007-02-11 Bruno Haible <bruno@clisp.org>
1476
1477 Enable the Java related testsuite tests when the only Java compiler
1478 found is a gcj < 4.3. Discussed at
1479 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1480 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1481
14822007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1483
1484 * data/Makefile.am: Update copyright date.
1485 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1486 yypstate_new returns NULL.
1487 (yypstate_new): Return NULL if malloc does.
1488 * src/reader.c (packgram): Move translation of rule actions from the
1489 beginning of packgram to...
1490 (check_and_convert_grammar): ... here right before packgram is invoked
1491 so it's easier to write more complete comments, and remove redundant
1492 code.
1493
14942007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1495
1496 As in semantic actions, make @$ in %initial-action, %destructor, and
1497 %printer imply %locations.
1498 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1499 scanning @$.
1500 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1501 (@$ in %initial-action implies %locations,
1502 @$ in %destructor implies %locations,
1503 @$ in %printer implies %locations): ... these new test cases.
1504
15052007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1506
1507 Undo most of the 2007-02-03 change, switching to the strcase module
1508 now that gnulib strcase has been fixed.
1509 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1510 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1511 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1512 * m4/.cvsignore: Add strcase.m4.
1513 * src/getargs.c: Revert 2007-02-03 change, as follows.
1514 Don't include c-strcase.h.
1515 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1516 strcasecmp has "unspecified behavior" outside the POSIX locale,
1517 but it works fine in practice if at least one argument is ASCII,
1518 as is the case in Bison.
1519
15202007-02-07 Paolo Bonzini <bonzini@gnu.org>
1521
1522 * tests/java.at: Skip tests if only one of javac/java is present.
1523 Reported by Joel E. Denny.
1524 * tests/atlocal.in: Adjust copyright years.
1525
15262007-02-05 Paolo Bonzini <bonzini@gnu.org>
1527
1528 * data/lalr1.java (Stack): Work around old verifiers that disallow
1529 access to the private fields of an inner class, from the outer class.
1530 We can make Stack's fields public because user code doesn't have access
1531 to the instance of Stack used by parse(). Reported by Paul Eggert.
1532
15332007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1534
1535 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1536 the right spot for these files?
1537 * bootstrap.conf (gnulib_modules): Add c-strcase.
1538 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1539 c-strncasecmp.c.
1540 * src/getargs.c: Include c-strcase.h.
1541 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1542 to avoid unspecified behavior.
1543
15442007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1545
1546 * doc/bison.texinfo (Decl Summary): Correct typo.
1547
15482007-01-30 Paolo Bonzini <bonzini@gnu.org>
1549
1550 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1551 Complain if the value does not match empty, "true" or "false".
1552 * data/c++.m4: Adjust default definitions of %define variables.
1553 * data/java.m4: Adjust default definitions of %define variables.
1554 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1555 to above behavior.
1556 * tests/input.at (Boolean %define variables): Test new behavior.
1557
15582007-01-29 Paolo Bonzini <bonzini@gnu.org>
1559
1560 * NEWS: Mention java.
1561 * TODO: Remove things that are done.
1562 * bootstrap.conf: Add javacomp-script and javaexec-script.
1563 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1564
1565 * data/Makefile.am: Add new files.
1566 * data/java-skel.m4: New.
1567 * data/java.m4: New.
1568 * data/lalr1.java: New.
1569
1570 * doc/bison.texinfo: Put "A Complete C++ Example" under
1571 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1572 under Other Languages.
1573
1574 * src/getargs.c (valid_languages): Add Java.
1575 * src/getargs.h (struct bison_language): Update size of string fields.
1576
1577 * tests/Makefile.am: Add java.at.
1578 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1579 * tests/java.at: New.
1580 * tests/testsuite.at: Include it.
1581
15822007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1583
1584 Clean up.
1585 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1586 at_directive_argv arguments so these no longer have to be global
1587 variables. Also, update the implementation for the following changes.
1588 (fail_for_at_directive_too_many_args,
1589 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1590 (at_directive_name): Remove as at_directive_argv[0] will be used for
1591 this now.
1592 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1593 for the directive name.
1594 (at_directive_argc, at_directive_argv): Make these local within
1595 skel_lex instead of global.
1596 (INITIAL): Update directive start action for above changes.
1597 (SC_AT_DIRECTIVE_ARG): Rename to...
1598 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1599 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1600 (scan_skel): Move yylex_destroy to...
1601 (skel_scanner_free): ... here.
1602 * tests/skeletons.at (installed skeleton file name): Rename to...
1603 (installed skeleton file names): ... this.
1604
16052007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1606
1607 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1608 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1609 Summary" not "Directives".
1610 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1611 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1612 since the former is now the more complete one.
1613 (Prologue Alternatives): Likewise and do the same for %defines.
1614 (Table of Symbols): Add summary of %code, add summary of %define, and
1615 move full %code documentation to...
1616 (Decl Summary): ... here for consistency with other entries in these
1617 sections.
1618 Move %define entry in order to keep this list alphabetized.
1619 Reword %define entry a little to put less emphasis on the skeleton
1620 concept, which most users shouldn't have to think about.
1621
16222007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1623
1624 Adjust to recent gnulib changes.
1625 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1626 Add string.h, string_.h, unistd_.h, wchar_.h.
1627 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1628 * src/system.h: Don't include <stpcpy.h>; this is now done by
1629 <string.h>.
1630
16312007-01-23 Paolo Bonzini <bonzini@gnu.org>
1632
1633 Simplify implementation of unqualified %code, implement macros for
1634 uniform treatment of boolean %define flags. Document %define.
1635 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1636 b4_percent_code_ifdef): New.
1637 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1638 * data/c++.m4: Define default value for global_tokens_and_yystype.
1639 * data/glr.cc: Likewise.
1640 * data/location.cc: Use b4_percent_define_flag_if.
1641
1642 * doc/bison.texinfo (Decl Summary): Document %define.
1643
1644 * src/parse-gram.y (Unqualified %code): Change muscle name to
1645 b4_percent_code().
1646 (content.opt): Default to empty.
1647
16482007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1649
1650 Implement support for relative and absolute skeleton file names.
1651 Discussed starting at
1652 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1653 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1654 (Bison Options): Document in --skeleton entry.
1655 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1656 full_skeleton can't necessarily hold all of pkgdatadir.
1657 If the specified skeleton file name contains a `/', don't prepend
1658 pkgdatadir.
1659 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1660 file name contains a `/', prepend the grammar file directory.
1661 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1662 * skeletons.at: New file.
1663 (relative skeleton file names): New test case.
1664 (installed skeleton file names): New test case.
1665 * tests/testsuite.at: Include skeletons.at.
1666
1667 * bootstrap: Update copyright to 2007.
1668
16692007-01-17 Paolo Bonzini <bonzini@gnu.org>
1670
1671 * bootstrap: Remove occurrences of .#bootmp from the files.
1672
16732007-01-17 Akim Demaille <akim@epita.fr>
1674
1675 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1676 nonterminals.
1677 Use per-type %printer.
1678
16792007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1680
1681 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1682 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1683 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1684 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1685 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1686 tests/glr-regression.at, tests/input.at, tests/local.at,
1687 tests/output.at, tests/torture.at: Update copyright to 2007.
1688
16892007-01-16 Akim Demaille <akim@epita.fr>
1690
1691 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1692 error code.
1693 (Calc++ Scanner): Exit with failure if we can't open the input
1694 file.
1695 Accept "-" standing for stdin.
1696 (Calc++ Top Level): Print the result only if the parsing was
1697 successful.
1698
16992007-01-16 Akim Demaille <akim@epita.fr>
1700
1701 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1702
17032007-01-15 Paolo Bonzini <bonzini@gnu.org>
1704 and Joel E. Denny <jdenny@ces.clemson.edu>
1705
1706 Clean up %define and %code implementation in M4 some. Most
1707 importantly, rename all related macros to be in the b4_percent_define
1708 and b4_percent_code namespaces. Also, complete support for `.' in
1709 %define variable names and %code qualifiers.
1710 * data/bison.m4 (b4_check_user_names): Check for special
1711 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1712 m4_foreach loops.
1713 (b4_get_percent_define, b4_get_percent_code): Rename to...
1714 (b4_percent_define_get, b4_percent_code_get): ... these.
1715 Extend documentation with examples.
1716 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1717 b4_percent_define_skeleton_variables and
1718 b4_percent_code_skeleton_qualifiers.
1719 Expect any value for the %define variable `foo' to be stored in the
1720 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1721 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1722 expect any unqualified %code blocks to be stored in a macro named
1723 `b4_percent_code_unqualified'.
1724 Use m4_indir so that %define variable names and %code qualifiers can
1725 contain `.', which is allowed by the grammar parser.
1726 (b4_percent_define_default): New macro to set a default value for a
1727 %define variable.
1728 (m4_wrap): Update wrapped code, and fix some underquoting.
1729 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1730 Expect grammar uses of %define variables and %code qualifiers to be
1731 defined in b4_percent_define_user_variables and
1732 b4_percent_code_user_qualifiers.
1733 * data/c++.m4: Use b4_percent_define_default rather than
1734 m4_define_default. Fix some underquoting. Skeleton usage of %define
1735 variable define_location_comparison now implies skeleton usage of
1736 %define variable filename_type.
1737 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1738 data/push.c, data/yacc.c: Update macro names.
1739 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1740 muscle names.
1741
17422007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1743
1744 DJGPP specific issues.
1745
1746 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1747 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1748
17492007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1750
1751 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1752 run parsers in all tests so that Valgrind is invoked during
1753 maintainer-check-valgrind.
1754 (Duplicate representation of merged trees): Free all semantic values.
1755 (Duplicated user destructor for lookahead): Likewise.
1756
17572007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1758
1759 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1760 command-line prefix.
1761 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1762 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1763 miss Valgrind messages.
1764 (Exploding the Stack Size with Malloc): Likewise.
1765
17662007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1767
1768 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1769 locals. Reported by Juan Manuel Guerrero at
1770 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1771 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1772 Fix some indentation also.
1773 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1774 explaining this issue.
1775
17762007-01-09 Paolo Bonzini <bonzini@gnu.org>
1777 and Joel E. Denny <jdenny@ces.clemson.edu>
1778
1779 Simplify union and prologue handling, and escape union and lex/parse
1780 params with digraphs.
1781 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1782 values to the empty string since these are no longer guaranteed
1783 initialized by the front-end.
1784 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1785 braces around b4_user_stype since this is no longer done by the
1786 front-end.
1787 * src/files.c, src/files.h (pre_prologue_obstack,
1788 post_prologue_obstack): Remove.
1789 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1790 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1791 with digraphs. This fixes lex params and parse params.
1792 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1793 * src/output.c (prepare): Remove muscle insertion of the prologues.
1794 (output): Remove freeing of pre_prologue_obstack and
1795 post_prologue_obstack.
1796 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1797 than prologue_augment for prologue parsing so you don't need prologue
1798 obstacks.
1799 (grammar_declaration): For %union RHS, use `braceless' instead of
1800 "{...}" so that braces are already stripped and code is escaped with
1801 digraphs.
1802 * src/reader.c (prologue_augment): Remove.
1803 (reader): Remove initialization of pre_prologue_obstack and
1804 post_prologue_obstack.
1805 * src/reader.h (prologue_augment): Remove.
1806
1807 * data/c.m4: Remove stray parenthesis.
1808
18092007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1810
1811 Remove quotes from variables names in %define directives and from
1812 qualifiers in %code directives, and restrict the characters that are
1813 allowed in them to M4-friendly ones. For %define, continue to support
1814 the quoted form as a deprecated feature. Discussed starting at
1815 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1816 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1817 %code.
1818 * doc/bison.texinfo (Prologue Alternatives): Update.
1819 (Decl Summary): In %defines entry, update mention of `%code requires'
1820 and `%code provides'.
1821 (C++ Location Values): Update %define uses.
1822 (Calc++ Parser Interface): Likewise.
1823 (Calc++ Parser): Likewise, and update `%code requires' uses.
1824 (Table of Symbols): Update %code documentation.
1825 * src/parse-gram.y (prologue_declaration): For %define variables, use
1826 `variable' instead of `STRING'.
1827 (grammar_declaration): For %code qualifiers, use `ID' instead of
1828 `STRING'.
1829 (variable): New nonterminal that takes an `ID' or a `STRING'.
1830 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1831 and %define uses.
1832 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1833 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1834 (%define errors): Update %define uses.
1835
18362007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1837
1838 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1839 instead of muscle_insert for %define values so that M4-special
1840 characters are replaced with digraphs.
1841 * tests/input.at (%define errors): Extend to check weird values.
1842
18432007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1844
1845 Instead of having skeletons declare all valid %define variables and
1846 %code qualifiers, provide macros that retrieve the associated values
1847 and build these lists automatically. Thus Bison will now warn when a
1848 variable or qualifier is not used by the skeleton in the current
1849 invocation regardless of whether it might sometimes be used by that
1850 skeleton in other invocations. Also, move all %define value macros to
1851 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1852 form, which is replaced by %code.
1853 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1854 (b4_check_user_names): ... this, and change the series of valid name
1855 arguments to a single list argument for names used in the skeleton
1856 similar to the existing list argument for names used in the grammar.
1857 Warn instead of complaining.
1858 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1859 values and %code code, to format %code code properly, and to build
1860 lists of all %define variables and %code qualifiers used in the
1861 skeleton: b4_skeleton_percent_define_variables and
1862 b4_skeleton_percent_code_qualifiers.
1863 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1864 Remove, and...
1865 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1866 the skeleton names lists can finish building first. In place of
1867 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1868 expect the lists b4_user_percent_define_variables and
1869 b4_user_percent_code_qualifiers.
1870 * data/c++.m4: Where setting default values for b4_parser_class_name,
1871 b4_location_type, b4_filename_type, b4_namespace, and
1872 b4_define_location_comparison, update their names to the
1873 b4_percent_define_ namespace.
1874 * data/glr.c: Don't use b4_check_percent_define_variables and
1875 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1876 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1877 (b4_parser_class_name, b4_namespace): Define these using
1878 b4_get_percent_define for parser_class_name and namespace.
1879 * data/location.cc: Use b4_get_percent_define.
1880 * data/push.c: Don't use b4_check_percent_define_variables and
1881 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1882 * data/yacc.c: Likewise, and don't call m4_exit in
1883 b4_use_push_for_pull_if or m4_wrap code will never execute.
1884 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1885 Rename to...
1886 (muscle_grow_user_name_list): ... this for consistency with the
1887 terminology used in bison.m4.
1888 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1889 %define variable names, and rename muscle used_percent_define_variables
1890 to user_percent_define_variables.
1891 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1892 user_percent_code_qualifiers.
1893 (content): Remove.
1894 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1895 {CODE} form is no longer accepted.
1896 * tests/input.at (Reject bad %code qualifiers): Rename to...
1897 (Reject unused %code qualifiers): ... this, and update test output.
1898 (%define error): Update test output.
1899
19002007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1901
1902 Check for unrecognized %define variables similar to checking for
1903 unrecognized %code qualifiers. Check for redefined %define variables.
1904 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1905 generalizes...
1906 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1907 (b4_check_percent_define_variables): New, also wraps it.
1908 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1909 variables using b4_check_percent_define_variables.
1910 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1911 all those exercised in the test suite and all those listed in the
1912 `Default values' section of c++.m4. Are there others?
1913 * data/push.c, data/yacc.c: Declare no valid %define variables.
1914 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1915 similar to muscle_find, but it works even when the muscle stores a
1916 const value.
1917 (muscle_grow_used_name_list): New function for constructing the used
1918 name list muscles that b4_check_for_unrecognized_names requires.
1919 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1920 %define'd more than once. Define the b4_used_percent_define_variables
1921 muscle with muscle_grow_used_name_list.
1922 (grammar_declaration): Abbreviate %code code with
1923 muscle_grow_used_name_list.
1924 * tests/input.at (%define errors): New.
1925
19262007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1927
1928 Provide warn_at, complain_at, and fatal_at function callbacks to the
1929 skeletons, and use this for %code qualifier complaints.
1930 * data/bison.m4 (b4_error_at): New, invoked by...
1931 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1932 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1933 @fatal_at(...@) directives.
1934 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1935 qualifiers in b4_used_percent_code_qualifiers and to use
1936 b4_complain_at.
1937 * src/location.c, src/location.h (boundary_set_from_string): New global
1938 function.
1939 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1940 function.
1941 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1942 to b4_used_percent_code_qualifiers.
1943 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1944 function.
1945 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1946 (lineno): Rename to...
1947 (out_lineno): ... this so I don't misunderstand it again.
1948 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
1949 here; these newlines are in the input but not the output file.
1950 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
1951 (at_directive_perform): ... this new static function, and add handling
1952 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
1953 directives.
1954 * tests/input.at (Reject bad %code qualifiers): Update test output with
1955 locations and extend.
1956
1957 * tests/output.at (Output file name: [, Output file name: ]): Remove
1958 bogus comment about these tests failing.
1959
19602007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1961
1962 Clean up b4_check_percent_code_qualifiers a little.
1963 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
1964 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
1965 documentation and add examples.
1966 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
1967 qualifiers here.
1968
19692007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
1970
1971 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
1972 unreliable -- especially when they're hidden inside another macro.
1973 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
1974 data/c.m4: Remove m4_divert(-1).
1975 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1976 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
1977 m4_divert_push(0) and m4_divert_pop(0).
1978 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
1979 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
1980 pushed and popped by m4sugar, should be first on the stack.
1981
1982 Provide warn, complain, and fatal function callbacks to the skeletons.
1983 This provides more flexibility than m4_fatal, improves the error
1984 message format, and captures messages for translation. Discussed
1985 starting at
1986 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
1987 * data/bison.m4 (b4_error): New, invoked by...
1988 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
1989 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
1990 directives. Because these M4 macros might be called when the current
1991 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
1992 the previous removal of uses of m4_divert, which caused trouble.
1993 (b4_check_percent_code_qualifiers): Use b4_complain instead of
1994 m4_fatal to report unrecognized %code qualifiers.
1995 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
1996 push parser requests.
1997 * data/glr.c: Use b4_complain instead of m4_fatal to report
1998 non-deterministic push parser requests.
1999 Update @output usage to @output(...@) form.
2000 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2001 report missing %defines. Update @output usage to @output(...@) form.
2002 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2003 @output(...@) form.
2004 * src/main.c (main): Invoke skel_scanner_free.
2005 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2006 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2007 obstack_for_string from flex-scanner.h.
2008 (YY_DECL): Use to declare skel_lex static.
2009 (decode_at_digraphs): Remove; now handled in the new
2010 SC_AT_DIRECTIVE_ARG start condition.
2011 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2012 functions.
2013 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2014 at_directive_argv): New static globals.
2015 (INITIAL): Use fail_for_invalid_at.
2016 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2017 recognize the start of a generalized `@directive(...@)' form and
2018 start...
2019 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2020 directive args (using the new obstack_for_string), to decode the
2021 contained @ diagraphs, and to perform the directive. It recognizes
2022 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2023 @output(...@).
2024 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2025 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2026 `@,'.
2027 (scan_skel): Initialize obstack_for_string on the first call.
2028 (skel_scanner_free): New function to free obstack_for_string.
2029 * tests/input.at (Reject bad %code qualifiers): Update test output.
2030
20312007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2032
2033 Consolidate the 4 prologue alternative directives (%code, %requires,
2034 %provides, and %code-top) into a single %code directive with an
2035 optional qualifier field. Discussed at
2036 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2037 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2038 alternatives.
2039 * doc/bison.texinfo (Prologue Alternatives): Update.
2040 (Decl Summary): Update to %code "requires" and %code "provides".
2041 (Calc++ Parser): Update to %code "requires".
2042 (Table of Symbols): Remove entries for %requires, %provides, and
2043 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2044 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2045 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2046 which are skeleton-specific.
2047 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2048 declare what %code qualifiers it supports and to complain if any other
2049 qualifiers were used in the grammar.
2050 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2051 and b4_user_code([b4_percent_code_provides]) in place of
2052 b4_user_requires and b4_user_provides.
2053 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2054 Add b4_user_code([b4_percent_code_top]) and
2055 b4_user_code([b4_percent_code]).
2056 Invoke b4_check_percent_code_qualifiers.
2057 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2058 PERCENT_REQUIRES): Remove.
2059 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2060 %requires. Rewrite the %code RHS as the unqualified form defining the
2061 muscle b4_percent_code. Add another RHS for the qualified %code form,
2062 which defines muscles of the form b4_percent_code_QUALIFIER and the
2063 b4_used_percent_code_qualifiers muscle.
2064 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2065 PERCENT_REQUIRES): Remove.
2066 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2067 %code "requires" and %code "provides".
2068 * tests/input.at (Reject bad %code qualifiers): New.
2069
20702007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2071
2072 Use the new code_props interface for destructors and printers.
2073 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2074 printer_location members, and change the type of the destructor and
2075 printer members to code_props.
2076 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2077 symbol_printer_get, semantic_type_destructor_set,
2078 semantic_type_printer_set, default_tagged_destructor_set,
2079 default_tagless_destructor_set, default_tagged_printer_set,
2080 default_tagless_printer_set): Use code_props in arguments and return
2081 types in place of char const * and location.
2082 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2083 since the locations are now contained in the return of
2084 symbol_destructor_get and symbol_printer_get.
2085 * src/output.c (symbol_destructors_output, symbol_printers_output):
2086 Replace with...
2087 (symbol_code_props_output): ... this to eliminate duplicate code.
2088 (output_skeleton): Update to use symbol_code_props_output.
2089 * src/reader.c (symbol_should_be_used): Update use of
2090 symbol_destructor_get.
2091 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2092 Update uses of the various _destructor_set and _printer_set functions.
2093 * src/symtab.c: (default_tagged_destructor_location,
2094 default_tagless_destructor_location, default_tagged_printer_location,
2095 default_tagless_printer_location): Remove since we...
2096 (default_tagged_destructor, default_tagless_destructor,
2097 default_tagged_printer, default_tagless_printer): ... change the type
2098 of these to code_props.
2099 (symbol_new, semantic_type_new, symbol_destructor_set,
2100 semantic_type_destructor_set, symbol_destructor_get,
2101 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2102 symbol_check_alias_consistency, default_tagged_destructor_set,
2103 default_tagless_destructor_set, default_tagged_printer_set,
2104 default_tagless_printer_set): Update.
2105 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2106 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2107 code_props members.
2108 (symbol_print): Use SYMBOL_CODE_PRINT.
2109
21102007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2111
2112 Use the new code_props interface for rule actions.
2113 * src/symlist.h (symbol_list): Replace action, action_location, and
2114 used members with a code_props action_props member.
2115 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2116 grammar_midrule_action, grammar_current_rule_merge_set,
2117 grammar_current_rule_symbol_append, packgram): Update.
2118 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2119 * src/scan-code.l (handle_action_dollar): Update.
2120 (translate_rule_action): Remove, no longer used.
2121 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2122
21232007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2124
2125 Use the new code_props interface in parse-gram.y.
2126 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2127 Update all uses of translate_* functions to use the new code_props
2128 interface and to use gram_scanner_last_string_free and
2129 code_scanner_last_string_free where possible.
2130 (grammar_declaration): symbol_list_destructor_set and
2131 symbol_list_printer_set now perform the translation, so don't do it
2132 here. Use gram_scanner_last_string_free where possible.
2133 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2134 translate_code): Remove, no longer used.
2135 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2136 symbol_list_printer_set): Perform code translation here rather than
2137 depending on the caller to do so.
2138
2139 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2140 * src/scan-gram.h (gram_last_string): Remove declaration.
2141 * src/scan-gram.l (last_string): Declare it static.
2142
21432007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2144
2145 Encapsulate code properties and related functionality for the various
2146 destructors, printers, and actions into a code_props structure and
2147 interface. This patch merely implements code_props in scan-code.h and
2148 scan-code.l. Future patches will rewrite other modules to use it.
2149 Discussed starting at
2150 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2151 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2152 consistently initialize const structs that have an empty location
2153 field.
2154 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2155 to ensure consistency.
2156 * src/scan-code.h (code_props): New structure.
2157 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2158 function, macro, and const global variable for initializing a
2159 code_props with no code.
2160 (code_props_plain_init, code_props_symbol_action_init,
2161 code_props_rule_action_init, code_props_translate_code): The rest of
2162 the new code_props functional interface. Among other things, the init
2163 functions set the code_props kind field so that
2164 code_props_translate_code will know whether to behave like
2165 translate_symbol_action, translate_rule_action, or translate_code.
2166 These old translate functions must remain until all other modules are
2167 updated to use the new code_props interface.
2168 (code_scanner_last_string_free): New function similar to
2169 gram_scanner_last_string_free.
2170 (code_scanner_free): Add documentation.
2171 * src/scan-code.l: Implement the new interface.
2172 (code_lex): Make it static, add a code_props* argument, and remove the
2173 rule argument.
2174 (last_string): New static global similar to the one in scan-gram.l.
2175 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2176 instead of rule.
2177 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2178 code_props since Bison may one day use this information for destructors
2179 and printers.
2180 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2181 (handle_action_dollar): Use symbol_list_n_get and set used flag
2182 directly since symbol_list_n_used_set is removed.
2183 (translate_action): Add a code_props* argument and remove the rule,
2184 action, and location arguments. Pass the code_props* on to code_lex.
2185 (translate_rule_action, translate_symbol_action, translate_code):
2186 Rewrite as wrappers around the new code_props interface.
2187 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2188 it would eventually need to break the encapsulation of code_props.
2189
21902007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2191
2192 * etc/.cvsignore: New.
2193
21942007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2195
2196 Add maintainer-push-check to run maintainer-check using push parsing in
2197 place of pull parsing where available.
2198 * Makefile.am (maintainer-push-check): New.
2199 * data/bison.m4 (b4_use_push_for_pull_if): New.
2200 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2201 appropriately based on their existing values.
2202 (yypush_parse): Don't print push-parser-specific diagnostics if push
2203 parsing is being used in place of pull parsing.
2204 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2205 push.c.
2206 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2207 variable, and insert b4_use_push_for_pull_flag into muscles.
2208 * tests/Makefile.am (maintainer-push-check): New.
2209
22102006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2211
2212 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2213 (whether successful or failed) so that yypush_parse can be invoked
2214 again to start a new parse using the same yypstate.
2215 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2216 check multiple yypull_parse invocations on the same yypstate. For pull
2217 mode, extend to check multiple yyparse invocations.
2218 (Exploding the Stack Size with Alloca): Extend to try with
2219 %push-pull-parser.
2220 (Exploding the Stack Size with Malloc): Likewise.
2221
2222 * tests/calc.at (Simple LALR Calculator): Don't specify
2223 %skeleton "push.c" since %push-pull-parser implies that now.
2224 * tests/headers.at (export YYLTYPE): Don't check for the push
2225 declarations. Otherwise, this test case can't be used to see if push
2226 mode can truly emulate pull mode.
2227 * tests/input.at (Torturing the Scanner): Likewise.
2228 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2229 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2230 AT_YACC_IF, which now includes the case of push mode since %skeleton
2231 need not be used for push mode. This will be more intuitive once
2232 push.c is renamed to yacc.c.
2233
22342006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2235
2236 For push mode, convert yyparse from a macro to a function, invoke yylex
2237 instead of passing a yylexp argument to yypull_parse, and don't
2238 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2239 Discussed starting at
2240 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2241 * data/bison.m4 (b4_pull_if): New.
2242 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2243 * data/push.c: Improve M4 quoting a little.
2244 (b4_generate_macro_args, b4_parenthesize): Remove.
2245 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2246 any time a pull parser is requested.
2247 Don't #define this as a wrapper around yypull_parse. Instead, when
2248 both push and pull are requested, make it a function that does that
2249 same thing.
2250 (yypull_parse): If there's a b4_prefix, #define this to
2251 b4_prefix[pull_parse] when both push and pull are requested.
2252 Don't define this as a function unless both push and pull are
2253 requested.
2254 Remove the yylexp argument and hard-code yylex invocation instead.
2255 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2256 %push-parser.
2257 * src/getargs.c (pull_parser): New global initialized to true.
2258 * getargs.h (pull_parser): extern it.
2259 * src/output.c (prepare): Insert pull_flag muscle.
2260 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2261 (prologue_declaration): Set both push_parser and pull_parser = true for
2262 %push-pull-parser. Set push_parser = true and pull_parser = false for
2263 %push-parser.
2264 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2265 %push-parser since there's no backward-compatibility concern here.
2266 Scan %push-pull-parser.
2267 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2268 instead of %push-parser.
2269 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2270 prototype it in the module that calls yyparse.
2271 * tests/input.at (Torturing the Scanner): Likewise.
2272 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2273
22742006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2275
2276 Update etc/bench.pl. Optimize push mode a little (the yyn change
2277 deserves most of the credit).
2278 * Makefile.am (SUBDIRS): Add etc subdirectory.
2279 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2280 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2281 yytoken, yyval, and yyloc declarations to...
2282 (yyparse or yypush_parse): ... here to improve performance. For
2283 yypush_parse invocations after the first, be sure to assign yyn its old
2284 value again.
2285 (yypstate_new): Don't bother initializing the yyresult field since the
2286 initial value isn't used.
2287 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2288 remove the #define that, in push mode, set it to yyps->NAME.
2289 * etc/Makefile.am: New.
2290 * etc/bench.pl: Remove and build it instead from...
2291 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2292 "tests/bison" from the build directory by default rather than just
2293 invoking "bison" from $PATH.
2294 (calc_grammar): Update push parser code: don't declare yylval globally,
2295 don't define yyparse_wrapper, and don't #define yyparse.
2296 (bench_grammar): Update to check all working combinations of yacc.c,
2297 push.c, impure, pure, pull, and push.
2298
22992006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2300
2301 For push mode, add pull wrappers around yypush_parse.
2302 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2303 (yypull_parse): New function wrapping yypush_parse.
2304 (yyparse): New #define wrapping yypull_parse.
2305 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2306 is declared.
2307 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2308 prototype yylex in the module that calls yyparse, and don't prototype
2309 yyparse there. Otherwise, the yyparse expansion won't compile.
2310 * tests/input.at (Torturing the Scanner): Likewise.
2311
23122006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2313
2314 Enable push parsers to operate in impure mode. Thus, %push-parser no
2315 longer implies %pure-parser. The point of this change is to move
2316 towards being able to test the push parser code by running the entire
2317 test suite as if %push-parser had been declared.
2318 * data/push.c (yypush_parse): For impure mode, remove the
2319 yypushed_char, yypushed_val, and yypushed_loc arguments.
2320 Instead, declare these as local variables initialized to the global
2321 yychar, yylval, and yylloc.
2322 For the first yypush_parse invocation only, restore the initial values
2323 of these global variables when it's time to read a token since they
2324 have been overwritten.
2325 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2326 %push-parser.
2327 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2328 %pure-parser along with %push-parser since this test case was designed
2329 for pure push parsers.
2330 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2331 (AT_YACC_OR_PUSH_IF): New.
2332 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2333 add a note that it's still wrong for some cases (as it has been for a
2334 while).
2335 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2336 %push-parser no longer implies %pure-parser.
2337
23382006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2339
2340 Remove some unnecessary differences between the pull parser code and
2341 the push parser code. This patch enables yynerrs in push mode.
2342 * data/push.c: Reformat M4 a little.
2343 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2344 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2345 because push mode is on. Instead, if pure mode is on, move yynerrs
2346 to...
2347 (b4_declare_parser_state_variables): ... here.
2348 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2349 to yyps->NAME so it can be used in yypush_parse.
2350 (yypush_parse): Don't omit uses of yynerrs in push mode.
2351
23522006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2353
2354 Fix bug such that the first pushed token's value and location are
2355 sometimes overwritten (sometimes by %initial-action) before being used.
2356 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2357 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2358 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2359 more closely mimic the pull parser logic.
2360 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2361 time to read a token, which is after any initialization of yylval and
2362 yylloc.
2363 (gottoken): Rename label to...
2364 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2365 user namespace.
2366
23672006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2368
2369 Rearrange initialization of the parser state variables so that the
2370 skeleton doesn't have to have a copy for pull mode and another for push
2371 mode. This patch also fixes at least a bug such that yylloc was not
2372 initialized (with b4_location_initial_line and
2373 b4_location_initial_column) upon calling yypush_parse. However, that
2374 initialization now overwrites the first token's location;
2375 %initial-action assigning @$ already did the same thing, and both bugs
2376 will be fixed in a later patch.
2377 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2378 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2379 yyss, yyvs, yyls, and yystacksize.
2380 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2381 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2382 yylsp.
2383 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2384 yyps->NAME so it can be used in yypush_parse.
2385 (yyparse or yypush_parse): For yypush_parse, don't print the
2386 "Starting parse" diagnostic for invocations after the first.
2387 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2388 yypush_parse, only do it for the first invocation.
2389 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2390 initialization to occur in yypush_parse but only on the first
2391 invocation.
2392
23932006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2394
2395 * data/push.c: Add CPP guards around push parser declarations in both
2396 the header and the code file.
2397 In the code file, move the push parser declarations to the same place
2398 they appear in the header file.
2399 Clean up the M4 some, especially the inconsistent underquoting in
2400 some b4_c_function_def and b4_c_function_decl uses.
2401
24022006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2403
2404 Encapsulate the push parser state variables into an M4 macro so the
2405 push skeleton doesn't have to list them again for pull mode's yyparse.
2406 For push mode, remove yypush_parse's local equivalents of these
2407 variables to eliminate unnecessary copying between the two sets at
2408 run-time. This patch also fixes at least a bug related to multiple
2409 %initial-action invocations in push mode.
2410 * data/push.c (b4_declare_parser_variables): Rename to...
2411 (b4_declare_scanner_communication_variables): ... this for clarity and
2412 update both uses.
2413 (b4_declare_yyparse_variables): Remove and move its contents to the one
2414 spot where it was invoked.
2415 (b4_declare_parser_state_variables): New macro containing the parser
2416 state variables required by push mode.
2417 (struct yypstate): Replace all fields but yynew with
2418 b4_declare_parser_state_variables.
2419 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2420 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2421 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2422 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2423 parser state variable declarations with
2424 b4_declare_parser_state_variables.
2425 Don't initialize parser state variables when calling yypush_parse since
2426 yypstate_new already does that.
2427 Invoke the user's initial action only upon the first yypush_parse
2428 invocation.
2429 Remove all code that copies between the local parser state variables
2430 and the yypstate.
2431
24322006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2433
2434 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2435 prevent a name collision in a future patch where these names will
2436 sometimes be #define'd.
2437 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2438 since it no longer has the same name as the existing argument.
2439 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2440
24412006-12-19 Paolo Bonzini <bonzini@gnu.org>
2442 and Joel E. Denny <jdenny@ces.clemson.edu>
2443
2444 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2445 that the argument is case-insensitive, and there's no `=' here.
2446 For the %skeleton entry, mention that %language is better.
2447 (Bison Options): Likewise for --language and --skeleton. Move the
2448 --skeleton entry so that the `Tuning the parser' section is sorted
2449 alphabetically on long options.
2450 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2451 %language directive in detail here; cross-reference the %language
2452 documentation instead.
2453 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2454 `%require "2.3b"' so that the example is always up-to-date.
2455 (Table of Symbols): Add entries for %language and %skeleton.
2456 * examples/extexi (normalize): Instead of replacing every %require
2457 argument with the current Bison version, just substitute for
2458 `@value{VERSION}'. This guarantees that we're testing what actually
2459 appears in the documentation.
2460 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2461 rather than `@VERSION@'.
2462
24632006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2464
2465 * NEWS: Reword the %language news a bit, and put it earlier.
2466
2467 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2468 Rewrite to simplify the logic.
2469 (language_argmatch): Likewise.
2470 (program_name): We now own this var.
2471 * src/getargs.h (struct bison_language): Use char[] rather than
2472 const char *.
2473
2474 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2475 Java is supported.
2476 * src/complain.c (program_name): Remove decl; no longer needed.
2477 * src/main.c (program_name): Remove; now belongs to getargs.
2478
24792006-12-18 Paolo Bonzini <bonzini@gnu.org>
2480
2481 * NEWS: Document %language.
2482
2483 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2484
2485 * data/c-skel.m4, data/c++-skel.m4: New files.
2486 * data/glr.c: Complain on push parsers.
2487
2488 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2489 over %skeleton.
2490 (Decl Summary): Document %language and %skeleton.
2491 (Command line): Document -L.
2492
2493 * examples/extexi: Rewrite %require directive.
2494 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2495
2496 * src/files.c (compute_exts_from_gc): Look in language structure
2497 for .y extension.
2498 (compute_file_name_parts): Check whether .tab should be added.
2499 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2500 (language, skeleton_arg, language_argmatch): New.
2501 (long_options): Add --language.
2502 (getargs): Use skeleton_arg, add -L/--language.
2503 * src/getargs.h: Include location.h.
2504 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2505 * src/output.c (prepare): Pick default skeleton from struct language.
2506 Don't dispatch C skeletons here.
2507 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2508 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2509 * src/scan-gram.l ("%language"): New rule.
2510
2511 * tests/calc.at: Test %skeleton and %language.
2512 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2513 (AT_GLR_IF): Look for %skeleton "glr.cc".
2514 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2515 (AT_YACC_IF): Reject %language.
2516
25172006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2518
2519 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2520 since it wasn't used; only the typedef name 'semantic_type' is needed.
2521 Also, omit trailing white space.
2522
2523 * bootstrap: Sync from coreutils.
2524 (gnulib_extra_files): Add build-aux/announce.gen.
2525 (slurp): Adjust .gitignore files like .cvsignore files.
2526 * build-aux/announce-gen: Remove from CVS, since bootstrap
2527 now creates this.
2528
25292006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2530
2531 Make %push-parser imply %pure-parser. This fixes several bugs; see
2532 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2533 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2534 pure_parser = true.
2535 * data/push.c: Don't bother testing b4_push_if when deciding whether
2536 to expand b4_declare_parser_variables globally.
2537 (yypush_parse): Likewise in here.
2538
2539 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2540 (yy_reduce_print): Reformat M4 for readability.
2541
25422006-12-15 Bob Rossi <bob@brasko.net>
2543 and Joel Denny <jdenny@ces.clemson.edu>
2544
2545 * data/push.c (yypstate): Add typedef, and update all uses of
2546 struct yypstate to just yypstate.
2547 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2548
25492006-12-14 Bob Rossi <bob@brasko.net>
2550
2551 * data/push.c (yypush_parse): Declare prototype regardless of
2552 %locations option.
2553
25542006-12-14 Bob Rossi <bob@brasko.net>
2555
2556 * data/push.c (yyparse): Remove the prototype and the #define when in
2557 push-parser mode.
2558
25592006-12-13 Bob Rossi <bob@brasko.net>
2560
2561 * data/push.c (yypstate_init): Rename to...
2562 (yypstate_new): ... this and use b4_c_function_def.
2563 (yypstate_delete): New.
2564 (yypush_parse): Change parameters yynval and yynlloc to be const.
2565 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2566 yypstate_delete functions.
2567
25682006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2569
2570 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2571 strange test case titles. Reported by Bob Rossi.
2572
25732006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2574
2575 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2576 of potential ambiguities in GLR grammers.
2577
25782006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2579
2580 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2581 `bison ', use m4_index instead of m4_substr since chopping up a string
2582 containing M4-special characters causes problems here.
2583
2584 Fix a couple of bugs related to special characters in user-specified
2585 file names, and make it easier for skeletons to compute output file
2586 names with the same file name prefix as Bison-computed output file
2587 names.
2588 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2589 b4_parser_file_name and b4_spec_defines_file instead of
2590 @output_parser_name@ and @output_header_name@, which are now redundant.
2591 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2592 b4_parser_file_name, b4_spec_defines_file, and the new
2593 @basename(FILENAME@) instead of @output_parser_name@ and
2594 @output_header_name@, which inappropriately escaped the file names as
2595 C string literals.
2596 * src/files.c (all_but_ext): Remove static qualifier.
2597 (compute_output_file_names): Move `free (all_but_ext)' to...
2598 (output_file_names_free): ... here since all_but_ext is needed later.
2599 * src/files.h (all_but_ext): Extern.
2600 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2601 exactly what MUSCLE_INSERT_STRING used to do.
2602 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2603 characters are escaped properly.
2604 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2605 all_but_ext.
2606 For pkgdatadir muscle, maintain previous functionality by using
2607 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2608 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2609 digraphs would never be expanded. Hopefully no one has M4-special
2610 characters in his Bison installation path.
2611 * src/scan-skel.l: Don't parse @output_header_name@ and
2612 @output_parser_name@ anymore since they're now redundant.
2613 In @output, use decode_at_digraphs.
2614 Parse a new @basename command that invokes last_component.
2615 (decode_at_digraphs): New.
2616 (BASE_QPUTS): Remove unused.
2617 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2618 (Output file name): New tests.
2619
26202006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2621
2622 Warn about output files that are generated by the skeletons and that
2623 conflict with other output files.
2624 * data/glr.c: Don't generate the header file here when glr.cc does.
2625 * src/files.c (file_names, file_names_count): New static globals.
2626 (compute_output_file_names): Invoke output_file_name_check for files
2627 not generated by the skeletons and remove existing checks.
2628 (output_file_name_check): New function that warns about conflicting
2629 output file names.
2630 (output_file_names_free): Free file_names.
2631 * src/files.h (output_file_name_check): Declare.
2632 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2633 the skeletons.
2634 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2635 (Conflicting output files): New tests.
2636
26372006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2638
2639 * doc/bison.texinfo: Fix a couple of typos.
2640
26412006-12-08 Bob Rossi <bob@brasko.net>
2642
2643 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2644 Rename to...
2645 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2646 update all uses.
2647 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2648 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2649 local pv.
2650 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2651 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2652
26532006-12-07 Bob Rossi <bob@brasko.net>
2654 and Joel Denny <jdenny@ces.clemson.edu>
2655
2656 * data/push.c (yypvarsinit): Change return type from void* to struct
2657 yypvars*. No longer cast to void* on return.
2658 (struct yypvars): Remove yylen since it need not be remembered between
2659 yypushparse invocations.
2660 (yypushparse): Don't copy between yylen and pv->yylen.
2661
26622006-12-05 Bob Rossi <bob@brasko.net>
2663
2664 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2665 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2666 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2667 (struct yypvars): Remove b4_declare_parser_variables.
2668 (yypvarsinit): Remove init code for removed variables.
2669 (global scope): Do not declare b4_declare_parser_variables if
2670 push or pure mode.
2671 (yypushparse): Add b4_declare_parser_variables.
2672 Init new local variables, and remove init code for removed
2673 yypvars variables.
2674 (yyparse): Delete.
2675 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2676 and yyparse for other modes.
2677 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2678 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2679 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2680 (AT_PURE_LEX_IF): True if pure or push parser.
2681
26822006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2683
2684 Document Yacc prologue alternatives and default %destructor's and
2685 %printer's as experimental. Don't mention Java yet. Discussed at
2686 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2687 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2688 (2.3a): Annotate this entry to say the old forms of these features were
2689 also experimental.
2690 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2691 Table of Symbols): Say they're experimental. Comment out any mention
2692 of Java (we'll want this back eventually).
2693
26942006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2695
2696 Support a file name argument to %defines. Deprecate `=' in
2697 %file-prefix, %name-prefix, and %output. Discussed at
2698 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2699 * NEWS (2.3a+): Mention.
2700 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2701 form of %defines, and remove `=' from entries for %file-prefix,
2702 %name-prefix, and %output.
2703 * src/parse-gram.y (prologue_declaration): Implement.
2704 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2705 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2706 all but one occurrence of %name-prefix.
2707 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2708 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2709 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2710 occurrence of each of %file-prefix and %output. Add check for %defines
2711 with argument.
2712 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2713 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2714 Remove the `=' from %output.
2715
27162006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2717
2718 Don't escape $ in test case titles since Autoconf 2.61 now does that
2719 correctly.
2720 * tests/actions.at (Default %printer and %destructor are not for error
2721 or $undefined): Here.
2722 (Default %printer and %destructor are not for $accept): Here.
2723 * tests/input.at (Invalid $n and @n): Here.
2724
27252006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2726
2727 Rename <!> to <>. Discussed starting at
2728 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2729 * NEWS (2.3a+): Update.
2730 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2731 Update.
2732 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2733 * src/scan-gram.l (INITIAL): Implement.
2734 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2735 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2736 comment.
2737 * tests/actions.at (Default tagless %printer and %destructor,
2738 Default tagged and per-type %printer and %destructor,
2739 Default %printer and %destructor are not for error or $undefined,
2740 Default %printer and %destructor are not for $accept,
2741 Default %printer and %destructor for mid-rule values): Update.
2742 * tests/input.at (Default %printer and %destructor redeclared,
2743 Unused values with default %destructor): Update.
2744
27452006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2746
2747 Don't let %prec take a nonterminal.
2748 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2749 token.
2750 * tests/input.at (%prec takes a token): New test checking that %prec
2751 won't take a nonterminal.
2752
27532006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2754
2755 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2756 it was double-quoted.
2757 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2758 grammar is maintained with Bison's highest standards.
2759 * src/getargs.c: Fix some typos in Doxygen comments.
2760
27612006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2762
2763 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2764 later. Reported by Paul Eggert in
2765 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2766 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2767 * src/scan-code.l (translate_action): Don't bother invoking
2768 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2769 (code_scanner_free): Instead of invoking
2770 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2771 which frees more.
2772 * src/scan-gram.l (gram_scanner_free): Likewise.
2773 * src/scan-skel.l (scan_skel): Likewise.
2774
27752006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2776
2777 * src/files.c (tr): Change return type to void.
2778 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2779 has been called previously for the same key.
2780 (muscle_find): Return storage instead of value so that
2781 --enable-gcc-warnings doesn't produce warnings that the return discards
2782 const. aver that the value and storage are the same since storage
2783 could potentially be NULL when value is not.
2784 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2785 same as 0.
2786
27872006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2788
2789 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2790 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2791 us a slightly cleaner distribution, and also works.
2792 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2793 gnulib changes.
2794
27952006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2796 and Paul Eggert <eggert@cs.ucla.edu>
2797
2798 Don't let Bison leak memory except when it complains.
2799 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2800 (spec_defines_file, dir_prefix): Now char *, not const char *,
2801 since they are freed.
2802 * src/files.c: Likewise.
2803 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2804 Likewise.
2805 (tr): Now operates in-place. All uses changed.
2806 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2807 values.
2808 (compute_file_name_parts, compute_output_file_names): Don't store
2809 read-only data in variables that will be freed.
2810 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2811 src_extension, and header_extension.
2812 (output_file_names_free): New public function to free
2813 spec_verbose_file, spec_graph_file, spec_defines_file,
2814 parser_file_name, and dir_prefix.
2815 * src/getargs.c (getargs): Don't store read-only data in variables that
2816 will be freed.
2817 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2818 (which previously existed but was unused), and quotearg_free.
2819 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2820 * src/muscle_tab.c: Likewise.
2821 (muscle_entry): Make the value char const *,
2822 and add a new storage member that is char * and can be freed.
2823 (muscle_entry_free): New private function.
2824 (muscle_init): Use it instead of free.
2825 (muscle_insert, muscle_grow): Update and use new storage member.
2826 (muscle_code_grow): Free the string passed to muscle_grow
2827 since it's not needed anymore.
2828 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2829 add a new `char *code' member.
2830 ("{...}"): Declare semantic type as code.
2831 * src/scan-code.h (translate_rule_action):
2832 (translate_symbol_action, translate_code, translate_action): Return
2833 `char const *' rather than `char *' since external code should not free
2834 these strings.
2835 * src/scan-code.l: Likewise.
2836 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2837 which is "{...}" in the parser.
2838 * tests/Makefile.am (maintainer-check-valgrind): Set
2839 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2840 Valgrind.
2841 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2842 complain.
2843 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2844 expecting a non-zero exit status sets --leak-check=summary and
2845 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2846 this case, and we don't want to hear about it.
2847
28482006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2849
2850 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2851 instead of from the template, to simplify configuration a bit.
2852 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2853 and m4/wint_t.m4, as they are needed with the latest gnulib.
2854
28552006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2856
2857 Disable unset/unused mid-rule value warnings by default, and recognize
2858 --warnings=midrule-values to enable them. Discussed starting at
2859 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2860 * NEWS (2.3a+): Mention.
2861 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2862 warnings): Add entry for midrule-values subargument.
2863 * src/reader.c (symbol_should_be_used): Don't return true just because
2864 the value is a set/used mid-rule value unless
2865 --warnings=midrule-values was specified.
2866 * tests/input.at (Unused values, Unused values before symbol
2867 declarations): Run tests with and without --warnings=midrule-values.
2868
2869 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2870 than LIST_FREE directly.
2871
28722006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2873
2874 Finish implementing --warnings=error, which should not be implied by
2875 --warnings=all (or by its synonyms -W and --warnings without
2876 subarguments).
2877 * src/complain.c (set_warning_issued): New function to report that
2878 warnings are being treated as errors and to record an error if so.
2879 Invoke...
2880 (warn_at, warn): ... here.
2881 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2882 "error - warnings are errors" does not appear above "all - all of the
2883 above".
2884 (getargs): For -W and --warnings without subarguments, don't let
2885 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2886 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2887
28882006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2889
2890 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2891 empty subargument list. For example: `bison --warnings= parser.y'.
2892
28932006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2894
2895 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2896 the parser header file so that gcc doesn't warn.
2897
28982006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2899
2900 Split the default %destructor/%printer into two kinds: <*> and <!>.
2901 Discussed starting at
2902 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2903 * NEWS (2.3a+): Mention.
2904 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2905 previous change today related to mid-rules.
2906 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2907 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2908 (TYPE_TAG_ANY): Add as <*>.
2909 (TYPE_TAG_NONE): Add as <!>.
2910 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2911 for <*> and <!>.
2912 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2913 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2914 * src/symlist.c (symbol_list_default_new): Split into tagged and
2915 tagless versions.
2916 (symbol_list_destructor_set, symbol_list_printer_set): Split
2917 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2918 SYMLIST_DEFAULT_TAGLESS.
2919 * src/symlist.h: Update symbol_list_default*_new prototypes.
2920 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2921 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2922 * src/symtab.c (default_destructor, default_destructor_location,
2923 default_printer, default_printer_location): Split each into tagged and
2924 tagless versions.
2925 (symbol_destructor_get, symbol_destructor_location_get,
2926 symbol_printer_get, symbol_printer_location_get): Implement tagged
2927 default and tagless default cases.
2928 (default_destructor_set, default_printer_set): Split each into tagged
2929 and tagless versions.
2930 * src/symtab.h: Update prototypes.
2931 * tests/actions.at (Default %printer and %destructor): Rename to...
2932 (Default tagless %printer and %destructor): ... this, and extend.
2933 (Per-type %printer and %destructor): Rename to...
2934 (Default tagged and per-type %printer and %destructor): ... this, and
2935 extend.
2936 (Default %printer and %destructor for user-defined end token): Extend.
2937 (Default %printer and %destructor are not for error or $undefined):
2938 Update.
2939 (Default %printer and %destructor are not for $accept): Update.
2940 (Default %printer and %destructor for mid-rule values): Extend.
2941 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2942 (Unused values with default %destructor): Extend.
2943
29442006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2945
2946 Don't apply the default %destructor/%printer to an unreferenced midrule
2947 value. Mentioned at
2948 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
2949 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
2950 like $@n instead of just @n so that the default %destructor/%printer
2951 logic doesn't see them as user-defined symbols.
2952 (symbol_is_dummy): Check for both forms of the name.
2953 * src/reader.c (packgram): Remove the `$' from each midrule symbol
2954 name for which the midrule value is referenced in any action.
2955 * tests/actions.at (Default %printer and %destructor for mid-rule
2956 values): New test.
2957 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
2958 for change to dummy symbol names.
2959
29602006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2961
2962 Warn about unset midrule $$ if the corresponding $n is used.
2963 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
2964 $n usage.
2965 (packgram): Before invoking grammar_rule_check on any rule, make sure
2966 all actions have already been scanned in order to set `used' flags.
2967 Otherwise, checking that a midrule's $$ is set will not always work
2968 properly because the midrule check must forward-reference the midrule's
2969 parent rule.
2970 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
2971 warning.
2972
29732006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
2974
2975 More improvements to the documentation of the prologue alternatives:
2976 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
2977 Bison manual.
2978 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
2979 some text to clarify the relative importance of the new directives and
2980 to show how these directives may be viewed as code labels.
2981
29822006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
2983
2984 Similar to the recently removed %before-header, add %code-top as the
2985 alternative to the pre-prologue. Mentioned at
2986 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
2987 Also, let the prologue alternatives appear in the grammar section.
2988 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
2989 (prologue_declaration): Move the existing prologue alternatives to...
2990 (grammar_declaration): ... here and add %code-top.
2991 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
2992
2993 Clean up and extend documentation for the prologue alternatives.
2994 * NEWS (2.3a+): Describe prologue alternatives.
2995 * doc/bison.texinfo (Prologue): Move discussion of prologue
2996 alternatives to...
2997 (Prologue Alternatives): ... this new section, and extend it to discuss
2998 all 4 directives in detail.
2999 (Table of Symbols): Clean up discussion of prologue alternatives and
3000 add %code-top.
3001
30022006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3003
3004 DJGPP specific issues.
3005
3006 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3007 config.bat accordingly.
3008 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3009 * djgpp/config.site: Likewise.
3010
30112006-10-16 Paolo Bonzini <bonzini@gnu.org>
3012
3013 Replace %*-header with %provides, %requires, %code. See discussion at
3014 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3015
3016 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3017 (b4_user_start_header): Remove.
3018 * data/glr.c: Use new macros instead of b4_*start_header
3019 and b4_*end_header.
3020 * data/glr.cc: Likewise.
3021 * data/lalr1.cc: Likewise.
3022 * data/push.c: Likewise.
3023 * data/yacc.c: Likewise.
3024
3025 * doc/bison.texinfo: Remove %before-header, rename
3026 %{start,end,after}-header to %requires, %provides, %code.
3027
3028 * src/parse-gram.y: Likewise (also rename token names accordingly).
3029 * src/scan-gram.l: Likewise.
3030 * tests/actions.at: Likewise.
3031
30322006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3033
3034 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3035 Problem reported by Joel E. Denny.
3036
30372006-10-14 Jim Meyering <jim@meyering.net>
3038
3039 (Sync from coreutils.)
3040 Work also when the working directory (with e.g. coreutils sources)
3041 is version controlled with git, rather than CVS.
3042 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3043 rather than CVS.
3044 In messages and comments, say e.g., "checked-out sources",
3045 rather than "CVS sources".
3046 (version_controlled_file): New function. Work for git as well as
3047 for CVS. Don't use grep's -q option.
3048 (slurp): Call it here, in place of CVS-specific code.
3049
30502006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3051
3052 Fix testsuite for ./configure --enable-gcc-warnings:
3053 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3054 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3055 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3056 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3057 * test/regression.at (Diagnostic that expects two alternatives):
3058 Likewise.
3059
30602006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3061
3062 * bootstrap.conf (gnulib_modules): Add config-h.
3063 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3064 worry about HAVE_CONFIG_H.
3065 * lib/abitset.c: Likewise.
3066 * lib/bitset.c: Likewise.
3067 * lib/bitset_stats.c: Likewise.
3068 * lib/bitsetv-print.c: Likewise.
3069 * lib/bitsetv.c: Likewise.
3070 * lib/ebitset.c: Likewise.
3071 * lib/get-errno.c: Likewise.
3072 * lib/lbitset.c: Likewise.
3073 * lib/subpipe.c: Likewise.
3074 * lib/timevar.c: Likewise.
3075 * lib/vbitset.c: Likewise.
3076 * lib/bitset.c: Include "bitset.h" first, to test interface.
3077 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3078 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3079 * lib/bitsetv.c: Include "bitsetv.h" first.
3080 * lib/get-errno.c: Include "get-errno.h" first.
3081 * m4/.cvsignore: Add config-h.m4.
3082 * tests/actions.at (Default %printer and %destructor for ...):
3083 Adjust expected line numbers in output to reflect removal of #if
3084 HAVE_CONFIG_H lines.
3085 * tests/glr-regression.at (Missed %merge type warnings when ...):
3086 Likewise.
3087 * tests/regression.at (Braced code in declaration in rules section):
3088 Likewise.
3089 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3090 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3091 Include <config.h> unconditionally.
3092
3093 * bootstrap: Sync from coreutils, as follows:
3094
3095 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3096
3097 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3098 variable was sometimes used without being initialized. This
3099 messed up the installation of the INSTALL file in some cases.
3100
3101 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3102
3103 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3104 --copy. Inspired by a suggestion from Bruno Haible.
3105
3106 2006-10-03 Jim Meyering <jim@meyering.net>
3107
3108 * bootstrap: Undo last change to this file, since now gnulib-tool
3109 sticks with the automake default in generating dependencies.
3110
31112006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3112
3113 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3114 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3115
3116 * doc/bison.1: Add copyright notice.
3117
3118 * data/glr.c: Don't include <stdarg.h>; not used.
3119
3120 * NEWS: The -g and --graph options now output graphs in Graphviz
3121 DOT format, not VCG format.
3122 * doc/bison.1: Likewise.
3123 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
3124 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3125 of this change in
3126 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
3127 * TODO: Remove Graphviz entry.
3128 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3129 remove vcg.c, vcg.h, vcg_defaults.h.
3130 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3131 * src/graphviz.c, src/graphviz.h: New files.
3132 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3133 * src/files.h: Make comment more generic.
3134 * src/main.c (main): Likewise.
3135 * src/print_graph.h: Likewise.
3136 * src/getargs.c (usage): Make usage description more generic.
3137 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3138 (static_graph, fgraph): Remove. All uses changed to pass
3139 arguments instead of sharing a static var.
3140 (print_core, print_actions, print_state, print_graph):
3141 Output graphviz format rather than VCG format.
3142 * tests/.cvsignore: Remove *.vcg; add *.dot.
3143 * tests/output.at: Expect *.dot files, not *.vcg files.
3144
3145 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3146 accommodates the 2006-10-08 change.
3147
31482006-10-11 Bob Rossi <bob@brasko.net>
3149
3150 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3151 (b4_yyssa, b4_yyerror_range): New macros.
3152 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3153 (yypvarsinit): Remove init of removed fields.
3154 (yypushparse): Remove use of removed fields; use new macros instead.
3155
31562006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3157
3158 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3159 in a push parser. Reindent slightly to match yacc.c better.
3160
31612006-10-11 Bob Rossi <bob@brasko.net>
3162
3163 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3164 yymsg_alloc fields.
3165 (yypvarsinit, yypushparse): Remove init of removed fields.
3166 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
3167
31682006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3169
3170 * THANKS: Add Paolo Bonzini and Bob Rossi.
3171
31722006-10-08 Paolo Bonzini <bonzini@gnu.org>
3173
3174 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3175 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3176 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3177 b4_define_user_cde and uses): Remove.
3178 (b4_comment, b4_prefix, b4_sync_start): New.
3179 * data/bison.m4: New file, with most of the content removed from c.m4.
3180 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3181 * src/output.c (output_skeleton): Pass bison.m4.
3182 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3183 only if specified.
3184
31852006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3186
3187 Fix test failure reported by Tom Lane in
3188 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3189 and try to make such failures easier to catch in the future.
3190 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3191 that's now the caller's responsibility.
3192 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3193 Set yychar = YYEOF if it's negative.
3194 * tests/actions.at (yylex): Abort if asked to read past EOF.
3195 * tests/conflicts.at (yylex): Likewise.
3196 * tests/cxx-type.at (yylex): Likewise.
3197 * tests/glr-regression.at (yylex): Likewise.
3198 * tests/input.at (yylex): Likewise.
3199 * tests/regression.at (yylex): Likewise.
3200 * tests/torture.at (yylex): Likewise.
3201
32022006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3203
3204 Fix problems with translating English-language diagnostics.
3205 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3206 respect to bison-runtime pot generation. The YY_ stuff
3207 wasn't being captured.
3208 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3209 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3210 * runtime-po/POTFILES.in: Add data/push.c.
3211
32122006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3213
3214 Merge bootstrap changes from coreutils.
3215
3216 2006-09-28 Jim Meyering <jim@meyering.net>
3217
3218 Automatically generated dependencies are important even
3219 when all of the sources in a directory come from gnulib.
3220 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3221 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3222
3223 2006-09-23 Jim Meyering <jim@meyering.net>
3224
3225 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3226
3227 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3228
3229 * bootstrap: Add support for --force.
3230 (usage): New function. Describe usage less tersely.
3231 (CVS_only_file): New var.
3232
32332006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3234
3235 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3236 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3237 Adjust white space and comments to match GNU style better.
3238
32392006-09-20 Bob Rossi <bob@brasko.net>
3240
3241 * data/push.c (yyresult_get): Remove function.
3242 (YYPUSH_MORE): Add #define.
3243 (yypushparse): Modify return value.
3244
32452006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3246
3247 * stamp-h.in: Remove; no longer needed.
3248 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3249 Remove config.h, config.hin, intl (no longer created).
3250 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3251 stamp-h1.
3252
3253 Sync bootstrap from coreutils, as follows:
3254
3255 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3256
3257 * bootstrap (symlink_to_gnulib): New function.
3258 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3259 to copies-of-gnulib.
3260 (cp_mark_as_generated, slurp, gnulib_files):
3261 Avoid making a copy if it's the same as the old version.
3262 (gnulib_files): Add support for this variable (used by Bison).
3263
32642006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3265
3266 * src/getargs.c (usage): Rework to use conventions similar to
3267 coreutils, to make translation a bit easier and the code a bit
3268 smaller. Problem reported by Tim Van Holder.
3269
32702006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3271
3272 Use some of gnulib's new modules, taken from coreutils.
3273
3274 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3275 * bootstrap.conf: New file.
3276 (gnulib_modules): Add configmake, inttypes, unistd.
3277 (XGETTEXT_OPTIONS): Add complain, complain_at,
3278 fatal, fatal_at, warn, warn_at, unexpected_end.
3279 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3280 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3281 (gl_EARLY): Add.
3282 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3283 (gl_INIT): Add
3284 (GNULIB_AUTOCONF_SNIPPET): Remove.
3285 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3286 the pickiest.
3287 * lib/.cvsignore: Add inttypes_.h.
3288 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3289 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3290 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3291 no-longer-necessary initializations.
3292 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3293 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3294 use the unistd module.
3295 * src/system.h: Likewise.
3296 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3297 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3298 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3299 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3300 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3301 * src/system.h: Include inttypes.h unconditionally, now that we
3302 use the inttypes module. Don't bother to include stdint.h, since
3303 inttypes.h now does that for us.
3304 (LOCALEDIR): Remove, now that we use the configmake module.
3305 * src/getargs.c: Include configmake.h.
3306 * src/main.c: Likewise.
3307 * src/output.c: Likewise.
3308 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3309 not from $abs_top_builddir, since config.h moved.
3310
3311
3312 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3313 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3314
3315 * src/parse-gram.y (symbol_declaration): Don't put statements
3316 before declarations; it's not portable to C89.
3317 * src/scan-code.l (handle_action_at): Likewise.
3318
3319 * src/scan-code.l: Always initialize braces_level; the old code
3320 left it uninitialized and therefore had undefined behavior.
3321
3322 Don't attempt to redefine 'assert', since it runs afoul of
3323 systems where standard headers (mistakenly) include <assert.h>.
3324 Instead, define and use our own alternative, called 'aver'.
3325 * src/reader.c: Don't include assert.h, since we no longer
3326 use assert.
3327 * src/scan-code.l: Likewise.
3328 * src/system.h (assert): Remove, replacing with....
3329 (aver): New function, taking a bool arg. All uses changed.
3330 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3331 not merely an integer.
3332
33332006-09-15 Bob Rossi <bob@brasko.net>
3334
3335 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3336 * data/c.m4 (YYPUSH): New.
3337 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3338 * src/getargs.c (push_parser): New var.
3339 * src/getargs.h (push_parser): New declaration.
3340 * src/output.c (prepare): Add macro insertion of `push_flag'.
3341 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3342 (prologue_declaration): Parse %push-parser.
3343 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3344 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3345 list of removed lines from the traces observed.
3346 (AT_CHECK_CALC_LALR): Added push parser tests.
3347
33482006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3349
3350 * NEWS: Version 2.3a.
3351 * configure.ac (AC_INIT): Likewise.
3352
3353 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3354 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3355 due to header ordering dependencies. I don't know why the #define
3356 was there.
3357
3358 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3359 runtime cost when YYDEBUG is not defined, and so that some tests
3360 that used to fail now work. Problem and initial suggestion by
3361 Paolo Bonzini.
3362 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3363 * data/glr.cc (b4_parser_class_name):
3364 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3365 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3366 (yydebug_) [YYDEBUG]: New member.
3367 (yycdebug_): Now defined only if YYDEBUG.
3368 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3369 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3370 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3371 if YYYDEBUG.
3372 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3373 Define only if YYDEBUG.
3374 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3375 set_debug_level.
3376 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3377 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3378 AT_CHECK_CALC_GLR_CC that are working now.
3379
33802006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3381
3382 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3383 We don't need them in glr.cc, and glr.c defines them.
3384 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3385 assumes that defining it to anything is the same as defining
3386 it to 1. Problem reported by Paolo Bonzini.
3387
33882006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3389
3390 * data/c.m4 (b4_null, b4_case): Define.
3391 * src/output.c (prepare_symbols): Use b4_null.
3392 (user_actions_output): Use b4_case.
3393
33942006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3395
3396 * data/glr.c (b4_shared_declarations): Put start-header first,
3397 before any #includes that we generate, so that feature-test
3398 macros work. Problem reported by Michael Deutschmann in
3399 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3400 * data/lalr1.cc: Likewise.
3401 * doc/bison.texinfo (Prologue): Document that feature-test macros
3402 should be defined before any Bison declarations.
3403 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3404 that depend on location.hh after, not before, Bison decls, since
3405 we now include location.hh after the first user prologue.
3406
3407 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3408 Sander Brandenburg in
3409 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3410 Also, fix minor white space and comment issues.
3411 (Prologue): Mention that it's better to define feature-test macros
3412 before Bison declarations. Problem reported by Michael Deutschmann.
3413
3414 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3415 by Jim Meyering.
3416 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3417 This adjusts to recent gnulib changes.
3418
34192006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3420
3421 Finish implementation of per-type %destructor/%printer. Discussed
3422 starting at
3423 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3424 and
3425 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3426 * NEWS (2.3+): Add a description of this feature to the default
3427 %destructor/%printer description.
3428 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3429 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3430 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3431 list node contains a semantic type.
3432 * src/symtab.c, src/symtab.h: Extend with a table that associates
3433 semantic types with their %destructor's and %printer's.
3434 (semantic_type_from_uniqstr, semantic_type_get,
3435 semantic_type_destructor_set, semantic_type_printer_set): New functions
3436 composing the public interface of that table.
3437 (symbol_destructor_get, symbol_destructor_location_get,
3438 symbol_printer_get, symbol_printer_location_get): If there's no
3439 per-symbol %destructor/%printer, look up the per-type before trying
3440 the default.
3441 * tests/actions.at (Per-type %printer and %destructor): New test case.
3442 * tests/input.at (Default %printer and %destructor redeclared):
3443 Extend to check that multiple occurrences of %symbol-default in a
3444 single %destructor/%printer declaration is an error.
3445 (Per-type %printer and %destructor redeclared, Unused values with
3446 per-type %destructor): New test cases.
3447
34482006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3449
3450 Require default %destructor/%printer to be declared using
3451 %symbol-default instead of an empty symbol list, and start working on
3452 new per-type %destructor/%printer. Discussed at
3453 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3454 * NEWS (2.3+): Add %symbol-default to example.
3455 * bison.texinfo (Freeing Discarded Symbols): Likewise.
3456 (Table of Symbols): Add entry for %symbol-default.
3457 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3458 (generic_symlist, generic_symlist_item): New nonterminals for creating
3459 a list in which each item is a symbol, semantic type, or
3460 %symbol-default.
3461 (grammar_declaration): Use generic_symlist in %destructor and %printer
3462 declarations instead of symbols.1 or an empty list.
3463 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3464 for changes to symbol_list.
3465 * src/reader.c: Update for changes to symbol_list.
3466 * src/scan-code.l: Likewise.
3467 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3468 * src/symlist.c, src/symlist.h: Extend such that a list node may
3469 represent a semantic type or a %symbol-default in addition to just an
3470 ordinary symbol. Add switched functions for setting %destructor's and
3471 %printer's.
3472 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3473 %destructor/%printer declarations.
3474
34752006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3476
3477 Whether the default %destructor/%printer applies to a particular symbol
3478 isn't a question of whether the user *declares* that symbol (in %token,
3479 for example). It's a question of whether the user by any means
3480 *defines* the symbol at all (by simply using a char token, for
3481 example). $end is defined by Bison whereas any other token with token
3482 number 0 is defined by the user. The error token is always defined by
3483 Bison regardless of whether the user declares it with %token, but we
3484 may one day let the user define error as a nonterminal instead.
3485 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3486 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3487 the meaning of "user-defined".
3488 * tests/actions.at (Default %printer and %destructor for user-declared
3489 end token): Rename to...
3490 (Default %printer and %destructor for user-defined end token): ...
3491 this.
3492
3493 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3494 computation of whether to apply the default, don't maintain a list of
3495 every Bison-defined symbol. Instead, just check for a first character
3496 of '$', which a user symbol cannot have, and check for the error token.
3497
34982006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3499
3500 Don't apply the default %destructor or %printer to the error token,
3501 $undefined, or $accept. This change fits the general rule that the
3502 default %destructor and %printer are only for user-declared symbols,
3503 and it solves several difficulties that are described in the new test
3504 cases listed below.
3505 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3506 * tests/actions.at (Default %printer and %destructor are not for error
3507 or $undefined, Default %printer and %destructor are not for $accept):
3508 New test cases.
3509
35102006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3511
3512 Allow %start after the first rule.
3513 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3514 when parsing the first rule.
3515 (check_and_convert_grammar): Search for it here after all grammar
3516 declarations have been parsed. Skip midrules, which have dummy LHS
3517 nonterminals.
3518 * src/symtab.c (symbol_is_dummy): New function.
3519 * src/symtab.h (symbol_is_dummy): Declare it.
3520 * tests/input.at (%start after first rule): New test.
3521
35222006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3523
3524 Redo some of the previous commit: add back the ability to use
3525 non-aliased/undeclared string literals since it might be useful to
3526 those declaring %token-table.
3527 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3528 commit: don't worry about complaints from symbols_pack.
3529 * src/symtab.c (symbol_new, symbol_class_set,
3530 symbol_check_alias_consistency): Undo changes in previous commit: count
3531 each string literal as a new symbol and token, assign it a symbol
3532 number, and don't complain about non-aliased string literals.
3533 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3534 and token counts but does still set aliased tokens to the same number,
3535 symbol_pack_processor now leaves empty slots in the symbols array.
3536 Remove those slots.
3537 * tests/regression.at (Undeclared string literal): Remove test case
3538 added in previous commit since non-aliased string literals are allowed
3539 again.
3540 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3541 remove unnecessary string literal declarations.
3542 * tests/sets.at (Firsts): Likewise.
3543
35442006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3545
3546 Don't allow an undeclared string literal, but allow a string literal to
3547 be used before its declaration.
3548 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3549 symbols_pack complained.
3550 * src/symtab.c (symbol_new): Don't count a string literal as a new
3551 symbol.
3552 (symbol_class_set): Don't count a string literal as a new token, and
3553 don't assign it a symbol number since symbol_make_alias does that.
3554 (symbol_make_alias): It's not necessary to decrement the symbol and
3555 token counts anymore. Don't assume that an alias declaration occurs
3556 before any uses of the identifier or string, and thus don't assert that
3557 one of them has the highest symbol number so far.
3558 (symbol_check_alias_consistency): Complain if there's a string literal
3559 that wasn't declared as an alias.
3560 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3561 symbol_pack asserts that every token has been assigned a symbol number
3562 although undeclared string literals have not.
3563 * tests/regression.at (String alias declared after use, Undeclared
3564 string literal): New test cases.
3565 (Characters Escapes, Web2c Actions): Declare string literals as
3566 aliases.
3567 * tests/sets.at (Firsts): Likewise.
3568
35692006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3570
3571 In the grammar scanner, STRING_FINISH unclosed constructs and return
3572 them to the parser in order to improve error messages.
3573 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3574 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3575 * tests/input.at (Unclosed constructs): New test case.
3576 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3577 seen.
3578
3579 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3580 unused global.
3581
35822006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3583
3584 Handle string aliases for character tokens correctly.
3585 * src/symtab.c (symbol_user_token_number_set): If the token has an
3586 alias, check and set its alias's user token number instead of its own,
3587 which is set to indicate the alias. Previously, every occurrence of
3588 the character token in the grammar overwrote that alias indicator with
3589 the character code.
3590 * tests/input.at (String aliases for character tokens): New test.
3591
35922006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3593
3594 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3595
35962006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3597
3598 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3599 to prevent failures when building on older platforms.
3600 Check for autopoint failure.
3601 Set XGETTEXT_OPTIONS to values that check for C format strings,
3602 so that translators are warned about them (this also helps
3603 prevent core dumps).
3604
3605 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3606 function, since it simplifies our code a bit.
3607
3608 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3609 rather than -W, so we don't get bogus warnings about sign comparisons.
3610 Add -Wpointer-arith, since that warning is useful (it reports code
3611 that does not conform to C89 and that some compilers reject).
3612 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3613 since it's no longer needed.
3614
36152006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3616
3617 Clean up scanners a bit.
3618 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3619 definitions so gcc won't warn when obstack_for_string is unused.
3620 * src/scan-code.l: config.h and system.h are already #include'd by
3621 scan-code-c.c, so get rid of them here.
3622 * src/scan-gram.l: Likewise.
3623 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3624 definitions rather than duplicating the rest of it.
3625 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3626
36272006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3628
3629 Suppress signed/unsigned comparison warnings for yycheck.
3630 * data/c.m4 (b4_safest_int_type): New macro.
3631 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3632 a signed int type, cast it to b4_safest_int_type first.
3633 * data/yacc.c: Likewise.
3634 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3635 also overwritten.
3636
36372006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3638
3639 * doc/bison.texinfo: Fix some typos.
3640
36412006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3642
3643 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3644 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3645
3646 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3647 the latest gnulib does this a different way.
3648 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3649 translation was patched, so stop omitting it.
3650
36512006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3652
3653 Enable declaration of default %printer/%destructor. Make the parser
3654 use these for all user-declared grammar symbols for which the user does
3655 not declare a specific %printer/%destructor. Thus, the parser uses it
3656 for token 0 if the user declares it but not if Bison generates it as
3657 $end. Discussed starting at
3658 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3659 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3660 and
3661 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3662 * NEWS (2.3+): Mention.
3663 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3664 declare a %destructor for a mid-rule's semantic value. It's just
3665 impossible to declare one specific to it.
3666 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3667 code. Describe default %destructor form.
3668 * src/parse-gram.y (grammar_declaration): Parse default
3669 %printer/%destructor declarations.
3670 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3671 and symbol_destructor_location_get rather than accessing the destructor
3672 and destructor_location members of struct symbol.
3673 (symbol_printers_output): Likewise but for %printer's.
3674 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3675 again.
3676 * src/symtab.c (default_destructor, default_destructor_location,
3677 default_printer, default_printer_location): New static global
3678 variables to record the default %destructor and %printer.
3679 (symbol_destructor_get, symbol_destructor_location_get,
3680 symbol_printer_get, symbol_printer_location_get): New functions to
3681 compute the appropriate %destructor and %printer for a symbol.
3682 (default_destructor_set, default_printer_set): New functions to set the
3683 default %destructor and %printer.
3684 * src/symtab.h: Prototype all those new functions.
3685 * tests/actions.at (Default %printer and %destructor): New test to
3686 check that the right %printer and %destructor are called, that they're
3687 not called for $end, and that $$ and @$ work correctly.
3688 (Default %printer and %destructor for user-declared end token): New
3689 test to check that the default %printer and %destructor are called for
3690 a user-declared end token.
3691 * tests/input.at (Default %printer and %destructor redeclared, Unused
3692 values with default %destructor): New tests to check related grammar
3693 warnings and errors.
3694
36952006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3696
3697 Clean up handling of %destructor for the end token (token 0).
3698 Discussed starting at
3699 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3700 and
3701 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3702
3703 Make the skeletons consistent in how they pop the end token and invoke
3704 its %destructor.
3705 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3706 state, which has token number 0, since this would invoke the
3707 %destructor for the end token.
3708 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3709 until after shifting the end token, or else it won't be popped.
3710 * data/yacc.c (yyparse): Likewise.
3711
3712 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3713 it's the end token. Upon termination, destroy an unshifted lookahead
3714 even when it's the end token.
3715 * data/lalr1.cc (yy::parser::parse): Likewise.
3716 * data/yacc.c (yyparse): Likewise.
3717
3718 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3719 value warnings for the end token when the user gives the end token a
3720 %destructor.
3721
3722 * tests/actions.at (Printers and Destructors): Test all the above.
3723
37242006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3725
3726 Update to latest gnulib and gettext versions.
3727 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3728 Add fopen-safer.
3729 (gnulib_files): Add m4/warning.m4. Don't worry about files
3730 overwritten by autopoint.
3731 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3732 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3733 rejects them.
3734 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3735 so that we can remove the intl files at a better time.
3736 (intl_files_to_remove): Remove aclocal.m4, since it gets
3737 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3738 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3739 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3740 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3741 Remove datarootdir hack; no longer needed.
3742 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3743 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3744 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3745 strdup.h.
3746 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3747 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3748
37492006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3750
3751 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3752 it with --assume-autoconf='latest-stable'.
3753
37542006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3755
3756 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3757 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3758 YYSTYPE' and `{'.
3759 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3760 those from muscle_tab.c since the old ones are misleading.
3761
37622006-07-13 Akim Demaille <akim@epita.fr>
3763
3764 Support %define "KEY" {VALUE}.
3765 * src/scan-code.h, src/scan-code.l (translate_action)
3766 (translate_rule_action, translate_symbol_action, translate_code):
3767 Return char *, not const char *.
3768 * src/parse-gram.y (declaration): Rename as...
3769 (prologue_declaration): this.
3770 (string_content): Remove this nonterminal, use STRING.
3771 (braceless, content, content.opt): New nonterminal.
3772 Use them.
3773 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3774 as value.
3775 * src/scan-gram.l (getargs.h): Don't include it.
3776
37772006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3778
3779 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3780 rather than a for-loop that declares a local bool variable. This
3781 should work around a compatibility problem with a Cray x1e C++
3782 compiler reported by Hung Nguyen in
3783 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3784 The for-loop was introduced in the 2004-11-17 change but I don't
3785 know why it was needed.
3786
37872006-07-12 Akim Demaille <akim@epita.fr>
3788
3789 * data/c.m4: Comment changes.
3790
37912006-07-10 Akim Demaille <akim@lrde.epita.fr>
3792
3793 * src/complain.c (error_message, ERROR_MESSAGE): New.
3794 To factor...
3795 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3796 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3797
37982006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3799
3800 * NEWS: Instead of %union, you can define and use your own union type
3801 YYSTYPE if your grammar contains at least one <type> tag.
3802 Your YYSTYPE need not be a macro; it can be a typedef.
3803 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3804 (Union Decl, Decl Summary): Document this.
3805 * data/glr.c (YYSTYPE): Implement this.
3806 * data/glr.cc (YYSTYPE): Likewise.
3807 * data/lalr1.cc (YYSTYPE): Likewise.
3808 * data/yacc.c (YYSTYPE): Likewise.
3809 * src/output.c (prepare): Output tag_seen_flag.
3810 * src/parse-gram.y (declaration, grammar_declaration):
3811 Use 'union_seen' rather than 'typed' to determine whether
3812 %union has been seen, since grammars can now be typed without
3813 %union.
3814 (symbol_declaration, type.opt, symbol_def):
3815 Keep track of whether a tag has been seen.
3816 * src/reader.c (union_seen, tag_seen): New vars.
3817 (typed): remove.
3818 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3819 * src/scan-code.l (untyped_var_seen): New variable.
3820 (handle_action_dollar): Adjust to above changes.
3821 (handle_action_dollar, handle_action_at):
3822 Improve overflow checking for outlandish numbers.
3823 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3824 avoid new diagnostics generated by above changes.
3825 * tests/regression.at (YYSTYPE typedef): Add test to check
3826 for type tags without %union.
3827
3828 * src/symlist.c (symbol_list_length): Return int, not unsigned
3829 int, since callers expect int. This may need to get revisited
3830 once we have proper integer overflow checking.
3831
3832 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3833 object is now static.
3834
3835 * src/getargs.c (flags_argmatch): Return void, not int,
3836 to pacify ./configure --enable-gcc-warnings.
3837
3838 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3839 since last_string is already defined to FLEX_PREFIX (last_string).
3840
38412006-07-09 Akim Demaille <akim@lrde.epita.fr>
3842
3843 Implement --warnings/-W.
3844 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3845 replaced by...
3846 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3847 Adjust callers.
3848 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3849 (warnings_args, warnings_types): New.
3850 (getargs, short_options, long_options): Accept -W/--warnings.
3851 Sort the options by alphabetical order, upper case letter right
3852 before its lower case.
3853
38542006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3855
3856 Change %merge result type clash warnings to errors. Discussed at
3857 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3858 * src/reader.c (record_merge_function_type): Use complain_at.
3859 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3860 declared later): Update test case results.
3861
38622006-07-09 Akim Demaille <akim@lrde.epita.fr>
3863
3864 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3865 to be in alphabetical order.
3866 (trace_args): Spelling fixes.
3867
38682006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3869
3870 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3871 so they don't collide with user-defined macros.
3872 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3873 this was never guaranteed, and now that we're using gnulib stdint,
3874 which defines int_fast16_t to long int, the problem is exposed.
3875
38762006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3877
3878 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3879 need the full POSIX semantics (and weren't implementing them
3880 anyway).
3881
3882 Adjust to Autoconf 2.60 and today's gnulib.
3883 * bootstrap (gnulib_modules): Add stdint.
3884 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3885 no longer copies it.
3886 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3887 since stdint needs the former and wcwidth (which is now required
3888 by mbswidth) needs the latter.
3889 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3890 work around a compatibility glitch between gettext 0.14.6 and
3891 Autoconf 2.60.
3892 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3893 Do not check for uintptr_t, since new stdint module does the right
3894 thing.
3895 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3896 Add stdint.h, stdint_.h, wcwidth.h.
3897 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3898 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3899 stdint.m4, wchar_t.m4, wcwidth.m4.
3900 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3901 usual order for ../lib/*.h files.
3902 (file_name_split): Use last_component, not base_name, to adjust
3903 to gnulib changes.
3904 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3905 for ../lib/*.h files.
3906 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3907 Define unconditionally, since we now assume the stdint module.
3908 * src/scan-skel.l: Include <dirname.h>.
3909 (BASE_QPUTS): Use last_component, not base_name.
3910 * src/system.h: Include <unlocked-io.h> in the usual order
3911 for ../lib/*.h files. Include <stdint.h> unconditionally,
3912 since we now use the stdint module.
3913 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3914 HAVE_UINTPTR_T, since we now use the stdint module.
3915 (base_name): Remove decl, since files now include <dirname.h>
3916 to get the decl.
3917
39182006-07-08 Akim Demaille <akim@lrde.epita.fr>
3919
3920 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3921 New, default to 1.
3922 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3923 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3924 default.
3925 * tests/calc.at: Adjust.
3926
39272006-07-08 Akim Demaille <akim@lrde.epita.fr>
3928
3929 * data/c.m4 (b4_basename): New.
3930 (b4_syncline): Also output the location of its invocation (from
3931 the skeleton).
3932 (b4_user_action, b4_define_user_action, b4_user_actions)
3933 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3934 (b4_user_stype): New.
3935 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3936
39372006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3938
3939 In the grammar file, the first column is 1 not 0 on the first line as
3940 on every other line.
3941 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3942 * tests/input.at (Torturing the Scanner): Update output.
3943
3944 * src/scan-gram.l (scanner_cursor): Declare it static.
3945
39462006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3947
3948 In warnings, say "previous declaration" rather than "first
3949 declaration".
3950 * src/symtab.c (redeclaration): Do that here.
3951 * src/reader.c (record_merge_function_type): In the case of a result
3952 type clash, report the previous declaration rather than the very first
3953 one in the grammar file.
3954 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3955 declared later): Add a third declaration to check this behavior.
3956 * tests/input.at (Incompatible Aliases): Update output.
3957
39582006-06-27 Akim Demaille <akim@epita.fr>
3959
3960 * doc/Doxyfile.in: New.
3961 * doc/Makefile.am: Use it.
3962 * src/lalr.h, src/symtab.h: Initial doxygenation.
3963
39642006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3965
3966 Don't miss %merge result type warnings just because the LHS types are
3967 declared after the %merge. This continues the effort of the previous
3968 patch.
3969 * src/reader.c (get_merge_function): Don't set the merger type yet.
3970 (record_merge_function_type): New function for setting the merger type
3971 and checking for clashes.
3972 (grammar_current_rule_merge_set): Set the location of the %merge for
3973 the current rule.
3974 (packgram): Invoke record_merge_function_type for each rule now that
3975 all symbol type declarations have been parsed.
3976 * src/reader.h (merger_list.type_declaration_location): New member
3977 storing the location of the first %merge from which the type for this
3978 merging function was derived.
3979 * src/symlist.h (symbol_list.merger_declaration_location): New member
3980 storing the location of a rule's %merge, if any.
3981 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3982 declared later): New test to catch the error fixed by the above patch.
3983
39842006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
3985
3986 Get action warnings (grammar_rule_check) right even when symbol
3987 declarations appear after the rules. Discussed at
3988 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
3989 and
3990 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
3991 Don't mistake the type of $$ in a midrule to be that of its parent
3992 rule's $$.
3993 * src/reader.c (grammar_current_rule_end): Don't invoke
3994 grammar_rule_check yet since not all symbol declarations may have been
3995 parsed yet.
3996 (grammar_midrule_action): Likewise.
3997 Don't record whether the midrule's $$ has been used yet since actions
3998 haven't been translated yet.
3999 Record the midrule's parent rule and its RHS index within the parent
4000 rule.
4001 (grammar_current_rule_action_append): Don't translate the action yet
4002 since not all symbol declarations may have been parsed yet and, thus,
4003 warnings about types for $$, $n, @$, and @n can't be reported yet.
4004 (packgram): Translate the action and invoke grammar_rule_check now that
4005 all symbol declarations have been parsed.
4006 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4007 after parsing the entire grammar file, the symbol list here in the case
4008 of a midrule is actually the midrule's empty RHS, so reference its
4009 parent rule's RHS where necessary.
4010 On the other hand, now that you can already know it's a midrule, you
4011 aren't forced to think $$ has the same type as its parent rule's $$.
4012 (handle_action_at): In the case of a midrule, reference the parent rule
4013 where necessary.
4014 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4015 members.
4016 (symbol_list_length): Now that this is invoked after all rules have
4017 been parsed, a NULL symbol (rather than a NULL symbol list node)
4018 terminates a rule. symbol_list_print already does this correctly.
4019 * src/symlist.h (symbol_list.midrule_parent_rule,
4020 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4021 remember their relationships with their parents.
4022 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4023 fixed by the above patch.
4024 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4025 implementing...
4026 (Unused values): ... this old test case and...
4027 (Unused values before symbol declarations): ... this new test case.
4028 This one is the same as `Unused values' except that all symbol
4029 declarations appear after the rules in order to catch the rest of the
4030 errors fixed by the above patch.
4031
40322006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4033
4034 More cleanup.
4035 * src/reader.c (current_rule): Declare it static since it's no longer
4036 used outside this file.
4037 (grammar_current_rule_action_append): Remove redundant arguments from
4038 translate_rule_action invocation.
4039 * src/reader.h (current_rule): Remove this unused extern.
4040 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4041 * src/scan-code.l (translate_rule_action): Likewise.
4042
40432006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4044
4045 Clean up yesterday's patch.
4046 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4047 to...
4048 * src/reader.c (grammar_current_rule_action_append): ... here for
4049 consistency with grammar_current_rule_symbol_append.
4050 * tests/regression.at (Braced code in declaration in rules section):
4051 Make yyerror and yylex static as usual.
4052
40532006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4054
4055 Fix bug that mistakes braced code in a declaration in the rules section
4056 to be a rule action. Mentioned at
4057 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4058 * src/scan-gram.l: Move midrule action detection from the start of the
4059 scanning of any braced code to...
4060 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4061 action. For readability, use $2 and @2 rather than the equivalent
4062 global variables.
4063 * tests/regression.at (Braced code in declaration in rules section):
4064 New test to catch the error fixed by the above patch.
4065
4066 Work on code readability some.
4067 * src/scan-code.l (current_rule): Get rid of this misleading and
4068 redundant declaration: it's actually extern'ed in reader.h.
4069 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4070 translate_action): Add a rule argument and use it instead of the global
4071 current_rule.
4072 (translate_rule_action): This already receives current_rule through an
4073 argument, so pass it on to translate_action instead of assigning
4074 current_rule to current_rule.
4075 (translate_symbol_action, translate_code): Pass rule = NULL to
4076 translate_action.
4077
40782006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4079
4080 Rename %before-definitions to %start-header and %after-definitions to
4081 %end-header. Don't use these declarations to separate pre-prologue
4082 blocks from post-prologue blocks. Add new order-independent
4083 declarations %before-header and %after-header as alternatives to the
4084 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4085 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4086 * NEWS (2.3+): Update for these changes.
4087 * data/glr.c (b4_before_definitions): Update to...
4088 (b4_start_header): ... this.
4089 (b4_after_definitions): Update to...
4090 (b4_end_header): ... this.
4091 * data/glr.cc: Likewise.
4092 * data/lalr1.cc: Likewise.
4093 * data/yacc.c: Likewise.
4094 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4095 prologue blocks with %*-header declarations.
4096 (Calc++ Parser): Likewise.
4097 (Decl Summary): Update names.
4098 (Table of Symbols): Update description.
4099 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4100 (PERCENT_END_HEADER): ... this.
4101 (PERCENT_BEFORE_DEFINITIONS): Update to...
4102 (PERCENT_START_HEADER): ... this.
4103 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4104 (declaration): Update token names and m4 macro names.
4105 When parsing %end-header and %start-header, invoke translate_code
4106 before muscle_code_grow, and no longer set global booleans to remember
4107 whether these declarations have been seen.
4108 Parse new %after-header and %before-header.
4109 * src/reader.c (before_definitions, after_definitions): Remove.
4110 (prologue_augment): Accept a new bool argument to specify whether to
4111 augment the pre-prologue or post-prologue.
4112 * src/reader.h (before_definitions, after_definitions): Remove these
4113 extern's.
4114 (prologue_augment): Add new bool argument.
4115 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4116 (PERCENT_END_HEADER): ... this.
4117 (PERCENT_BEFORE_DEFINITIONS): Update to...
4118 (PERCENT_START_HEADER): ... this.
4119 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4120 * tests/actions.at (Printers and Destructors): Update names.
4121
41222006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4123
4124 Add comparison operators for C++ location classes. Discussed at
4125 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4126 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4127 declaration indicating whether filename_type has an operator==. If
4128 filename_type is `std::string', it defaults to `1', `0' otherwise.
4129 * data/location.cc: Iff b4_define_location_comparison is `1', add
4130 operator== and operator!= for class position and for class location.
4131
4132 Some minor fixes.
4133 * src/scan-action.l: Remove unused file.
4134 * src/symtab.c (symbol_printer_set): Use printer_location not
4135 destructor_location.
4136 * src/symtab.h (struct symbol): Replace incorrect source comment for
4137 printer members.
4138 * tests/input.at (Incompatible Aliases): Update output with correct
4139 printer location.
4140
41412006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4142
4143 Don't put the pre-prologue in the header file. For the yacc.c code
4144 file and the glr.c header and code files, move the pre-prologue before
4145 the token definitions. Add new %before-definitions and
4146 %after-definitions to declare code that will go in both the header file
4147 and code file. Discussed at
4148 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4149 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4150 and
4151 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4152 * NEWS (2.3+): Describe these changes.
4153 * data/glr.c (b4_pre_prologue): Move from within to before...
4154 (b4_shared_declarations): ... this.
4155 Add new b4_before_definitions before b4_token_enums.
4156 Add new b4_after_definitions at the end.
4157 * data/glr.cc (b4_pre_prologue): Replace with...
4158 (b4_before_definitions): ... this in the header file.
4159 (b4_after_definitions): New near the end of the header file.
4160 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4161 code file right before including the header file.
4162 (b4_before_definitions): New in the previous position of
4163 b4_pre_prologue in the header file.
4164 (b4_after_definitions): New near the end of the header file.
4165 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4166 (b4_token_enums_defines): In the code file, move to right before
4167 YYSTYPE for consistency with the header file.
4168 (b4_before_definitions): New right before b4_token_enums_defines in
4169 both the header and code file.
4170 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4171 header and code file.
4172 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4173 of prologues for %union dependencies.
4174 (Decl Summary): In %defines description, mention the effect of
4175 %before-definitions and %after-definitions on the header file.
4176 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4177 than in the pre-prologue so that make check succeeds.
4178 (Table of Symbols): Add entries for %before-definitions and
4179 %after-definitions.
4180 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4181 %before-definitions.
4182 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4183 (declaration): Parse those declarations and append to
4184 b4_before_definitions and b4_after_definitions, respectively.
4185 * src/reader.c (before_definitions, after_definitions): New bools to
4186 track whether those declarations have been seen.
4187 (prologue_augment): Add to the post-prologue if %union,
4188 %before-definitions, or %after-definitions has been seen.
4189 * src/reader.h (before_definitions, after_definitions): New extern's.
4190 * src/scan-gram.l: Scan the new declarations.
4191 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4192 prologue block in a %before-definitions or a %after-definitions based
4193 on whether the %union is declared.
4194 * tests/regression.at (Early token definitions with --yacc, Early token
4195 definitions without --yacc): Move tests for token definitions into the
4196 post-prologue since token names are no longer defined in the
4197 pre-prologue.
4198
41992006-06-20 Akim Demaille <akim@epita.fr>
4200
4201 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4202 (symbol_get): Use it.
4203 * src/parse-gram.y: Use it.
4204
42052006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4206
4207 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4208 build succeeds when configured with --enable-gcc-warnings.
4209
42102006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4211
4212 * src/parse-gram.y (char_name): New function.
4213 (CHAR, STRING, string_content): For %printer, properly escape.
4214 (ID): Prefer fputs to fprintf.
4215 (id): Reindent to be consistent with other rules.
4216 Properly quote char.
4217
4218 The Translation Project changed its way of publishing translations
4219 to maintainers. I haven't received any responses to my request
4220 for supporting the old way, or for documenting the new way. I
4221 have modified 'bootstrap' to use screen scraping
4222 (in this case, HTML scraping). This is unreliable and inelegant,
4223 but I don't see any better way. Yuck.
4224 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4225 (get_translations): New function, which uses HTML scraping to
4226 deduce locations of latest translations.
4227 Use this function to grab both bison and bison-runtime .po files.
4228 Don't bother priming the pump for the runtime-po domain any more,
4229 as it's now translated better than bison is.
4230
42312006-06-19 Akim Demaille <akim@epita.fr>
4232
4233 * src/scan-gram.l: No longer "parse" things after `%union' until
4234 `{'. Rather, return a single "%union" token.
4235 No longer make symbols: return strings, and leave the conversion
4236 to symbols to the parser.
4237 (SC_PRE_CODE, token_type): Remove.
4238 * src/parse-gram.y (%union): New field `character'.
4239 Sort tokens.
4240 (CHAR): New token.
4241 (ID, ID_COLON): Now that the scanner no longer makes them
4242 identifiers, adjust all uses to invoke symbol_get.
4243 (id_colon): New, wraps the conversion from string to symbol.
4244 (%union): Accept a possible union_name.
4245 (symbol): Now can be a char.
4246 * data/c.m4 (b4_union_name): Leave a default value.
4247 * data/glr.c, data/yacc.c: Use it.
4248
42492006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4250
4251 For associating token numbers with token names for "yacc.c", don't use
4252 #define statements unless `--yacc' is specified; always use enum
4253 yytokentype. Most important discussions start at:
4254 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4255 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4256 and
4257 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4258 * NEWS (2.3+): Mention.
4259 * data/c.m4 (b4_yacc_if): New.
4260 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4261 token #define's.
4262 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4263 on token name definitions.
4264 * src/getargs.c (usage): Capitalize `Yacc' in English.
4265 * src/output.c (prepare): Define b4_yacc_flag.
4266 * tests/regression.at (Early token definitions): Test that tokens names
4267 are defined before the pre-prologue not just before the post-prologue.
4268 Remove this test case and copy to...
4269 (Early token definitions with --yacc): ... this to test #define's.
4270 (Early token definitions without --yacc): ... and this to test enums.
4271
42722006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4273
4274 * NEWS: Reword the post-2.3 change to not be so optimistic about
4275 removing the old "look-ahead" spelling.
4276 Update previous look-ahead/lookahead change reports.
4277 * REFERENCES: look-ahead -> lookahead (since that's
4278 what he actually wrote).
4279 * doc/refcard.tex: look ahead -> lookahead,
4280 look-ahead -> lookahead
4281
42822006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4283
4284 For consistency, use `lookahead' instead of `look-ahead' or
4285 `look_ahead'. Discussed starting at
4286 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4287 and then at
4288 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4289 * NEWS: For the next release, note the change to `--report'.
4290 * TODO, doc/bison.1: Update English.
4291 * doc/bison.texinfo: Update English.
4292 (Understanding Your Parser, Bison Options): Document as
4293 `--report=lookahead' rather than `--report=look-ahead'.
4294 * src/conflicts.c: Update English in comments.
4295 (lookahead_set): Rename from look_ahead_set.
4296 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4297 (resolve_sr_conflict): Rename local look_ahead_tokens to
4298 lookahead_tokens, and update other uses.
4299 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4300 count_rr_conflicts, conflicts_free): Update uses.
4301 * src/getargs.c (report_args): Move "lookahead" before alternate
4302 spellings.
4303 (report_types): Update uses.
4304 (usage): For `--report' usage description, state `lookahead' spelling
4305 rather than `look-ahead'.
4306 * src/getargs.h (report.report_lookahead_tokens): Rename from
4307 report_look_ahead_tokens.
4308 * src/lalr.c: Update English in comments.
4309 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4310 (state_lookahead_tokens_count): Rename from
4311 state_look_ahead_tokens_count.
4312 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4313 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4314 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4315 Update other uses.
4316 Update English in output.
4317 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4318 * src/print.c: Update English in comments.
4319 (lookahead_set): Rename from look_ahead_set.
4320 (print_reduction): Rename argument lookahead_token from
4321 look_ahead_token.
4322 (print_core, state_default_rule, print_reductions, print_results):
4323 Update uses.
4324 * src/print_graph.c: Update English in comments.
4325 (print_core): Update uses.
4326 * src/state.c: Update English in comments.
4327 (reductions_new): Update uses.
4328 (state_rule_lookahead_tokens_print): Rename from
4329 state_rule_look_ahead_tokens_print, and update other uses.
4330 * src/state.h: Update English in comments.
4331 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4332 (state_rule_lookahead_tokens_print): Rename from
4333 state_rule_look_ahead_tokens_print.
4334 * src/tables.c: Update English in comments.
4335 (conflict_row, action_row): Update uses.
4336 * tests/glr-regression.at
4337 (Incorrect lookahead during deterministic GLR,
4338 Incorrect lookahead during nondeterministic GLR): Rename
4339 print_look_ahead to print_lookahead.
4340 * tests/torture.at: Update English in comments.
4341 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4342 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4343 (Many lookahead tokens): Update uses.
4344 * data/glr.c: Update English in comments.
4345 * lalr1.cc: Likewise.
4346 * yacc.c: Likewise.
4347 * src/conflicts.h: Likewise.
4348 * src/lalr.h: Likewise.
4349 * src/main.c: Likewise.
4350 * src/output.c: Likewise.
4351 * src/parse-gram.c: Likewise.
4352 * src/tables.h: Likewise.
4353 * tests/calc.at: Likewise.
4354
43552006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4356
4357 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4358
43592006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4360
4361 * TODO: Add request from Nelson H. F. Beebe to be able to install
4362 Bison without installing the yacc script.
4363
43642006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4365
4366 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4367 and yytext if they're already #define'd.
4368 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4369 * src/scan-code-c.c: ... here.
4370 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4371 <config.h>.
4372
43732006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4374
4375 Get Bison to build again when configured with --enable-gcc-warnings.
4376 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4377 missing #include's.
4378 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4379 loc argument as it shadows a global.
4380 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4381 invocation.
4382
4383 * src/.cvsignore: Add scan-code.c.
4384
43852006-06-07 Akim Demaille <akim@epita.fr>
4386
4387 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4388 to...
4389 * src/scan-code.l: here.
4390 * tests/input.at (Torturing the Scanner): Fix another location
4391 error.
4392
43932006-06-07 Akim Demaille <akim@epita.fr>
4394
4395 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4396
43972006-06-06 Akim Demaille <akim@epita.fr>
4398
4399 Extract the parsing of user actions from the grammar scanner.
4400 As a consequence, the relation between the grammar scanner and
4401 parser is much simpler. We can also split "composite tokens" back
4402 into simple tokens.
4403 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4404 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4405 rename as...
4406 * src/location.h, src/location.c (add_column_width)
4407 (location_compute): these.
4408 Fix the column count: the initial column is 0.
4409 (location_print): Be robust to ending column being 0.
4410 * src/location.h (boundary_set): New.
4411 * src/main.c: Adjust to scanner_free being renamed as
4412 gram_scanner_free.
4413 * src/output.c: Include scan-code.h.
4414 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4415 Use boundary_set.
4416 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4417 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4418 which is now, again, a separate token.
4419 Adjust all dependencies.
4420 Whereever actions with $ and @ are used, use translate_code.
4421 (action): Remove this nonterminal which is now useless.
4422 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4423 (grammar_current_rule_action_append): Use translate_code.
4424 (packgram): Bound check ruleno, itemno, and rule_length.
4425 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4426 (last_string, last_braced_code_loc, max_left_semantic_context)
4427 (scanner_initialize, scanner_free, scanner_last_string_free)
4428 (gram_out, gram_lineno, YY_DECL_): Move to...
4429 * src/scan-gram.h: this new file.
4430 (YY_DECL): Rename as...
4431 (GRAM_DECL): this.
4432 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4433 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4434 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4435 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4436 Move these declarations, and...
4437 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4438 these to...
4439 * src/flex-scanner.h: this new file.
4440 * src/scan-gram.l (rule_length, rule_length_overflow)
4441 (increment_rule_length): Remove.
4442 (last_braced_code_loc): Rename as...
4443 (gram_last_braced_code_loc): this.
4444 Adjust to the changes of the parser.
4445 Move all the handling of $ and @ into...
4446 * src/scan-code.l: here.
4447 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4448 (handle_action_dollar, handle_action_at): Move to...
4449 * src/scan-code.l: here.
4450 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4451 scan-code.h, scan-code-c.c, scan-gram.h.
4452 (EXTRA_bison_SOURCES): Add scan-code.l.
4453 (BUILT_SOURCES): Add scan-code.c.
4454 (yacc): Be robust to white spaces.
4455
4456 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4457 * tests/regression.at: Adjust the column numbers.
4458 * tests/regression.at: Adjust the error message.
4459
44602006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4461
4462 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4463 Use Akim's wording from
4464 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4465
44662006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4467
4468 Between Bison releases, manually append `+' to the previous Bison
4469 release number, and use that as a signal to automatically print the
4470 ChangeLog's CVS Id keyword from --version. Discussed starting at
4471 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4472 * ChangeLog: Add Id header.
4473 * configure.ac (AC_INIT): Append `+' to `2.3'.
4474 * src/.cvsignore: Add revision.c.
4475 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4476 (BUILT_SOURCES): Add revision.c.
4477 (revision.c): New target rule. This file defines a new global variable
4478 named revision. It initializes it with either the Id from ChangeLog
4479 or, if VERSION doesn't contain `+', with the empty string.
4480 * src/getargs.c (version): Print the value of revision.
4481 * src/revision.h: Extern revision.
4482
44832006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4484
4485 * NEWS: Version 2.3.
4486 * configure.ac (AC_INIT): Likewise.
4487
44882006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4489
4490 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4491 with no arguments, not as an object-like macro. This is for
4492 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4493 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4494 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4495 Document this.
4496
44972006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4498
4499 * src/getargs.c (usage): Back out yesterday's modification of the
4500 --help output so that we don't have to wait for translation before
4501 releasing 2.3.
4502
45032006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4504
4505 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4506 Problem reported by Akim Demaille.
4507
45082006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4509
4510 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4511
45122006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4513
4514 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4515 generated source code. Problem reported by Frans Englich in
4516 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4517
45182006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4519
4520 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4521 shell, not within 'make', so that 'make' by an ordinary builder
4522 (using GNU make) does not worry about configuring gzip. This also
4523 works around a bug reported independently by Keith Thompson and by
4524 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4525 stderr rather than stdout, messing up the build logs.
4526
45272006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4528
4529 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4530 to make sure that YYID will never be unused. This fixes a 'make
4531 maintainer-check' failure caused by the recent changes to the 'Trivial
4532 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4533 not used.
4534 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4535
45362006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4537
4538 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4539 state before an empty RHS is always resolved here. Only the location
4540 of that state is guaranteed to be resolved, and that's enough. This
4541 fixes the remaining bug reported by Derek M. Jones in
4542 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4543 * tests/glr-regression.at (Uninitialized location when reporting
4544 ambiguity): Test the above case.
4545 Also, the embedded comments in this test case claim it checks the case
4546 of an empty RHS that has inherited the initial location. However, the
4547 corresponding LHS was already resolved, so yyresolveLocations didn't
4548 actually have reason to modify it. Fix this by forcing
4549 nondeterministic operation at the beginning of the parse.
4550
45512006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4552
4553 * data/c.m4 (b4_yy_symbol_print_generate):
4554 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4555 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4556 of the bugs reported today by Derek M Jones in
4557 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4558 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4559 defined to be a type name without parens or brackets.
4560 (Location Type): Similarly for YYLTYPE.
4561 * tests/regression.at (Trivial grammars): Put in a test for this
4562 bug that will be caught by 'make maintainer-check' (though not,
4563 alas, by 'make check' unless your compiler is picky).
4564
45652006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4566
4567 * NEWS: Version 2.2.
4568 * configure.ac (AC_INIT): Likewise.
4569
45702006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4571
4572 * data/glr.c (yyreportTree): Make room in yystates for the state
4573 preceding the RHS. This fixes the segmentation fault reported by Derek
4574 M. Jones in
4575 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4576 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4577 to the user. Reported for yyreportTree by Derek M. Jones later in the
4578 same thread.
4579 * THANKS: Add Derek M. Jones.
4580 Update my email address.
4581 Fix typo in Steve Murphy's name.
4582
45832006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4584
4585 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4586 checking against YYLAST that caused the parser to miss a potential
4587 alternative in its diagnostic.
4588 Problem reported by Maria Jose Moron Fernandez in
4589 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4590 * data/lalr1.cc (yysyntax_error_): Likewise.
4591 * data/yacc.c (yysyntax_error): Likewise.
4592 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4593 tokens, in case we run into an older C compiler.
4594 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4595 Use them to check for the off-by-one error fixed above.
4596
4597 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4598 YYSIZE_T, not size_t.
4599 * tests/regression.at (Trivial grammars): New test, to catch
4600 the error fixed by the above patch.
4601
46022006-05-14 Akim Demaille <akim@lrde.epita.fr>
4603
4604 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4605 scheme.
4606 Reported by Steve Murphy.
4607
46082006-05-14 Akim Demaille <akim@lrde.epita.fr>
4609
4610 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4611 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4612
46132006-05-14 Akim Demaille <akim@lrde.epita.fr>
4614
4615 Implement --trace=m4.
4616 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4617 * src/output.c (output_skeleton): When set, pass -dV to m4.
4618
4619 Factor the handling of flags in m4.
4620 * src/output.c (prepare): Rename the muscle names debug, defines,
4621 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4622 * data/c.m4: Adjust.
4623 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4624 Use b4_define_flag_if to define other b4_FLAG_if macros.
4625 (b4_location_if): As a consequence, rename as...
4626 (b4_locations_if): this, for consistency.
4627 Adjust all the skeletons.
4628
46292006-05-14 Akim Demaille <akim@lrde.epita.fr>
4630
4631 * etc/bench.pm: Shorten bench names.
4632
46332006-05-14 Akim Demaille <akim@lrde.epita.fr>
4634
4635 * src/output.h, src/output.c (error_verbose): Move to...
4636 * src/getargs.h, src/getargs.c: here.
4637 Sort the flags.
4638 Adjust dependencies.
4639
46402006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4641
4642 * data/c.m4 (b4_copyright): Put the special exception for Bison
4643 skeletons here, so we don't have to put it in each skeleton. All
4644 uses changed. Suggested by Akim Demaille. Also, wrap the
4645 copyright notice, in case it is longer than 80 columns. Replace
4646 comma by newline after title.
4647
46482006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4649
4650 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4651 incompatibility, not a bug. Mention that it wasn't fixed as of
4652 flex 2.5.33.
4653
46542006-05-11 Akim Demaille <akim@lrde.epita.fr>
4655
4656 * examples/extexi: Enforce the precedence of concatenation over
4657 >>.
4658 Reported by Tommy Nordgren.
4659
46602006-05-11 Akim Demaille <akim@lrde.epita.fr>
4661
4662 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4663 with the member "token".
4664 Reported by Martin Nylin.
4665
46662006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4667
4668 * data/glr.c: Switch to Bison 2.2 special-exception language in
4669 the copyright notice. Use more-regular format for titles and
4670 copyright notices.
4671 * data/glr.cc: Likewise.
4672 * data/location.cc: Likewise.
4673 * data/yacc.cc: Likewise.
4674 * doc/bison.texinfo (Conditions): Document this.
4675 * NEWS: likewise. Upgrade version to 2.2.
4676
46772006-04-27 Akim Demaille <akim@lrde.epita.fr>
4678
4679 * data/glr.cc: Remove dead code.
4680
46812006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4682
4683 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4684 that variable and the line breaks the bootstrap. Problem reported
4685 by Juan M. Guerrero.
4686
46872006-04-24 Akim Demaille <akim@lrde.epita.fr>
4688
4689 * doc/bison.texinfo (Multiple start-symbols): New.
4690
46912006-04-24 Akim Demaille <akim@lrde.epita.fr>
4692
4693 * etc/README, etc/bench.pl: New.
4694
46952006-04-03 Akim Demaille <akim@lrde.epita.fr>
4696
4697 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4698 rule.
4699 Reported by Mickael Labau.
4700 * tests/input.at (Torturing the Scanner): Test it.
4701
47022006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4703
4704 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4705 Problem reported by Bob Rossi.
4706
47072006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4708
4709 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4710 and didn't really work.
4711 For the index, use @ifnotinfo, not @iftex.
4712 Minor cleanups of spacing and terminology.
4713
47142006-03-12 Akim Demaille <akim@lrde.epita.fr>
4715
4716 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4717 of AT_NAME_PREFIX when %name-prefix is not used.
4718
47192006-03-12 Akim Demaille <akim@lrde.epita.fr>
4720
4721 Apply --prefix to C++ skeletons too: they change the namespace.
4722 The test suite already exercize these cases.
4723 * data/c++.m4 (b4_namespace): New.
4724 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4725 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4726 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4727 * doc/bison.texinfo: Document it.
4728 (Option Cross Key): Use @multitable in all formats. It looks
4729 nicer, even in TeX outputs.
4730 (Rules): Use the same code whatever the output type is.
4731 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4732 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4733 * tests/calc.at: Use it, instead of hard coding `yy'.
4734
47352006-03-10 Akim Demaille <akim@lrde.epita.fr>
4736
4737 * TODO: Remove dead items.
4738
47392006-03-10 Akim Demaille <akim@lrde.epita.fr>
4740
4741 * doc/FAQ: Remove, merged into...
4742 * doc/bison.texinfo (FAQ): this.
4743 * doc/Makefile.am (EXTRA_DIST): Adjust.
4744
47452006-03-10 Akim Demaille <akim@lrde.epita.fr>
4746
4747 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4748 even if empty.
4749 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4750 * doc/bison.texinfo (Calc++ Scanner): Use it.
4751
47522006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4753
4754 Fix two nits reported by twlevo, plus one more that I discovered.
4755
4756 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4757 this is the usual Bison style.
4758 * src/location.h (location_print): Likewise.
4759
4760 * src/reader.h (token_name): Likewise.
4761
47622006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4763
4764 Fix some nits reported by twlevo.
4765 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4766 and "POSIX". Use more-modern syntax for URLs. Mention C++
4767 and ask for Java. Don't hardwire OS version numbers. Add
4768 copyright notice.
4769 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4770 * src/conflicts.c (solved_conflicts_obstack): Now static.
4771
47722006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4773
4774 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4775 page. Say "you can use it" not "you may use it" as on the web page;
4776 we're describing capabilities not granting permission.
4777
47782006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4779
4780 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4781 shadowing warnings. Use usual patter for iterating through RHS.
4782 * tests/glr-regression.at
4783 (Uninitialized location when reporting ambiguity):
4784 Modify yylex so that it uses its argument, rather than trying
4785 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4786 const char -> char const.
4787
4788 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4789 Don't use tabs inside commands; it messes up 'ps'.
4790 Problem reported by twlevo.
4791
47922006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4793
4794 * tests/glr-regression.at (Uninitialized location when reporting
4795 ambiguity): New test case.
4796 * data/glr.c (yyresolveLocations): New function, which uses
4797 YYLLOC_DEFAULT.
4798 (yyresolveValue): Invoke yyresolveLocations before reporting an
4799 ambiguity.
4800 * doc/bison.texinfo (Default Action for Locations): Note
4801 YYLLOC_DEFAULT's usage for ambiguity locations.
4802 (GLR Semantic Actions): Cross-reference those notes.
4803
48042006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4805
4806 * tests/glr-regression.at (Leaked semantic values when reporting
4807 ambiguity): Remove unnecessary union and type declarations.
4808 (Leaked lookahead after nondeterministic parse syntax error): New test
4809 case.
4810 * data/glr.c (yyparse): Check for zero stacks remaining before
4811 attempting to shift the lookahead so that you don't lose it.
4812
48132006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4814
4815 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4816 * tests/glr-regression.at (Leaked semantic values when reporting
4817 ambiguity): New test case.
4818 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4819 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4820 now unnecessary yystackp parameter.
4821 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4822 destructors can be called.
4823
4824 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4825 in existing testcases.
4826
48272006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4828
4829 Don't leak semantic values for parent RHS when a user action cuts the
4830 parser, and clean up related code a bit.
4831 * tests/glr-regression.at (Leaked merged semantic value if user action
4832 cuts parse): Rename to...
4833 (Leaked semantic values if user action cuts parse): ... this. Add check
4834 for leaked parent RHS values.
4835 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4836 between an unresolved state (non-empty chain of semantic options) and
4837 an incomplete one (signaled by an empty chain).
4838 (yyresolveStates): Document the interface. Move all manipulation of a
4839 successfully or unsuccessfully resolved yyGLRState to...
4840 (yyresolveValue): ... here so that yyresolveValue always leaves a
4841 yyGLRState with consistent data and thus is easier to understand.
4842 Remove the yyvalp and yylocp parameters since they are always just
4843 taken from the yys parameter. When reporting a discarded merged value
4844 in debugging output, note that it is incompletely merged. Document the
4845 interface.
4846 (yyresolveAction): If resolving any of the RHS states fails, destroy
4847 them all rather than leaking them. Thus, as long as user actions are
4848 written to clean up the RHS correctly, yyresolveAction always cleans up
4849 the RHS of a semantic option. Document the interface.
4850
48512006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4852
4853 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4854 led to a segmentation fault in GNU Pascal. Problem reported
4855 by Waldek Hebisch.
4856
48572006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4858
4859 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4860 mid-rule action inside a nonterminal symbol in order to declare a
4861 destructor for its semantic value.
4862
48632006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4864
4865 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4866 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4867 __cplusplus && ! defined _STDLIB_H && !
4868 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4869 defined free))]: Include <stdlib.h> rather than rolling our own
4870 declarations of malloc and free, to avoid problems with
4871 incompatible declarations (using 'throw') C++'s stdlib.h. This
4872 should fix Debian bug 340012
4873 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4874 reported by Guillaume Melquiond.
4875
48762006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4877
4878 * NEWS: Clarify symbols versus types in unused-value warnings.
4879
4880 * configure.ac (AC_INIT): Bump version number.
4881
48822006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4883
4884 * NEWS: Version 2.1a.
4885 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4886 since C99 requires this.
4887
48882006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4889
4890 * m4/c-working.m4: New file.
4891 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4892
48932006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4894
4895 * Makefile.maint: Merge from coreutils.
4896
48972006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4898
4899 More portability fixes for problems summarized by Nelson H. F. Beebe.
4900
4901 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4902 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4903 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4904 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4905 messes up because C++ code is compiled in 32-bit mode but linked
4906 in 64-bit mode.
4907
49082006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4909
4910 More portability fixes for problems summarized by Nelson H. F. Beebe.
4911
4912 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4913 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4914
4915 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4916 nodist_PROGRAMS, since we don't need to actually compile the
4917 example if we're just doing a plain 'make'. This avoids bothering
4918 the installer unnecessarily about problems due to weird C++
4919 compilers.
4920
49212006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4922
4923 More portability fixes for problems summarized by Nelson H. F. Beebe.
4924
4925 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4926 than #include "...", and compile with -I'.'. The old method was
4927 not portable, according to Posix and the C standard, and it does
4928 not work with Sun C 5.7, where previous #line directives affect
4929 the working directory used in later #include "..." directives.
4930
49312006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4932
4933 Various DJGGP specific issues in /djgpp
4934
49352006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4936
4937 More portability fixes for problems summarized by Nelson H. F. Beebe.
4938
4939 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4940 '#include <map>' works and that you can apply ++ to iterators.
4941
49422006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4943
4944 Work around portability problems summarized by Nelson H. F. Beebe in
4945 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4946
4947 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
4948 that '#include <string>' works.
4949
4950 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
4951 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
4952 "warning: sorry: semantics of inline function static data `const
4953 unsigned char translate_table[262]' are wrong (you'll wind up with
4954 multiple copies)".
4955
4956 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
4957 or, xor to not_, and_, or_, and xor_, respectively. This works
4958 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
4959 random system header somewhere that includes the equivalent of
4960 <iso646.h>.
4961
4962 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
4963 -E" works; it apparently doesn't work with PathScale EKO Compiler
4964 Suite Version 2.0.
4965
49662006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
4967
4968 During deterministic GLR operation, user actions should be able to
4969 influence the parse by changing yychar. To make this easier to fix and
4970 to make glr.c easier to evolve in general, don't maintain yytoken in
4971 parallel with yychar; just compute yytoken when needed.
4972 * tests/glr-regression.at (Incorrect lookahead during deterministic
4973 GLR): Check that setting yychar in a user action has the intended
4974 effect.
4975 * data/glr.c (yyGLRStack): Remove yytokenp member.
4976 (yyclearin): Don't set *yytokenp.
4977 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
4978 yychar rather than *yytokenp to determine the current lookahead.
4979 Compute yytoken locally when needed.
4980 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
4981 point to.
4982
4983 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
4984 after `--report' documentation.
4985
49862006-01-30 Paul Eggert <eggert@cs.ucla.edu>
4987
4988 * src/parse-gram.y (grammar_declaration): Location of printer
4989 symbol is @1, not list->location. Bug reported by twlevo.
4990 * tests/input.at (Incompatible Aliases): Adjust to above change.
4991
49922006-01-29 Paul Eggert <eggert@cs.ucla.edu>
4993
4994 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
4995 all the test at once. This makes the output easier to read in the
4996 normal case.
4997
4998 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
4999 got from <http://bro-ids.org/download.html>. The bug is that
5000 when two actions appeared in succession, the second one was
5001 scanned before the first one was added to the grammar rule
5002 as a midrule action. Bison then output the incorrect warning
5003 "parse.y:905.17-906.36: warning: unused value: $3".
5004 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5005 associated with a value.
5006 (rhs): Don't invoke grammar_current_rule_action_append.
5007 (action): Invoke it here instead.
5008 * src/reader.c (grammar_midrule_action): Now extern.
5009 (grammar_current_rule_action_append): Don't invoke
5010 grammar_midrule_action; that is now the scanner's job.
5011 * src/reader.h (last_string, last_braced_code_loc):
5012 (grammar_midrule_action): New decls.
5013 * src/scan-gram.l (last_string): Now extern, sigh.
5014 (last_braced_code_loc): New extern variable.
5015 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5016 rule already has an action.
5017 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5018 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5019 Add some tests to check that the above changes fixed the bug.
5020
50212006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5022
5023 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5024 All used changed. Check whether the symbol has a destructor,
5025 not whether it is typed.
5026 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5027 that the values are still reported as unused. All line numbers
5028 adjusted.
5029
50302006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5031
5032 Work around a bug in bro 0.8, which underparenthesizes its
5033 definition of YYLLOC_DEFAULT.
5034 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5035 their arguments.
5036 * data/lalr1.cc: Likewise.
5037 * data/yacc.cc: Likewise.
5038
50392006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5040
5041 Work around a bug in Pike 7.0, and give the Pike folks a
5042 better way to override the usual int widths.
5043 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5044 user can override the types.
5045 (short): #undef, to work around a bug in Pike 7.0.
5046 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5047 (union yyalloc.yyss): Use yytype_int16 rather than short.
5048 All uses changed.
5049 (yysigned_char): Remove.
5050 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5051 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5052 * tests/regression.at (Web2c Actions): Adjust to above changes.
5053
5054 * src/reader.c (check_and_convert_grammar): New function.
5055 (reader): Close the input file even if something went wrong during
5056 parsing. Minor file descriptor leak reported by twlevo.
5057
5058 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5059 to pacify gcc -Wswitch-default.
5060 * src/scan-gram.l (adjust_location): Use a default: break; case
5061 to pacify gcc -Wswitch-default.
5062 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5063 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5064 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5065 Move these decls to scan-skel.l, since they don't need to be
5066 visible elsewhere.
5067 * src/scan-skel.l: Accept the above decls.
5068 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5069 is used.
5070
50712006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5072
5073 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5074 since we don't want to insist on a version number at the start
5075 of the changelog every time.
5076 * Makefile.maint: Sync from coreutils a bit better.
5077 (sc_trailing_blank): Renamed from sc_trailing_space.
5078 All uses changed.
5079 (sc_no_if_have_config_h, sc_require_config_h):
5080 (sc_prohibit_assert_without_use): New rules.
5081 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5082 (sc_dd_max_sym_length): Fix leading spaces in rule.
5083 (sc_system_h_headers): Prefix with @.
5084 (sc_useless_cpp_parens, m4-check): Output line numbers.
5085 (changelog-check): Allow version only in head.
5086 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5087 satisfy new Makefile.maint rule.
5088 * data/glr.c: Likewise.
5089 * data/glr.cc: Likewise.
5090 * data/lalr1.cc: Likewise.
5091 * data/yacc.c: Likewise.
5092 * lib/ebitsetv.c: Likewise.
5093 * lib/lbitset.c: Likewise.
5094 * lib/subpipe.c: Likewise.
5095 * lib/timevar.c: Likewise.
5096 * src/system.h: Likewise.
5097 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5098 * djgpp/Makefile.maint: Add copyright notice.
5099 * djgpp/README.in: Likewise.
5100 * djgpp/config.bat: Likewise.
5101 * djgpp/config.site: Likewise.
5102 * djgpp/config_h.sed: Likewise.
5103 * djgpp/djunpack.bat: Likewise.
5104 * djgpp/config.sed: Fix copyright notice to match standard format.
5105 * djgpp/subpipe.h: Likewise.
5106 * lib/bitsetv-print.c: Likewise.
5107 * lib/bitsetv.c: Likewise.
5108 * lib/subpipe.h: Likewise.
5109 * lib/timevar.c: Likewise.
5110 * lib/timevar.h: Likewise.
5111 * djgpp/subpipe.c: Use standard recipe for config.h.
5112 * lib/abitset.c: Likewise.
5113 * lib/bitset.c: Likewise.
5114 * lib/bitset_stats.c: Likewise.
5115 * lib/bitsetv-print.c: Likewise.
5116 * lib/bitsetv.c: Likewise.
5117 * lib/ebitsetv.c: Likewise.
5118 * lib/get-errno.c: Likewise.
5119 * lib/lbitset.c: Likewise.
5120 * lib/subpipe.c: Likewise.
5121 * lib/timevar.c: Likewise.
5122 * lib/vbitset.c: Likewise.
5123 * tests/local.at: Likewise.
5124 * src/scan-gram.l: Don't include verify.h, since system.h does
5125 that for us.
5126 * .x-sc_require_config_h: New file.
5127 * .x-sc_unmarked_diagnostics: New file.
5128
51292006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5130
5131 Be a bit more systematic about using 'abort'.
5132 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5133 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5134 Put 'default: abort ();' before some other case, to satisfy older
5135 pedantic compilers.
5136 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5137 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5138 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5139 * src/conflicts.c (resolve_sr_conflict): Likewise.
5140 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5141 (get_decision_str, get_orientation_str, get_node_alignment_str):
5142 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5143 (get_linestyle_str, get_arrowstyle_str): Likewise.
5144 * src/conflicts.c (resolve_sr_conflict):
5145 Use a default case rather than one for the one remaining enum
5146 value, to catch invalid enum values as well.
5147 * src/lalr.c (set_goto_map, map_goto):
5148 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5149 * src/nullable.c (nullable_compute, token_definitions_output):
5150 Likewise.
5151 * src/reader.c (packgram, reader): Likewise.
5152 * src/state.c (transitions_to, state_new, state_reduction_find):
5153 Likewise.
5154 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5155 (symbol_pack): Likewise.
5156 * src/tables.c (conflict_row, pack_vector): Likewise.
5157 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5158 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
5159 * src/system.h: Don't include <assert.h>.
5160 (assert): New macro.
5161
5162 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5163 (Destructor Decl, Parser Function, Pure Calling):
5164 Describe rules for braces inside C code more carefully.
5165
51662006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5167
5168 Fix some porting glitches found by Nelson H. F. Beebe.
5169 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5170 compilers that don't understand that abort () does not return.
5171 * src/state.c (transitions_to): Likewise.
5172 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5173 that '#include <cstdlib>' works.
5174 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5175 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5176 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5177 for the benefit of some pre-C99 compilers.
5178
5179 * bootstrap: Undo changes to gnulib files that autoreconf made.
5180
5181 Minor fixups to get 'make maintainer-check' to work.
5182 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5183 with the new verify.h implementation.
5184 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5185 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5186 * data/yacc.c (YYUSE): Likewise.
5187 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5188 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5189 * src/parse-gram.y (declaration): Don't pass a string constant
5190 to a function that expects char *, since GCC might complain
5191 about the constant value.
5192 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5193 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5194 before #defining them.
5195 * tests/glr-regression.at
5196 (Incorrectly initialized location for empty right-hand side in GLR):
5197 In yyerror, use the msg arg.
5198 (Corrupted semantic options if user action cuts parse):
5199 (Incorrect lookahead during deterministic GLR):
5200 (Incorrect lookahead during nondeterministic GLR):
5201 Don't name a local var 'index'; it shadows string.h's 'index'.
5202
52032006-01-19 Akim Demaille <akim@epita.fr>
5204
5205 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5206 location, not just parts of it.
5207
52082006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5209
5210 * NEWS: Document the fact that multiple %unions are now allowed.
5211 * doc/bison.texinfo (Union Decl): Likewise.
5212 * TODO: This feature is now implemented, so remove it from
5213 the wishlist.
5214
5215 * Makefile.maint: Merge with coreutils Makefile.maint.
5216 (CVS_LIST): Use build-aux version if available.
5217 (VERSION_REGEXP): New macro.
5218 (syntax-check-rules): Add sc_no_if_have_config_h,
5219 sc_prohibit_assert_without_use, sc_require_config_h,
5220 sc_useless_cpp_parens.
5221 (sc_obsolete_symbols): Check for O_NDELAY.
5222 (sc_dd_max_sym_length): Track coreutils.
5223 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5224 (sc_useless_cpp_parens): New rule.
5225 (news-date-check): Look for version or today's date.
5226 (changelog-check): Don't require version number near head.
5227 (copyright-check): Use current year instead of hardwiring 2005.
5228 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5229 (announcement): Add --gpg-key-ID.
5230
5231 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5232 with "file system".
5233
5234 Avoid undefined behavior that addressed just before the start of an
5235 array. Problem reported by twlevo.
5236 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5237 * src/lalr.c (build_relations): Rely on new sentinel.
5238 * src/gram.c (gram_free): Adjust to new sentinel.
5239
52402006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5241
5242 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5243 yylookaheadNeeds. All uses updated.
5244 (yysplitStack): Rename local yynewLookaheadStatuses to
5245 yynewLookaheadNeeds.
5246 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5247 GLR): In comments, change `lookahead status' to `lookahead need'.
5248
52492006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5250
5251 * data/glr.c (yysplitStack): A little stylistic rewrite.
5252
52532006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5254
5255 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5256
52572006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5258
5259 * doc/bison.texinfo: Fix some typos.
5260 (GLR Semantic Actions): New subsection discussing special
5261 considerations because GLR semantic actions might be deferred.
5262 (Actions): Mention look-ahead usage of yylval.
5263 (Actions and Locations): Mention look-ahead usage of yylloc.
5264 (Special Features for Use in Actions): Add YYEOF entry and mention it
5265 in the yychar entry.
5266 In the yychar entry, remove mention of the local yychar case (pure
5267 parser) since this is irrelevant information when writing semantic
5268 actions and since it's already discussed in `Table of Symbols' where
5269 yychar is otherwise described as an external variable.
5270 In the yychar entry, don't call it the `current' look-ahead since it
5271 isn't when semantic actions are deferred.
5272 In the yychar and yyclearin entries, add note about deferred semantic
5273 actions.
5274 Add yylloc and yylval entries discussing look-ahead usage.
5275 (Look-Ahead Tokens): When discussing yychar, don't call it the
5276 `current' look-ahead, and do mention yylval and yylloc.
5277 (Error Recovery): Cross-reference `Action Features' when mentioning
5278 yyclearin.
5279 (Table of Symbols): In the yychar entry, don't call it the `current'
5280 look-ahead.
5281 In the yylloc and yylval entries, mention look-ahead usage.
5282
52832006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5284
5285 * tests/glr-regression.at: Update copyright year to 2006.
5286
52872006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5288
5289 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5290 use during nondeterministic operation to track which stacks have
5291 actually needed the current lookahead.
5292 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5293 Allocate, deallocate, resize, and otherwise shuffle space for
5294 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5295 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5296 appropriately during nondeterministic operation.
5297 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5298 members to store the current lookahead to be used by the deferred
5299 user action.
5300 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5301 from which the RHS is taken. Set the lookahead members of the new
5302 yySemanticOption according to the lookahead status for stack yyk.
5303 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5304 yyaddDeferredAction.
5305 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5306 members of yySemanticOption before invoking yyuserAction, and then set
5307 them back to their current values afterward.
5308 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5309 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5310 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5311 titles for consistency.
5312 (Leaked merged semantic value if user action cuts parse): In order to
5313 suppress lint warnings, use arguments in merge function, and assign
5314 char value < 128 in main.
5315 (Incorrect lookahead during deterministic GLR): New test case.
5316 (Incorrect lookahead during nondeterministic GLR): New test case.
5317
53182006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5319
5320 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
5321 !yyvaluep as signal that no semantic value is available to print.
5322 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5323 to print a semantic value.
5324
53252006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5326
5327 * tests/glr-regression.at: For consistency with my newer test cases,
5328 don't thank myself.
5329
53302006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5331
5332 * data/glr.c (yyresolveValue): When merging semantic options, if at
5333 least one user action succeeds but a later one cuts the parse, then
5334 destroy the semantic value before returning rather than leaking it.
5335 (yyresolveStates): If a user action cuts the parse and thus
5336 yyresolveValue fails, ignore the (unset) semantic value rather than
5337 corrupting the yyGLRState, and empty the semantic options list since
5338 the user actions should have called all necessary destructors.
5339 Simplify code with YYCHK.
5340 * tests/glr-regression.at (Corrupted semantic options if user action
5341 cuts parse): New test case.
5342 (Undesirable destructors if user action cuts parse): New test case.
5343 Before applying any of this patch, this test case never actually failed
5344 for me... but only because the corrupted semantic options usually
5345 masked this bug.
5346 (Leaked merged semantic value if user action cuts parse): New test
5347 case.
5348
53492006-01-05 Akim Demaille <akim@epita.fr>
5350
5351 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5352
53532006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5354
5355 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5356 _MSC_VER. Problem reported by Cenzato Marco.
5357 (b4_c_function_def): Use it.
5358 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5359 b4_c_modern.
5360 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5361 than rolling our own.
5362
53632006-01-04 Akim Demaille <akim@epita.fr>
5364
5365 Also warn about non-used mid-rule values.
5366 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5367 member.
5368 (symbol_list_new): Adjust.
5369 * src/reader.c (symbol_typed_p): New.
5370 (grammar_rule_check): Use it.
5371 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5372 Check its rule.
5373 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5374 Use it.
5375 * tests/actions.at (Exotic Dollars): Adjust.
5376
53772006-01-04 Akim Demaille <akim@epita.fr>
5378
5379 * src/reader.c (grammar_midrule_action): If $$ is set in a
5380 mid-rule, move the `used' bit to its lhs.
5381 * tests/input.at (Unused values): New.
5382 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5383
53842006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5385
5386 * doc/bison.texinfo (Bison Options): Say more accurately what
5387 --yacc does.
5388 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5389 about declarations in the grammar when in Yacc mode, as POSIX does
5390 not require a diagnostic when the grammar uses extensions.
5391
5392 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5393
5394 Warn about dubious constructions like "%token T T".
5395 Reported by twlevo.
5396 * src/symtab.h (struct symbol.declared): New member.
5397 * src/symtab.c (symbol_new): Initialize it to false.
5398 (symbol_class_set): New arg DECLARING, specifying whether
5399 this is a declaration that we want to warn about, if there
5400 is more than one of them. All uses changed.
5401
5402 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5403 Allow multiple %union directives, whose contents concatenate.
5404 * src/parse-gram.y (grammar_declaration): Likewise.
5405 Use muscle_code_grow, so that we don't need stype_line any more.
5406 All uses changed.
5407
5408 * src/muscle_tab.c (muscle_grow): Fix comment.
5409
5410 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5411 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5412 Update copyright year to 2006.
5413
54142006-01-03 Akim Demaille <akim@epita.fr>
5415
5416 Have glr.cc pass (some of) the calc.at tests.
5417 * data/glr.cc (b4_parse_param_orig): New.
5418 (b4_parse_param): Improve its definition, and bound it more
5419 clearly in the skeleton.
5420 (b4_epilogue): Append, instead of prepending, in order to keep
5421 #line consistency.
5422 Simplify the generation of auxiliary functions: locations and
5423 purity are mandated.
5424 (b4_global_tokens_and_yystype): Honor it.
5425 * data/location.cc (c++.m4): Don't include it.
5426 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5427 and AT_SKEL_CC_IF.
5428 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5429 AT_LALR1_CC_IF.
5430 Be sure to initialize the first position's filename.
5431 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5432 mandated anyway.
5433 (AT_CHECK_CALC_GLR_CC): New.
5434 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5435
54362006-01-02 Akim Demaille <akim@epita.fr>
5437
5438 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5439 c.m4.
5440 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
5441 * data/glr.cc: Do not include stack.hh.
5442
54432006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5444
5445 * data/glr.c: Reformat whitespace with tabs.
5446 (b4_lpure_formals): Remove this unused m4 macro.
5447 * tests/cxx-type.at: Reformat whitespace with tabs.
5448 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5449 since it's a member. Rename type to isNterm for clarity.
5450
54512005-12-29 Akim <akim@sulaco.local>
5452
5453 Let glr.cc catch up with symbol_value_print.
5454 * data/glr.cc (b4_yysymprint_generate): Replace by...
5455 (b4_yy_symbol_print_generate): this.
5456 (yy_symbol_print, yy_symbol_value_print): Declare them.
5457
54582005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5459
5460 * src/location.h (boundary): Note that a line or column equal
5461 to INT_MAX indicates an overflow.
5462 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5463 (rule_length_overflow, increment_rule_length, add_column_width):
5464 New functions.
5465 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5466 (<SC_BRACED_CODE>"}"):
5467 Use increment_rule_length rather than incrementing it by hand.
5468 (adjust_location, handle_syncline): Diagnose overflow.
5469 (handle_action_dollar, handle_action_at):
5470 Fix bug with monstrosities like $-2147483648.
5471 Remove now-unnecessary checks.
5472 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5473 (convert_ucn_to_byte): Verify assumptions.
5474 (handle_syncline): New arg LOC. All callers changed.
5475 Don't store through a value derived from char const * pointer.
5476
5477 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5478 GCC warnings.
5479
54802005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5481
5482 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5483 Remove unnecessary forward static decls.
5484
54852005-12-27 Akim Demaille <akim@epita.fr>
5486
5487 * src/reader.c (grammar_current_rule_check): Also check that $$
5488 is used.
5489 Take the rule to check as argument, hence rename as...
5490 (grammar_rule_check): this.
5491 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5492 Rename as...
5493 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5494 (grammar_midrule_action, grammar_symbol_append): Now static.
5495 * tests/torture.at (input): Don't rely on the default action
5496 being always performed.
5497 * tests/calc.at: "Set" $$ even when the action is "cut" with
5498 YYERROR or other.
5499 * tests/actions.at (Exotic Dollars): Instead of using unused
5500 values, check that the warning is issued.
5501
55022005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5503
5504 * NEWS: Improve wording for unused-value warnings.
5505
55062005-12-22 Akim Demaille <akim@epita.fr>
5507
5508 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5509 (b4_yysymprint_generate): Rename as...
5510 (b4_yy_symbol_print_generate): this.
5511 Generate yy_symbol_print instead of yysymprint.
5512 Generate also yy_symbol_value_print, and use it.
5513
55142005-12-22 Akim Demaille <akim@epita.fr>
5515
5516 * NEWS: Warn about unused values.
5517 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5518 a `used' member.
5519 (symbol_list_n_get, symbol_list_n_used_set): New.
5520 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5521 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5522 * src/reader.c (grammar_current_rule_check): Check that values are
5523 used.
5524 * src/symtab.c (symbol_print): Accept 0.
5525 * tests/existing.at: Remove the type information.
5526 Empty the actions.
5527 Remove useless actions (beware of mid-rule actions: perl -000
5528 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5529 * tests/actions.at (Exotic Dollars): Use unused values.
5530 * tests/calc.at: Likewise.
5531 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5532 Likewise.
5533
5534 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5535 rule_useful_p.
5536
55372005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5538
5539 Undo 2005-12-01 tentative license wording change. The wording is
5540 still being reviewed by the lawyers, and we don't want to wait for
5541 them before publishing a test release. For now, revert to the
5542 previous wording.
5543 * NEWS: Undo 2005-12-01 change.
5544 * data/glr.c: Revert to previous license wording.
5545 * data/glr.cc: Likewise.
5546 * data/lalr1.cc: Likewise.
5547 * data/location.cc: Likewise.
5548 * data/yacc.c: Likewise.
5549
5550 * NEWS: Reword %destructor vs YYABORT etc.
5551 * data/glr.c: Use American spacing, for consistency.
5552 * data/glr.cc: Likewise.
5553 * data/lalr1.cc: Likewise.
5554 * data/yacc.c: Likewise.
5555 * data/yacc.c: Reformat comments slightly.
5556 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5557 for consistency. Fix some spelling errors and reword recently-included
5558 text slightly.
5559 * tests/cxx-type.at: Cast results of malloc, for C++.
5560
55612005-12-21 Joel E. Denny <address@hidden>
5562
5563 * tests/cxx-type.at: Construct a tree, count the parents of shared
5564 nodes, and free each node once and only once. Previously, the memory
5565 for semantic values was leaked instead.
5566
55672005-12-21 Joel E. Denny <address@hidden>
5568
5569 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5570 (yylval, yylloc): If pure, #define to yystackp->yyval and
5571 yystackp->yyloc similar to yychar and yynerrs.
5572 (yyparse): If pure, remove local yylval and yylloc. Add local
5573 yystackp to accommodate pure definitions of yylval and yylloc.
5574 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5575 yylvalp and yyllocp to &yylval and &yylloc.
5576 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5577 namespace. Previously, nerrs and char were missing, but lval and lloc
5578 weren't necessary.
5579 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5580 yylvalp and yyllocp parameters since, if pure, these are now always
5581 accessible through yystackp. If not pure, they are still accessible
5582 globally.
5583 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5584 `if (YYID (N))' to pacify lint.
5585
55862005-12-21 Akim Demaille <akim@epita.fr>
5587
5588 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5589 destroy the RHS symbols of a rule.
5590 * data/yacc.c (yylen): Initialize to 0.
5591 Keep its value to the number of items to possibly shift.
5592 In particular, a regular successful parse that ends on YYFINAL by
5593 a (internal) YYACCEPT must not have yylen != 0.
5594 (yyerrorlab, yyreturn): Pop the RHS.
5595 Reorder a bit to emphasize the `shifting' bits of code.
5596 (YYPOPSTACK): Now accept a number of items to pop.
5597 * data/lalr1.cc: Likewise.
5598 * data/glr.c: Formatting changes.
5599 Use goto instead of fall through.
5600 * doc/bison.texinfo (Destructor Decl): Complete.
5601
56022005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5603
5604 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5605 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5606 * djgpp/config.bat: Replace every occurence of the file name
5607 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5608 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5609 * djgpp/config.sed: Replace every occurence of the file name
5610 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5611 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5612 * djgpp/djunpack.bat: DJGPP specific file.
5613 * djgpp/fnchange.lst: DJGPP specific file.
5614 * djgpp/README.in: Add new information about how to unpack the bison
5615 source on MSDOS and other systems which have 8.3 file name restrictions
5616 using djunpack.bat and fnchange.lst.
5617
56182005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5619
5620 * bootstrap (build_cvs_prefix): Remove; unused.
5621 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5622 when getting gnulib.
5623
56242005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5625
5626 * data/glr.c: Reorder typedef declarations for structs to match order
5627 of struct declarations.
5628 Rename yystack everywhere to yystackp except in yyparse where it's not
5629 a pointer.
5630 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5631 consistency.
5632 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5633 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5634 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5635 lint.
5636
56372005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5638
5639 * tests/sets.at (Accept): Fix typos in regular expression used to
5640 sed out the final state number.
5641
5642 Work around portability problem on Solaris 10: flex-generated
5643 files include <stdio.h> before <config.h>, which messes up
5644 because the latter defines __EXTENSIONS__. Address the problem
5645 by creating two new little files that include <config.h> first,
5646 then include the flex-generated files. Rewrite everyone else
5647 to include <config.h> first, as well.
5648 * lib/timevar.c: Always include "config.h".
5649 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5650 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5651 (EXTRA_bison_SOURCES): New macro.
5652 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5653 * src/system.h: Don't include config.h.
5654 * src/LR0.c: Include <config.h> first.
5655 * src/assoc.c: Likewise.
5656 * src/closure.c: Likewise.
5657 * src/complain.c: Likewise.
5658 * src/conflicts.c: Likewise.
5659 * src/derives.c: Likewise.
5660 * src/files.c: Likewise.
5661 * src/getargs.c: Likewise.
5662 * src/gram.c: Likewise.
5663 * src/lalr.c: Likewise.
5664 * src/location.c: Likewise.
5665 * src/main.c: Likewise.
5666 * src/muscle_tab.c: Likewise.
5667 * src/nullable.c: Likewise.
5668 * src/output.c: Likewise.
5669 * src/parse-gram.y: Likewise.
5670 * src/print.c: Likewise.
5671 * src/print_graph.c: Likewise.
5672 * src/reader.c: Likewise.
5673 * src/reduce.c: Likewise.
5674 * src/relation.c: Likewise.
5675 * src/state.c: Likewise.
5676 * src/symlist.c: Likewise.
5677 * src/symtab.c: Likewise.
5678 * src/tables.c: Likewise.
5679 * src/uniqstr.c: Likewise.
5680 * src/vcg.c: Likewise.
5681
5682 * src/parse-gram.y: Fix minor problems uncovered by lint.
5683 (current_lhs, current_lhs_location): Now static.
5684 (current_assoc): Remove unused variable.
5685
5686 Cleanups so that Bison-generated parsers have less lint.
5687 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5688 Prepend /*ARGSUSED*/, for lint's sake.
5689 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5690 definition if 'lint' is defined.
5691 (YYID): New macro (or function, if lint).
5692 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5693 * data/yacc.c: Likewise.
5694 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5695 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5696 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5697 is C++ only.
5698 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5699 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5700 Use YYID(0) rather than 0, for lint.
5701 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5702 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5703
57042005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5705
5706 * tests/glr-regression.at
5707 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5708 Close memory leak reported by twlevo.
5709
57102005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5711
5712 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5713 all stacks.
5714 (yyparse): Iterate another stack in order to call user destructors.
5715 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5716 New test case.
5717 (Duplicated user destructor for lookahead): This test now is expected
5718 to succeed.
5719
57202005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5721
5722 * NEWS: Document the following change.
5723 * data/yacc.c: Say "parser skeleton" rather than "file", since
5724 it's no longer just a file.
5725 * data/glr.c: Grant a special exception for C GLR parsers, that
5726 reads like the already-existing exception for C LALR(1) parsers.
5727 * data/glr.cc: Likewise.
5728 * data/lalr1.cc: Likewise.
5729 * data/location.cc: Likewise.
5730 * data/yacc.c: Reword the "written by" statement to clarify that
5731 it was the parser skeleton, not the entire output file.
5732 * data/glr.c: Written by Paul Hilfinger.
5733 * data/glr.cc: Written by Akim Demaille.
5734 * data/lalr1.cc: Likewise.
5735
57362005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5737
5738 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5739 Fix typos in previous change that broke 'make check'.
5740 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5741 supported in C.
5742 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5743 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5744 We can revert this once things settle down.
5745
5746 * src/conflicts.c (conflicts_print): Don't print file name twice
5747 when %expect fails because there were no conflicts.
5748 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5749 change.
5750 * tests/conflicts.at (%expect not enough, %expect too much):
5751 (%expect with reduce conflicts): Adjust to new behavior.
5752
57532005-11-18 Akim Demaille <akim@epita.fr>
5754
5755 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5756 errors.
5757 * NEWS: Document this.
5758 * doc/bison.texinfo (Expect Decl): Likewise.
5759
57602005-11-16 Akim Demaille <akim@epita.fr>
5761
5762 Generalize the display of semantic values and locations in traces.
5763 * data/glr.c (yy_reduce_print): Fix indices (again).
5764 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5765 literal integers.
5766 * data/lalr1.cc (yyreduce_print): Rename as...
5767 (yy_reduce_print): this.
5768 Display values and locations.
5769 * data/yacc.c (yy_reduce_print): Likewise.
5770 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5771 (yysymprint): Move higher to be visible from yy_reduce_print).
5772 (yyparse): Adjust.
5773 * tests/calc.at: Adjust the expected length of the traces.
5774
57752005-11-14 Akim Demaille <akim@epita.fr>
5776
5777 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5778 from 1 to N, while values and location start at 0.
5779 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5780
57812005-11-14 Akim Demaille <akim@epita.fr>
5782
5783 * data/glr.c (yy_reduce_print): Fix the $ number.
5784
57852005-11-14 Akim Demaille <akim@epita.fr>
5786
5787 "Use" parse parameters.
5788 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5789 * data/glr.c, data/glr.cc: Use them.
5790 * data/glr.c (YYUSE): Have a C++ definition that supports
5791 non-pointer types.
5792
57932005-11-14 Akim Demaille <akim@epita.fr>
5794
5795 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5796
57972005-11-14 Akim Demaille <akim@epita.fr>
5798
5799 * data/glr.cc: New.
5800 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5801
58022005-11-12 Akim Demaille <akim@epita.fr>
5803
5804 Let position and location be PODs.
5805 * data/location.cc (position::initialize, location::initialize): New.
5806 (position::position, location::location): Define only if
5807 b4_location_constructors is defined.
5808 * data/lalr1.cc (b4_location_constructors): Define it for backward
5809 compatibility.
5810 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5811
58122005-11-12 Akim Demaille <akim@epita.fr>
5813
5814 * data/lalr1.cc: Move the body of the ctor and dtor into the
5815 parser file (instead of the header).
5816 Wrap the implementations in a "namespace yy".
5817
58182005-11-12 Akim Demaille <akim@epita.fr>
5819
5820 Have glr.c include its header file when created.
5821 * data/glr.c (b4_shared_declarations): New.
5822 Output them verbatim in the parser if !%defines, otherwise
5823 output then in the header file, and include it instead.
5824
58252005-11-11 Akim Demaille <akim@epita.fr>
5826
5827 * data/glr.c: Comment changes.
5828
58292005-11-11 Akim Demaille <akim@epita.fr>
5830
5831 When yydebug, report semantic and location values for reductions.
5832 * data/glr.c (yy_reduce_print): Report the semantic values and the
5833 locations.
5834 (YY_REDUCE_PRINT): Adjust.
5835 (yyglrReduce): Use them.
5836 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5837 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5838 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5839 traces.
5840
58412005-11-10 Akim Demaille <akim@epita.fr>
5842
5843 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5844 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5845 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5846
58472005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5848
5849 * m4/cxx.m4, examples/Makefile.am: Don't build
5850 examples/calc++ if no C++ compiler is available. (trivial change)
5851
58522005-11-09 Akim Demaille <akim@epita.fr>
5853
5854 * src/scan-skel.l: Use a couple of asserts.
5855
58562005-11-03 Akim Demaille <akim@epita.fr>
5857
5858 In some (weird) cases, the final state number is incorrect.
5859 Reported by Alexandre Duret-Lutz.
5860 * src/LR0.c (state_list_append): Remove the computation of
5861 final_state.
5862 (save_reductions): Do it here.
5863 (get_state): Alpha conversion.
5864 (generate_states): Use a for loop.
5865 * src/gram.h (item_number_is_rule_number)
5866 (item_number_is_symbol_number): New.
5867 * src/state.c: Use assert.
5868 * src/system.h: Include assert.h.
5869 * tests/sets.at (Accept): New.
5870
58712005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5872
5873 * data/glr.c (yyfill): Adjust comment.
5874 (yyresolveAction): Initialize default location properly
5875 for empty right-hand sides.
5876 (yydoAction): Ditto.
5877 Add comment explaining apparently dead code.
5878 * tests/glr-regression.at
5879 (Incorrectly initialized location for empty right-hand side in GLR):
5880 New test.
5881
58822005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5883
5884 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5885 gnulib when interrupted. This fixes some race conditions and
5886 works around some portability problems (one noted by Paul
5887 Hilfinger).
5888
58892005-10-22 Akim <akim@epita.fr>
5890
5891 * Makefile.cfg: Adjust to config -> build-aux.
5892 Reported by twledo.
5893
58942005-10-21 Akim Demaille <akim@epita.fr>
5895
5896 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5897 the %parse-params.
5898 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5899 * data/yacc.c (b4_Pure_if): Rename as...
5900 (b4_yacc_pure_if): this.
5901 (YY_SYMBOL_PRINT, yyparse): Adjust.
5902 * doc/bison.texinfo: Formatting changes.
5903
59042005-10-21 Akim Demaille <akim@epita.fr>
5905
5906 Finish the transition config -> build-aux.
5907 * configure.ac, Makefile.am: Use build-aux.
5908 * config/prev-version, config/announce-gen, config/Makefile.am:
5909 Move to...
5910 * build-aux/prev-version, build-aux/announce-gen,
5911 * build-aux/Makefile.am: here.
5912
59132005-10-14 Akim Demaille <akim@epita.fr>
5914
5915 * examples/calc++/test: Use set -x only when VERBOSE.
5916
59172005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5918
5919 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5920 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5921
59222005-10-13 Akim Demaille <akim@epita.fr>
5923
5924 * src/scan-skel.l: Output the base name parts of the parser and
5925 header file names.
5926 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5927 additional checks.
5928 Use this to exercise C++ outputs in subdirs.
5929 Reported by Oleg Smolsky.
5930
59312005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5932
5933 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5934 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5935 Problem reported by John P. Hartmann.
5936 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5937 already defined it.
5938
59392005-10-12 Akim Demaille <akim@epita.fr>
5940
5941 * src/parse-gram.y (version_check): Exit 63 to please missing
5942 (stands for "version mismatch).
5943 * tests/input.at, doc/bison.texinfo: Adjust.
5944
59452005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5946
5947 Work around portability problems with Visual Age C compiler
5948 (xlc and xlC_r) reported by John P. Hartmann.
5949 * data/location.cc (initial_column, initial_line): Remove.
5950 All uses replaced by 0 and 1.
5951 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
5952 that xlc complains about.
5953 * src/scan-skel.l (skel_wrap): Likewise.
5954 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
5955 as __STDC__.
5956 * data/yacc.c (YYMODERN_C): New macro, which also looks at
5957 __STDC_VERSION__. Use it everywhere instead of looking at
5958 __STDC__ and __cplusplus.
5959
59602005-10-10 Akim Demaille <akim@epita.fr>
5961
5962 * examples/calc++/test: Be quiet unless VERBOSE.
5963
59642005-10-05 Paul Eggert <eggert@cs.ucla.edu>
5965
5966 * data/c.m4 (yydestruct, yysymprint):
5967 Use YYUSE instead of casting to void.
5968 * data/glr.c (YYUSE): New macro.
5969 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
5970 Use it instead of rolling our own.
5971 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5972 (YYCHK1):
5973 Use /*CONSTCOND*/ to suppress lint warnings.
5974 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
5975 (YY_STACK_PRINT): Use 'false' not '0'.
5976 (YYUSE): New macro.
5977 (yysymprint_, yydestruct_): Use it instead of rolling our own.
5978 * data/yacc.c (YYUSE): New macro.
5979 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
5980 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
5981 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
5982
5983
5984 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
5985 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
5986
59872005-10-04 Paul Eggert <eggert@cs.ucla.edu>
5988
5989 Undo the parts of the unlocked-I/O change that substituted
5990 putc or puts for printf. This might hurt performance a bit,
5991 but some people prefer the printf style.
5992 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
5993 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
5994 All uses replaced by YYFPRINTF and YYDPRINTF.
5995 * data/yacc.c: Likewise.
5996 * lib/bitset.c (bitset_print): Likewise.
5997 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
5998 putc and puts.
5999 * lib/lbitset.c (debug_lbitset): Likewise.
6000 * src/closure.c (print_firsts, print_fderives): Likewise.
6001 * src/gram.c (grammar_dump): Likewise.
6002 * src/lalr.c (look_ahead_tokens_print): Likewise.
6003 * src/output.c (escaped_output): Likewise.
6004 (user_actions_output): Break apart two printfs.
6005 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6006 * src/reduce.c (reduce_print): Likewise.
6007 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6008 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6009
6010 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6011 Use assignments rather than casts-to-void to suppress
6012 unused-variable warnings. This pacifies 'lint'.
6013 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6014 unused-variable warnings.
6015
60162005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6017
6018 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6019
60202005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6021
6022 Use unlocked I/O for a minor performance improvement on hosts like
6023 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6024 is to use the gnlib unlocked-io module, and to prefer putc and
6025 puts to printf when either will work (since the latter doesn't
6026 come in an unlocked flavor).
6027 * bootstrap (gnulib_modules): Add unlocked-io.
6028 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6029 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6030 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6031 and similarly for puts and putc and printf.
6032 * data/yacc.c: Likewise.
6033 * lib/bitset.c (bitset_print): Likewise.
6034 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6035 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6036 to printf.
6037 * lib/lbitset.c (debug_lbitset): Likewise.
6038 * src/closure.c (print_firsts, print_fderives): Likewise.
6039 * src/gram.c (grammar_dump): Likewise.
6040 * src/lalr.c (look_ahead_tokens_print): Likewise.
6041 * src/output.c (escaped_output): Likewise.
6042 (user_actions_output): Coalesce two printfs.
6043 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
6044 * src/reduce.c (reduce_print): Likewise.
6045 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6046 * src/system.h: Include unlocked-io.h rather than stdio.h.
6047
6048 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6049 this confuses xgettext.
6050
60512005-10-02 Akim Demaille <akim@epita.fr>
6052
6053 * bootstrap (gnulib_modules): Add strverscmp.
6054 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6055 * m4/.cvsignore: Add strverscmp.m4.
6056 * src/parse-gram.y (%require): New token, new rule.
6057 (version_check): New.
6058 * src/scan-gram.l (%require): Adjust.
6059 * tests/input.at (AT_REQUIRE): New.
6060 Use it.
6061 * doc/bison.texinfo (Require Decl): New.
6062 (Calc++ Parser): Use %require.
6063
60642005-10-02 Akim Demaille <akim@epita.fr>
6065
6066 * data/location.cc: New.
6067
60682005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6069 Akim Demaille <akim@epita.fr>
6070
6071 Make sure -odir/foo.cc creates dir/location.hh etc.
6072 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6073 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6074 (spec_defines_file): Now const.
6075 (dir_prefix): New.
6076 (short_base_name): Remove.
6077 * src/files.c: Adjust.
6078 (dirname.h): Include.
6079 (base_name): Don't prototype it.
6080 (finput): Remove, duplicates gram_in.
6081 (full_base_name, short_base_name): Replace by...
6082 (all_but_ext, all_but_tab_ext): these.
6083 (compute_base_names): Rename as...
6084 (compute_file_name_parts): this.
6085 Update to compute the new variables, including dir_prefix.
6086 Adjust dependencies.
6087 * src/output.c (prepare): Output them.
6088 * src/reader.c: Adjust to use gram_in, not finput.
6089 * src/scan-skel.l (@dir_prefix@): New.
6090
60912005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6092
6093 * lib/subpipe.c: New function end_of_output_subpipe() added
6094 to allow support for non-posix systems. This is a no-op function
6095 for posix systems.
6096
6097 * lib/subpipe.h: New function end_of_output_subpipe() added
6098 to allow support for non-posix systems. This is a no-op function
6099 for posix systems.
6100
6101 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6102 handle the lack of pipe/fork functionality on non-posix systems.
6103
6104 * djgpp/Makefile.maint: DJGPP specific file.
6105
6106 * djgpp/README.in: DJGPP specific file.
6107
6108 * djgpp/config.bat: DJGPP specific configuration file.
6109
6110 * djgpp/config.sed: DJGPP specific configuration file.
6111
6112 * djgpp/config.site: DJGPP specific configuration file.
6113
6114 * djgpp/config_h.sed: DJGPP specific configuration file.
6115
6116 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6117
6118 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6119
61202005-10-02 Akim Demaille <akim@epita.fr>
6121
6122 * data/location.cc: New, extract from...
6123 * data/lalr1.cc: here.
6124 (location.hh): Include it after the user prologue, in case the
6125 filename type is defined by the user.
6126 Forward declation location and position before the pre-prologue.
6127 (yyresult_): Rename as...
6128 (yyresult): this, it's a local variable, not an attribute.
6129 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6130
61312005-10-01 Akim Demaille <akim@epita.fr>
6132
6133 * examples/extexi: Restore the #line generation.
6134
61352005-09-30 Akim Demaille <akim@epita.fr>,
6136 Alexandre Duret-Lutz <adl@gnu.org>
6137
6138 Move the token type and YYSTYPE in the parser class.
6139 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6140 (parser::token): New, from the moved free definition of tokens.
6141 (parser::semantic_value): Now a full definition instead of an
6142 indirection to YYSTYPE.
6143 (b4_post_prologue): No longer included in the header file, but
6144 in the implementation file.
6145 * doc/bison.texi (C+ Language Interface): Update.
6146 * src/parse-gram.y: Support unary %define.
6147 * tests/actions.at: Define global_tokens_and_yystype for backward
6148 compatibility until we update the tests.
6149 * tests/calc.at: Idem.
6150 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6151 to simplify the code.
6152
61532005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6154
6155 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6156 Ah, the good old days! Problem reported by Peter Klein.
6157 * bootstrap (gnulib_modules): Add strerror, strtoul.
6158 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6159 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6160
61612005-09-29 Akim Demaille <akim@epita.fr>
6162
6163 * data/c.m4 (b4_error_verbose_if): New.
6164 * data/lalr1.cc: Use it.
6165 (YYERROR_VERBOSE_IF): Remove.
6166 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6167 parser members, replaced by...
6168 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6169 local variables.
6170 (yysyntax_error_): Takes the state number as argument.
6171 (yyreduce_print_): Use the argument yyrule, not the former
6172 attribute yyn_.
6173
61742005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6175
6176 * bootstrap (gnulib_modules): Add verify.
6177 * lib/.cvsignore: Add verify.h.
6178 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6179 * src/system.h (verify): Remove.
6180 Include verify.h instead.
6181 * src/tables.c (tables_generate): Use new API for 'verify'.
6182
61832005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6184
6185 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6186 local variables whose names begin with 'yy'.
6187 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6188 Trivial changes from Joel E. Denny.
6189
6190 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6191 it itself.
6192 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6193 don't use alloca any more.
6194
6195 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6196 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
6197 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
6198 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6199 to match yacc.c, to test more hosts.
6200
62012005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6202
6203 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6204 doesn't affect behavior.
6205 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6206 Solaris, AIX, MSC.
6207 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6208 This works a bit better with glibc, if user code has already included
6209 stdlib.h.
6210 * doc/bison.texinfo (Bison Parser): Document that users can't
6211 arbitrarily use malloc and free for other purposes. Document
6212 that <alloca.h> and <malloc.h> might be included.
6213 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6214 user must declare alloca.
6215
6216 * HACKING (release): Forwarn the Translation Project about
6217 stable releses.
6218
62192005-09-20 Akim Demaille <akim@epita.fr>
6220
6221 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6222
62232005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6224
6225 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6226 (YYSTACK_ALLOC_MAXIMUM): Use it.
6227 (yysyntax_error): New function.
6228 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6229 multiple syntax errors are reported, and alloca is being used.
6230 Instead, reallocate buffers twice as big each time, so that
6231 we waste at most half the allocated memory. Start with a small
6232 (128-byte) buffer that will suffice in most cases anyway.
6233 Use yysyntax_error to do most of the work.
6234
6235 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6236 yynerrs is the number of errors reported, not the number of
6237 errors encountered.
6238
6239 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6240 Mark it as expected to fail.
6241 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6242 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6243 Don't start user-code symbols with "yy", to avoid name space problems.
6244
62452005-09-19 Akim Demaille <akim@epita.fr>
6246
6247 Remove the traits, failed experiment.
6248 It never proved useful, and anyway because of the current
6249 definition, it was not possible to have several specialization of
6250 this traits, making it useless.
6251 * data/lalr1.cc (yy:traits): Remove.
6252 Inline its definitions in the parser class.
6253
62542005-09-19 Akim Demaille <akim@epita.fr>
6255
6256 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6257 least Mac OSX with a /usr/local install of gettext.
6258
62592005-09-19 Akim Demaille <akim@epita.fr>
6260
6261 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6262 and yytoken for similarity with the other skeletons.
6263
62642005-09-19 Akim Demaille <akim@epita.fr>
6265
6266 * NEWS, configure.ac: update version number to 2.1a.
6267
62682005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6269
6270 * NEWS: Version 2.1.
6271
6272 * NEWS: Remove notice of yytname change, since it was never in an
6273 official release.
6274 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6275 diagnostic.
6276 * src/output.c (prepare): Likewise.
6277 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6278 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6279 is not defined. This is an awful hack, but it's enough for now.
6280 All callers changed.
6281 * tests/glr-regression-at (make_value): Args are const pointers now,
6282 to avoid GCC warning.
6283 (Duplicated user destructor for lookahead): New test. Currently
6284 skipped. It fails on my host but I'm not sure it'll always fail.
6285
62862005-09-16 Akim Demaille <akim@epita.fr>
6287
6288 * src/symtab.h (struct symbol): Declare the printer and destructor
6289 as const, to avoid accidental calls to free.
6290 (symbol_destructor_set, symbol_printer_set): Adjust.
6291 * src/symtab.c: Adjust.
6292
62932005-09-16 Akim Demaille <akim@epita.fr>
6294
6295 * data/c.m4 (b4_token_enums): New.
6296 (b4_token_defines): Rename as...
6297 (b4_token_enums_defines): this.
6298 (b4_token_defines): New, output only the #defines.
6299 * data/yacc.c, data/glr.c: Adjust.
6300 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6301 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6302 as default values.
6303
63042005-09-16 Akim Demaille <akim@epita.fr>
6305
6306 * data/lalr1.cc (yylex_): Remove, inline its code.
6307 (yyreport_syntax_error_): Remove, replaced by...
6308 (yysyntax_error_): this which returns a string and leaves to the
6309 caller the call to the users' error function.
6310 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6311 Move from members of the parser object...
6312 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6313 to local variables of the parse function.
6314
63152005-09-16 Akim Demaille <akim@epita.fr>
6316
6317 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6318 since it's in Bison's name space.
6319
63202005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6321
6322 * data/glr.c (yyresolveValue): Add default case to pacify
6323 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6324
6325 * NEWS: Document when yyparse started to return 2.
6326 * doc/bison.texinfo (Parser Function): Document when yyparse
6327 returns 2.
6328
6329 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6330 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6331 changed.
6332 (class position): file_name -> filename (reverting). All uses changed.
6333
63342005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6335
6336 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6337 do anything if $@ exists. This reverts part of the 2005-07-07
6338 patch.
6339
63402005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6341
6342 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6343 contains obsolete information and isn't worth distributing as a
6344 separate file anyway.
6345 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6346 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6347 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6348 (yyparse): Abort if user code uses longjmp to throw an unexpected
6349 value.
6350
63512005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6352
6353 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6354 Suggested by twlevo@xs4all.nl.
6355
6356 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6357 This avoids a diagnostic from gcc -Wswitch-enum.
6358 Problem reported by twlevo@xs4all.nl.
6359
6360 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6361 standards. Use "file name" or "file" or "name", depending on
6362 the context.
6363 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6364 not to hack/foo.tab.c.
6365 (Calc++ Top Level): 2nd arg of main is not const.
6366 * data/glr.c: b4_filename -> b4_file_name.
6367 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6368 All uses changed.
6369 (class position): filename -> file_name. All uses changed.
6370 * data/yacc.c: b4_filename -> b4_file_name.
6371 * lib/bitset.h: filename -> file_name in local vars.
6372 * lib/bitset_stats.c: Likewise.
6373 * src/files.c: Likewise.
6374 * src/scan-skel.l ("@output ".*\n): Likewise.
6375 * src/files.c (file_name_split): Renamed from filename_split.
6376 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6377
63782005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6379
6380 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6381 to accommodate latest gnulib.
6382
6383 * tests/glr-regression.at (Duplicate representation of merged trees):
6384 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6385
6386 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6387 needed.
6388
63892005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6390
6391 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6392 All uses changed. Invoke user destructor after an error during a
6393 split parse (trivial change from Joel E. Denny).
6394
6395 * tests/glr-regression.at
6396 (User destructor after an error during a split parse): New test case.
6397 Problem reported by Joel E. Denny in:
6398 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6399
64002005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6401
6402 * README-cvs: Give URLs for recommended tools.
6403 Mention Gzip version problem, and bootstrapping issues.
6404 Remove troubleshooting section, as it's somewhat obsolete.
6405
6406 * bootstrap (no_cache): New var, to accommodate different wget
6407 variants. Use it instead of '-C off'. Problem reported by
6408 twlevo@xs4all.nl.
6409
6410 * data/glr.c (yydestroyStackItem): New function.
6411 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6412 debugging information. Problem reported by Joel E. Denny.
6413
64142005-08-25 Akim Demaille <akim@epita.fr>
6415
6416 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6417
64182005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6419
6420 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6421 Don't invoke destructor on unresolved entries.
6422 * tests/glr-regression.at
6423 (User destructor for unresolved GLR semantic value): New test case.
6424 Problem reported by Joel E. Denny in:
6425 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6426
64272005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6428
6429 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6430 Add strnlen.c.
6431 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6432 lib-prefix.m4, po.m4.
6433
6434 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6435 in yydestruct diagnostic, since it might not be an error.
6436 Problem reported by Joel Denny near end of
6437 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6438 * data/lalr1.cc (yyerturn): Likewise.
6439 * data/yacc.c (yyreturn): Likewise.
6440 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6441
6442 * src/files.c: Remove obsolete FIXME comment.
6443
6444 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6445 with the other templates, and to fix bogus run-on messages such
6446 as the one reported at the end of
6447 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6448 All callers changed to avoid the newline.
6449 (yyprocessOneStack): Output two lines rather than one, to accommodate
6450 the above change. This changes the debug output format slightly.
6451
6452 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6453 reported by Joel E. Denny in
6454 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6455 (trivial change).
6456 * tests/glr-regression.at (Duplicate representation of merged trees):
6457 New test, from Joel E. Denny in:
6458 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6459 * THANKS: Add Joel E. Denny.
6460
6461 * configure.ac (AC_INIT): Bump to 2.0c.
6462
64632005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6464
6465 * NEWS: Version 2.0b.
6466
6467 * Makefile.am (SUBDIRS): Put examples before tests, so that
6468 "make check" doesn't finish with "All 1 tests passed".
6469
6470 * tests/regression.at (Token definitions): Don't rely on
6471 AT_PARSER_CHECK for data that contains backslashes. It currently
6472 uses 'echo', and 'echo' isn't portable if its argument contains
6473 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6474 that the byte '\0xff' is not printable in the C locale; it is,
6475 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6476 not printable, so use '\0x81' to test.
6477
6478 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6479 version of GCC, since the macro is used with non-GCC compilers.
6480
6481 Fix core dump reported by Pablo De Napoli in
6482 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6483 * tests/regression.at (Invalid inputs with {}): New test.
6484 * src/parse-gram.y (token_name): Translate type before using
6485 it as an index.
6486
6487 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6488 the user's name space. All uses changed to __attribute__
6489 ((__unused__)).
6490 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6491 Add __attribute__ ((__noreturn__)).
6492
6493 * etc/clcommit: Remove. We weren't using it, and it failed
6494 "make maintainer-distcheck".
6495 * Makefile.maint: Merge from coreutils.
6496 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6497 (syntax-check-rules): Change list of rules as described below.
6498 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6499 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6500 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6501 (sc_trailing_space): New rules.
6502 (sc_xalloc_h_in_src): Remove.
6503 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6504 (sc_space_tab, sc_error_exit_success, sc_changelog):
6505 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6506 (makefile-check, po-check, author_mark_check):
6507 (makefile_path_separator_check, copyright-check):
6508 Use grep -n, to make it easier to find violations.
6509 Use CVS_LIST and CVS_LIST_EXCEPT.
6510 (header_regexp, h_re): Remove.
6511 (dd_c): New macro.
6512 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6513 (my-distcheck): Use more-modern GCC flags.
6514 (signatures, %.asc): Remove.
6515 (rel-files, announcement): Remove signatures.
6516 Restore old updating code, even though we don't use it, so
6517 that we're the same as coreutils.
6518 (alpha, beta, major): Depend on news-date-check.
6519 Make the upload commands.
6520
6521 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6522 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6523 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6524 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6525 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6526 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6527 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6528 * tests/sets.at: Likewise.
6529
6530 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6531 we comment out the Autoconf version number.
6532 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6533 it's error-prone and "make maintainer-distcheck" rejects it.
6534
6535 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6536 Indent calls to "error" to pacify "make maintainer-distcheck",
6537 when the calls are not intended to be translated.
6538 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6539
6540 * src/Makefile.am (DEFS): Use +=, to pacify
6541 "make maintainer-distcheck".
6542 (bison_SOURCES): Add scan-skel.h.
6543 (sc_tight_scope): New rule, from coreutils.
6544
6545 * src/files.c (src_extension, header_extension):
6546 Now static, not extern.
6547 * src/getargs.c (short_options): Likewise.
6548 * src/muscle_tab.c (muscle_table): Likewise.
6549 * src/parse-gram.y (current_class, current_type, current_prec):
6550 Likewise.
6551 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6552 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6553 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6554 void, to avoid warning when NLS is disabled.
6555 * src/output.c: Include scan-skel.h.
6556 (scan_skel): Remove decl, since scan-skel.h does this.
6557 (output_skeleton):
6558 Indent calls to "error" to pacify "make maintainer-distcheck".
6559 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6560 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6561 "make maintainer-distcheck".
6562 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6563 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6564 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6565 (skel_lex_destroy, scan_skel): Move these decls to...
6566 * src/scan-skel.h: New file.
6567 * src/uniqstr.c (uniqstr_assert):
6568 Indent calls to "error" to pacify "make maintainer-distcheck".
6569
6570 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6571 not @VAR@.
6572
6573 * tests/torture.at: Revamp to avoid misuse of atoi that
6574 "make maintainer-distcheck" complained about.
6575
6576 * examples/extexi (message): Don't print a message more than once,
6577 and omit line-number decoration that makes Emacs compile think
6578 that informative messages are worth worrying about.
6579
65802005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6581
6582 * configure.ac: Update version number.
6583
6584 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6585 accidentally.
6586 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6587 autogenerated by the maintainer.
6588 * examples/calc++/.cvsignore: Add *.yy.
6589
6590 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6591 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6592 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6593
6594 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6595
6596 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6597 from maintainer-distcheck about casting the argument of 'free'.
6598
6599 * NEWS: Mention recent yytname changes.
6600 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6601
6602 * bootstrap: For translations that have not yet been upgraded to
6603 the new runtime-po domain, prime the pump by extracting the
6604 relevant strings from the obsolete translations. This code can be
6605 removed once the bison-runtime domain has been translated by each
6606 team.
6607
6608 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6609 now that token names are already quoted.
6610
6611 Fix problem reported by Anthony Heading.
6612 * data/glr.c (YYTOKEN_TABLE): New macro.
6613 (yytname): Define if YYTOKEN_TABLE.
6614 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6615 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6616 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6617 * src/output.c (prepare_symbols): Output token_table_flag.
6618
66192005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6620
6621 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6622 again if the first call fails.
6623
6624 * data/glr.c (yytnamerr): New function.
6625 (yyreportSyntaxError): Use it to dequote most string literals.
6626 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6627 with other skeletons. All uses changed.
6628 (yytnameerr_): New function.
6629 (yyreport_syntax_error): Use it to dequote most string literals.
6630 * data/yacc.c (yytnamerr): New function.
6631 (yyerrlab): Use it to decode most string literals.
6632 * doc/bison.texinfo (Decl Summary, Calling Convention):
6633 Clarify quoting convention of yytname.
6634 * src/output.c (prepare_symbols): Quote all names. This undoes
6635 the 2005-04-17 change, which is now accomplished (mostly) via
6636 changes in the parsers as described above.
6637 * tests/regression.at (Token definitions, Web2c Actions):
6638 Undo most 2005-04-17 change here, too.
6639
66402005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6641
6642 Fix more problems reported by twlevo@xs4all.nl.
6643 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6644 remove trailing spaces. This loses the exit status of ./types,
6645 and isn't needed since ./types shouldn't be emitting trailing
6646 spaces.
6647 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6648 as the stack isn't valid in that case.
6649
6650 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6651 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6652 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6653 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6654 is used.
6655 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6656 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6657 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6658 Likewise.
6659
6660 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6661 overly-picky compilers that reject 'char *foo = "bar";'.
6662
6663 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6664 to FILE * parameter, not to stderr. This fixes a typo introduced
6665 in the 2005-07-12 change.
6666
6667 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6668 warnings from GCC 4.
6669
6670 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6671 (yyglrShiftDefer, yysplitStack):
6672 Remove unused parameters b4_pure_formals. All uses changed.
6673 (yyglrShift): Remove unused parameters b4_user_formals.
6674 All uses changed.
6675 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6676
66772005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6678
6679 Destructor cleanups and regularization among the three skeletons.
6680 * NEWS: Document the behavior changes.
6681 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6682 stack before failing, as the cleanup code will do it for us now.
6683 * data/lalr1.cc (yyerrlab): Likewise.
6684 * data/glr.c (yyparse): Pop everything off the stack before
6685 freeing it, so that destructors get called properly.
6686 * data/lalr1.cc (yyreturn): Likewise.
6687 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6688 This is more consistent.
6689 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6690 why destructors might be called. 1.875 -> 2.1.
6691 (Destructor Decl, Decl Summary, Table of Symbols):
6692 Some English-language cleanups for %destructor.
6693 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6694 Add output line for destructor of start symbol.
6695 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6696 because of that same extra output line.
6697
6698 * NEWS: Document minor wording changes in diagnostics of
6699 Bison-generated parsers.
6700 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6701 Remove unused formals. All uses changed.
6702 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6703 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6704 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6705 Rename yyoverflowab to yyexhaustedlab.
6706 When memory exhaustion occurs during syntax-error reporting,
6707 report it separately rather than in a single diagnostic; this
6708 eases translation.
6709 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6710 (Memory Exhausted): Renamed from Parser Stack Overflow.
6711 Revamp wording slightly to prefer "memory exhaustion".
6712 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6713
6714 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6715
6716 Add i18n support to the GLR skeleton. Partially fix the C++
6717 skeleton; a C++ expert needs to finish this. Remove debugging
6718 msgids; there's little point to having them translated, since they
6719 can be understood only by someone who can read the
6720 (English-language) source code.
6721
6722 Generate runtime-po/bison-runtime.pot automatically, so that we
6723 don't have to worry about garbage getting in that file. We'll
6724 make sure after the next official release that old msgids don't
6725 get lost. See
6726 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6727
6728 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6729 Now auto-generated.
6730 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6731 Fix typos in explanations of the runtime file.
6732 * bootstrap: Change gettext keyword from YYI18N to YY_.
6733 Use standard Makefile.in.in in runtime-po, since we'll arrange
6734 for backward-compatible bison-runtime.po files in a different way.
6735 * data/glr.c (YY_): New macro, from yacc.c.
6736 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6737 Translate messages intended for users.
6738 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6739 the wording in the other skeletons. We don't know that the memory
6740 is virtual.
6741 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6742 Use same method that yacc.c uses.
6743 Don't translate debugging messages.
6744 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6745 it doesn't work (yet), and requires C++ expertise to fix.
6746 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6747 Move defn to a more logical place, to be consistent with other
6748 skeletons.
6749 Don't translate debugging messages.
6750 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6751 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6752 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6753 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6754
6755 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6756 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6757 void, not int.
6758 * tests/glr-regression.at (Badly Collapsed GLR States):
6759 Likewise.
6760 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6761 yylex should return 0 at EOF rather than aborting.
6762
6763 Improve tests for stack overflow in GLR parser.
6764 Problem reported by twlevo@xs4all.nl.
6765 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6766 All uses removed.
6767 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6768 can handle the problem.
6769 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6770 (yyparse): New local variable yyresult to record the result.
6771 Use result of setjmp to set it, rather than storing itinto
6772 struct.
6773 (yyDone): Remove label.
6774 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6775 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6776 if YYABORT is used).
6777 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6778 yyparse status; put status > 1 into diagnostic.
6779 Check that status==2 works.
6780 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6781 Use exit status 3 for failure to open (which shouldn't happen).
6782
67832005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6784
6785 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6786 1 on syntax error; just let yyparse do its thing.
6787 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6788 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6789 (Exploding the Stack Size with Alloca):
6790 (Exploding the Stack Size with Malloc):
6791 Expect exit status 2, not 1, since the parser is supposed to blow
6792 its stack. Problem reported by twlevo@xs4all.nl.
6793
6794 * data/glr.c (yyparse): Don't assume that the initial calls
6795 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6796 Print a stack-overflow message and fail instead.
6797 Initialize the line-number information before creating the stack,
6798 so that the stack-overflow message can report line zero safely.
6799
68002005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6801
6802 Fix problems reported by twlevo@xs4all.nl.
6803 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6804 (yyuserMerge): Provide a default case if b4_mergers is empty.
6805 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6806 * tests/glr-regression.at
6807 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6808 Add casts to pacify C++ compilers.
6809 * tests/glr-regression.at (Improper merging of GLR delayed action
6810 sets): Declare yylex before using it.
6811 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6812 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6813 test for valgrind; valgrind is independent of g++.
6814 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6815 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6816 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6817 Use a destructor, so that we can expand the stack. Change
6818 YYSTYPE to char * so that we can free it. Cast result of malloc.
6819
68202005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6821
6822 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6823 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6824
68252005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6826
6827 * PACKAGING: New file, suggested by Bruno Haible and taken from
6828 similar wording in gettext's PACKAGING file.
6829 * NEWS: Mention PACKAGING.
6830 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6831
68322005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6833
6834 * NEWS: Document recent i18n improvements.
6835 * bootstrap: Get runtime translations into runtime-po.
6836 Create runtime-po files automatically, if possible.
6837 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6838 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6839 does not infringe on the user's name space.
6840 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6841 * doc/bison.texinfo (Internationalization): Revamp the English
6842 and Texinfo syntax a bit, to try to make it clearer.
6843 (Bison Options, Option Cross Key): Mention --print-localedir.
6844 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6845 YYENABLE_NLS. Quote a bit more.
6846 * runtime-po/.cvsignore: New file.
6847 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6848 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6849 * runtime-po/quot.sed: Likewise.
6850 * runtime-po/boldquot.sed: Likewise.
6851 * runtime-po/en@quot.header: Likewise.
6852 * runtime-po/en@boldquot.header: Likewise.
6853 * runtime-po/insert-header.sin: Likewise.
6854 * runtime-po/remove-potcdate.sin: Likewise.
6855 * runtime-po/Makevars: Likewise.
6856 * runtime-po/LINGUAS: Likewise.
6857 * runtime-po/de.po: Likewise; we will rely on the translation project
6858 to maintain this, so "bootstrap" should get it.
6859 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6860 its value.
6861 * src/main.c (main): Bind the bison-runtime domain, too.
6862
68632005-07-12 Bruno Haible <bruno@clisp.org>
6864
6865 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6866 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6867 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6868 * runtime-po: New directory.
6869 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6870 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6871 * runtime-po/Rules-quot: New file, copied from po/.
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: New file.
6879 * runtime-po/POTFILES.in: New file.
6880 * runtime-po/LINGUAS: New file.
6881 * runtime-po/bison-runtime.pot: New file.
6882 * runtime-po/de.po: New file.
6883 * m4/bison.m4: New file.
6884 * Makefile.am (SUBDIRS): Add runtime-po.
6885 (aclocaldir, aclocal_DATA): New variables.
6886 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6887 Define aclocaldir.
6888 * src/getargs.c (usage): Document --print-localedir option.
6889 (PRINT_LOCALEDIR_OPTION): New enum item.
6890 (long_options): Add --print-localedir option.
6891 (getargs): Handle --print-localedir option.
6892 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6893 (Internationalization): New section.
6894
68952005-07-12 Akim Demaille <akim@epita.fr>
6896
6897 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6898 for consistency with the rest of the code.
6899 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6900 Add separators.
6901
69022005-07-12 Akim Demaille <akim@epita.fr>
6903
6904 * src/parse-gram.y: Use %printer instead of YYPRINT.
6905
69062005-07-12 Akim Demaille <akim@epita.fr>
6907
6908 * src/symtab.h, src/symtab.c (symbol_print): New.
6909 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6910 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6911
69122005-07-12 Akim Demaille <akim@epita.fr>
6913
6914 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6915 b4_at_dollar and b4_dollar_dollar.
6916
69172005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6918
6919 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6920 and Pennello's paper.
6921
69222005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6923
6924 * data/yacc.c (yyparse): Undo previous patch. Instead,
6925 set yylsp[0] and yyvsp[0] only if the initial action
6926 sets yylloc and yylval, respectively.
6927
6928 * data/yacc.c (yyparse): In the initial action, set
6929 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6930 This avoids the use of undefined variables if the initial
6931 action does not set yylloc and/or yylval.
6932
69332005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6934
6935 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6936 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6937 Remove from CVS. These files are automatically generated.
6938 * examples/extexi: Clarify that this file is now part of Bison,
6939 not GNU M4, and that it works with any POSIX-compatible Awk.
6940 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6941 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6942 so that we also get calc++-parser.yy. Geneate it.
6943 Use $(AWK), not gawk, since any conforming Awk will do.
6944 Put comment before action, since older 'make' can't handle comment
6945 in action.
6946 $(BUILT_SOURCES): List all built sources, not just some of them.
6947 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
6948 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
6949 $($(calc_sources_generated)): Remove unnecessary test for existence
6950 of target. (This had a shell syntax error anyway; a stray "x".)
6951 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
6952 calc++-parser.yy.
6953 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
6954
6955 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
6956 implied by the other modules.
6957
69582005-07-06 Akim Demaille <akim@epita.fr>
6959
6960 Bind examples/calc++ to the package.
6961 * examples/calc++/Makefile: Remove, replaced by...
6962 * examples/calc++/Makefile.am: ... this new file.
6963 * examples/calc++/test: Remove input.
6964 * examples/calc++/compile: Remove.
6965 * examples/Makefile.am: New.
6966 * configure.ac, Makefile.am: Adjust.
6967 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
6968
69692005-07-05 Paul Eggert <eggert@cs.ucla.edu>
6970
6971 * data/glr.c (yyFail): Drastically simplify; since the format argument
6972 never had any % directives, we can simply pass it to yyerror.
6973 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
6974 be modified later, as that is the usual style in glr.c.
6975 Problems reported by Paul Hilfinger.
6976
6977 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
6978 and size overflow errors.
6979 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
6980 in case the user prolog sets feature-test macros like _GNU_SOURCE.
6981 (YYSIZEMAX): New macro.
6982 (yystpcpy): New function, taken from yacc.c.
6983 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
6984 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
6985 so that we don't have to maintain their signatures.
6986 (yyFail): Check for buffer overflow, by using vsnprintf rather
6987 than vsprintf. Allocate a bigger buffer if possible.
6988 Report an error if buffer allocation fails.
6989 (yyStackOverflow): New function.
6990 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
6991 the initialization was successful. It might fail if storage was
6992 exhausted.
6993 (yyexpandGLRStack): Add more checks for storage allocation failure.
6994 Use yyStackOverflow to report failures.
6995 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
6996 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
6997 Don't assume stack number fits in int.
6998 (yysplitStack): Check for storage allocation failure.
6999 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7000 can print diagnostics on storage allocation failure. All callers
7001 changed.
7002 (yyresolveValue): Use yybool for boolean.
7003 (yyreportSyntaxError): Check for size-calculation overflow.
7004 This code is taken from yacc.c.
7005 (yyparse): Check for storage allocation errors when allocating
7006 the initial stack.
7007
70082005-07-05 Akim Demaille <akim@epita.fr>
7009
7010 Extract calc++ from the documentation.
7011 * doc/bison.texinfo (Calc++): Add the extraction marks.
7012 * examples/extexi: New, from the aborted GNU Programming 2E.
7013 Separate the different paragraph of a file with empty lines.
7014 * examples/Makefile: Use it to extract the whole calc++ example.
7015
70162005-06-24 Akim Demaille <akim@epita.fr>
7017
7018 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7019 class typedefs.
7020
70212005-06-22 Akim Demaille <akim@epita.fr>
7022
7023 * doc/bison.texinfo (C++ Language Interface): First stab.
7024 (C++ Parsers): Remove.
7025
70262005-06-22 Akim Demaille <akim@epita.fr>
7027
7028 * data/lalr1.cc (yylex_): Honor %lex-param.
7029
70302005-06-22 Akim Demaille <akim@epita.fr>
7031
7032 Start a set of simple examples.
7033 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7034 * examples/calc++/calc++-driver.hh,
7035 * examples/calc++/calc++-parser.yy,
7036 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7037 * examples/calc++/compile, examples/calc++/test: New.
7038
70392005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7040
7041 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7042 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7043 which stems from the 2005-05-27 patch.
7044
70452005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7046
7047 * data/glr.c: Modify treatment of unused parameters to permit use
7048 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7049
70502005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7051
7052 Fix infringement on user name space reported by Janos Zoltan Szabo.
7053 * data/yacc.c (yyparse): strlen -> yystrlen.
7054
70552005-05-30 Akim Demaille <akim@epita.fr>
7056
7057 * data/lalr1.cc (_): New.
7058 Translate the various messages.
7059
70602005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7061
7062 Fix infringement on user name space reported by Bruno Haible.
7063 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7064 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7065 the user's name space.
7066 (alloca): Include <stdlib.h> to get it, if it's not built in.
7067 (YYMALLOC, YYFREE): Define only if needed.
7068 (malloc, free): Declare, but only if needed, as this infringes on
7069 the user name space.
7070
70712005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7072
7073 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7074 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7075 with %d format.
7076 * lib/ebitset.c (min, max): Undef before defining.
7077 * lib/vbitset.c (min, max): Likewise.
7078 * lib/subpipe.c (create_subpipe): Save local variables in case
7079 vfork clobbers them.
7080
70812005-05-24 Bruno Haible <bruno@clisp.org>
7082
7083 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7084 error message syntax used by gcc-4.0.
7085
70862005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7087
7088 * README: Mention m4 1.4.3. Remove obsolete advice about
7089 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7090
7091 * bootstrap: Remove workaround for problem I encountered with
7092 gettext 0.14.1; it seems to be fixed now.
7093
70942005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7095
7096 * NEWS: Version 2.0a.
7097
7098 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7099 the previous change.
7100
7101 Various maintainer cleanups.
7102 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7103 conftest*, for benefit of CVS commands run at the same time as
7104 "configure". Add build-aux, since "bootstrap" now creates it and
7105 its subfiles.
7106 * Makefile.cfg (move_if_change): Remove.
7107 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7108 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7109 (po_repo, do-po-update, po-update, wget_files, get-targets):
7110 (config.guess-url_prefix, config.sub-url_prefix):
7111 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7112 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7113 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7114 Remove.
7115 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7116 this is now the recommended name.
7117 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7118 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7119 ylwrap. These files now go into build-aux.
7120 * config/move-if-change: Remove.
7121 * config/prev-version.txt: Bump from 1.75 to 2.0.
7122
7123 * bootstrap: Add stdio-safer, unistd-safer modules.
7124 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7125 we don't need it).
7126 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7127 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7128 * lib/subpipe.c: Include "unistd-safer.h".
7129 (create_subpipe): Make sure all the newly-created
7130 file descriptors are > 2, so that diagnostics don't
7131 get sent down them (which might cause Bison to hang, in theory).
7132 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7133 * src/files.c (xfopen): Use fopen_safer, not fopen.
7134
7135 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7136 yesterday's yacc.c fix.
7137
71382005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7139
7140 * data/glr.c, data/lalr1.cc: Update copyright date.
7141
7142 Fix a destructor bug reported by Wolfgang Spraul in
7143 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7144 * data/yacc.c (yyabortlab): Don't call destructor, and
7145 don't set yychar to EMPTY.
7146 (yyoverflowlab): Don't call destructor.
7147 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7148 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7149 since we no longer output the message "discarding lookahead token
7150 end of input ()".
7151
71522005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7153
7154 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7155 fix a small glitch in debugging output.
7156 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7157 after YY_SYMBOL_PRINT where needed.
7158
7159 (struct yyGLRState): Add some comments.
7160 (struct yySemanticOption): Add some comments.
7161 (union yyGLRStackItem): Add comment.
7162
7163 (yymergeOptionSets): Correct this to properly perform the union,
7164 avoiding infinite reported by Michael Rosien.
7165 Update comment.
7166
7167 * tests/glr-regression.at: Add test for GLR merging error reported
7168 by M. Rosien.
7169
71702005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7171
7172 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7173 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7174 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7175 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7176 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7177 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7178 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7179 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7180 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7181 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7182 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7183 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7184 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7185 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7186 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7187 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7188 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7189 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7190 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7191 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7192 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7193 src/output.h, src/parse-gram.c, src/parse-gram.h,
7194 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7195 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7196 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7197 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7198 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7199 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7200 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7201 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7202 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7203 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7204 tests/reduce.at, tests/regression.at, tests/sets.at,
7205 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7206 Update FSF postal mail address.
7207
72082005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7209
7210 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7211 Problem reported by Ralf Menzel.
7212
72132005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7214
7215 * tests/actions.at: Test that stack overflow invokes destructors.
7216 From Marcus Holland-Moritz.
7217 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7218 from here....
7219 (yyreturn): to here. That way, destructors are called properly
7220 even if the stack overflows, or the user calls YYACCEPT or
7221 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7222 (yyoverflowlab): Destroy the lookahead.
7223
72242005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7225
7226 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7227
72282005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7229
7230 * NEWS: Bison-generated C parsers no longer quote literal strings
7231 associated with tokens.
7232 * src/output.c (prepare_symbols): Don't escape strings,
7233 since users don't want to see C escapes.
7234 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7235 in diagnostics.
7236 * tests/input.at (Torturing the Scanner): Likewise.
7237 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7238
72392005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7240
7241 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7242 the data size is known to be too small and we can't increase it.
7243 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7244
72452005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7246
7247 * src/parse-gram.y: Include quotearg.h.
7248 (string_as_id): Quote $1 before using it as a key, since the
7249 lexer no longer quotes it for us.
7250 (string_content): Don't strip quotes, since lexer no longer
7251 quotes it for us.
7252 * src/scan-gram.l: Include quotearg.h.
7253 ("\""): Omit quote.
7254 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7255 a key, since the rest of the lexer doesn't quote it.
7256 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7257 * tests/regression.at (Token definitions): Check for backslashes
7258 in token strings.
7259
7260 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7261 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7262 (yyparse): Revamp code to generate long syntax error message, to
7263 make it easier to translate, and to avoid problems with arithmetic
7264 overflow. Change "virtual memory" to "memory" in diagnostic, since
7265 we don't know whether the memory is virtual.
7266
72672005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7268
7269 * NEWS: Bison-generated C parsers now use the _ macro to
7270 translate strings.
7271 * data/yacc.c (_) [!defined _]: New macro.
7272 All English strings wrapped inside this macro.
7273 * doc/bison.texinfo (Bison Parser): Document _.
7274 * po/POTFILES.in: Include src/parse-gram.c, since it now
7275 includes translateable strings that parse-gram.y doesn't.
7276
72772005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7278
7279 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7280 reverting the 2004-10-11 change to this function.
7281 (symbol_check_alias_consistency): Don't call symbol_type_set
7282 if the type name is already correct.
7283 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7284
72852005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7286
7287 * tests/regression.at (Token definitions): Don't use a token named
7288 c, as that generates a "#define c ..." that runs afoul of buggy
7289 stdlib.h that uses the identifier c as a member of struct
7290 drand48_data. Problem reported by Horst Wente.
7291
72922005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7293
7294 * bootstrap: Change translation URL from
7295 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7296 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7297 redirection glitches. Problem reported by twlevo@xs4all.nl.
7298
72992005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7300
7301 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7302 after operands; POSIX says this isn't portable for the c99 command.
7303
73042005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7305
7306 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7307 immediately if a data overrun has occurred; this may help us track
7308 down what may be a spurious failure on MacOS.
7309
73102005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7311
7312 Respond to problems reported by twlevo@xs4all.nl.
7313
7314 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7315
7316 * src/vcg.h: Comment fix.
7317 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7318 (G_CMAX): Change to -1 instead of INT_MAX.
7319
7320 * data/yacc.c (yyparse): Omit spaces before #line.
7321
73222005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7323
7324 * src/tables.c (state_number_to_vector_number): Put it inside an
7325 "#if 0", since it's not currently used. Problem reported by
7326 Roland McGrath.
7327
73282005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7329
7330 * src/output.c (escaped_output): Renamed from
7331 escaped_file_name_output, since we now use it for symbol tags as
7332 well. All uses changed.
7333 (symbol_destructors_output, symbol_printers_output):
7334 Escape symbol tags too.
7335 Problem reported by Matyas Forstner in
7336 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7337
7338 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7339 not needed.
7340 * src/output.c (user_actions_output, token_definitions_output,
7341 symbol_destructors_output, symbol_printers_output): Likewise.
7342 * src/reader.c (prologue_augment): Likewise.
7343 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7344
7345 * src/vcg.c (output_edge): Don't quote linestyle arg.
7346 Problem reported by twlevo@xs4all.nl.
7347
73482005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7349
7350 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7351 example, reported by Derek M Jones. Also, make the example even
7352 more outrageous, to better illustrate how bad the problem is.
7353
73542005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7355
7356 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7357 putsym. Typo reported by Sebastian Piping.
7358
73592005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7360
7361 * doc/bison.texinfo (Language and Grammar): some -> same
7362 (Epilogue): int he -> in the
7363 Typos reported by Sebastian Piping via Justin Pence.
7364
73652005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7366
7367 * tests/glr-regression.at (Improper handling of embedded actions
7368 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7369 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7370 with dollar signs in test names.
7371 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7372 for a similar reason.
7373
73742005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7375
7376 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7377 wants to redefine G_VIEW.
7378
73792005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7380
7381 * src/vcg.c (get_view_str): Remove case for normal_view.
7382 Problem reported by twlevo@xs4all.nl.
7383
73842005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7385
7386 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7387 Problem reported by twlevo@xs4all.nl.
7388
7389 * doc/bison.texinfo: Change @dircategory from "GNU programming
7390 tools" to "Software development". Requested by Richard Stallman
7391 via Karl Berry.
7392
73932005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7394
7395 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7396 Problem reported by twlevo@xs4all.nl.
7397
73982005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7399
7400 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7401 keyword; it's not needed with modern compilers, and it doesn't
7402 affect correctness with older compilers. Suggested by
7403 twlevo@xs4all.nl.
7404
74052005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7406
7407 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7408 gcc -Wswitch-default.
7409 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7410 * data/yacc.c (yyparse): Likewise.
7411
74122005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7413
7414 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7415 already. Let config.h define any nonstandard values.
7416
74172005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7418
7419 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7420 for the benefit of slower hosts. Problem reported by
7421 Nelson H. F. Beebe.
7422
74232005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7424
7425 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7426 being defined and not used.
7427 * data/lalr1.cc (yyparse): Likewise.
7428 Use "if (false)" rather than "if (0)".
7429
74302005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7431
7432 * TODO: Mention that we should allow NUL bytes in tokens.
7433
74342005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7435
7436 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7437 Problem reported by Hans Aberg.
7438
74392005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7440
7441 * src/getargs.c (version): Happy new year; update overall
7442 program copyright date from 2004 to 2005.
7443
7444 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7445 Problem reported by Hans Aberg.
7446 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7447 (Output file names.): Add a test for the case when standard output
7448 is closed.
7449
74502004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7451
7452 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7453 to fix an oversight in the Bison 2.0 manual.
7454
74552004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7456
7457 * NEWS: Version 2.0. Reformat the existing news items since
7458 1.875, so that related items are grouped together.
7459 * configure.ac (AC_INIT): Bump version to 2.0.
7460 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7461
7462 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7463 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7464 otherwise, we're not testing alloca. Unfortunately there's no
7465 simple way to consult HAVE_ALLOCA here.
7466
7467 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7468 for yymsg, too.
7469
7470 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7471 hand. This avoids a warning about comparing int to size_t when
7472 GCC warnings are enabled.
7473
74742004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7475
7476 * NEWS: Bison-generated parsers no longer default to using the
7477 alloca function (when available) to extend the parser stack, due
7478 to widespread problems in unchecked stack-overflow detection.
7479 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7480 responsibility to set it to a positive value. This lets the user
7481 specify a value that is not a preprocessor constant.
7482 * data/yacc.c (YYMAXDEPTH): Likewise.
7483 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7484 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7485 to be a compile-time constant. However, explain the constraints on it.
7486 Also, explain the constraints on YYINITDEPTH.
7487 (Table of Symbols): Explain that alloca is no longer the default.
7488 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7489 to 1.
7490
7491 * doc/bison.texinfo (Location Default Action): Mention that n must
7492 be zero when k is zero. Suggested by Frank Heckenbach.
7493
74942004-12-22 Akim Demaille <akim@epita.fr>
7495
7496 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7497 (parser::state_type, parser::semantic_type, parser::location_type):
7498 Private, not public.
7499 (parser::parse): Return ints, not bool.
7500 Returning a bool introduces a problem: 0 corresponds to false, and
7501 it seems weird to return false on success. Returning true changes
7502 the conventions for yyparse.
7503 Alternatively we could return void and send an exception.
7504 There is no clear consensus (yet?).
7505 (state_stack, semantic_stack, location_stack): Rename as...
7506 (state_stack_type, semantic_stack_type, location_stack_type): these.
7507 Private, not public.
7508 * tests/c++.at: New.
7509 * tests/testsuite.at, tests/Makefile.am: Adjust.
7510
75112004-12-21 Akim Demaille <akim@epita.fr>
7512
7513 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7514
75152004-12-21 Akim Demaille <akim@epita.fr>
7516
7517 Don't impose std::string for filenames.
7518
7519 * data/lalr1.cc (b4_filename_type): New.
7520 (position::filename): Use it.
7521 (parser.hh): Move the inclusion of stack.hh and location.hh below
7522 the user code, so that needed headers for the filename type can be
7523 included first.
7524 Forward declare them before the user code.
7525 * tests/Makefile.am (check-local, installcheck-local): Pass
7526 TESTSUITEFLAGS to the TESTSUITE.
7527
75282004-12-20 Akim Demaille <akim@epita.fr>
7529
7530 Use more STL like names: my_class instead of MyClass.
7531
7532 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7533 (SemanticStack, SemanticType, StateStack, StateType)
7534 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7535 (Parser::value): Rename as...
7536 (location_stack, location_type, rhs_number_type, semantic_stack)
7537 (semantic_type, state_stack, state_type, token_number_type, stack)
7538 (slice, traits, parser::yylloc, parser::yylval): these.
7539
7540 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7541
75422004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7543
7544 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7545 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7546
75472004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7548
7549 Remove uses of 'short int' and 'unsigned short int'. This raises
7550 some arbitrary limits. It uses more memory but nowadays that's
7551 not much of an issue.
7552
7553 This change does not affect the generated parsers; that's a different
7554 task, as some users will want to conserve memory there.
7555
7556 Ideally we should use size_t to represent all object counts, and
7557 something like ptrdiff_t to represent signed differences of object
7558 counts; but that will require more code-cleanup than I have the
7559 time to do right now.
7560
7561 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7562 Use size_t, not int or short int, to count objects.
7563 * src/closure.c (nritemset, closure): Likewise.
7564 * src/closure.h (nritemset, closure): Likewise.
7565 * src/nullable.c (nullable_compute): Likewise.
7566 * src/print.c (print_core): Likewise.
7567 * src/print_graph.c (print_core): Likewise.
7568 * src/state.c (state_compare, state_hash): Likewise.
7569 * src/state.h (struct state): Likewise.
7570 * src/tables.c (default_goto, goto_actions): Likewise.
7571
7572 * src/gram.h (rule_number, rule): Use int, not short int.
7573 * src/output.c (prepare_rules): Likewise.
7574 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7575 errs, reductions): Likewise.
7576 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7577 Likewise.
7578 * src/tables.c (vector_number, tally, action_number,
7579 ACTION_NUMBER_MINIMUM): Likewise.
7580 * src/output.c (muscle_insert_short_int_table): Remove.
7581
75822004-12-17 Akim Demaille <akim@epita.fr>
7583
7584 * data/lalr1.cc: Extensive Doxygenation.
7585 (error_): Rename as...
7586 (error): this, since it is visible to the user.
7587 Adjust callers.
7588 (Parser::message): Now an automatic variable from...
7589 (Parser::yyreport_syntax_error_): here.
7590 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7591 Parser::error.
7592 * tests/input.at: Escape $.
7593
75942004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7595
7596 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7597 Parenthesize rhs to avoid obscure problems with mistakes like
7598 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7599 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7600 b4_rhs_location): Likewise.
7601 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7602 b4_rhs_location): Likewise.
7603
76042004-12-16 Akim Demaille <akim@epita.fr>
7605
7606 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7607 yacc.c: be sure to stay within yycheck_.
7608 * tests/actions.at: Re-enable C++ tests.
7609
76102004-12-16 Akim Demaille <akim@epita.fr>
7611
7612 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7613 real.
7614
76152004-12-16 Akim Demaille <akim@epita.fr>
7616
7617 Use #define to handle the %name-prefix.
7618
7619 * data/glr.c, data/yacc.c: Comment changes.
7620 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7621 so that one can refer to yylex in the parser file, and have it
7622 renamed, as is the case with other skeletons.
7623
76242004-12-16 Akim Demaille <akim@epita.fr>
7625
7626 Move lalr1.cc internals into yy*.
7627
7628 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7629 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7630 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7631 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7632 (empty_, final_, terror_, errcode_, ntokens_)
7633 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7634 (looka_, ilooka_, error_range_, nerrs_):
7635 Rename as...
7636 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7637 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7638 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7639 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7640 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7641 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7642 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7643 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7644 these.
7645
76462004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7647
7648 Fix some problems reported by twlevo at xs4all.
7649 * src/symtab.c (symbol_new): Report an error if the input grammar
7650 contains too many symbols. This is better than calling abort() later.
7651 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7652 (struct node, struct graph):
7653 Rename member expand to stretch. All uses changed.
7654 (struct graph): Remove member layoutalgorithm. All uses removed.
7655 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7656 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7657 All uses changed.
7658 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7659
76602004-12-15 Akim Demaille <akim@epita.fr>
7661
7662 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7663 Add more Doxygen comments.
7664 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7665 (report_syntax_error_, translate_): Rename as...
7666 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7667 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7668
76692004-12-15 Akim Demaille <akim@epita.fr>
7670
7671 * data/lalr1.cc (lex_): Rename as...
7672 (yylex_): this.
7673 Move the trace here.
7674 Take the %name-prefix into account.
7675 Reported by Alexandre Duret-Lutz.
7676
76772004-12-15 Akim Demaille <akim@epita.fr>
7678
7679 Simplify the C++ parser constructor.
7680
7681 * data/lalr1.cc (debug_): Rename as...
7682 (yydebug_): so that the parser's internals are always in the yy*
7683 pseudo namespace.
7684 Adjust uses.
7685 (b4_parse_param_decl): Remove the leading comma as it is now only
7686 called as unique argument list.
7687 (Parser::Parser): Remove the constructor accepting a location and
7688 an initial debugging level.
7689 Remove from the other ctor the argument for the debugging level.
7690 (debug_level_type, debug_level, set_debug_level): New.
7691
7692 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7693 constructor calls.
7694
76952004-12-15 Akim Demaille <akim@epita.fr>
7696
7697 Remove b4_root related material: failure experiment
7698 (which goal was to allow to derive from a class).
7699
7700 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7701 definitions and uses.
7702
77032004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7704
7705 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7706 not 2, since it's not portable to subtract 1 from the start of an
7707 array. The new item 0 is never set or used. All uses changed.
7708
7709 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7710 the default definition of YYLLOC_DEFAULT. Problem reported
7711 by Frank Heckenbach.
7712
77132004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7714
7715 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7716 the normal case and one for the error case. Just use the
7717 first one uniformly. Problem reported by Frank Heckenbach.
7718 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7719 use exactly the same macro in both places.
7720 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7721 so that the normal-case YYRHSLOC works for the error case too.
7722 All uses changed.
7723 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7724 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7725 * doc/bison.texinfo (Location Default Action): Don't claim that
7726 we have an array of locations. Use the same macro for both glr
7727 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7728 the index is 0.
7729
77302004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7731
7732 * HACKING: Update email addresses to send announcements to.
7733
7734 * configure.ac (AC_INIT): Bump version to 1.875f.
7735
77362004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7737
7738 * NEWS: Version 1.875e.
7739 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7740
7741 * src/scan-skel.l: Include "complain.h", for "fatal".
7742
7743 * src/relation.h (relation_print, relation_digraph):
7744 Relation sizes are of type relation_node, not size_t (this is
7745 merely a doc fix, since the two types are equivalent).
7746 (relation_transpose): Relation sizes are of type relation_node,
7747 not int.
7748 * src/relation.c: Likewise.
7749 (top, infinity): Now of type relation_node, not int.
7750 (traverse, relation_transpose): Use relation_node, not int.
7751
7752 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7753 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7754 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7755
7756 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7757 specifying whether the test should be skipped. Use it tp
7758 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7759 fail on some hosts, and should be skipped.
7760
77612004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7762
7763 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7764 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7765 unless otherwise specified below.
7766
7767 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7768 to allocate kernel_base, kernel_items, kernel_size, since
7769 they needn't be initialized to 0.
7770 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7771 * src/closure.c (new_closure): Likewise, for itemset.
7772 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7773 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7774 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7775 (build_relations): Likewise for edge, states1, includes.
7776 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7777 * src/reader.c (packgram): Likewise, for ritem, rules.
7778 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7779 * src/relation.c (relation_digraph): Likewise for VERTICES.
7780 (relation_transpose): Likewise for new_R, end_R.
7781 * src/symtab.c (symbols_token_translations_init): Likewise for
7782 token_translations.
7783 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7784 (token_actions): Likewise for yydefact, actrow, conflrow,
7785 conflict_list.
7786 (save_column): Likewise for froms[symno], tos[symno].
7787 (goto_actions): Likewise for state_count.
7788 (pack_table): Likewise for base, pos, check.
7789 (tables_generate): Likewise for width.
7790
7791 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7792 for initial core. Just have a separate core, so we needn't worry
7793 about whether kernel_size and kernel_base are initialized.
7794
7795 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7796 kernel_size, kernel_items): Remove unnecessary initialization.
7797 * src/conflicts.c (conflicts): Likewise.
7798 * src/derives.c (derives): Likewise.
7799 * src/muscle_tablc (muscle_insert): Likewise.
7800 * src/relation.c (relation_digraph): Likewise.
7801 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7802 conflrow, conflict_table, conflict_list, table, check):
7803 Likewise.
7804
7805 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7806 This is because all callers pass unsigned int.
7807 * src/closure.h (new_closure): Likewise.
7808
7809 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7810 (build_relations): Initialize includes[i] in all cases.
7811 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7812 and rules[ruleno].precsym. Initialize members in order.
7813 * src/relation.c (relation_transpose): Always initialize new_R[i]
7814 and end_R[i].
7815 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7816
7817 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7818 conflict_list[0] was always 0, but now it isn't initialized.
7819
7820 * src/table.c (table_grow): When conflict_table grew, the grown
7821 area wasn't cleared. Fix this.
7822
7823 * lib/.cvsignore: Add strdup.c, strdup.h.
7824 * m4/.cvsignore: Add strdup.m4.
7825
78262004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7827
7828 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7829 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7830 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7831 ngotos + 1 without checking for overflow.
7832 (build_relations): Use END_NODE, not -1, to denote end of edges.
7833 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7834 build_relations): Use goto_number, not int, for goto numbers.
7835 * src/tables.c (save_column, default_goto): Likewise.
7836
78372004-11-23 Akim Demaille <akim@epita.fr>
7838
7839 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7840 of #defining from yystype.
7841 Don't typedef yystype, C++ does not need it.
7842 This lets it possible to forward declare it as union.
7843
78442004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7845
7846 * bootstrap (gnulib_modules): Add extensions.
7847 Problem reported by Jim Meyering.
7848
78492004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7850
7851 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7852 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7853 src/system.h, src/tables.c: XFREE -> free, to accommodate
7854 recent change to gnulib xalloc.h.
7855 Problem reported by Jim Meyering.
7856
78572004-11-17 Akim Demaille <akim@epita.fr>
7858
7859 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7860
78612004-11-17 Akim Demaille <akim@epita.fr>,
7862 Alexandre Duret-Lutz <adl@gnu.org>
7863
7864 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7865 changes.
7866 (YYCDEBUG): Adjust.
7867 Use it instead of cdebug_.
7868 (Parser::debug_stream, Parser::set_debug_stream): New.
7869 (Parser::symprint_): Define cdebug_ for temporary backward
7870 compatibility.
7871 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7872 debug_stream ().
7873
78742004-11-17 Akim Demaille <akim@epita.fr>
7875
7876 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7877 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7878 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7879 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7880
78812004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7882
7883 * data/glr.c (yyloc_default): Remove; not used.
7884 Problem reported by Frank Heckenbach.
7885
78862004-10-25 Akim Demaille <akim@epita.fr>
7887
7888 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7889 Introduce another definition to address simple location arrays.
7890 (yyGLRStack): New member: yyerror_range.
7891 (yyrecoverSyntaxError, yyparse): Update it.
7892 (yyrecoverSyntaxError): Use it when shifting the error token to
7893 have an accurate range, equivalent to the one computed by both
7894 yacc.c and lalr1.cc.
7895 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7896 that column numbers start at column 0, as per GNU Coding
7897 Standards, the others tests, and the doc.
7898 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7899 Adjust to the above change (first column is 0).
7900 And adjust the location of the "<error>", now covering the whole
7901 line.
7902
79032004-10-22 Akim Demaille <akim@epita.fr>
7904 and Paul Eggert <eggert@cs.ucla.edu>
7905
7906 Remove some arbitrary limits on goto numbers and relations.
7907 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7908 initial values, since they're never used.
7909 (set_goto_map): ngotos is now unsigned, so test for overflow
7910 by seeing whether it wraps around to zero.
7911 * src/lalr.h (goto_number): Now size_t, not short int.
7912 (GOTO_NUMBER_MAXIMUM): Remove.
7913 * src/relation.c (relation_print, traverse, relation_transpose):
7914 Check for END_NODE rather than looking at sign.
7915 * src/relation.h (END_NODE): New macro.
7916 (relation_node): Now size_t, not short int.
7917
79182004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7919
7920 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7921 keyword, not an identifier. Problem reported by Baron Schwartz in
7922 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7923
79242004-10-11 Akim Demaille <akim@epita.fr>
7925
7926 * src/symtab.c (symbol_check_alias_consistency): Also check
7927 type names, destructors, and printers.
7928 Reported by Alexandre Duret-Lutz.
7929 Recode the handling of associativity and precedence in terms
7930 of symbol_precedence_set.
7931 Accept no redeclaration at all, not even equal to the previous
7932 value.
7933 (redeclaration): New.
7934 Use it to factor redeclaration complaints.
7935 (symbol_make_alias): Don't set the type of the alias, let
7936 symbol_check_alias_consistency do it as for other features.
7937 * src/symtab.h (symbol): Add new member prec_location, and
7938 type_location.
7939 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7940 * tests/input.at (Incompatible Aliases): New.
7941
79422004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7943
7944 .cvsignore fixes to accommodate gnulib changes,
7945 and the practice of naming build directories "_build".
7946 * .cvsignore: Add "_*". Sort.
7947 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
7948 * m4/.cvsignore: Add "*_gl.m4".
7949
79502004-10-06 Akim Demaille <akim@epita.fr>
7951
7952 * src/parse-gram.y (add_param): Fix the truncation of trailing
7953 spaces.
7954
79552004-10-05 Akim Demaille <akim@epita.fr>
7956
7957 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
7958 whether the reducion was empty or not. This leaves room to
7959 improve the use of YYLLOC_DEFAULT in such a case.
7960 lalr1.cc is still experimental, so changing this is acceptable.
7961 And finally, there are probably not many users who changed the
7962 handling of locations in GLR, so changing is admissible too.
7963
7964 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
7965 empty reduction, set @$ to an empty location ending the previously
7966 stacked symbol.
7967 Adjust uses to make sure the code is triggered on empty
7968 reductions.
7969 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
7970 expected output: empty reductions have empty locations.
7971
79722004-09-29 Akim Demaille <akim@epita.fr>
7973
7974 * data/lalr1.cc: Move towards a more standard C++ coding style
7975 for templates: Class < T > -> Class<T>.
7976
79772004-09-29 Akim Demaille <akim@epita.fr>
7978
7979 * data/lalr1.cc: Reinstall the former ctor, for sake of
7980 compatibility, but warn it will be removed.
7981 Move towards a more standard C++ coding style (i.e., type *var ->
7982 type* var).
7983
79842004-09-27 Paul Eggert <eggert@cs.ucla.edu>
7985
7986 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
7987 since it's less likely to work if NULs are involved in the future.
7988
79892004-09-27 Akim Demaille <akim@epita.fr>
7990
7991 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
7992
79932004-09-27 Akim Demaille <akim@epita.fr>
7994
7995 * data/lalr1.cc (b4_parse_param_decl_1): New.
7996 (b4_parse_param_decl): Use it to have different names between attribute
7997 and argument names.
7998 (b4_cc_constructor_call): Likewise.
7999
80002004-09-24 Akim Demaille <akim@epita.fr>
8001
8002 * src/parse-gram.y (add_param): Strip the leading and trailing
8003 blanks from a formal argument declaration.
8004 (YY_LOCATION_PRINT): New.
8005
80062004-09-24 Akim Demaille <akim@epita.fr>
8007
8008 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8009 after the location.
8010
80112004-09-24 Akim Demaille <akim@epita.fr>
8012
8013 * doc/bison.texinfo (Table of Symbols): Sort.
8014
80152004-09-21 Akim Demaille <akim@epita.fr>
8016
8017 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8018 the useless parentheses.
8019 Suggested by Paul Eggert.
8020
80212004-09-20 Akim Demaille <akim@epita.fr>
8022
8023 Let the initial-action act on the look-ahead, and use it for the
8024 "initial push" (corresponding to an hypothetical beginning-of-file).
8025 And let lalr1.cc honor %initial-action.
8026
8027 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8028 example.
8029 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8030 (Parser::Parser): Remove the ctor that used to initialize it.
8031 (Parser::parse): Like in the other skeletons, issue the "starting
8032 parse" message before any action.
8033 Honor %initial-action.
8034 Initialize the stacks with the lookahead.
8035 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8036 look-ahead.
8037 Push them in the stacks.
8038 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8039
80402004-09-20 Akim Demaille <akim@epita.fr>
8041
8042 * doc/bison.texinfo (Initial Action Decl): New.
8043
80442004-09-20 Akim Demaille <akim@epita.fr>
8045
8046 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8047 clearer criterion to define it.
8048 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8049 When reducing on an empty RHS, use the latest stacked location as
8050 location.
8051 yylloc is not always available.
8052 * data/glr.c: Likewise.
8053 Also, honor initial-actions.
8054
80552004-09-20 Akim Demaille <akim@epita.fr>
8056
8057 * data/yacc.c (YY_LOCATION_PRINT): New.
8058 Define when we know YYLTYPE's structure, i.e., when the default
8059 YYLLOC_DEFAULT is used.
8060 * data/c.m4 (b4_yysymprint_generate): Use it.
8061 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8062 value of the result.
8063 (error_start_): Replace with...
8064 (error_range_): this location array.
8065 This allows to replace code relying on the implementation of
8066 locations by portable code.
8067 * data/yacc.c (yylerrsp): Replace with...
8068 (yyerror_range): this.
8069 Every time a token is popped, update yyerror_range[0], to have an
8070 accurate location for the error token.
8071 * data/glr.c (YY_LOCATION_PRINT): New.
8072 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8073 deference a pointer.
8074 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8075 report the location in %printers.
8076
8077 * src/scan-skel.l: Instead of abort, report error messages to ease
8078 understanding skeleton scanning failures.
8079
80802004-09-16 Akim Demaille <akim@epita.fr>
8081
8082 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8083 (iterator, const_iterator): these, to be more in the C++ spirit.
8084 Also, return reverse iterators so that when displaying the stack
8085 we display its bottom first.
8086 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8087 from yacc.c.
8088 We should probably use vector here though.
8089
80902004-09-16 Akim Demaille <akim@epita.fr>
8091
8092 Have more complete shift traces.
8093
8094 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8095 to report Shifts instead of ad hoc YYDPRINTF invocations,
8096 including for the error token.
8097 * data/lalr1.cc (symprint_): Output the location.
8098 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8099 output the location within the %printer.
8100 Activate GLR tests, at least to make sure they compile properly.
8101 They still don't pass though.
8102 * tests/calc.at: Adjust expect verbose output, since now "Entering
8103 state..." is on a different line than the "Shifting" message.
8104
81052004-09-08 Akim Demaille <akim@epita.fr>
8106
8107 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8108 Bison directive from the Bison file to the invocation of this
8109 macro, so that these directives are passed to
8110 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8111 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8112 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8113 the extra Bison directives instead of the whole series.
8114 Change the grammar so that there are recoverable errors, and
8115 unrecoverable errors. Now we can have the parser give up before
8116 consuming the whole input. As a result we now can observe that
8117 the lookahead is freed when needed.
8118 Change the parser source to parse argv[1] instead of a hard coded
8119 string.
8120 Simplify yylex, and give a value and location to EOF.
8121 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8122 passed directives already coded in the file.
8123 Add some tests to check the location of "error".
8124 For some tests, the C++ parser is correct, and not yacc.c.
8125 For other tests, they provide different, but unsatisfying, values,
8126 so keep the C++ value so that at least one parser is "correct"
8127 according to the test suite.
8128 (Actions after errors): Remove, this is subsumed by the
8129 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8130
81312004-09-06 Akim Demaille <akim@epita.fr>
8132
8133 * data/lalr1.cc: Adjust the indentation of the labels.
8134 (Parser::pop): New.
8135 Use it.
8136
81372004-09-06 Akim Demaille <akim@epita.fr>
8138
8139 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8140 argument, an informative message.
8141 Call YY_SYMBOL_PRINT.
8142 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8143 * data/lalr1.cc (destruct_): Likewise.
8144 In addition, no longer depend on b4_yysymprint_generate and
8145 b4_yydestruct_generate to generate these functions, do it "by
8146 hand".
8147
81482004-09-03 Akim Demaille <akim@epita.fr>
8149
8150 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8151 invoked, yydestruct the lookahead.
8152 * tests/calc.at (Calculator $1): Update the expected lengths of
8153 traces: there is an added line for the discarded lookahead.
8154 * doc/bison.texinfo (Destructor Decl): Some rewording.
8155 Define "discarded" symbols.
8156
81572004-09-02 Akim Demaille <akim@epita.fr>
8158
8159 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8160
81612004-09-02 Akim Demaille <akim@epita.fr>
8162
8163 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8164 (YYDSYMPRINTF): Rename as...
8165 (YY_SYMBOL_PRINT): this.
8166 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8167 two.
8168 Use it instead of direct symprint_ calls.
8169 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8170 one.
8171
81722004-09-02 Akim Demaille <akim@epita.fr>
8173
8174 * data/lalr1.cc (b4_yysymprint_generate): New.
8175 (symprint_): New member function, defined when YYDEBUG.
8176 Use it consistently instead of token/nterm debugging output by
8177 hand.
8178 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8179 %printer calls to use cdebug_ when using lalr1.cc.
8180
81812004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8182
8183 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8184 with #ifdef YYDEBUG.
8185
81862004-08-26 Akim Demaille <akim@epita.fr>
8187
8188 * doc/bison.texinfo (Implementing Loops): Rename as...
8189 (Implementing Gotos/Loops): this.
8190
81912004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8192
8193 Adjust to latest gnulib.
8194 * bootstrap (gnulib_modules): Add xalloc-die.
8195 Set LC_ALL=C so that file names sort consistently.
8196 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8197 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8198 uintmax_t.m4, ulonglong.m4.
8199 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8200 po.m4 since we are now using _gl.m4 instead.
8201
82022004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8203
8204 * src/scan-action.l: Remove. Scanning of semantic actions is
8205 handled in scan-gram.l.
8206
82072004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8208
8209 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8210
8211 * src/location.h (struct): The file member is a uniqstr.
8212 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8213
82142004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8215
8216 Fix bug with non-%union parsers that have printers or destructors,
8217 which led to a Bison core dump. Reported by Peter Fales in
8218 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
8219
8220 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8221 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8222 not to our own type.
8223 * src/output.c (symbol_destructors_output, symbol_printers_output):
8224 Don't assume %union.
8225 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8226 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8227 UNION-FLAG. All callers changed.
8228 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8229 Use type char, not unsigned int, when declaring an array of char;
8230 this lets us remove a cast.
8231 (Printers and Destructors): Add non-%union test cases.
8232
82332004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8234
8235 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8236 GLR writeups. E.g., avoid frenchspacing and the future tense,
8237 change "lookahead" to "look-ahead", and change "wrt" to "with
8238 respect to".
8239
82402004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8241
8242 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8243 New sections, split off from the GLR Parsers section. Put the new
8244 Simple GLR Parser near the start of the GLR section, for clarity.
8245 Rewrite connective text.
8246
82472004-06-21 Frank Heckenbach <frank@g-n-u.de>
8248
8249 * doc/bison.texinfo (Simple GLR Parsers): New section.
8250
82512004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8252
8253 * NEWS, TODO, doc/bison.texinfo:
8254 Use "look-ahead" instead of "lookahead", to be consistent.
8255 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8256 while we're fixing "look-ahead".
8257 * src/conflicts.c (shift_set): Renamed from shiftset.
8258 (look_ahead_set): Renamed from lookaheadset.
8259 * src/print.c: Likewise.
8260 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8261 name for "lookahead".
8262 (report_types, usage): Likewise.
8263 * src/getargs.h (report_look_ahead_tokens): Renamed from
8264 report_lookaheads.
8265 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8266 compute_lookaheads.
8267 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8268 (look_ahead_tokens_print): Renamed from lookaheads_print.
8269 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8270 state_rule_lookaheads_print.
8271 * src/state.h: Likewise.
8272 (reductions.look_ahead_tokens): Renamed from lookaheads.
8273 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8274 AT_DATA_LOOKAHEADS_GRAMMAR.
8275
82762004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8277
8278 * README: Update location of patched M4 distribution.
8279
82802004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8281
8282 Don't assume the C++ compiler takes the same arguments as the C compiler
8283 (trivial change).
8284 * configure.ac (O0CXXFLAGS): New var.
8285 * tests/atlocal.in (CXXFLAGS): Use it.
8286
82872004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8288
8289 Fix some "make check" problems with C++ reported by
8290 Albert Chin-A-Young for Tru64 C++ in this thread:
8291 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8292
8293 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8294 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8295 Output to a .cc file for C++, not to a .c file.
8296 * tests/calc.at (AT_CHECK_CALC): Likewise.
8297 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8298 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8299
83002004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8301
8302 * tests/calc.at, tests/actions.at: Workaround for SGI
8303 C++ compiler. (trivial change)
8304
83052004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8306
8307 Spent a few hours checking out which prerequisite versions the
8308 current sources actually require. I went all the way back to
8309 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8310 a seemingly endless set of combinations of versions more recent
8311 than that. The bottom line is that the current sources require
8312 fairly recent versions of the build tools, and it'll be some work
8313 to change this.
8314 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8315 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8316 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8317 Add comments explaining why those particular versions are
8318 currently needed.
8319
8320 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8321 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
8322 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
8323
8324 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8325 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8326
83272004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8328
8329 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8330 0.11.5. Suggested by Bruno Haible.
8331 * bootstrap: Remove gettext version checking.
8332
8333 * doc/bison.texinfo (Decl Summary): Also mention that %union
8334 can depend on prerequisite types. Problem reported by Tim
8335 Van Holder.
8336
83372004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8338
8339 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8340 * README-alpha: Don't tell people not to package this.
8341
8342 * bootstrap: Don't assume $(...) works; use `...` instead.
8343 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8344 gettext better.
8345
8346 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8347 put into the -d output file, and mention what to do if YYSTYPE is
8348 defined as a macro.
8349
83502004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8351
8352 Undo change made earlier today: it caused autopoint to not bring
8353 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8354 autopoint's.
8355
8356 * bootstrap: Check that gettext version matches what's in
8357 configure.ac. Warn users to ignore robots.txt ERROR 404.
8358 * bootstrap: Undo today's earlier change (logged below).
8359 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8360
8361 The gettext version checking is causing more trouble than it's
8362 curing; remove it. Problem reported by Paul Hilfinger.
8363
8364 * bootstrap: Issue a warning that one can expect a message
8365 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8366 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8367
83682004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8369
8370 Ensure that the C++ compiler used for testing actually works on a
8371 simple test program; if not, skip the C++-related tests. Problem
8372 reported by Vin Shelton in:
8373 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8374
8375 * m4/cxx.m4: New file.
8376 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8377 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8378 * tests/local.at (AT_COMPILE_CXX): Use it.
8379
83802004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8381
8382 * data/glr.c (yylloc): Output this macro even if locations are not
8383 being generated, as the GLR parser needs it even in that case.
8384 Problem reported by Troy A. Johnson
8385 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8386
8387 * configure.ac (AC_INIT): Update to 1.875e.
8388
83892004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8390
8391 * NEWS: Version 1.875d.
8392 * configure.ac (AC_INIT): Likewise.
8393 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8394
8395 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8396 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8397 lalr1.cc runs afoul of the first, and the last two are no longer
8398 supported by GCC 3.4.0.
8399 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8400 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8401
84022004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8403
8404 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8405 unsigned int, for compatibility with latest gnulib hash module.
8406 * src/state.c (state_hash, state_hasher): Likewise.
8407 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8408 * src/uniqstr.c (hash_uniqstr): Likewise.
8409
84102004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8411
8412 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8413
8414 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8415 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8416 character and string literals.
8417 (unexpected_end): New function.
8418 (unexpected_eof): Use it.
8419 (unexpected_newline): New function.
8420 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8421 actions.
8422
8423 * NEWS: Document %expect-rr.
8424
8425 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8426 Fix typo by replacing $1 with $option.
8427 Remove more 'intl'-related files.
8428 Don't DEFUN AM_INTL_SUBDIR twice.
8429
8430 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8431 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8432 strtoul.c.
8433 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8434 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8435 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8436 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8437 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8438 * src/.cvsignore: Add *.output.
8439
8440 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8441 gets copied to the output file.
8442
84432004-04-28 Paul Eggert <eggert@twinsun.com>
8444
8445 Get files from the gnulib and po repositories, instead of relying
8446 on them being in our CVS. Upgrade to latest versions of gnulib
8447 and Automake.
8448
8449 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8450 * bootstrap: Bootstrap from gnulib and po repositories.
8451 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8452 * README-cvs: Document these changes. Remove version numbers from
8453 mentions of build tools, since they change so often. Mention Flex.
8454
8455 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8456 (gl_USE_SYSTEM_EXTENSIONS): Add.
8457 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8458 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
8459 does this for us.
8460 (AC_ISC_POSIX): Remove; we no longer support this
8461 ancient OS, as it gets in the way of latest Autoconf & gnulib.
8462 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8463 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8464 Do not check for C89 headers, except for locale.h which is used
8465 by the Yacc library and must port to K&R hosts.
8466 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8467 Do not check for C89 functions, except for setlocale which is
8468 used by the Yacc library.
8469 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8470 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8471 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8472 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8473 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8474 AM_GNU_GETTEXT): Remove; now done by:
8475 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8476 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8477 for us.
8478
8479 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8480 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8481 Define to empty, as gnulib.mk will do the rest for us.
8482 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8483 for us.
8484 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8485 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8486
8487 * src/files.c: Include gnulib's xstrndup.h.
8488
8489 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8490 (REALLOC): Use xnrealloc, for likewise.
8491 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8492 (strnlen, memrchr): Remove decls; functions no longer used.
8493 Include <stpcpy.h>.
8494
8495 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8496 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8497 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8498 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8499 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8500 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8501 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8502 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8503 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8504 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8505 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8506 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8507 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8508 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8509 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8510 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8511 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8512 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8513 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8514 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8515 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8516 Remove, as these files are now generated automatically
8517 by bootstrap or automake.
8518
8519 * po/ChangeLog: Remove: all but one entry was a duplicate
8520 of this file, and I moved that 2000-11-02 entry here.
8521
8522 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8523 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8524 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8525 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8526 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8527 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8528 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8529 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8530 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8531 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8532 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8533 xstrndup.h.
8534 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8535 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8536 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8537 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8538 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8539 * src/.cvsignore: Remove *_.c.
8540
8541
8542 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8543 support it. (The latest stable gzip doesn't.)
8544
85452004-04-27 Paul Eggert <eggert@twinsun.com>
8546
8547 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8548 case, as stos_ is now used by destructors due to the 2004-02-09
8549 change.
8550
8551 Remove more K&R C support.
8552 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8553 * lib/subpipe.c (errno): Remove decl.
8554 Include <stdlib.h> unconditionally.
8555 (EXIT_FAILURE): Remove macro.
8556 * src/complain.c (vfprintf, strerror): Remove.
8557 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8558 unconditionally.
8559 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8560 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8561 (strchr, strspn, memchr): Remove decls.
8562 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8563 unconditionally. Do not declare perror.
8564 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8565 unconditionally.
8566
8567 * src/complain.c (_): Remove useless defn, as system.h defines this.
8568
8569 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8570 with latest obstack.h.
8571 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8572 to procedure types, as obstack.h now does that for us.
8573 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8574
8575 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8576 so that this include file can stand alone.
8577 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8578 does this now. Include subpipe.h first after config.h, to
8579 test whether it can stand alone.
8580
8581 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8582 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8583 unused declaration.
8584
8585 * tests/synclines.at (%union synch line): Put a dummy member in
8586 the union, because empty unions aren't allowed in C. Caught
8587 by GCC 3.4.0.
8588
85892004-04-13 Jim Meyering <jim@meyering.net>
8590
8591 * src/conflicts.c (conflicts_print): Correct format string typo:
8592 use `%%' to produce literal `%'. (trivial change)
8593
85942004-03-30 Paul Eggert <eggert@twinsun.com>
8595
8596 * src/getargs.c (version): Update copyright year to 2004.
8597
8598 * data/c.m4 (b4_int_type): Use 'short int' rather than
8599 'short', and similarly for 'long', 'unsigned', etc.
8600 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8601 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8602 yy_yypstack, yydumpstack): Likewise.
8603 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8604 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8605 Likewise.
8606 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8607 yy_stack_print, yyparse): Likewise.
8608 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8609 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8610 * lib/bitset.c (bitset_print): Likewise.
8611 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8612 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8613 * lib/bitsetv.c (bitsetv_dump): Likewise.
8614 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8615 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8616 Likewise.
8617 * src/LR0.c (allocate_itemsets): Likewise.
8618 * src/gram.h (rule_number, rule): Likewise.
8619 * src/lalr.h (goto_number): Likewise.
8620 * src/nullable.c (nullable_compute): Likewise.
8621 * src/output.c (prepare_rules): Likewise.
8622 * src/relation.c (relation_print, relation_digraph): Likewise.
8623 * src/relation.h (relation_node): Likewise.
8624 * src/state.h (state_number, transitions, errs, reductions,
8625 struct state): Likewise.
8626 * src/symtab.h (symbol_number, struct symbol): Likewise.
8627 * src/tables.c (vector_number, tally, action_number,
8628 default_goto, goto_actions): Likewise.
8629 * tests/existing.at (GNU Cim Grammar): Likewise.
8630 * tests/regression.at (Web2c Actions): Likewise.
8631
8632 * src/output.c (muscle_insert_short_int_table): Renamed from
8633 muscle_insert_short_table. All uses changed.
8634
86352004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8636
8637 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8638 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8639 Add %expect-rr rule.
8640
8641 * src/scan-gram.l: Recognize %expect-rr.
8642
8643 * src/conflicts.h (expected_sr_conflicts): Rename from
8644 expected_conflicts.
8645 (expected_rr_conflicts): Declare.
8646
8647 * src/conflicts.c (expected_sr_conflicts): Rename from
8648 expected_conflicts.
8649 (expected_rr_conflicts): Define.
8650 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8651 for GLR parsers.
8652 Use expected_sr_conflicts in place of expected_conflicts.
8653 Warn if expected_rr_conflicts used in non-GLR parser.
8654
8655 * doc/bison.texinfo: Add documentation for %expect-rr.
8656
86572004-03-08 Paul Eggert <eggert@gnu.org>
8658
8659 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8660 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8661
8662 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8663 in lalr1.cc.
8664 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8665 * src/scan-gram.l (scan_integer): New function.
8666 ({int}): Use it.
8667 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8668 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8669 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8670 Say "long int", not "long", for uniformity with GNU style.
8671
86722004-02-25 Paul Eggert <eggert@twinsun.com>
8673
8674 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8675 compilers. This fixes a problem with Intel's C++ compiler being
8676 chatty, reported by Guido Trentalancia in
8677 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8678
86792004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8680
8681 Support %destructor and merge error locations in lalr1.cc.
8682
8683 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8684 (Parser::stos_): Define unconditionally.
8685 (Parser::destruct_): New method. Generate its body with
8686 b4_yydestruct_generate.
8687 (Parser::error_start_): New attribute.
8688 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8689 token which are discarded.
8690 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8691 error_start_ when erroneous token are discarded.
8692 (Parser::parse) <yyerrlab1>: Compute the location of the error
8693 token so that it covers all the discarded tokens.
8694 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8695 it can be called with `%skeleton "lalr1.cc"', and do that.
8696
86972004-02-02 Paul Eggert <eggert@twinsun.com>
8698
8699 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8700 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8701 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8702 There's no need to mention top_builddir since Automake does that
8703 for us.
8704 (INCLUDES): Remove, as Automake says it's obsolescent.
8705 Contents migrated into AM_CPPFLAGS as described above.
8706 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8707
87082004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8709
8710 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8711 (yyreportSyntaxError): Handle case where lookahead token is
8712 YYEMPTY.
8713
87142004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8715
8716 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8717 resulting parsers are compilable with C++.
8718
87192003-12-23 Paul Eggert <eggert@twinsun.com>
8720
8721 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8722 * src/output.c (output_skeleton): Rename local var.
8723 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8724 Bison tokens, as this runs afoul of the 2003-10-07 change that
8725 disallowed NUL bytes in character constants or string literals.
8726
8727 * tests/local.at: Require Autoconf 2.59's Autotest.
8728 * tests/testsuite.at: Don't include local.at, since we now assume
8729 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8730 including it.
8731 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8732 multiple inclusion warnings.
8733
87342003-12-02 Akim Demaille <akim@epita.fr>
8735
8736 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8737 conditions.
8738 From Bruno Haible.
8739
87402003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8741
8742 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8743
87442003-10-07 Paul Eggert <eggert@twinsun.com>
8745
8746 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8747 if testsuite doesn't exist.
8748
8749 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8750 literals, unfortunately.
8751 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8752 Complain about NUL bytes in character constants or string literals.
8753
87542003-10-05 Paul Eggert <eggert@twinsun.com>
8755
8756 * NEWS: Don't document %no-default-prec, as it's still
8757 too experimental.
8758 * doc/bison.texinfo: Document %no-default-prec only if
8759 the defaultprec flag is set. Normally it's not.
8760
87612003-10-04 Paul Eggert <eggert@twinsun.com>
8762
8763 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8764 non-modifiable lvalue, instead of a modifiable one.
8765 * doc/bison.texinfo (Actions): Document that $$ can
8766 be assigned to. Do not claim that $$ and $N are
8767 array element references: user code should not rely on this.
8768
87692003-10-01 Paul Eggert <eggert@twinsun.com>
8770
8771 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8772 (grammar_declaration): Use it.
8773 * src/scan-gram.l: New token %no-default-prec.
8774 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8775 * NEWS, doc/bison.texinfo: Document the above.
8776
87772003-10-01 Akim Demaille <akim@epita.fr>
8778
8779 VCG no longer supports long_straight_phase.
8780
8781 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8782 * src/print_graph.c (print_graph): Adjust.
8783
87842003-09-30 Frank Heckenbach <frank@g-n-u.de>
8785 and Paul Eggert <eggert@twinsun.com>
8786
8787 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8788 Table of Symbols): Document %default-prec.
8789 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8790 (grammar_declaration): Set default_prec on %default-prec.
8791 * src/scan-gram.l (%default-prec): New token.
8792 * src/reader.h (default_prec): New flag.
8793 * src/reader.c: Likewise.
8794 (packgram): Handle it.
8795 * tests/conflicts.at (%default-prec without %prec,
8796 %default-prec with %prec, %default-prec 1): New tests.
8797
87982003-09-30 Paul Eggert <eggert@twinsun.com>
8799
8800 * tests/testsuite.at: Include local.at, not input.at, fixing
8801 a typo in the 2003-08-25 patch.
8802
88032003-08-27 Akim Demaille <akim@epita.fr>
8804
8805 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8806 GCC warnings.
8807
88082003-08-26 Akim Demaille <akim@epita.fr>
8809
8810 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8811 "<\#" to avoid magic from Gnus when posting parts of this script.
8812
88132003-08-26 Akim Demaille <akim@epita.fr>
8814
8815 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8816 (Parser::parse): here.
8817 Adjust: nerrs and errstatus is now replaced by...
8818 (Parser::nerrs_, Parser::errstatus_): New.
8819
88202003-08-25 Akim Demaille <akim@epita.fr>
8821
8822 * config/announce-gen, Makefile.cfg: New.
8823 * Makefile.am: Adjust.
8824 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8825 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8826
88272003-08-25 Akim Demaille <akim@epita.fr>
8828
8829 When reducing initial empty rules, Bison parser read an initial
8830 location that is not defined. This results in garbage, and that
8831 affects Bison's own parser. Therefore we need (i) to extend Bison
8832 to support a means to initialize this location, and (ii) to use
8833 this CVS Bison to fix CVS Bison's parser.
8834
8835 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8836 with...
8837 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8838 * src/parse-gram.y: Adjust.
8839 (%initial-action): New.
8840 (%error-verbose): Since we require CVS Bison, there is no reason
8841 not to use it.
8842 * src/scan-gram.l: Adjust.
8843 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8844 * data/yacc.c (yyparse): Use b4_initial_action.
8845
88462003-08-25 Akim Demaille <akim@epita.fr>
8847
8848 * doc/bison.texinfo: Don't promote stdout for error messages.
8849
88502003-08-25 Akim Demaille <akim@epita.fr>
8851
8852 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8853 From Alexandre Duret-Lutz.
8854
88552003-08-25 Akim Demaille <akim@epita.fr>
8856
8857 Version 1.875c.
8858
88592003-08-25 Akim Demaille <akim@epita.fr>
8860
8861 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8862 Use them.
8863
88642003-08-25 Akim Demaille <akim@epita.fr>
8865
8866 * data/lalr1.cc (Parser::reduce_print_): New.
8867 Use it.
8868
88692003-08-25 Akim Demaille <akim@epita.fr>
8870
8871 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8872 error recovery loops. This patch is based on
8873 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8874 Also, augment the similarity between lalr1.cc and yacc.c.
8875 Note: the locations of error recovery rules are not correct yet.
8876
8877 * data/lalr1.cc: Comment changes to augment the similarity between
8878 lalr1.cc and yacc.c.
8879 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8880 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8881 yyerrlab), when hitting EOF, pop the whole stack here instead of
8882 merely falling thru the default error handling mechanism.
8883 (yyerrorlab): New label, with the old contents of YYERROR,
8884 plus the following change: pop the stack of rhs corresponding
8885 to the production that invoked YYERROR. That is how Yacc
8886 behaves (required by POSIX).
8887 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8888 fail.
8889
88902003-08-25 Akim Demaille <akim@epita.fr>
8891
8892 Tune local.at so that people can "autom4te -l autotest calc.at -o
8893 calc" for instance, to extract a sub test suite.
8894
8895 * tests/testsuite.at: Move the initialization, Autotest version
8896 requirement, and AT_TESTED invocation into...
8897 * tests/local.at: here.
8898 * tests/testsuite.at: Include it for compatibility with Autoconf
8899 2.57.
8900 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8901 be ignore.
8902
89032003-08-04 Paul Eggert <eggert@twinsun.com>
8904
8905 Rework code slightly to avoid gcc -Wtraditional warnings.
8906 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8907 The returned value is now stored in *YY0. All callers changed.
8908 * src/output.c (merge_output): Adjust to the above change.
8909
89102003-07-26 Paul Eggert <eggert@twinsun.com>
8911
8912 * data/glr.c (YYASSERT): New macro.
8913 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8914 yyresolveStates, yyprocessOneStack):
8915 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8916 Derived from a suggestion by Frank Heckenbach.
8917
89182003-07-25 Paul Eggert <eggert@twinsun.com>
8919
8920 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8921 for portability to K&R C (after ansi2knr, presumably). See
8922 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8923 by Frank Heckenbach, though I have omitted the structure-initialization
8924 part of his glr-knr.diff patch since I recall that the Portable
8925 C Compiler didn't require that change.
8926
8927 Let the user specify how to allocate and free memory.
8928 Derived from a suggestion by Frank Heckenbach in
8929 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8930 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8931 All uses of free, malloc, realloc changed to use these macros,
8932 and unnecessary casts removed.
8933 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8934
89352003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8936
8937 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8938 use s.empty() rather than s == "" to test for empty string; see
8939 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8940 (trivial change)
8941
89422003-06-25 Akim Demaille <akim@epita.fr>
8943
8944 * config/depcomp, config/install-sh: Update from masters.
8945
89462003-06-20 Paul Eggert <eggert@twinsun.com>
8947
8948 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
8949 and return properly parenthesized result.
8950 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
8951 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
8952 Remove unnecessary parentheses from uses.
8953 * doc/bison.texinfo (Location Default Action): Describe the
8954 conventions for parentheses.
8955
89562003-06-19 Paul Eggert <eggert@twinsun.com>
8957
8958 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
8959 yyreportTree): Do not assume that size_t is the same width as int,
8960 when printing sizes. Print sizes using an unsigned format.
8961 Problem reported by Frank Heckenbach in
8962 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
8963
8964 Port to Forte Developer 7 C compiler.
8965 * data/glr.c (struct YYLTYPE): If locations are not being used,
8966 declare a single dummy member, as empty structs do not conform
8967 to the C standard.
8968 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
8969 the Forte Developer 7 C compiler complains that end-of-loop
8970 code is not reached.
8971
89722003-06-17 Paul Eggert <eggert@twinsun.com>
8973
8974 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
8975 avoid warnings from picky compilers about redefinition of PARAMS.
8976
89772003-06-17 Paul Eggert <eggert@twinsun.com>
8978
8979 Version 1.875b.
8980
8981 * NEWS: Document 1.875b.
8982
8983 * lib/bbitset.h: Do not include config.h; that's the includer's job.
8984 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
8985 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
8986 Don't use 'index' in comments, as it's a builtin fn on some hosts.
8987 * lib/bitset_stats.c: Include gettext.h unconditionally, as
8988 per recent gettext manual's suggestion.
8989 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
8990 Use prototypes, not old-style definitions.
8991 * lib/lbitset.c (lbitset_unused_clear): Likewise.
8992 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
8993 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
8994 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
8995 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
8996 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
8997 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
8998 vbitset_or_and_cmp, vbitset_copy): Likewise.
8999
9000 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9001 Do not include <stdlib.h>.
9002 (PARAMS): Define unconditionally for C89.
9003 (ATTRIBUTE_NORETURN): Remove.
9004 (ATTRIBUTE_UNUSED): Define unconditionally.
9005
9006 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
9007 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
9008 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9009 * lib/vbitset.c, lib/vbitset.h: New files.
9010 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9011 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9012 from libbitset.
9013
9014 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9015 `How Can I Reset @code{yyparse}', since texinfo does not allow
9016 arbitrary @ in node names.
9017
9018 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9019 shouldn't be needed according to the gettext 0.12.1 documentation
9020 but which seem to be needed anyway: codeset.m4 glibc21.m4
9021 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
9022 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
9023 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
9024
9025 * lib/.cvsignore: Add stdbool.h.
9026 * m4/.cvsignore: Add nls.m4, po.m4.
9027
9028 Upgrade to CVS gnulib.
9029 * stdbool_.h: File renamed from stdbool.h.in.
9030 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9031 AC_HEADER_STDBOOL.
9032 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9033 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9034 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9035 (MOSTLYCLEANFILES): New var.
9036 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9037 (stdbool.h): New rule.
9038 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9039 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9040 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9041 m4/quote.m4: Upgrade to today's gnulib.
9042
9043 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9044 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9045 the tests right now.
9046 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9047 yyerror are declared before use; C99 requires this.
9048
90492003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9050
9051 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9052 first.
9053 (yyrecoverSyntaxError): Correct the logic for setting and testing
9054 yyerrState.
9055 Correct comment on handling EOF.
9056 Allow states with only a default reduction, rather than failing
9057 (I can't quite reconstruct why these were not allowed before).
9058
9059 Fixes to avoid problem that $-N rules in GLR parsers can cause
9060 buffer overruns, corrupting state.
9061
9062 * src/output.c (prepare_rules): Output max_left_semantic_context
9063 definition.
9064 * src/reader.h (max_left_semantic_context): New variable declaration.
9065 * src/scan-gram.l (max_left_semantic_context): Define.
9066 (handle_action_dollar): Update max_left_semantic_context.
9067 * data/glr.c (YYMAXLEFT): New definition.
9068 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9069 (yyresolveAction): Ditto.
9070
9071 Fixes to problems with location handling in GLR parsers reported by
9072 Frank Heckenbach (2003/06/05).
9073
9074 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9075 (YYRHSLOC): Add parentheses, and define only if locations used.
9076 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9077 locations not used.
9078 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9079 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
9080
9081 * tests/cxx-type.at: Exercise location information; update tests
9082 to differentiate output with and without locations.
9083 Remove forward declarations of yylex and yyerror---caused errors
9084 because default YYLTYPE not yet defined.
9085 Change semantic actions to compute strings, rather than printing
9086 them directly (to test proper passing of semantics values). Change
9087 output to prefix notation and update test data and expected results.
9088 (yylex): Track locations.
9089 (stmtMerge): Return value rather than printing, and include arguments
9090 in value.
9091
90922003-06-03 Paul Eggert <eggert@twinsun.com>
9093
9094 Avoid warnings generated by GCC 2.95.4 when Bison is
9095 configured with --enable-gcc-warnings.
9096 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9097 yy::]b4_parser_class_name[::translate_,
9098 yy::Stack::operator[] (unsigned),
9099 yy::Stack::operator[] (unsigned) const,
9100 yy::Slice::operator[] (unsigned),
9101 yy::Slice::operator[] (unsigned) const):
9102 Rename local vars to avoid warnings.
9103 * tests/glr-regression.at (Improper handling of embedded actions
9104 and $-N in GLR parsers): Remove unused local variable from yylex.
9105 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9106 (void) as arg when not pure, since we now assume C89 when building
9107 Bison. Pacify GCC by using parameter.
9108
91092003-06-02 Paul Eggert <eggert@twinsun.com>
9110
9111 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9112 yy::Location::lines, yy::Location::columns): Rename arguments
9113 to avoid shadowing; this removes a warning generated by GCC 3.3.
9114
91152003-06-01 Paul Eggert <eggert@twinsun.com>
9116
9117 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9118 to g++, as GCC 3.3 complains if you do it.
9119 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9120 everything that WARNING_CFLAGS has, except omit warnings
9121 not suitable for C++.
9122 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9123 * tests/atlocal.in (CXXFLAGS): New var.
9124 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9125
9126 Fix a GLR parser bug I reported in February; see
9127 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
9128 The problem was that GLR parsers did not conform to the C standard,
9129 because actions like { $1 = $2 + $3; } expanded to expressions
9130 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9131 to a local variable. The C standard says that expressions
9132 like (var = f ()) + (var = f ()) have undefined behavior.
9133 Another problem was that GCC sometimes issues warnings that
9134 yyfill and its parameters are unused.
9135
9136 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9137 as possibly unused.
9138 (yyfill): New function.
9139 (YYFILL): Use it.
9140 (yyuserAction): Change type of yynormal to bool, so that it matches
9141 the new yyfill signature. Mark it as possibly unused.
9142
9143
9144 Follow up on a bug I reported in February, where a Bison-generated
9145 parser can loop. Provide a test case and a fix for yacc.c. I
9146 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9147 The original bug report is in:
9148 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
9149
9150 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9151 macro's size was becoming unwieldy.
9152 (yyerrlab): Do not discard an empty lookahead symbol, as this
9153 might destroy garbage.
9154 (yyerrorlab): New label, with the old contents of YYERROR,
9155 plus the following change: pop the stack of rhs corresponding
9156 to the production that invoked YYERROR. That is how Yacc
9157 behaves, and POSIX requires this behavior.
9158 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9159 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9160 Define 'alarm' to do nothing if unistd.h is not available.
9161 Add a new rule "exp: '-' error;" to test the above change to
9162 data/yacc.c. Use 'alarm' to abort any test taking longer than
9163 10 seconds, as it's probably looping.
9164 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9165 Also, the new yacc.c generates two fewer diagnostics for an
9166 existing test.
9167
91682003-05-24 Paul Eggert <eggert@twinsun.com>
9169
9170 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9171 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9172 This fixes a problem reported by John Bowman when the Compaq/HP
9173 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9174 -ansi -Wall -gall).
9175 * data/yacc.c (union yyalloc): Likewise.
9176 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
9177
9178 Switch from 'int' to 'bool' where that makes sense.
9179
9180 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9181 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9182 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9183 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9184 Return or accept bool, not int. All callers changed.
9185 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9186 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9187 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9188 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9189 bitset_or_and_cmp_): Likewise.
9190 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9191 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9192 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9193 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9194 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9195 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9196 bitset_stats_or_and_cmp): Likewise.
9197 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9198 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9199 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9200 ebitset_xor_cmp): Likewise.
9201 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9202 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9203 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9204 lbitset_xor_cmp): Likewise.
9205 * lib/bbitset.h: Include <stdbool.h>.
9206 (struct bitset_vtable): The following members now return bool, not
9207 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9208 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9209 or_and_cmp).
9210 * src/conflicts.c (count_rr_conflicts): Likewise.
9211 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9212 All uses changed.
9213 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9214 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9215 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9216 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9217 graph_flag): Likewise.
9218 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9219 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9220 graph_flag): Likewise.
9221 * src/output.c (error_verbose): Likewise.
9222 * src/output.h (error_verbose): Likewise.
9223 * src/reader.c (start_flag, typed): Likewise.
9224 * src/reader.h (typed): Likewise.
9225 * src/getargs.c (LOCATIONS_OPTION): New constant.
9226 (long_options, getargs): Use it.
9227 * src/lalr.c (build_relations): Use bool, not int.
9228 * src/nullable.c (nullable_compute): Likewise.
9229 * src/print.c (print_reductions): Likewise.
9230 * src/tables.c (action_row, pack_vector): Likewise.
9231 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9232 * src/output.c (prepare): Use it.
9233 * src/output.c (token_definitions_output,
9234 symbol_destructors_output, symbol_destructors_output): Use string,
9235 not boolean integer, to keep track of whether to output separator.
9236 * src/print_graph.c (print_core): Likewise.
9237 * src/state.c (state_rule_lookaheads_print): Likewise.
9238
9239 * config/install-sh: Sync from automake 1.7.5.
9240
92412003-05-14 Paul Eggert <eggert@twinsun.com>
9242
9243 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9244 semicolon after a grammar declaration, in the interest of possible
9245 future changes to the Bison input language.
9246 Do not allow a stray semicolon at the start of the grammar.
9247 (rhses.1): Allow one or more semicolons after any rule, including
9248 just before "|" as required by POSIX.
9249 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9250 grammar.
9251
92522003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9253
9254 %parse-param support for lalr1.cc.
9255
9256 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9257 b4_cc_constructor_calls, b4_cc_constructor_call,
9258 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9259 definitions.
9260 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9261 parse-param arguments.
9262 (yy::b4_parser_class_name): Declare instance variables to
9263 hold parse-param arguments.
9264 * tests/calc.at: s/value/semantic_value/ because value clashes
9265 with a member of yy::b4_parser_class_name. Adjust C++ code
9266 to handle %parse-param. Enable %parse-param test in C++.
9267
92682003-05-12 Paul Eggert <eggert@twinsun.com>
9269
9270 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9271 English a bit. Fix fclose typo. Change "const char" to "char
9272 const", and use ANSI C rather than K&R for "main". Suggest
9273 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9274 and suggest yy_switch_to_buffer.
9275
92762003-05-05 Paul Eggert <eggert@twinsun.com>
9277
9278 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9279 C89. This avoids a diagnostic on compilers that define __STDC__
9280 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
9281 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9282
92832003-05-03 Paul Eggert <eggert@twinsun.com>
9284
9285 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9286 Do not overrun array bounds.
9287 This should fix a bug reported today by Olatunji Oluwabukunmi in
9288 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
9289
92902003-04-29 Akim Demaille <akim@epita.fr>
9291
9292 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9293 * src/getargs.c, src/getargs.h: here, as bool, not int.
9294 (nondeterministic_parser): New.
9295 * src/parse-gram.y, src/scan-gram.l: Support
9296 %nondeterministic-parser.
9297 * src/output.c (prepare): Use nondeterministic_parser instead
9298 of glr_parser where appropriate.
9299 * src/tables.c (conflict_row, action_row, save_row)
9300 (token_actions, token_actions, pack_vector): Ditto.
9301
93022003-04-29 Akim Demaille <akim@epita.fr>
9303
9304 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9305
93062003-04-29 Akim Demaille <akim@epita.fr>
9307
9308 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9309 with %pure-parser and %locations to exercise the patch from Yakov
9310 Markovitch below.
9311
93122003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9313
9314 * data/yacc.c: (b4_lex_param): Corrected for the case where
9315 %lex-param is provided and %pure-parser isn't.
9316
93172003-04-27 Paul Eggert <eggert@twinsun.com>
9318
9319 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
9320 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
9321 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9322 if it is not defined.
9323 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9324
93252003-04-26 Paul Eggert <eggert@twinsun.com>
9326
9327 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9328 Declare to be of type suitable for the ninf value itself, not of
9329 type suitable for the corresponding table, since the latter might
9330 be unsigned but the ninf value might be negative. This fixes a
9331 bug reported by Alexandre Duret-Lutz in
9332 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
9333
9334 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9335 invokes it. We shouldn't invoke it twice because it will attempt
9336 to put error.o in the archive twice. This fixes a glitch reported
9337 by Martin Mokrejs in
9338 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9339
93402003-04-21 Paul Eggert <eggert@twinsun.com>
9341
9342 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9343 to gnulib.
9344
93452003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9346
9347 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9348 Fix obvious typo that results in uncompilable GLR parsers
9349 when both %pure-parser and %locations are used. (trivial change)
9350
93512003-04-17 Paul Eggert <eggert@twinsun.com>
9352
9353 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9354 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9355 Do not insert the expected token via unput, as this runs afoul
9356 of a POSIX-compatibility bug in flex 2.5.31.
9357 All uses changed to BEGIN the parent state,
9358 since we no longer insert the expected token via unput.
9359 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9360 that is no longer emitted after the above change.
9361
9362 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9363 the first one. This change is from Paul Hilfinger, and it fixes
9364 regression reported by Werner Lemberg in
9365 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9366
9367 (resolve_sr_conflict): Don't invoke state_errs_set
9368 unless one or more tokens have been explicitly made errors.
9369 Otherwise, the above change causes Bison to abort.
9370
9371 * tests/existing.at (GNU pic Grammar): New test case, taken from
9372 Lemberg's email.
9373
93742003-03-31 Akim Demaille <akim@epita.fr>
9375
9376 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9377
93782003-03-31 Akim Demaille <akim@epita.fr>
9379
9380 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9381 output.
9382
93832003-03-31 Akim Demaille <akim@epita.fr>
9384
9385 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9386 From Paul Hilfinger.
9387
93882003-03-29 Akim Demaille <akim@epita.fr>
9389
9390 * m4/error.m4: Do not put under dynamic conditions some code which
9391 expansion is under static control.
9392
93932003-03-29 Akim Demaille <akim@epita.fr>
9394
9395 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9396
93972003-03-29 Akim Demaille <akim@epita.fr>
9398
9399 * doc/bison.texinfo (Strings are Destroyed): New.
9400
94012003-03-13 Paul Eggert <eggert@twinsun.com>
9402
9403 * .cvsignore: Add configure.lineno.
9404 * src/.cvsignore: Add yacc.
9405 * tests/.cvsignore: Add testsuite.log.
9406 * doc/fdl.texi: Sync with latest FSF version.
9407
94082003-03-12 Paul Eggert <eggert@twinsun.com>
9409
9410 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9411 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9412 cursor, instead of leaving it undefined. This fixes a bug
9413 reported by Tim Van Holder in
9414 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9415 * tests/input.at (Torturing the Scanner): Test the scanner on
9416 an empty input file, which was Tim Van Holder's test case.
9417
9418 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9419 <sys/resource.h> can be included, include sys/time.h and
9420 sys/times.h first, if available. This works around the SunOS
9421 4.1.4 porting bug reported by Bruce Becker in
9422 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
9423
9424 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9425 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9426 AC_HEADER_SYS_WAIT.
9427
9428 Merge changes from gnulib. This was prompted because the CVS
9429 snapshot didn't build on Solaris 7 due to strnlen problems.
9430
9431 These changes need to be merged back into gnulib:
9432 * lib/hash.c: Include <stdbool.h> unconditionally.
9433 * m4/onceonly.m4 (m4_quote): New macro.
9434 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9435 Quote AC_FOREACH variable-expansions properly.
9436 The 2003-01-03 obstack.h change also needs merging.
9437 {end of changes requiring merging}
9438
9439 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9440 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9441 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9442 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9443 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9444 New files, imported from gnulib.
9445 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9446 above.
9447
9448 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9449 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9450 gnulib sources.
9451
9452 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9453 Add.
9454 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9455 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9456 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9457 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9458 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9459 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9460 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9461 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9462 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9463 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9464 (jm_PREREQ_ARGMATCH): Remove.
9465 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9466 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9467
9468 * src/system.h: Include <stdbool.h> unconditionally.
9469
9470 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9471 assuming at least C89 in the bitset code for some time now.
9472
94732003-03-03 Akim Demaille <akim@epita.fr>
9474
9475 * ro.po: New.
9476
94772003-03-02 Akim Demaille <akim@epita.fr>
9478
9479 * doc/bison.texinfo (Table of Symbols): Reactivate the
9480 documentation for %lex-param, and %parse-param.
9481
94822003-03-02 Akim Demaille <akim@epita.fr>
9483
9484 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9485 generate verbose error messages.
9486 Use the number of tokens as an upper bound in yytname, as it
9487 cannot be a non terminal.
9488
94892003-03-02 Akim Demaille <akim@epita.fr>
9490
9491 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9492 message.
9493
94942003-03-02 Akim Demaille <akim@epita.fr>
9495
9496 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9497 Use them to exercise yycheck overrun.
9498 Based on Andrew Suffield's grammar.
9499
95002003-03-02 Akim Demaille <akim@epita.fr>
9501
9502 Create tests/local.at for Bison generic testing macros.
9503
9504 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9505 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9506 This new file.
9507 * tests/calc.at (AT_CHECK_CALC): Adjust.
9508 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9509 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9510 * tests/local.at: here.
9511 (AT_COMPILE_CXX): Tags the tests using it as c++.
9512 Ignore the test if CXX is not functional.
9513
95142003-03-01 Paul Eggert <eggert@twinsun.com>
9515
9516 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9517 not loc->end, since loc->end might contain garbage and this leads
9518 to undefined behavior on some platforms.
9519 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9520 depend on *loc, so that the reader doesn't give the the false
9521 impression that *loc is initialized.
9522 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9523 does not survive the return.
9524
95252003-03-01 Akim Demaille <akim@epita.fr>
9526
9527 * src/scan-gram.l (code_start): Always initialize it when entering
9528 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9529 yylex invocation. An alternative would be making it static, but
9530 then it starts with the second %%'s beginning, instead of its end.
9531
95322003-02-28 Paul Eggert <eggert@twinsun.com>
9533
9534 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9535 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9536 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9537
95382003-02-26 Paul Eggert <eggert@twinsun.com>
9539
9540 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9541 Remove Sequent/Pyramid discussion (nobody uses them any more).
9542 Merge VMS and MS-DOS discussion; these ports may well be dead
9543 but let's keep mentioning them for now. Put <> around email
9544 addresses. Add copyright notice.
9545
95462003-02-24 Paul Eggert <eggert@twinsun.com>
9547
9548 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9549 to avoid collision with flex use of yylineno.
9550 Problem reported by Bruce Lilly in
9551 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9552 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9553 * data/yacc.c (yy_reduce_print): Likewise.
9554
9555 * config/depcomp: Sync with Automake 1.7.3.
9556
95572003-02-21 Akim Demaille <akim@epita.fr>
9558
9559 * data/lalr1.cc: Use temporary variables instead of casts to
9560 change integer types.
9561 Suggested by Paul Eggert.
9562
95632003-02-21 Akim Demaille <akim@epita.fr>
9564
9565 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9566 to avoid confusions with lalr1.cc's notion of Position.
9567 Suggested by Paul Eggert.
9568
95692003-02-20 Akim Demaille <akim@epita.fr>
9570
9571 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9572 before initial_columns.
9573 (location.hh): Use consistent variable names when defining the
9574 operator<<.
9575 Use "last" so that we subtract from Positions, not from unsigned.
9576
95772003-02-20 Akim Demaille <akim@epita.fr>
9578
9579 * data/lalr1.cc (position.hh): New subfile, including the extended
9580 and Doxygen'ed documentation of class Position.
9581 (location.hh): Use it.
9582 Document a` la Doxygen.
9583 With the help of Benoit Perrot.
9584
95852003-02-20 Akim Demaille <akim@epita.fr>
9586
9587 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9588 AT_YACC_IF.
9589 Redefine AT_YYERROR_SEES_LOC_IF using it.
9590 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9591 not defined.
9592 Don't use the location in yy::Parser::error_ and
9593 yy::Parser::print_ when not %locations.
9594 Activate more lalr1.cc tests.
9595
95962003-02-19 Akim Demaille <akim@epita.fr>
9597
9598 * data/lalr1.cc: When displaying a line number, be sure to make it
9599 an int.
9600
96012003-02-19 Akim Demaille <akim@epita.fr>
9602
9603 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9604 Remove, useless.
9605 (YYABORT, YYACCEPT, YYERROR): New.
9606 * tests/calc.at: Renable the lalr1.cc test.
9607
96082003-02-19 Akim Demaille <akim@epita.fr>
9609
9610 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9611 error recovery, mixing with/without pops and discarding of the
9612 lookahead.
9613 Exercise YYERROR.
9614 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9615
96162003-02-17 Paul Eggert <eggert@twinsun.com>
9617
9618 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9619 * tests/testsuite.at (AT_COMPILE): Use them.
9620 This fixes the testsuite problem reported by Robert Lentz in
9621 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9622
96232003-02-12 Paul Eggert <eggert@twinsun.com>
9624
9625 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9626 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9627 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9628 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9629 Check for malloc failure, for consistency with yacc.c.
9630 (yytname_size): Remove, for consistency with yacc.c.
9631
9632 The bug still remains in data/lalr1.cc, as I didn't have time
9633 to fix it there.
9634
96352003-02-06 Akim Demaille <akim@epita.fr>
9636
9637 * configure.ac (GXX): Rename as...
9638 (CXX): this, to keep the original Autoconf semantics.
9639 Require 2.57.
9640 * data/lalr1.cc: Fix b4_copyright invocations.
9641 If YYDEBUG is not defined, don't depend upon name_ being defined.
9642 (location.hh): Include string and iostream.
9643 (Position::filename): New member.
9644 (Position::Position ()): New.
9645 (operator<< (Position)): New.
9646 (operator- (Position, int)): New.
9647 (Location::first, Location::last): Rename as...
9648 (Location::begin, Location::end): these, to mock the conventional
9649 iterator names.
9650 (operator<< (Location)): New.
9651 * tests/atlocal.in (CXX): New.
9652 * tests/testsuite.at (AT_COMPILE_CXX): New.
9653 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9654 locations in a more synthetic way.
9655 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9656 lalr1.cc is used.
9657 Adjust the C locations to match those from Emacs: first column is
9658 column 0.
9659 Change all the expected results.
9660 Conform to the GCS: simplify the locations when applicable.
9661 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9662 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9663 these CPP macros with the m4 macros new defined by...
9664 (AT_CHECK_PUSHDEFS): this, i.e.:
9665 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9666 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9667 New macros.
9668 (AT_CHECK_POPDEFS): Undefine them.
9669 (AT_CHECK_CALC_LALR1_CC): New.
9670 Use it for the first lalr1.cc test.
9671
96722003-02-04 Akim Demaille <akim@epita.fr>
9673
9674 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9675 Location as is defined.
9676
96772003-02-04 Akim Demaille <akim@epita.fr>
9678
9679 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9680 name_ being defined.
9681
96822003-02-03 Paul Eggert <eggert@twinsun.com>
9683
9684 * src/gram.h (start_symbol): Remove unused decl.
9685
9686 Use more-consistent naming conventions for local vars.
9687
9688 * src/derives.c (derives_compute): Change type of local var from
9689 int to rule_number.
9690 * src/gram.c (grammar_rules_partial_print): Likewise.
9691 * src/print.c (print_core): Likewise.
9692 * src/reduce.c (reduce_grammar_tables): Likewise.
9693
9694 * src/gram.c (grammar_dump): Change name of item_number *
9695 local var from r to rp.
9696 * src/nullable.c (nullable_compute): Likewise.
9697
9698 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9699
9700 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9701 for symbol or symbol_number var.
9702 * src/reader.c (grammar_start_symbol_set): Likewise.
9703 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9704 Likewise.
9705 * src/state.c (transitions_to): Likewise.
9706 * src/state.h: Likewise.
9707 * src/tables.c (symbol_number_to_vector_number): Likewise.
9708
9709 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9710 char * var.
9711
9712 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9713 var.
9714
9715 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9716 var.
9717
9718 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9719 Use str, not s, for char * var. Use ch, not c, for character var.
9720 Use size for size var.
9721
9722 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9723 char * var.
9724 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9725 uniqstr var.
9726 * src/uniqstr.h: Likewise.
9727
9728 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9729 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9730 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9731 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9732 param to have same name as that of enum, so that we don't use
9733 "s" to stand for a non-state.
9734
97352003-02-02 Akim Demaille <akim@epita.fr>
9736
9737 * src/scan-skel.l: Scan more than one inert character per yylex
9738 invocation.
9739
97402003-02-01 Paul Eggert <eggert@twinsun.com>
9741
9742 Version 1.875a.
9743
9744 * po/LINGUAS: Add ms.
9745
97462003-01-30 Akim Demaille <akim@epita.fr>
9747
9748 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9749
97502003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9751
9752 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9753 of $1.
9754
9755 Changes in response to error report by S. Eken: GLR mode does not
9756 handle negative $ indices or $ indices in embedded rules correctly.
9757 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9758
9759 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9760 (b4_rhs_location): Ditto.
9761 (yyfill): New function to copy from stack tree into array
9762 incrementally.
9763 (yyuserAction): Modify to allow incremental move of semantic values
9764 to rhs array when in GLR mode.
9765 Define YYFILL to use in user-defined actions to fill semantic array
9766 as needed.
9767 Remove dummy use of yystack, as there is now a guaranteed use.
9768 (yydoAction): Modify to allow incremental move of semantic values
9769 to rhs array when in GLR mode.
9770 (yyresolveAction): Ditto.
9771 (yyglrShiftDefer): Update comment.
9772 (yyresolveStates): Use X == NULL for pointers, not !X.
9773 (yyglrReduce): Ditto.
9774 (yydoAction): Ditto
9775
9776 * tests/glr-regr1.at: Rename to ...
9777 * tests/glr-regression.at: Add new regression test for the problems
9778 described above (adapted from S. Eken).
9779 Update copyright notice.
9780 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9781 * tests/Makefile.am: Ditto.
9782
97832003-01-28 Paul Eggert <eggert@twinsun.com>
9784
9785 * data/lalr1.cc: Do not use @output_header_name@ unless
9786 b4_defines_flag is set. This fixes two bugs reported by
9787 Tim Van Holder in
9788 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9789 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9790
97912003-01-21 Paul Eggert <eggert@twinsun.com>
9792
9793 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9794 we don't need to worry about yyerrlab1 being reported as an
9795 "unused label" by non-GCC C compilers. The downside is that if
9796 locations are used then a couple of statements are duplicated each
9797 time YYERROR is invoked, but the upside is that the warnings
9798 should vanish.
9799 (yyerrlab1): Move code to YERROR.
9800 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9801 This reverts some of the 2002-12-27 change.
9802
98032003-01-17 Paul Eggert <eggert@twinsun.com>
9804
9805 * src/output.c (symbol_printers_output): Fix typo that led
9806 to core dump. Problem reported by Antonio Rus in
9807 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9808
98092003-01-13 Akim Demaille <akim@epita.fr>,
9810 Quoc Peyrot <chojin@lrde.epita.fr>,
9811 Robert Anisko <anisko_r@lrde.epita.fr>
9812
9813 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9814 when the stacks contain one element, as the loop would otherwise
9815 free the last state, and then use the top state (the one we just
9816 popped). This means that the initial elements will not be freed
9817 explicitly, as is the case in yacc.c; it is not a problem, as
9818 these elements have fake values.
9819
98202003-01-11 Paul Eggert <eggert@twinsun.com>
9821
9822 * NEWS: %expect-violations are now just warnings, reverting
9823 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9824 bootstrapping problem reported by Matthias Klose; see
9825 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9826 * src/conflicts.c (conflicts_print): Likewise.
9827 * tests/conflicts.at (%expect not enough, %expect too much,
9828 %expect with reduce conflicts): Likewise.
9829 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9830 that the warning is enabled if the number of conflicts changes
9831 (not necessarily increases).
9832
9833 * src/getargs.c (version): Update copyright year.
9834
98352003-01-09 Akim Demaille <akim@epita.fr>
9836
9837 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9838
98392003-01-08 Paul Eggert <eggert@twinsun.com>
9840
9841 * Makefile.maint (WGETFLAGS):
9842 New macro, containing "-C off" to disable proxy caches.
9843 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9844 (rel-check): Use $(WGET) instead of wget.
9845
98462003-01-06 Paul Eggert <eggert@twinsun.com>
9847
9848 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9849 the GLR paper of Scott, Johnstone and Hussain.
9850
98512003-01-04 Paul Eggert <eggert@twinsun.com>
9852
9853 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9854 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9855 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9856 (EXTRA_LIBRARIES): New var, for liby.a.
9857 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9858 (EXTRA_SCRIPTS): New var, for yacc.
9859
9860 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9861 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9862 Problem reported by Nelson H. F. Beebe.
9863
98642003-01-03 Paul Eggert <eggert@twinsun.com>
9865
9866 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9867 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9868 when compiling Bison 1.875's `bitset bset = obstack_alloc
9869 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9870
9871 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9872 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9873 grow to a huge size with typical invocation.
9874
9875 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9876 Use the pattern recommended by Autoconf 2.57, except also protect
9877 against double-definition.
9878 * src/system.h: Likewise.
9879 Portability issues reported by Nelson H. F. Beebe.
9880
9881 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9882 All uses changed. Provide a definition in both C and C++.
9883 (yytrue, yyfalse): Define even if defined (__cplusplus).
9884
9885 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9886 Reported by Nelson H. F. Beebe.
9887
9888 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9889
98902003-01-02 Paul Eggert <eggert@twinsun.com>
9891
9892 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9893 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9894 Bug reported by Nelson H. F. Beebe.
9895
98962003-01-01 Paul Eggert <eggert@twinsun.com>
9897
9898 * Version 1.875.
9899
99002002-12-30 Paul Eggert <eggert@twinsun.com>
9901
9902 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9903 Moved here from...
9904 (<INITIAL>","): Here. This causes stray "," to be treated
9905 more uniformly.
9906
9907 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9908 last brace in braced code when not in Yacc mode, for compatibility
9909 with Bison 1.35. This resurrects the 2001-12-15 patch to
9910 src/reader.c.
9911
9912 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9913 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9914
99152002-12-28 Paul Eggert <eggert@twinsun.com>
9916
9917 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9918 that of SYM's type. This fixes Debian bug 168069, reported by
9919 Thomas Olsson.
9920
99212002-12-28 Paul Eggert <eggert@twinsun.com>
9922
9923 Version 1.75f.
9924
9925 Switch back to the Yacc style of conflict reports, undoing some
9926 of the 2002-07-30 change.
9927 * doc/bison.texinfo (Understanding): Use Yacc style for
9928 conflict reports. Also, use new way of locating rules.
9929 * src/conflicts.c (conflict_report):
9930 Renamed from conflict_report_yacc, removing the old
9931 'conflict_report'. Translate the entire conflict report at once,
9932 so that we don't assume that "," has the same interpretation in
9933 all languages.
9934 (conflicts_output): Use Yacc-style conflict report for each state,
9935 instead of our more-complicated style.
9936 (conflicts_print): Use Yacc-style conflict report, except print
9937 the input file name when not emulating Yacc.
9938 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9939 Conflicted Reduction, %expect not enough, %expect too much,
9940 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9941 * tests/existing.at (GNU Cim Grammar): Likewise.
9942 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9943
9944 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9945 fatal): Don't invoke fflush; it's not needed and it might even be
9946 harmful for stdout, as stdout might not be open.
9947 * src/reduce.c (reduce_print): Likewise.
9948
99492002-12-27 Paul Eggert <eggert@twinsun.com>
9950
9951 Fix a bug where error locations were not being recorded correctly.
9952 This problem was originally reported by Paul Hilfinger in
9953 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
9954
9955 * data/yacc.c (yyparse): New local var yylerrsp, to record the
9956 top of the location stack's error locations.
9957 (yyerrlab): Set it. When discarding a token, push its location
9958 onto yylerrsp so that we don't lose track of the error's end.
9959 (yyerrlab1): Now is only the target of YYERROR, so that we can
9960 properly record the location of the action that failed. For GCC
9961 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
9962 GCC warning about yyerrlab1 being unused if YYERROR is unused.
9963 (yyerrlab2): New label, which yyerrlab now falls through to.
9964 Compute the error's location by applying YYLLOC_DEFAULT to
9965 the locations of all the symbols that went into the error.
9966 * doc/bison.texinfo (Location Default Action): Mention that
9967 YYLLOC_DEFAULT is also invoked for syntax errors.
9968 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9969 Error locations include the locations of all the tokens that were
9970 discarded, not just the last token.
9971
99722002-12-26 Paul Eggert <eggert@twinsun.com>
9973
9974 * src/files.c: Include quote.h.
9975 (compute_output_file_names): Warn if we detect conflicting
9976 outputs to the same file. This should catch the misunderstanding
9977 exemplified by Debian Bug 165349, reported by Bruce Stephens..
9978
9979 * src/conflicts.c (conflicts_print): If the user specifies
9980 "%expect N", report an error if there are any reduce/reduce
9981 conflicts. This is what the manual says should happen.
9982 This fixes Debian bug 130890, reported by Anthony DeRobertis.
9983 * tests/conflicts.at (%expect with reduce conflicts): New test.
9984
9985 Don't use m4_include on relative file names, as it doesn't work as
9986 desired if there happens to be a file with that name under ".".
9987
9988 * m4sugar/version.m4: Remove; it was included but it wasn't used.
9989 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
9990 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
9991 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
9992 * src/output.c (output_skeleton): Use full path names when
9993 specifying a file to include; don't rely on include path, as
9994 it's unreliable when the working file contains a file with
9995 that name.
9996
99972002-12-25 Paul Eggert <eggert@twinsun.com>
9998
9999 Remove obsolete references to bison.simple and bison.hairy.
10000 Problem mentioned by Aubin Mahe in
10001 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
10002 * data/glr.c: Comment fix.
10003 * doc/bison.1: Remove references. Also, mention "yacc".
10004
10005 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10006 with -g option.
10007
10008 * src/parse-gram.y (declaration): Use enum "report_states" rather
10009 than its numeric value 1.
10010
10011 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10012 opening a new one. This fixes Debian bug 165349, reported by
10013 Bruce Stephens.
10014
100152002-12-24 Paul Eggert <eggert@twinsun.com>
10016
10017 Version 1.75e.
10018
10019 * Makefile.maint (cvs-update): Don't assume that the shell
10020 supports $(...), as Solaris sh doesn't.
10021
10022 * src/parse-gram.y (lloc_default): Remove test for empty
10023 nonterminals at the end, since it didn't change the result.
10024
100252002-12-24 Paul Eggert <eggert@twinsun.com>
10026
10027 If the user does not define YYSTYPE as a macro, Bison now declares it
10028 using typedef instead of defining it as a macro. POSIX requires this.
10029 For consistency, YYLTYPE is also declared instead of defined.
10030
10031 %union directives can now have a tag before the `{', e.g., the
10032 directive `%union foo {...}' now generates the C code
10033 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10034 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10035 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10036 instead of `yyltype'.
10037
10038 `yystype' and `yyltype' are now obsolescent macros instead of being
10039 typedefs or tags; they are no longer documented and will be
10040 withdrawn in a future release.
10041
10042 * data/glr.c (b4_location_type): Remove.
10043 (YYSTYPE): Renamed from yystype.
10044 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10045 (struct YYLTYPE): Renamed from struct yyltype.
10046 (YYLTYPE): Renamed from yyltype.
10047 (yyltype, yystype): New (and obsolescent) macros,
10048 for backward compatibility.
10049 * data/yacc.c: Likewise.
10050
10051 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10052 does not specify a union tag. This is for compatibility with
10053 Solaris 9 yacc.
10054
10055 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10056 const *, since it is now modified by stripping surrounding { }.
10057 (current_braced_code): Remove.
10058 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10059 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10060 trailing " {...}". Now of type <chars>.
10061 (grammar_declaration): Adjust to bundled tokens.
10062 (code_content): Remove; stripping is now done by add_param.
10063 (print_token_value): Print contents of bundled tokens.
10064 (token_name): New function.
10065
10066 * src/reader.h (braced_code, current_braced_code): Remove.
10067 (token_name): New decl.
10068
10069 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10070 token_type, not braced_code code_kind. All uses changed.
10071 (SC_PRE_CODE): New state, for scanning after a keyword that
10072 has (or usually has) an immediately-following braced code.
10073 (token_type): New local var, to keep track of which token type
10074 to return when scanning braced code.
10075 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
10076 <INITIAL>"%parse-param", <INITIAL>"%printer",
10077 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10078 instead of returning a token type immediately.
10079 (<INITIAL>"{"): Set token type.
10080 (<SC_BRACED_CODE>"}"): Use it.
10081 (handle_action_dollar, handle_action_at): Now returns bool
10082 indicating success. Fail if ! current_rule; this prevents a core dump.
10083 (handle_symbol_code_dollar, handle_symbol_code_at):
10084 Remove; merge body into caller.
10085 (handle_dollar, handle_at): Complain in invalid contexts.
10086
10087 * NEWS, doc/bison.texinfo: Document the above.
10088 * NEWS: Fix years and program names in copyright notice.
10089
100902002-12-17 Paul Eggert <eggert@twinsun.com>
10091
10092 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10093 Reporting, Table of Symbols): Omit mentions of %lex-param and
10094 %parse-param from the documentation for now.
10095
100962002-12-15 Paul Eggert <eggert@twinsun.com>
10097
10098 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10099 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10100 lookahead symbol, and which sets yychar in parser actions) and it
10101 disagreed with the Bison documentation. Bug
10102 reported by Andrew Walrond.
10103
10104 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10105 as the caller now does that.
10106 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10107 (YYEMPTY): Parenthesize right hand side, since others use it.
10108 (yyparse): Don't assume that our generated code is the only code
10109 that sets yychar.
10110
101112002-12-13 Paul Eggert <eggert@twinsun.com>
10112
10113 Version 1.75d.
10114
10115 POSIX requires a "yacc" command.
10116 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10117 (MOSTLYCLEANFILES): Add yacc.
10118 (yacc): New rule.
10119 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
10120 as an alias for bison y.
10121
10122 * po/LINGUAS: Add da.
10123
10124 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10125 problem with latest <getopt.h>.
10126 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10127
10128 * doc/fdl.texi: Upgrade to 1.2.
10129 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10130 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10131 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10132 gnulib.
10133 * config/install-sh: Sync with autotools.
10134
10135 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
10136 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10137 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10138 locations are requested.
10139 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10140 locations are requested.
10141
101422002-12-12 Paul Eggert <eggert@twinsun.com>
10143
10144 Remove unportable casts and storage allocation tricks.
10145 While we're at it, remove almost all casts, since they
10146 usually aren't needed and are a sign of trouble.
10147
10148 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10149
10150 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10151 the pointer DSET returned by malloc; this isn't portable.
10152 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10153 Similarly for DERIVES.
10154 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10155 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10156 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10157
10158 * src/derives.c (derives_compute): Do not bother invoking
10159 int_of_rule_number, since rule numbers are integers.
10160
10161 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10162 rather than XMALLOC (char, N).
10163
10164 * src/files.c (filename_split): Rewrite to avoid cast.
10165
10166 * src/gram.h (symbol_number_as_item_number,
10167 item_number_as_symbol_number, rule_number_as_item_number,
10168 item_number_as_rule_number):
10169 Now inline functions rather than macros, to avoid casts.
10170 * src/state.h (state_number_as_int): Likewise.
10171 * src/tables.c (state_number_to_vector_number,
10172 symbol_number_to_vector_number): Likewise.
10173
10174 * src/gram.h (int_of_rule_number): Remove; no longer used.
10175
10176 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10177 since the resulting storage is always stored into.
10178
10179 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10180 where it's needed.
10181
10182 * src/muscle_tab.c (muscle_m4_output):
10183 Now inline. Return bool, not int.
10184 * src/state.c (state_compare): Likewise.
10185 * src/symtab.c (symbol_check_defined,
10186 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10187 hash_compare_symbol, hash_symbol):
10188 Likewise.
10189 * src/uniqstr.c (uniqstr_print): Likewise.
10190 * src/muscle_tab.c (muscle_m4_output_processor):
10191 New function, to avoid casts.
10192 * src/state.c (state_comparator, stage_hasher): Likewise.
10193 * src/symtab.c (symbol_check_defined_processor,
10194 symbol_check_alias_consistency_processor, symbol_pack_processor,
10195 symbol_translation_processor, hash_symbol_comparator,
10196 hash_symbol_hasher): Likewise.
10197 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10198 * src/muscle_tab.c (muscles_m4_output):
10199 Use new functions instead of casting old functions unportably.
10200 * src/state.c (state_hash_new): Likewise.
10201 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10202 symbols_token_translations_init):
10203 Likewise.
10204 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10205
10206 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10207 var instead of casting to long, to avoid casts.
10208 (prepare_states): Use MALLOC rather than alloca, so that we don't
10209 have to worry about alloca.
10210 * src/state.c (state_hash_lookup): Likewise.
10211
10212 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10213 local var instead of casting to unsigned char, to avoid casts.
10214
10215 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10216 STATE_ALLOC): Remove.
10217 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10218 rather than calloc, and use offsetof to avoid allocating slightly
10219 too much storage.
10220 (state_new): Initialize all members.
10221
10222 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10223
10224 * src/symtab.c (symbol_free): Remove; unused.
10225 (symbol_get): Remove cast in lhs of assignment.
10226 (symbols_do): Now static. Accept generic arguments, not
10227 hashing-related ones.
10228
10229 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10230 (symbol_processor): Remove.
10231 (symbols_do): Remove decl; now static.
10232
10233 * src/system.h (alloca): Remove; decl no longer needed.
10234 (<stddef.h>): Include, for offsetof.
10235 (<inttypes.>, <stdint.h>): Include if available.
10236 (uintptr_t): New type, if system lacks it.
10237 (CALLOC, MALLOC, REALLOC): New macros.
10238 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10239 new macros.
10240
10241 * src/tables.c (table_size): Now int, to pacify GCC.
10242 (table_grow, table_ninf_remap): Use signed table size.
10243 (save_row): Don't bother initializing locals when not needed.
10244 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10245 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10246
10247 * src/vcg.h: Correct misspellings.
10248
10249 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10250
10251
10252 * src/getargs.c (getargs): Don't assume EOF == -1.
10253
102542002-12-09 Paul Eggert <eggert@twinsun.com>
10255
10256 Change identifier spellings to avoid collisions with names
10257 that are reserved by POSIX.
10258
10259 Don't use names ending in _t, since POSIX reserves them.
10260 For consistency, remove _e and _s endings -- they're weren't
10261 needed to remove ambiguity. All uses changed.
10262 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10263 turn was just renamed from struniq_t.
10264 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10265 which in turn was just renamed from struniq_processor_t.
10266 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10267 in turn was renamed from hash_compare_struniq_t.
10268 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10269 (state_list): Renamed from state_list_t.
10270 * src/assoc.h (assoc): Renamed from assoc_t.
10271 * src/conflicts.c (enum conflict_resolution): Renamed from
10272 enum conflict_resolution_e.
10273 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10274 (rule_list): Renamed from rule_list_t.
10275 * src/getargs.h (enum trace): Renamed from enum trace_e.
10276 (enum report): Renamed from enum report_e.
10277 * src/gram.h (item_number): Renamed from item_number_t.
10278 (rule_number): Renamed from rule_number_t.
10279 (struct rule_s): Remove the "rule_s" part; not used.
10280 (rule): Renamed from rule_t.
10281 (rule_filter): Renamed from rule_filter_t.
10282 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10283 (goto_list): Renamed from goto_list_t.
10284 * src/lalr.h (goto_number): Renamed from goto_number_t.
10285 * src/location.h (location): Renamed from location_t.
10286 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10287 and moved here from:
10288 * src/muscle_tab.h (muscle_entry_t): here.
10289 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10290 (rule_list): Renamed from rule_list_t.
10291 * src/print_graph.c (static_graph): Renamed from graph.
10292 * src/reader.h (braced_code): Renamed from braced_code_t.
10293 Remove brace_code_e tag.
10294 * src/relation.h (relation_node): Renamed from relation_node_t.
10295 (relation_nodes): Renamed from relation_nodes_t.
10296 (relation): Renamed from relation_t.
10297 * src/state.h (state_number): Renamed from state_number_t.
10298 (struct state): Renamed from struct state_s.
10299 (state): Renamed from state_t.
10300 (transitions): Renamed from transitions_t. Unused (and
10301 misspelled) transtion_s tag removed.
10302 (errs): Renamed from errs_t. Unused errs_s tag removed.
10303 (reductions): Renamed from reductions_t. Unused tag
10304 reductions_s removed.
10305 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10306 (struct symbol_list): Renamed from struct symbol_list_s.
10307 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10308 (struct symbol): Renamed from struct symbol_s.
10309 (symbol): Renamed from symbol_t.
10310 * src/tables.c (vector_number): Renamed from vector_number_t.
10311 (action_number): Renamed from action_t.
10312 * src/tables.h (base_number): Renamed from base_t.
10313 * src/vcg.h (enum color): Renamed from enum color_e.
10314 (enum textmode): Renamed from enum textmode_e.
10315 (enum shape): Renamed from enum shape_e.
10316 (struct colorentry): Renamed from struct colorentry_s.
10317 (struct classname): Renamed from struct classname_s.
10318 (struct infoname): Renamed from struct infoname_s.
10319 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10320 (enum decision): Renamed from enum decision_e.
10321 (enum orientation): Renamed from enum orientation_e.
10322 (enum alignment): Renamed from enum alignment_e.
10323 (enum arrow_mode): Renamed from enum arrow_mode_e.
10324 (enum crossing_type): Renamed from enum crossing_type_e.
10325 (enum view): Renamed from enum view_e.
10326 (struct node): Renamed from struct node_s.
10327 (node): Renamed from node_t.
10328 (enum linestyle): Renamed from enum linestyle_e.
10329 (enum arrowstyle): Renamed from enum arrowstyle_e.
10330 (struct edge): Renamed from struct edge.
10331 (edge): Renamed from edge_t.
10332 (struct graph): Renamed from struct graph_s.
10333 (graph): Renamed from graph_t.
10334 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10335 Rename value_t -> value.
10336 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10337 value_t_as_yystype -> value_as_yystype.
10338
10339 Don't include <errno.h> in the mainstream code, since it
10340 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10341 * lib/get-errno.c, lib/get-errno.h: New files.
10342 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10343 get-errno.c.
10344 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10345 * src/output.c (output_skeleton): Likewise.
10346 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10347 instead of errno.
10348 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10349 Likewise.
10350 (handle_action_dollar, handle_action_at): Likewise.
10351 * src/system.h: Do not include <errno.h>.
10352 (TAB_EXT): Renamed from EXT_TAB.
10353 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10354
10355 Avoid str[a-z]*, since <string.h> reserves that name space.
10356 Change all instances of "struniq" in names to "uniqstr", and
10357 likewise for "STRUNIQ" and "UNIQSTR".
10358 * src/uniqstr.c: Renamed from src/struniq.c.
10359 * src/uniqstr.h: Renamed from src/struniq.h.
10360 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10361 * src/files.c (strsuffix): Remove; unused.
10362 (concat2): Renamed from stringappend. Now static.
10363 * src/files.h (strsuffix, stringappend): Remove; unused.
10364 * src/parse-gram.y (<chars>): Renamed from <string>.
10365 (<uniqstr>): Renamed from <struniq>.
10366 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10367 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10368 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10369 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10370 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10371 (N_EXPAND): Renamed from N_STRETCH.
10372
10373 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10374 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10375 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10376 Remove; unused.
10377 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10378 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10379 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10380 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10381 (BASE_MAXIMUM): Renamed from BASE_MAX.
10382 (BASE_MINIMUM): Renamed from BASE_MIN.
10383 (ACTION_MAX): Remove; unused.
10384 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10385 Unnecessary casts removed from above defines.
10386
10387
10388 Fix misspelling in names.
10389 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10390 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10391 G_NODE_ALIGNEMENT.
10392
10393
10394 * lib/timevar.c (timevar_report): Renamed from time_report,
10395 for consistency with other names.
10396 * lib/timevar.h (timevar_report): New decl.
10397 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10398
10399
10400 Sort include-file uses.
10401
10402 Reorder all include files under src to be in the order "system.h".
10403 then the ../lib include files in angle brackets (alphabetized),
10404 then the . include files in double-quotes (alphabetized). Fix
10405 dependency breakages encountered in this process, as follows:
10406 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10407 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10408 * src/state.h: Include "symtab.h".
10409
104102002-12-08 Paul Eggert <eggert@twinsun.com>
10411
10412 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10413 since this causes problems when __file__ contains character
10414 sequences like "@" that are treated specially by src/scan-skel.l.
10415 Instead, just use the file's basename. This fixes the bug
10416 reported by Martin Mokrejs in
10417 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10418
104192002-12-06 Paul Eggert <eggert@twinsun.com>
10420
10421 Add support for rules that do not have trailing semicolons, as
10422 POSIX requires. Improve the quality of locations in Bison
10423 diagnostics.
10424
10425 * src/location.c: Include <quotearg.h>.
10426 (empty_location): Now const.
10427 (location_print): New function. Follow the recommendation of the
10428 GNU Coding Standards for locations that span file boundaries.
10429 * src/location.h: Do not include <quotearg.h>; no longer needed.
10430 (boundary): New type.
10431 (location_t): Use it. This allows locations to span file boundaries.
10432 All member uses changed: file -> start.file or end.file (as needed),
10433 first_line -> start.line, first_column -> start.column,
10434 last_line -> end.line, last_column -> end.column.
10435 (equal_boundaries): New function.
10436 (LOCATION_RESET, LOCATION_STEP): Remove.
10437 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10438 (empty_location): Now const.
10439 (location_print): New decl.
10440 * src/parse-gram.y (lloc_default): New function, which handles
10441 empty locations more accurately.
10442 (YYLLOC_DEFAULT): Use it.
10443 (%token COLON): Remove.
10444 (%token ID_COLON): New token.
10445 (rules): Use it.
10446 (declarations, rules): Remove trailing semicolon.
10447 (declaration, rules_or_grammar_declaration):
10448 Allow empty (";") declaration.
10449 (symbol_def): Remove empty actions; no longer needed.
10450 (rules_or_grammar_declaration): Remove trailing semicolon.
10451 (semi_colon.opt): Remove.
10452 * src/reader.h: Include location.h.
10453 (scanner_cursor): New decl.
10454 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10455 rolling our own.
10456 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10457 of *loc.
10458 (STEP): Remove. No longer needed, now that adjust_location does
10459 the work. All uses removed.
10460 (scanner_cursor): New var.
10461 (adjust_location): Renamed from extend_location. It now sets
10462 *loc and adjusts the scanner cursor. All uses changed.
10463 Don't bother testing for CR.
10464 (handle_syncline): Remove location arg; now updates scanner cursor.
10465 All callers changed.
10466 (unexpected_end_of_file): Now accepts start boundary of token or
10467 comment, not location. All callers changed. Update scanner cursor,
10468 not the location.
10469 (SC_AFTER_IDENTIFIER): New state.
10470 (context_state): Renamed from c_context. All uses changed.
10471 (id_loc, code_start, token_start): New local vars.
10472 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10473 processing of Yacc white space and equivalents here.
10474 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10475 instead of returning ID immediately, since we need to search for
10476 a subsequent colon.
10477 (<INITIAL>"'", "\""): Save token_start.
10478 (<INITIAL>"%{", "{", "%%"): Save code_start.
10479 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10480 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10481 BEGIN context_state at end, not INITIAL.
10482 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10483 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10484 Return correct token start.
10485 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10486 the start of a character, string or multiline comment is found.
10487 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10488 Reduction): Adjust reported locations to match the more-precise
10489 results now expected.
10490 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10491 * tests/reduce.at (Useless Rules, Reduced Automaton,
10492 Underivable Rules): Likewise.
10493 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10494 or "|"' now that so many other tokens are allowed by the new grammar.
10495
10496 * src/complain.h (current_file): Remove duplicate decl;
10497 current_file is now owned by files.h.
10498 * src/complain.c, src/scan-gram.l: Include files.h.
10499
105002002-12-06 Paul Eggert <eggert@twinsun.com>
10501
10502 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10503 promotes to int; it might be unsigned int.
10504 * data/yacc.c (yy_reduce_print): Likewise.
10505
10506 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10507 be #defined in the prologue, not in the Bison declarations.
10508 This fixes Debian Bug 102878, reported by Shaul Karl.
10509
105102002-12-02 Paul Eggert <eggert@twinsun.com>
10511
10512 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10513 * lib/strtoul.c: New file, from gnulib.
10514 This fixes a porting bug reported by Peter Klein in
10515 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10516
105172002-11-30 Paul Eggert <eggert@twinsun.com>
10518
10519 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10520 and put only a forward declaration in the prologue. This is for
10521 consistency with the other scanner helper functions.
10522
10523 Type clashes now generate warnings, not errors, since it
10524 appears that POSIX may allow some grammars with type clashes.
10525 * src/reader.c (grammar_current_rule_check): Warn about
10526 type clashes instead of complaining.
10527 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10528
10529 Add Yacc library, since POSIX requires it.
10530 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10531 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10532 * lib/main.c, lib/yyerror.c: New files.
10533
10534 gram_error can be static; it need not be extern.
10535 * src/reader.h (gram_error): Remove decl.
10536 * src/parse-gram.y (gram_error): Now static. Add static decl.
10537 (print_token_value): Omit parameter names from forward decl,
10538 for consistency.
10539
105402002-11-29 Paul Eggert <eggert@twinsun.com>
10541
10542 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10543 be declared before being used. E.g., one should typically
10544 declare them in the prologue. Use GNU coding style in examples.
10545 Put "const" consistently after the type it modifies. Mention
10546 that C99 supports "inline". Mention that yyerror traditionally
10547 returns "int".
10548
10549 %parse-param and %lex-param now take just one argument, the
10550 declaration; the argument name is deduced from the declaration.
10551
10552 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10553 Reporting, Table of Symbols): Document this.
10554 * src/parse-gram.y (add_param): New function.
10555 (COMMA): Remove.
10556 (declaration): Implement new rule for %parse-param and %lex-param.
10557 * src/scan-gram.l: "," now elicits a warning, rather than being
10558 a token; this is more compatible with byacc.
10559 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10560
105612002-11-27 Paul Eggert <eggert@twinsun.com>
10562
10563 Rename identifiers to avoid real and potential collisions.
10564
10565 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10566 to avoid collision with lex macro described by Bruce Lilly in
10567 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10568 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10569 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10570 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10571 All uses changed.
10572 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10573 The name "yycontrol" violates the name space rules, and this stuff
10574 wasn't being used anyway.
10575 (input): Remove action; this stuff wasn't being used.
10576 (gram_error): Rename local variable yylloc -> loc.
10577 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10578 (YY_DECL): Don't use "yy" at start of local variables.
10579 All uses changed, e.g., yylloc -> loc.
10580 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10581 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10582 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10583 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10584
10585 * src/parse-gram.y (gram_error): loc is now const *.
10586 * src/reader.h (gram_error): Likewise.
10587
105882002-11-24 Paul Eggert <eggert@twinsun.com>
10589
10590 Version 1.75c.
10591
10592 * tests/actions.at (Actions after errors): Use an output format
10593 more similar to that of the Printers and Destructors test.
10594 Test the position of the ';' token too.
10595 (Printers and Destructors): Likewise.
10596 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10597 unnecessarily alarming people when the test fails.
10598
10599 * data/yacc.c (yyerrlab1): Move this label down, so that the
10600 parser does not discard the lookahead token if the user code
10601 invokes YYERROR. This change is required for POSIX conformance.
10602
10603 * lib/error.c: Sync with gnulib.
10604
106052002-11-22 Paul Eggert <eggert@twinsun.com>
10606
10607 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10608 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10609 * lib/xmalloc.c: Likewise.
10610
106112002-11-20 Paul Eggert <eggert@twinsun.com>
10612
10613 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10614
106152002-11-20 Paul Eggert <eggert@twinsun.com>
10616
10617 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10618 should use `if (! x) abort ();' rather than `assert (x);', and
10619 anyway it's one less thing to worry about configuring.
10620
10621 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10622 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10623 and replace all instances of assert with abort.
10624 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10625 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10626
10627 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10628 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10629 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10630 hash_find_entry, hash_rehash, hash_insert): Likewise.
10631 * src/conflicts.c (resolve_sr_conflict): Likewise.
10632 * src/lalr.c (set_goto_map, map_goto): Likewise.
10633 * src/nullable.c (nullable_compute): Likewise.
10634 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10635 * src/reader.c (packgram, reader): Likewise.
10636 * src/state.c (state_new, state_free, state_transitions_set,
10637 state_reduction_find): Likewise.
10638 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10639 symbol_pack): Likewise.
10640 * src/tables.c (conflict_row, pack_vector): Likewise.
10641 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10642 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10643 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10644 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10645
10646 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10647 (ARGMATCH_CONSTRAINT): New macro.
10648 (ARGMATCH_ASSERT): Use it.
10649
10650 * src/system.h (verify): New macro.
10651 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10652 rather than assert.
10653 * src/tables.c (tables_generate): Likewise.
10654
10655 * src/struniq.c (struniq_assert): Now returns void, and aborts
10656 if the assertion is false.
10657 (struniq_assert_p): Remove.
10658 * src/struniq.h: Likewise.
10659
106602002-11-18 Paul Eggert <eggert@twinsun.com>
10661
10662 * data/glr.c (yygetLRActions): Replace `yyindex' with
10663 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10664 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10665 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10666
106672002-11-18 Akim Demaille <akim@epita.fr>
10668
10669 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10670 space.
10671 From Tim Van Holder.
10672
106732002-11-17 Paul Eggert <eggert@twinsun.com>
10674
10675 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10676 to "SyntaxError" for consistency with my 2002-11-15 change.
10677
10678 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10679 not define to {}, since this breaks the common use of `YYDPRINTF
10680 ((...));' if a single statement is desired (e.g. before `else').
10681 Work around GCC warnings by surrounding corresponding calls with
10682 {} if needed.
10683 (yyhasResolvedValue): Remove unused function.
10684 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10685 loop body.
10686 (yyreportSyntaxError): Renamed from yyreportParseError.
10687 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10688 All uses changed.
10689 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10690 extern when possible. Remove unused initializations.
10691
106922002-11-16 Akim Demaille <akim@epita.fr>
10693
10694 Augment the similarity between GLR and LALR traces.
10695
10696 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10697 (YY_REDUCE_PRINT): New.
10698 (yyparse): Use them.
10699 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10700 YYDPRINT here.
10701 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10702 state reached after the reduction/recovery, since...
10703 (yyparse, yyprocessOneStack): Report the state we are entering in.
10704
107052002-11-16 Akim Demaille <akim@epita.fr>
10706
10707 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10708 Add support for --trace=skeleton.
10709 * src/scan-skel.l: %option debug.
10710 Scan strings of non-@ or \n instead of character by character.
10711 (scan_skel): Handle trace_skeleton.
10712 (QPUTS): New.
10713 (@output_parser_name@, @output_header_name@): ``Restore'' their
10714 support (used to be M4 macros).
10715 * data/yacc.c: Quote larger chunks, a la glr.c.
10716 * data/lalr1.cc: Likewise.
10717 The header guards are no longer available, so use some other
10718 string than `YYLSP_NEEDED'.
10719
107202002-11-16 Akim Demaille <akim@epita.fr>
10721
10722 Make the ``Printers and Destructors'' test more verbose, taking
10723 `yacc.c''s behavior as (possibly wrong) reference.
10724
10725 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10726 instead of fprint on stdout.
10727 Set and report the last_line of the symbols.
10728 Consistently display values and locations.
10729
107302002-11-16 Paul Eggert <eggert@twinsun.com>
10731
10732 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10733
107342002-11-15 Paul Eggert <eggert@twinsun.com>
10735
10736 * tests/actions.at (Actions after errors): New test case.
10737
10738 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10739 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10740 tests/action.at, tests/calc.at, tests/conflicts.at,
10741 tests/cxx-type.at, tests/regression.at:
10742 "parse error" -> "syntax error" for POSIX compatibility.
10743 "parsing stack overflow..." -> "parser stack overflow" so
10744 that code matches Bison documentation.
10745
107462002-11-15 Akim Demaille <akim@epita.fr>
10747
10748 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10749 take two BRACED_CODE, not two string_content.
10750 Free the scanner's obstack when we are done.
10751 (code_content): New.
10752 * tests/calc.at: Adjust.
10753 * doc/bison.texinfo: Adjust.
10754 Also, make sure to include the `,' for these declarations.
10755
107562002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10757
10758 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10759 definition; avoids potential autoreconf problems.
10760
107612002-11-15 Akim Demaille <akim@epita.fr>
10762
10763 Always check the value returned by yyparse.
10764
10765 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10766 returned by yyparse.
10767 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10768 Adjust calls.
10769 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10770 returned by yyparse.
10771
107722002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10773
10774 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10775 on input.at test.
10776
107772002-11-14 Paul Eggert <eggert@twinsun.com>
10778
10779 * src/output.c (output_skeleton): Call xfopen instead of
10780 duplicating xfopen's body.
10781
10782 Fix bugs reported by Nelson H. F. Beebe in
10783 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10784
10785 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10786 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10787 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10788 file twice in the grammar, as an extra check.
10789
10790 * tests/input.at (Torturing the Scanner): Surround the
10791 backslash-newline tests with "#if 0", to make it less likely that
10792 we'll run into compiler bugs. Bring back solitary \ inside
10793 comment, but add a closing comment to work around HP C bug. Don't
10794 test backslash-newline in C character constant.
10795
107962002-11-14 Akim Demaille <akim@epita.fr>
10797
10798 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10799 status of the compiler.
10800 Calling `exit 1' is no longer needed.
10801 Reported by Nelson H. F. Beebe.
10802
108032002-11-14 Akim Demaille <akim@epita.fr>
10804
10805 * tests/atlocal.in (CPPFLAGS): We have config.h.
10806 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10807 New.
10808 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10809 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10810 * tests/regression.at, tests/torture.at: Use them for all the
10811 grammars that are to be compiled.
10812 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10813 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10814 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10815
108162002-11-14 Akim Demaille <akim@epita.fr>
10817
10818 * doc/bison.texinfo: Various formatting changes (alignments in
10819 samples, additional @group/@end group, GCS in samples.
10820 Use @deffn instead of simple @table to define the directives,
10821 macros, variables etc.
10822
108232002-11-13 Paul Eggert <eggert@twinsun.com>
10824
10825 Fix some bugs reported by Albert Chin-A-Young in
10826 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10827
10828 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10829 -o c"; the HP C compiler chatters during compilation.
10830 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10831 * tests/headers.at (export YYLTYPE): Likewise.
10832
10833 * tests/input.at (Torturing the Scanner): Remove lines containing
10834 solitary backslashes, as they tickle a bug in the HP C compiler.
10835
10836 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10837 comments, since they're not portable. Use GNU coding style.
10838
108392002-11-13 Akim Demaille <akim@epita.fr>
10840
10841 * data/yacc.c: Leave bigger chunks of quoted text.
10842 (YYDSYMPRINTF): New.
10843 Use it to report symbol activities.
10844 * data/glr.c (YYDSYMPRINTF): New.
10845 Use it.
10846
108472002-11-12 Paul Eggert <eggert@twinsun.com>
10848
10849 Version 1.75b.
10850
10851 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10852 (yyglrReduce): Return yyok, not 0.
10853 This should avoid the enumerated-type warnings reported
10854 by Nelson H. F. Beebe in
10855 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10856
10857 * lib/bbitset.h (BITSET_INLINE): Remove.
10858 * lib/bitset.h [! BITSET_INLINE]: Remove.
10859 (bitset_set, bitset_reset, bitset_test): Rename local vars
10860 to avoid shadowing warnings by GCC.
10861
10862 * data/glr.c (inline): Remove #define. It's the user's
10863 responsibility to #define it away, just like 'const'.
10864 This fixes one of the bugs reported by Nelson H. F. Beebe in
10865 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10866
10867 * Makefile.maint (po-check): Scan .l and .y files instead of the
10868 .c and the .h files that they generate. This fixes the bug
10869 reported by Tim Van Holder in:
10870 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10871 Look for N_ as well as for _. Try to avoid matching #define for
10872 N_ and _.
10873 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10874 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10875 * src/scan-gram.l: Revamp regular expressions so that " and '
10876 do not confuse xgettext.
10877
10878 * src/struniq.h (struniq_new): Do not declare the return type
10879 to be 'const'; this violates the C standard.
10880 * src/struniq.c (struniq_new): Likewise.
10881
108822002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10883
10884 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10885 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10886 linker.
10887
108882002-11-12 Akim Demaille <akim@epita.fr>
10889
10890 * Makefile.maint: Sync with Autoconf:
10891 (local_updates): New.
10892
108932002-11-12 Akim Demaille <akim@epita.fr>
10894
10895 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10896
108972002-11-12 Akim Demaille <akim@epita.fr>
10898
10899 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10900 locations.
10901
109022002-11-12 Akim Demaille <akim@epita.fr>
10903
10904 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10905 not yyvalue.
10906
109072002-11-12 Akim Demaille <akim@epita.fr>
10908
10909 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10910 Use it to test the GLR parser.
10911
109122002-11-12 Akim Demaille <akim@epita.fr>
10913
10914 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10915 defines it.
10916 * data/glr.c (yystos): New.
10917 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10918 (YYDSYMPRINT): New.
10919 (yyval): Don't define it, it is handled via M4.
10920 (yyrecoverParseError): Free verbosely the discarded symbols.
10921 * data/yacc.c (yysymprint): Remove, rather...
10922 (b4_yysymprint_generate): invoke.
10923 * data/c.m4 (b4_yysymprint_generate): New.
10924 Accept pointers as arguments, as opposed to the version from
10925 yacc.c.
10926 (b4_yydestruct_generate): Likewise.
10927 * tests/cations.at (Printers and Destructors): Use Bison directives
10928 instead of CPP macros.
10929 Don't rely on internal details.
10930
109312002-11-12 Akim Demaille <akim@epita.fr>
10932
10933 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10934 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10935 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10936 it against YYEMPTY and so forth), work on yytoken (i.e., set
10937 it to YYEMPTY etc.).
10938 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10939 (b4_symbol_actions): Remove.
10940 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10941 for 0, end-of-input.
10942
109432002-11-12 Akim Demaille <akim@epita.fr>
10944
10945 * doc/bison.texinfo (Destructor Decl): New.
10946
109472002-11-12 Akim Demaille <akim@epita.fr>
10948
10949 * src/tables.c (tables_generate): Use free for pointers that
10950 cannot be NULL, not XFREE.
10951 (pack_vector): Use assert, not fatal, for bound violations.
10952 * src/state.c (state_new): Likewise.
10953 * src/reader.c (reader): Likewise.
10954 * src/lalr.c (set_goto_map): Likewise.
10955 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
10956 the file name.
10957
109582002-11-12 Akim Demaille <akim@epita.fr>
10959
10960 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
10961 Restore.
10962 * src/scan-gram.l (last_string): Is global to the file, not to
10963 yylex.
10964 * src/parse-gram.y (input): Don't append the epilogue here,
10965 (epilogue.opt): do it here, and free the scanner's obstack.
10966 * src/reader.c (epilogue_set): Rename as...
10967 (epilogue_augment): this.
10968 * data/c.m4 (b4_epilogue): Defaults to empty.
10969
109702002-11-12 Akim Demaille <akim@epita.fr>
10971
10972 * src/getargs.c (long_options): Remove duplicates.
10973 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
10974 Remove.
10975 * doc/bison.rnh: Remove.
10976 * doc/bison.texinfo (VMS Invocation): Remove.
10977
109782002-11-12 Akim Demaille <akim@epita.fr>
10979
10980 * src/struniq.h, src/struniq.c (struniq_t): Is const.
10981 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
10982
10983 Use struniq for symbols.
10984
10985 * src/symtab.h (symbol_t): The tag member is a struniq.
10986 (symbol_type_set): Adjust.
10987 * src/symtab.c (symbol_new): Takes a struniq.
10988 (symbol_free): Don't free the tag member.
10989 (hash_compare_symbol_t, hash_symbol_t): Rename as...
10990 (hash_compare_symbol, hash_symbol): these.
10991 Use the fact that tags as struniqs.
10992 (symbol_get): Use struniq_new.
10993 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
10994 Returns a strniq.
10995 * src/reader.h (merger_list, grammar_currentmerge_set): The name
10996 and type members are struniqs.
10997 * src/reader.c (get_merge_function)
10998 (grammar_current_rule_merge_set): Adjust.
10999 (TYPE, current_type): Are struniq.
11000
11001 Use struniq for file names.
11002
11003 * src/files.h, src/files.c (infile): Split into...
11004 (grammar_file, current_file): these.
11005 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11006 * src/reduce.c (reduce_print): Likewise.
11007 * src/getargs.c (getargs): Likewise.
11008 * src/complain.h, src/complain.c: Likewise.
11009 * src/main.c (main): Call struniqs_new early enough to use it for
11010 file names.
11011 Don't free the input file name.
11012
110132002-11-12 Akim Demaille <akim@epita.fr>
11014
11015 * src/symtab.c (symbol_free): Remove dead deactivated code:
11016 type_name are properly removed.
11017 Don't use XFREE to free items that cannot be NULL.
11018 * src/struniq.h, src/struniq.c: New.
11019 * src/main.c (main): Initialize/free struniqs.
11020 * src/parse-gram.y (%union): Add astruniq member.
11021 (yyprint): Adjust.
11022 * src/scan-gram.l (<{tag}>): Return a struniq.
11023 Free the obstack bit that used to store it.
11024 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11025
110262002-11-11 Paul Eggert <eggert@twinsun.com>
11027
11028 Revamp to fix many (but not all) of the C- and M4-related quoting
11029 problems. Among other things, this fixes the Bison bug reported
11030 by Jan Hubicka when processing the Bash grammar; see:
11031 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
11032
11033 Use new @ escapes consistently. Represent brackets with @{ and @}
11034 rather than @<:@ and @:>@, since this works a bit better with dumb
11035 editors like vi. Represent @ with @@, since @ is now consistently
11036 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11037 __ofile__, to avoid unexpected expansions. Similarly, use @output
11038 rather than #output.
11039
11040 * data/c.m4 (b4_copyright): Omit file name from comment, since
11041 the file name could contain "*/".
11042 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11043 be quoted. All uses changed.
11044
11045 * data/glr.c: Use new @ escapes consistently.
11046 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11047 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11048 Remove, since they couldn't handle arbitrary characters in file
11049 names.
11050 * data/lalr1.cc: Likewise.
11051 * data/yacc.c: Likewise.
11052
11053 * src/files.c (output_infix): Remove; all uses removed.
11054 * src/files.h: Likewise.
11055
11056 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11057 mishandled funny characters in file names, and anyway it isn't
11058 needed any more.
11059 * data/yacc.c: Likewise.
11060 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11061
11062 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11063 * data/yacc.c: Likewise.
11064
11065 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11066 strings now.
11067 (muscle_init): Quote filename as a C string.
11068 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11069 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11070 * src/output.c (escaped_file_name_output): New function.
11071 (prepare_symbols): Quote tokens for M4.
11072 (prepare): Don't insert output_infix, output_prefix,
11073 output_parser_name, output_header_name; this is now down by scan-skel.
11074 Insert skeleton as a C string.
11075
11076 * src/output.c (user_actions_output, symbol_destructors_output,
11077 symbol_printers_output): Quote filenames for C and M4.
11078 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11079
11080 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11081 escapes other than \\ and \'; this simplifies the code.
11082 (<SC_STRING>): Likewise, for \\ and \".
11083 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11084 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11085 Use new escapes @{ and @} for [ and ].
11086
11087 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11088 them with auto vars.
11089 Switch to new escape scheme, where @ is the escape character uniformly.
11090 Abort if a stray escape character is found. Avoid unbounded input
11091 buffer when parsing non-escaped text.
11092
11093 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11094 __oline__, #output, $@, and @{ do not have unintended meanings.
11095
110962002-11-09 Paul Eggert <eggert@twinsun.com>
11097
11098 Fix the test failure due to GCC warnings described in
11099 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
11100 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11101 evaluate to 0 if it's impossible for NINF to be in the respective
11102 table.
11103 (yygetLRActions, yyrecoverParseError): Use them.
11104
11105 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11106 counted in the token inserted at end of file. Now takes
11107 location_t *, not location_t, so that the location can be
11108 adjusted. All uses changed.
11109
11110 * tests/regression.at (Invalid inputs): Adjust wording in
11111 diagnostic to match the new behavior.
11112
11113 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11114 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11115 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11116 abort ();'. This reduces the runtime of the "Many lookaheads"
11117 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11118 GCC 3.2.
11119
111202002-11-07 Paul Eggert <eggert@twinsun.com>
11121
11122 * src/parse-gram.y (CHARACTER): Remove unused token.
11123 All uses removed.
11124
11125 * src/scan-gram.l: Remove stack option. We no longer use the
11126 stack, since the stack was never deeper than 1; instead, use the
11127 new auto var c_context to record the stacked value.
11128
11129 Remove nounput option. At an unexpected end of file, we now unput
11130 the minimal input necessary to end cleanly; this simplifies the
11131 code.
11132
11133 Avoid unbounded token sizes where this is easy.
11134
11135 (unexpected_end_of_file): New function.
11136 Use it to systematize the error message on unexpected EOF.
11137 (last-string): Now auto, not static.
11138 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11139 (scanner_last_string_free): Remove; not used.
11140 (percent_percent_count): Move decl to just before use.
11141 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11142 not the (never otherwised-used) CHARACTER.
11143
111442002-11-07 Akim Demaille <akim@epita.fr>
11145
11146 Let yyerror always receive the msg as last argument, so that
11147 yyerror can be variadic.
11148
11149 * data/yacc.c (b4_yyerror_args): New.
11150 Use it when calling yyerror.
11151 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11152 Use it when calling yyerror.
11153 * doc/bison.texinfo (Error Reporting): Adjust.
11154 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11155 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11156
111572002-11-06 Akim Demaille <akim@epita.fr>
11158
11159 #line should have quoted strings.
11160 Ideally, this should be done by m4_quotearg.
11161
11162 * src/scan-skel.l: Include quotearg.h.
11163 Quote __ofile__.
11164 * src/output.c (symbol_printers_output)
11165 (symbol_destructors_output): Quote the file name.
11166
111672002-11-06 Akim Demaille <akim@epita.fr>
11168
11169 * tests/regression.at (Invalid inputs): Adjust to the recent
11170 messages.
11171
111722002-11-06 Akim Demaille <akim@epita.fr>
11173
11174 Restore --no-lines.
11175 Reported by Jim Kent.
11176
11177 * data/c.m4 (b4_syncline): New.
11178 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11179 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11180 * src/output.c (user_actions_output): Likewise.
11181 (prepare): Define 'b4_synclines_flag'.
11182 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
11183
111842002-11-06 Akim Demaille <akim@epita.fr>
11185
11186 * src/main.c (main): Free `infile'.
11187 * src/scan-gram.l (handle_syncline): New.
11188 Recognize `#line'.
11189 * src/output.c (user_actions_output, symbol_destructors_output)
11190 (symbol_printers_output): Use the location's file name, not
11191 infile.
11192 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11193
111942002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11195
11196 * src/tables.c (matching_state): Don't allow states to match if
11197 either has GLR conflict entries.
11198
111992002-11-05 Paul Eggert <eggert@twinsun.com>
11200
11201 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11202 "integer out of range" rather than "invalid value".
11203 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11204 accordingly.
11205
11206 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11207 Also, remove one static variable in the scanner.
11208
11209 * src/scan-gram.l (braces_level): Now auto, not static.
11210 Initialize to zero if the compiler is being picky.
11211 (INITIAL): Clear braces_level instead of incrementing it.
11212 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11213 as POSIX 1003.1-2001 requires.
11214 * src/system.h (IF_LINT): New macro, taken from coreutils.
11215 * configure.ac: Define "lint" if --enable-gcc-warnings.
11216
112172002-11-05 Akim Demaille <akim@epita.fr>
11218
11219 * src/scan-gram.l: When it starts with `%', complain about the
11220 whole directive, not just that `invalid character: %'.
11221
112222002-11-04 Akim Demaille <akim@epita.fr>
11223
11224 * Makefile.maint: Update from Autoconf.
11225 (update, cvs-update, po-update, do-po-update): New.
11226
112272002-11-04 Akim Demaille <akim@epita.fr>
11228
11229 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11230 and yyerror.
11231 Have yyerror `use' its arguments.
11232 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11233 returns true when location & yacc & pure & parse-param.
11234 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11235
112362002-11-04 Akim Demaille <akim@epita.fr>
11237
11238 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11239 clashes.
11240 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11241 font-lock-mode.
11242 Use complain_at.
11243 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11244 slot 0.
11245
112462002-11-03 Paul Eggert <eggert@twinsun.com>
11247
11248 * src/reader.c (get_merge_function, grammar_current_rule_check):
11249 Use consistent diagnostics for reporting type name clashes.
11250 Quote the types with <>, for consistency with Yacc.
11251 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11252
112532002-11-03 Akim Demaille <akim@epita.fr>
11254
11255 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11256 New.
11257 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11258 (b4_parse_param): Remove.
11259 Use b4_identification.
11260 Propagate b4_pure_args where needed to pass them to yyerror.
11261 * data/glr.m4 (b4_parse_param): Remove.
11262 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11263 (b4_lpure_formals): New.
11264 Use b4_identification.
11265 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11266 b4_user_formals and b4_user_args.
11267 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11268 (yyreportAmbiguity): When using a pure parser, also need
11269 the location, and the parse-params.
11270 Adjust callers.
11271 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11272 When using a pure parser, also need the parse-params.
11273 Adjust callers.
11274 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11275 (%pure-parser + %parse-param) LALR and GLR parsers.
11276 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11277 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11278 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11279 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11280 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11281 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11282 * doc/bison.texinfo: Untabify the whole file.
11283 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11284 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11285 (Error Reporting): Adjust to these new directives.
11286 Document %error-verbose, deprecate YYERROR_VERBOSE.
11287
112882002-11-03 Akim Demaille <akim@epita.fr>
11289
11290 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11291 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11292 command line options.
11293 * tests/cxx-type.at: Formatting changes.
11294
112952002-11-03 Paul Eggert <eggert@twinsun.com>
11296
11297 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11298 to count columns correctly, and to check for invalid inputs.
11299
11300 Use mbsnwidth to count columns correctly. Account for tabs, too.
11301 Include mbswidth.h.
11302 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11303 (extend_location): New function.
11304 (YY_LINES): Remove.
11305
11306 Handle CRLF in C code rather than in Lex code.
11307 (YY_INPUT): New macro.
11308 (no_cr_read): New function.
11309
11310 Scan UCNs, even though we don't fully handle them yet.
11311 (convert_ucn_to_byte): New function.
11312
11313 Handle backslash-newline correctly in C code.
11314 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11315 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11316 all uses changed.
11317 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11318 Use {splice} wherever C allows backslash-newline.
11319 YY_STEP after space, newline, vertical-tab.
11320 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
11321
11322 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11323
11324 ({int}, handle_action_dollar, handle_action_at): Check for integer
11325 overflow.
11326
11327 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11328
11329 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11330 as well as \000. Check for UCHAR_MAX, not 255.
11331 Allow \x with an arbitrary positive number of digits, as in C.
11332 Check for overflow here.
11333 Allow \? and UCNs, for compatibility with C.
11334
11335 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11336 with quote slot used by complain_at.
11337
11338 * tests/input.at: Add tests for backslash-newline, m4 quotes
11339 in symbols, long literals, and funny escapes in strings.
11340
11341 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11342 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11343 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11344 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11345 * m4/mbswidth.m4: New file, from GNU coreutils.
11346
11347 * doc/bison.texinfo (Grammar Outline): Document // comments.
11348 (Symbols): Document that trigraphs have no special meaning in Bison,
11349 nor is backslash-newline allowed.
11350 (Actions): Document that trigraphs have no special meaning.
11351
11352 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11353 no longer used.
11354
113552002-11-02 Paul Eggert <eggert@twinsun.com>
11356
11357 * src/reader.c: Don't include quote.h; not needed.
11358 (get_merge_function): Reword warning to be consistent with
11359 type clash diagnostic in grammar_current_rule_check.
11360
11361 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11362 bug in trigraph handling.
11363
11364 * src/output.c (prepare_symbols): When printing token names,
11365 escape "[" as "@<:@" and likewise for "]".
11366
11367 * src/system.h (errno): Remove declaration, as we are now
11368 assuming C89 or better, and C89 guarantees errno.
11369
113702002-10-30 Paul Eggert <eggert@twinsun.com>
11371
11372 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11373 Check for close failures.
11374 * src/files.h (xfclose): Return void, not int, since it always
11375 returned zero.
11376 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11377 indicates one.
11378 * src/output.c (output_skeleton): Use xfclose rather than fclose
11379 and ferror. xfclose now checks ferror.
11380
11381 * data/glr.c (YYLEFTMOST_STATE): Remove.
11382 (yyreportTree): Use a stack-based leftmost state. This avoids
11383 our continuing battles with bogus warnings about initializers.
11384
113852002-10-30 Akim Demaille <akim@epita.fr>
11386
11387 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11388 #if.
11389
113902002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11391
11392 * tests/glr-regr1.at: New test for reported regressions.
11393 * tests/testsuite.at: Add glr-regr1.at test.
11394 * tests/Makefile.am: Add glr-regr1.at test.
11395
113962002-10-24 Paul Eggert <eggert@twinsun.com>
11397
11398 Version 1.75a.
11399
11400 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11401 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11402 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11403 Don't assume strdup exists; POSIX says its an XSI extension.
11404 Check for buffer overflow on input.
11405
114062002-10-24 Akim Demaille <akim@epita.fr>
11407
11408 * src/output.c (output_skeleton): Don't disable M4sugar comments
11409 too soon: it results in comments being expanded.
11410 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11411 first output.
11412
114132002-10-24 Akim Demaille <akim@epita.fr>
11414
11415 * data/yacc.c (m4_int_type): New.
11416 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11417 char' as only yacc.c wants K&R portability.
11418 * data/glr.c (yysigned_char): Remove.
11419 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11420 Reported by Quoc Peyrot.
11421
114222002-10-23 Paul Eggert <eggert@twinsun.com>
11423
11424 * src/main.c (main): With --trace=time, report times even if a
11425 non-fatal error occurs. Formerly, the times were reported in some
11426 such cases but not in others.
11427 * src/reader.c (reader): Just return if a complaint has been issued,
11428 instead of exiting, so that 'main' can report times.
11429
114302002-10-22 Akim Demaille <akim@epita.fr>
11431
11432 * src/system.h: Include sys/types.
11433 Reported by Bert Deknuydt.
11434
114352002-10-23 Paul Eggert <eggert@twinsun.com>
11436
11437 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11438 Suggested by Art Haas.
11439
114402002-10-22 Paul Eggert <eggert@twinsun.com>
11441
11442 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11443 decl; not needed any more.
11444 * src/main.c (main): Use return to exit, undoing yesterday's change.
11445 The last OS that we could find where this wouldn't work is
11446 SunOS 3.5, and that's too old to worry about now.
11447
11448 * data/glr.c (struct yyltype): Define members even when not
11449 doing locations. This is more consistent with yacc.c, and it
11450 works around the following bug reports:
11451 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11452 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
11453
11454 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11455 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11456 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11457
114582002-10-22 Akim Demaille <akim@epita.fr>
11459
11460 * data/README: New.
11461
114622002-10-21 Paul Eggert <eggert@twinsun.com>
11463
11464 Be consistent about 'bool'; the old code used an enum in one
11465 module and an int in another, and this violates the C standard.
11466 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11467 * configure.ac (AC_HEADER_STDBOOL): Add.
11468 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11469 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11470 * src/symtab.c (hash_compare_symbol_t): Likewise.
11471 * src/system.h (bool, false, true): Use a definition consistent
11472 with ../lib/hash.c. All uses changed.
11473
11474 * src/complain.c (warning_issued): Renamed from warn_message_count,
11475 so that we needn't worry about integer overflow (!).
11476 Now of type bool. All uses changed.
11477 (complaint_issued): Renamed from complain_message_count; likewise.
11478
11479 * src/main.c (main): Use exit to exit with failure.
11480
11481 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11482 rather than 1 and 0.
11483 * src/main.c (main): Likewise.
11484 * src/getargs.c (getargs): Likewise.
11485 * src/reader.c (reader): Likewise.
11486
11487 * src/getarg.c (getargs): Remove duplicate code for
11488 "Try `bison --help'".
11489
11490 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11491 What was that "2" for?
11492
11493 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11494 * src/getargs.c (usage): Likewise.
11495
11496 * src/getargs.c (getargs): When there are too few operands, report
11497 the last one. When there are too many, report the first extra
11498 one. This is how diffutils does it.
11499
115002002-10-20 Paul Eggert <eggert@twinsun.com>
11501
11502 Remove K&R vestiges.
11503 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11504 * src/complain.c (VA_START): Remove. Assume prototypes.
11505 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11506 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11507 fatal): Assume prototypes.
11508 * src/complain.h: Assume prototypes.
11509 * src/system.h (PARAMS): Remove.
11510 Include <limits.h> unconditionally, since it's guaranteeed even
11511 for a freestanding C89 compiler.
11512 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11513 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11514
115152002-10-20 Akim Demaille <akim@epita.fr>
11516
11517 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11518 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11519 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11520 (yyresolveStates, yyresolveAction, yyresolveStack)
11521 (yyprocessOneStack): Use them.
11522 (yy_reduce_print): New.
11523 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11524
115252002-10-20 Akim Demaille <akim@epita.fr>
11526
11527 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11528 arguments and output `void'.
11529 (b4_c_function): Rename as...
11530 (b4_c_function_def): this.
11531 (b4_c_function_decl, b4_c_ansi_function_def)
11532 (b4_c_ansi_function_decl): New.
11533 Change the interpretation of the arguments: before `int, foo', now
11534 `int foo, foo'.
11535 * data/yacc.c (yyparse): Prototype and define thanks to these.
11536 Adjust b4_c_function_def uses.
11537 * data/glr.c (yyparse): Likewise, but ANSI only.
11538
115392002-10-20 Akim Demaille <akim@epita.fr>
11540
11541 * src/output.c (prepare): Move the definition of `tokens_number',
11542 `nterms_number', `undef_token_number', `user_token_number_max'
11543 to...
11544 (prepare_tokens): Here.
11545 (prepare_tokens): Rename as...
11546 (prepare_symbols): this.
11547 (prepare): Move the definition of `rules_number' to...
11548 (prepare_rules): here.
11549 (prepare): Move the definition of `last', `final_state_number',
11550 `states_number' to...
11551 (prepare_states): here.
11552 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11553
115542002-10-20 Akim Demaille <akim@epita.fr>
11555
11556 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11557
115582002-10-20 Akim Demaille <akim@epita.fr>
11559
11560 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11561 * data/c.m4: here.
11562
115632002-10-20 Akim Demaille <akim@epita.fr>
11564
11565 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11566 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11567 `pair'.
11568 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11569 `name' to...
11570 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11571 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11572 These.
11573
115742002-10-19 Paul Eggert <eggert@twinsun.com>
11575
11576 Do not create a temporary file, as that involves security and
11577 cleanup headaches. Instead, use a pair of pipes.
11578 Derived from a suggestion by Florian Krohm.
11579 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11580 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11581 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11582 (BISON_PREREQ_SUBPIPE): Add.
11583 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11584 Add subpipe.h, subpipe.c.
11585 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11586 * po/POTFILES.in: Add lib/subpipe.c.
11587 * src/output.c: Include "subpipe.h".
11588 (m4_invoke): Remove decl.
11589 (scan_skel): New decl.
11590 (output_skeleton): Use pipe rather than temporary file for m4 input.
11591 Check that m4sugar.m4 is readable, to avoid deadlock.
11592 Check for pipe I/O error.
11593 * src/scan-skel.l (readpipe): Remove decl.
11594 (scan_skel): New function, to be used in place of m4_invoke.
11595 Read from stream rather than file.
11596
11597 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11598 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11599 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11600 this generates a more-accurate value anyway.
11601
11602 * lib/timevar.c (timervar_accumulate): Rename locals to
11603 avoid confusion with similarly-named more-global.
11604 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11605
11606 * src/output.c (prepare): Use xstrdup to convert char const *
11607 to char *, to avoid GCC warning.
11608
116092002-10-19 Akim Demaille <akim@epita.fr>
11610
11611 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11612 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11613 Use them to have `calc.y' ready for %pure-parser.
11614 * data/yacc.c (YYLEX): Pass a yylex return type to
11615 b4_c_function_call.
11616
116172002-10-19 Akim Demaille <akim@epita.fr>
11618
11619 Prototype support of %lex-param and %parse-param.
11620
11621 * src/parse-gram.y: Add the definition of the %lex-param and
11622 %parse-param tokens, plus their rules.
11623 Drop the `_' version of %glr-parser.
11624 Add the "," token.
11625 * src/scan-gram.l (INITIAL): Scan them.
11626 * src/muscle_tab.c: Comment changes.
11627 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11628 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11629 (muscle_entry_s): The `value' member is no longer const.
11630 Adjust all dependencies.
11631 * src/muscle_tab.c (muscle_init): Adjust: use
11632 MUSCLE_INSERT_STRING.
11633 Initialize the obstack earlier.
11634 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11635 (muscle_pair_list_grow): New.
11636 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11637 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11638 * tests/calc.at: Use %locations, not --locations.
11639 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11640
116412002-10-19 Akim Demaille <akim@epita.fr>
11642
11643 * src/getargs.c (usage): Take status as argument and exit
11644 accordingly.
11645 Report the traditional `Try ... --help' message when status != 0.
11646 (usage, version): Don't take a FILE * as arg, it is pointless.
11647 (getargs): When there is an incorrect number of arguments, make it
11648 an error, and report it GNUlically thanks to `usage ()'.
11649
116502002-10-18 Paul Eggert <eggert@twinsun.com>
11651
11652 * data/glr.c (yyreportParseError): Don't assume that sprintf
11653 yields the length of the printed string, as this is not true
11654 on SunOS 4.1.4. Reported by Peter Klein.
11655
11656 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11657 * tests/conflicts.at (%nonassoc and eof): Likewise.
11658 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11659
116602002-10-17 Akim Demaille <akim@epita.fr>
11661
11662 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11663 * src/getargs.c (trace_types, trace_args): Adjust.
11664 * src/reader.c (grammar_current_rule_prec_set)
11665 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11666 Standardize error messages.
11667 And s/@prec/%prec/!
11668 (reader): Use trace_flag to enable scanner/parser debugging,
11669 instead of an adhoc scheme.
11670 * src/scan-gram.l: Remove trailing debugging code.
11671
116722002-10-16 Paul Eggert <eggert@twinsun.com>
11673
11674 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11675 MUSCLE_TAB_H.
11676
11677 * NEWS: Officially drop support for building Bison with K&R C,
11678 since it didn't work anyway and it's not worth worrying about.
11679 * Makefile.maint (wget_files): Remove ansi2knr.c.
11680 (ansi2knr.c-url_prefix): Remove.
11681 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11682 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11683 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11684
116852002-10-15 Paul Eggert <eggert@twinsun.com>
11686
11687 Stop using the "enum_" trick for K&R-style function definitions;
11688 it confused me, and I was the author! Instead, assume that people
11689 who want to use K&R C compilers (when using these modules in GCC,
11690 perhaps?) will run ansi2knr.
11691
11692 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11693 All uses of "enum_" changed to "enum ".
11694 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11695 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11696
11697 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11698 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11699 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11700 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11701 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11702 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11703 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11704 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11705 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11706 Use function prototypes; this removes the need for declaring
11707 static functions simply to provide their prototypes.
11708 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11709 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11710 bitset_count_, bitset_create, bitset_dump, bitset_first,
11711 bitset_free, bitset_init, bitset_last, bitset_next,
11712 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11713 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11714 bitset_print, bitset_release_memory, bitset_toggle_,
11715 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11716 debug_bitset): Likewise.
11717 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11718 * lib/bitset_stats.c (bitset_log_histogram_print,
11719 bitset_percent_histogram_print, bitset_stats_and,
11720 bitset_stats_and_cmp, bitset_stats_and_or,
11721 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11722 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11723 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11724 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11725 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11726 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11727 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11728 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11729 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11730 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11731 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11732 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11733 bitset_stats_zero): Likewise.
11734 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11735 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11736 bitsetv_dump, debug_bitsetv): Likewise.
11737 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11738 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11739 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11740 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11741 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11742 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11743 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11744 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11745 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11746 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11747 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11748 Likewise.
11749 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11750 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11751 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11752 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11753 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11754 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11755 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11756 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11757 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11758 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11759 lbitset_xor_cmp, lbitset_zero): Likewise.
11760
117612002-10-14 Akim Demaille <akim@epita.fr>
11762
11763 Version 1.75.
11764
117652002-10-14 Akim Demaille <akim@epita.fr>
11766
11767 * tests/Makefile.am (maintainer-check-posix): New.
11768
117692002-10-14 Akim Demaille <akim@epita.fr>
11770
11771 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11772 member.
11773
117742002-10-14 Akim Demaille <akim@epita.fr>
11775
11776 * src/tables.c (table_ninf_remap): base -> tab.
11777 Reported by Matt Rosing.
11778
117792002-10-14 Paul Eggert <eggert@twinsun.com>
11780
11781 * tests/action.at, tests/calc.at, tests/conflicts.at,
11782 tests/cxx-type.at, tests/headers.at, tests/input.at,
11783 tests/regression.at, tests/synclines.at, tests/torture.at:
11784 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11785 so that the tests still work even if POSIXLY_CORRECT is set.
11786 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11787
11788 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11789 for portability to K&R hosts. Fix typo: signed char is guaranteed
11790 only to 127, not to 128.
11791 * data/glr.c (yysigned_char): New type.
11792 * data/yacc.c (yysigned_char): Likewise.
11793 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11794
117952002-10-13 Paul Eggert <eggert@twinsun.com>
11796
11797 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11798 true due to limited range of data type" warning from GCC.
11799
11800 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11801 by wrapping enum yytokentype's definition inside #ifndef
11802 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11803
118042002-10-13 Akim Demaille <akim@epita.fr>
11805
11806 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11807 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11808
118092002-10-13 Akim Demaille <akim@epita.fr>
11810
11811 * Makefile.maint: Update from Autoconf 2.54.
11812 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11813
118142002-10-13 Akim Demaille <akim@epita.fr>
11815
11816 * src/print.c (print_state): Separate the list of solved conflicts
11817 from the other items.
11818 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11819
118202002-10-13 Akim Demaille <akim@epita.fr>
11821
11822 Let nondeterministic skeletons be usable with deterministic
11823 tables.
11824
11825 With the patch, GAWK compiled by GCC without -O2 passes its test
11826 suite using a GLR parser driven by LALR tables. It fails with -O2
11827 because `struct stat' gives two different answers on my machine:
11828 88 (definition of an auto var) and later 96 (memset on this var).
11829 Hence the stack is badly corrumpted. The headers inclusion is to
11830 blame: if I move the awk.h inclusion before GLR's system header
11831 inclusion, the two struct stat have the same size.
11832
11833 * src/tables.c (pack_table): Always create conflict_table.
11834 (token_actions): Always create conflict_list.
11835 * data/glr.c (YYFLAG): Remove, unused.
11836
118372002-10-13 Akim Demaille <akim@epita.fr>
11838
11839 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11840 (O0FLAGS): New.
11841 (VALGRIND, GXX): New.
11842 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11843 * tests/bison.in: Run $PREBISON a pre-command.
11844 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11845 (maintainer-check-g++): New.
11846 * Makefile.am (maintainer-check): New.
11847
118482002-10-13 Akim Demaille <akim@epita.fr>
11849
11850 * data/glr.c: Formatting changes.
11851 Tweak some trace messages to match yacc.c's.
11852
118532002-10-13 Akim Demaille <akim@epita.fr>
11854
11855 GLR parsers sometimes raise parse errors instead of performing the
11856 default reduction.
11857 Reported by Charles-Henry de Boysson.
11858
11859 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11860 check the length of the traces when %glr.
11861 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11862 GLR's traces.
11863 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11864 Test GLR parsers.
11865 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11866 (yyltype): Remove the yy prefix from the member names.
11867 (yytable): Complete its comment.
11868 (yygetLRActions): Map error action number from YYTABLE from
11869 YYTABLE_NINF to 0.
11870 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11871 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11872 not satisfying as we could compare an YYACTION computed from
11873 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11874 only value for error actions.
11875 (yyreportParseError): In verbose parse error messages, don't issue
11876 `error' in the list of expected tokens.
11877 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11878 next action to perform to match glr.c's decoding.
11879 (yytable): Complete its comment.
11880
118812002-10-13 Paul Eggert <eggert@twinsun.com>
11882
11883 Fix problem reported by Henrik Grubbstroem in
11884 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11885 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11886 because the Bison parser reads the second action before reducing
11887 the first one.
11888 * src/scan-gram.l (rule_length): New static var.
11889 Use it to keep track of the rule length in the scanner, since
11890 we can't expect the parser to be in lock-step sync with the scanner.
11891 (handle_action_dollar, handle_action_at): Use this var.
11892 * tests/actions.at (Exotic Dollars): Test for the problem.
11893
118942002-10-12 Paul Eggert <eggert@twinsun.com>
11895
11896 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11897 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11898 Include <sys/time.h> when checking for clock_t and struct tms.
11899 Use same include order as source.
11900 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11901 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11902
11903 * lib/timevar.c: Update copyright date and clarify comments.
11904 (get_time) [IN_GCC]: Keep the GCC version for reference.
11905
11906 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11907 GCC version as of today, then merge Bison's changes.
11908 Change "GCC" to "Bison" in copyright notice. timevar.def's
11909 author is Akim, so change that too.
11910
11911 * src/reader.c (grammar_current_rule_check):
11912 Don't worry about the default action if $$ is untyped.
11913 Prevents bogus warnings reported by Jim Gifford in
11914 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11915
11916 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11917 * data/glr.c, data/lalr1.cc, data/yacc.c:
11918 Output token definitions before the first part of user declarations.
11919 Fixes compatibility problem reported by Jim Gifford for kbd in
11920 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11921
119222002-10-11 Paul Eggert <eggert@twinsun.com>
11923
11924 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11925 (yyparse): here. This undoes some of the 2002-07-25 change.
11926 Compatibility problem reported by Ralf S. Engelschall with
11927 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11928
119292002-10-11 Akim Demaille <akim@epita.fr>
11930
11931 * tests/regression.at Characters Escapes): New.
11932 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11933 characters.
11934 Reported by Jan Nieuwenhuizen.
11935
119362002-10-11 Akim Demaille <akim@epita.fr>
11937
11938 * po/id.po: New.
11939
119402002-10-10 Paul Eggert <eggert@twinsun.com>
11941
11942 Portability fixes for bitsets; this also avoids several GCC
11943 warnings.
11944
11945 * lib/abitset.c: Include <stddef.h>, for offsetof.
11946 * lib/lbitset.c: Likewise.
11947
11948 * lib/abitset.c (abitset_bytes): Return a size that is aligned
11949 properly for vectors of objects. Do not assume that adding a
11950 header size to a multiple of a word size yields a value that is
11951 properly aligned for the whole union.
11952 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11953
11954 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
11955 unique names for structures.
11956 * lib/ebitset.c (ebitset_bytes): Likewise.
11957 * lib/lbitset.c (lbitset_bytes): Likewise.
11958
11959 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
11960 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
11961 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
11962 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
11963 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
11964 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
11965 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
11966 to improve the type-checking that GCC can do.
11967 * lib/bitset.c (bitset_op4_cmp): Likewise.
11968 * lib/bitset_stats.c (bitset_stats_count,
11969 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
11970 bitset_stats_copy, bitset_stats_disjoint_p,
11971 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
11972 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
11973 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
11974 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
11975 bitset_stats_and_or_cmp, bitset_stats_andn_or,
11976 bitset_stats_andn_or_cmp, bitset_stats_or_and,
11977 bitset_stats_or_and_cmp): Likewise.
11978 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
11979 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
11980 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
11981 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
11982
11983 * lib/abitset.h: Include bitset.h, not bbitset.h.
11984 * lib/ebitset.h: Likewise.
11985 * lib/lbitset.h: Likewise.
11986
11987 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
11988 All instances of parameters of type enum bitset_opts are now of
11989 type enum_bitset_opts, to conform to the C Standard, and similarly
11990 for enum_bitset_type.
11991 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11992 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11993
11994 Do not use "struct bitset_struct" to mean different things in
11995 different modules. Not only is this confusing, it violates
11996 the C Standard, which requires that structure types in different
11997 modules must be compatible if one is to be passed to the other.
11998 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
11999 All instances of "struct bitset_struct *" replaced with "bitset".
12000 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12001 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12002 struct lbitset_struct, struct bitset_stats_struct): New types.
12003 All uses of struct bitset_struct changed to union bitset_union,
12004 etc.
12005 * lib/abitset.c (struct abitset_struct, abitset,
12006 struct bitset_struct): Remove.
12007 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12008 struct bitset_struct): Remove.
12009 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12010 bitset_struct): Remove.
12011 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12012 Likewise.
12013
12014 Do not call a function of type T using a call that assumes the
12015 function is of a different type U. Standard C requires that a
12016 function must be called with a type that is compatible with its
12017 definition.
12018 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12019 New decls.
12020 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12021 New functions.
12022 * lib/ebitset.c (PFV): Remove.
12023 * lib/lbitset.c (PFV): Likewise.
12024 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12025 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12026 decls.
12027 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12028 (ebitset_vtable): Use them.
12029 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12030 lbitset_xor): New functions.
12031 (lbitset_vtable): Use them.
12032
12033 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12034 Declare.
12035
12036 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12037 GCC warning.
12038 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12039 Use offsetof, for simplicity.
12040
120412002-10-06 Paul Eggert <eggert@twinsun.com>
12042
12043 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12044 the same width as int. This reapplies a hunk of the 2002-08-12 patch
12045 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
12046 which was inadvertently undone by the 2002-09-30 patch.
12047 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12048 the same width as int.
12049
120502002-10-04 Paul Eggert <eggert@twinsun.com>
12051
12052 Version 1.50.
12053
12054 * configure.ac (AC_INIT), NEWS: Increment version number.
12055
12056 * doc/bison.texinfo: Minor spelling, grammar, and white space
12057 fixes.
12058 (Symbols): Mention that any negative value returned from yylex
12059 signifies end-of-input. Warn about negative chars. Mention
12060 the portable Standard C character set.
12061
12062 The GNU coding standard says CFLAGS and YFLAGS are reserved
12063 for the installer to set.
12064 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12065 * src/Makefile.am (AM_CFLAGS): Likewise.
12066 (AM_YFLAGS): Renamed from YFLAGS.
12067
12068 Fix some MAX and MIN problems.
12069 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12070 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12071 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12072 * src/reader.c (reader): Use it.
12073
12074 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12075 POSIX 1003.1-2001 has removed fgrep.
12076
120772002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12078
12079 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12080 interpreted as signed.
12081 * lib/ebitset.c (ebitset_list): Fix bug.
12082
120832002-10-01 Paul Eggert <eggert@twinsun.com>
12084
12085 More fixes for 64-bit hosts and large bitsets.
12086
12087 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12088 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12089 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12090 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12091 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12092 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12093 bitset_count_): Likewise.
12094 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12095 bitset_first, bitset_last): Likewise.
12096 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12097 bitset_stats_list_reverse, bitset_stats_size,
12098 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12099 Likewise.
12100 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12101 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12102 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12103 bitsetv_reflexive_transitive_closure): Likewise.
12104 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12105 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12106 Likewise.
12107 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12108 Likewise.
12109
12110 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12111 Use size_t, not unsigned int, to count bytes.
12112 * lib/abitset.h (abitset_bytes): Likewise.
12113 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12114 Likewise.
12115 * lib/bitset.h (bitset_bytes): Likewise.
12116 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12117 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12118 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12119 * lib/ebitset.c (ebitset_bytes): Likewise.
12120 * lib/ebitset.h (ebitset_bytes): Likewise.
12121 * lib/lbitset.c (lbitset_bytes): Likewise.
12122 * lib/lbitset.h (lbitset_bytes): Likewise.
12123
12124 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12125 abitset_subset_p, abitset_disjoint_p, abitset_and,
12126 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12127 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12128 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12129 abitset_or_and, abitset_or_and_cmp):
12130 Use bitset_windex instead of unsigned int.
12131 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12132 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12133 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12134 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12135 Likewise.
12136 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
12137
12138 * lib/bitset.c (bitset_print):
12139 Use proper printf formats for widths of integer types.
12140 * lib/bitset_stats.c (bitset_percent_histogram_print,
12141 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12142 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12143 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12144 * lib/lbitset.c (lbitset_bytes): Likewise.
12145
12146 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12147 BITSET_SIZE_MAX): New macros.
12148 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12149 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12150 to BITSET_WINDEX_MAX.
12151
12152 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12153 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12154 since we now return the bitset_bindex type (not int).
12155
12156 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12157 when computing sizes.
12158 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12159
12160 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12161 and avoid cast to unsigned.
12162
121632002-09-30 Akim Demaille <akim@epita.fr>
12164
12165 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12166 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12167 Updates from Michael Hayes.
12168
121692002-09-30 Art Haas <ahaas@neosoft.com>
12170
12171 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12172 invocations.
12173 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12174 defined.
12175
121762002-09-27 Akim Demaille <akim@epita.fr>
12177
12178 Version 1.49c.
12179
121802002-09-27 Akim Demaille <akim@epita.fr>
12181
12182 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12183 (Because of AC_LIBSOURCE).
12184
121852002-09-27 Akim Demaille <akim@epita.fr>
12186
12187 Playing with Autoscan.
12188
12189 * configure.ac: Remove the old LIBOBJ tweaks.
12190 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12191 * lib/strrchr.c: New.
12192 * lib/strtol.c: New, from the Coreutils 4.5.1.
12193
121942002-09-27 Akim Demaille <akim@epita.fr>
12195
12196 Playing with Autoscan.
12197
12198 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12199 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12200 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12201 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12202 Coreutils 4.5.1.
12203
122042002-09-24 Akim Demaille <akim@epita.fr>
12205
12206 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12207 (Frequently Asked Questions, Parser Stack Overflow): New.
12208
122092002-09-13 Akim Demaille <akim@epita.fr>
12210
12211 Playing with autoscan.
12212
12213 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12214 * src/files.c (skeleton_find): Remove, unused.
12215 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12216 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12217
122182002-09-13 Akim Demaille <akim@epita.fr>
12219
12220 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12221 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12222
122232002-09-13 Akim Demaille <akim@epita.fr>
12224
12225 * configure.ac: Require 2.54.
12226 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12227 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12228 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12229 Remove, provided by Autoconf macros.
12230
122312002-09-12 Akim Demaille <akim@epita.fr>
12232
12233 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12234
122352002-09-12 Akim Demaille <akim@epita.fr>
12236
12237 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12238 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12239 Reported by Martin Mokrejs.
12240
122412002-09-10 Akim Demaille <akim@epita.fr>
12242
12243 * src/parse-gram.y: Associate a human readable string to each
12244 token type.
12245 * tests/regression.at (Invalid inputs): Adjust.
12246
122472002-09-10 Gary V. Vaughan <gary@gnu.org>
12248
12249 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12250 with an Autoconf-2.5x style configure.ac.
12251
122522002-09-06 Paul Eggert <eggert@twinsun.com>
12253
12254 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12255 exception applies only to yacc.c. This is a modification of a
12256 patch originally suggested by Akim Demaille.
12257
122582002-09-06 Akim Demaille <akim@epita.fr>
12259
12260 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12261 here to...
12262 * data/yacc.c: here.
12263
12264 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12265 LocationType.
12266 (b4_ltype): Default to yy::Location from location.hh.
12267
122682002-09-04 Jim Meyering <jim@meyering.net>
12269
12270 * data/yacc.c: Guard the declaration of yytoknum also with
12271 `#ifdef YYPRINT', so it is declared only when used.
12272
122732002-09-04 Akim Demaille <akim@epita.fr>
12274
12275 * configure.in: Rename as...
12276 * configure.ac: this.
12277 Bump to 1.49c.
12278
122792002-09-04 Akim Demaille <akim@epita.fr>
12280
12281 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12282 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12283 translate maintainer only messages.
12284
122852002-08-12 Paul Eggert <eggert@twinsun.com>
12286
12287 Version 1.49b.
12288
12289 * Makefile.am (SUBDIRS): Remove intl.
12290 (DISTCLEANFILES): Remove.
12291 * NEWS: Mention that GNU M4 is now required. Clarify what is
12292 meant by "larger grammars". Mention the pt_BR translation.
12293 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12294 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12295 Bump version from 0.11.2 to 0.11.5.
12296 (BISON_PREREQ_STAGE): Remove.
12297 (AM_GNU_GETTEXT): Use external gettext.
12298 (AC_OUTPUT): Remove intl/Makefile.
12299
12300 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12301
12302 * data/glr.c: Include string.h, for strlen.
12303 (yyreportParseError): Use size_t for yysize.
12304 (yy_yypstack): No longer nested inside yypstates, as nested
12305 functions are not portable. Do not assume size_t is the
12306 same width as int.
12307 (yypstates): Do not assume that ptrdiff_t is the same width
12308 as int, and similarly for yyposn and YYINDEX.
12309
12310 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12311
12312 * lib/Makefile.am (INCLUDES): Do not include from the intl
12313 directory, which has been removed.
12314 * src/Makefile.am (INCLUDES): Likewise.
12315
12316 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12317 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12318 New vars.
12319
12320 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12321 * tests/Makefile.am (EXTRA_DIST): Likewise.
12322
12323 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12324 Do not assume that bitset_windex is the same width as unsigned.
12325
12326 * lib/abitset.c (abitset_unused_clear): Do not assume that
12327 bitset_word is the same width as int.
12328 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12329 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12330 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12331 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12332 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12333
12334 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12335 portability to one's complement hosts!).
12336 * lib/ebitset.c (ebitset_op1): Likewise.
12337 * lib/lbitset.c (lbitset_op1): Likewise.
12338
12339 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12340 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12341 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12342 Sync with fileutils.
12343 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12344 lib/gettext.h: Sync with diffutils.
12345
12346 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12347 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12348
12349 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12350 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12351 check for void *.
12352
12353 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12354 size_t; the old version tried to do this but casted improperly.
12355 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12356 (bitset_test): Now returns int, not unsigned long.
12357
12358 * lib/bitset_stats.c: Include "gettext.h".
12359 (_): New macro.
12360 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12361 name locals "index", as it generates unnecessary warnings on some
12362 hosts that have an "index" function.
12363
12364 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12365 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12366 they need translation.
12367 * src/LR0.c (state_list_append, new_itemsets, get_state,
12368 append_states, generate_states): Likewise.
12369 * src/assoc.c (assoc_to_string): Likewise.
12370 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12371 * src/gram.c (grammar_dump): Likewise.
12372 * src/injections.c (injections_compute): Likewise.
12373 * src/lalr.c (lookaheads_print): Likewise.
12374 * src/relation.c (relation_transpose): Likewise.
12375 * src/scan-gram.l: Likewise.
12376 * src/tables.c (table_grow, pack_vector): Likewise.
12377
12378 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12379 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12380 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12381 * m4/mbstate_t.m4: Sync with fileutils.
12382 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12383
12384 * po/LINGUAS: Add pt_BR.
12385 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12386 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12387 lib/timevar.c.
12388 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12389 manual recommends.
12390 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12391
12392 * src/complain.c (strerror_r): Remove decl; not needed.
12393 (strerror): Use same pattern as ../lib/error.c.
12394
12395 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12396
12397 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12398
12399 * src/main.c (main): Cast result of bindtextdomain and textdomain
12400 to void, to avoid a GCC warning when --disable-nls is in effect.
12401
12402 * src/scan-gram.l: Use strings rather than escapes when possible,
12403 to minimize the number of warnings from xgettext.
12404 (handle_action_dollar, handle_action_at): Don't use isdigit,
12405 as it mishandles negative chars and it may not work as expected
12406 outside the C locale.
12407
12408 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12409 this is a GCC extension and is not portable to other compilers.
12410
12411 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12412 Do not include <ctype.h>; no longer needed.
12413 Do not include <malloc.h>; no longer needed (and generates
12414 warnings on OpenBSD 3.0).
12415
12416 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12417 it's not portable.
12418
12419 * tests/regression.at: Do not use 'cc -c input.c -o input';
12420 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12421
12422 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12423 exit status as failure, not just exit status 1. Sun C exits
12424 with status 2 sometimes.
12425
12426 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12427 Use it for the two large tests.
12428
124292002-08-02 Akim Demaille <akim@epita.fr>
12430
12431 * src/conflicts.c (conflicts_output): Don't output rules never
12432 reduced here, since anyway that computation doesn't work.
12433 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12434 (rule_useless_p, rule_never_reduced_p): New.
12435 (grammar_rules_partial_print): Use a filter instead of a range.
12436 Display the title only if needed.
12437 (grammar_rules_print): Adjust.
12438 (grammar_rules_never_reduced_report): New.
12439 * src/tables.c (action_row): Move the computation of rules never
12440 reduced to...
12441 (token_actions): here.
12442 * src/main.c (main): Make the parser before making the report, so
12443 that rules never reduced are computed.
12444 Call grammar_rules_never_reduced_report.
12445 * src/print.c (print_results): Report rules never reduced.
12446 * tests/conflicts.at, tests/reduce.at: Adjust.
12447
124482002-08-01 Akim Demaille <akim@epita.fr>
12449
12450 Instead of attaching lookaheads and duplicating the rules being
12451 reduced by a state, attach the lookaheads to the reductions.
12452
12453 * src/state.h (state_t): Remove the `lookaheads',
12454 `lookaheads_rule' member.
12455 (reductions_t): Add a `lookaheads' member.
12456 Use a regular array for the `rules'.
12457 * src/state.c (reductions_new): Initialize the lookaheads member
12458 to 0.
12459 (state_rule_lookaheads_print): Adjust.
12460 * src/state.h, src/state.c (state_reductions_find): New.
12461 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12462 (count_rr_conflicts): Adjust.
12463 * src/lalr.c (LArule): Remove.
12464 (add_lookback_edge): Adjust.
12465 (state_lookaheads_count): New.
12466 (states_lookaheads_initialize): Merge into...
12467 (initialize_LA): this.
12468 (lalr_free): Adjust.
12469 * src/main.c (main): Don't free nullable and derives too early: it
12470 is used by --verbose.
12471 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12472
124732002-08-01 Akim Demaille <akim@epita.fr>
12474
12475 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12476 `rule_number_t**'.
12477 (set_derives, free_derives): Rename as...
12478 (derives_compute, derives_free): this.
12479 Adjust all dependencies.
12480 * src/nullable.c (set_nullable, free_nullable): Rename as...
12481 (nullable_compute, nullable_free): these.
12482 (rule_list_t): Store rule_t *, not rule_number_t.
12483 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12484 pointers, instead of their numbers.
12485 * src/main.c (main): Call nullable_free, and derives_free earlier,
12486 as they were lo longer used.
12487
124882002-08-01 Akim Demaille <akim@epita.fr>
12489
12490 * lib/timevar.c (get_time): Include children time.
12491 * src/lalr.h (LA, LArule): Don't export them: used with the
12492 state_t.
12493 * src/lalr.c (LA, LArule): Static.
12494 * src/lalr.h, src/lalr.c (lalr_free): New.
12495 * src/main.c (main): Call it.
12496 * src/tables.c (pack_vector): Check whether loc is >= to the
12497 table_size, not >.
12498 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12499 (tables_generate): do it, since that's also it which allocates
12500 them.
12501 Don't free LA and LArule, main does.
12502
125032002-07-31 Akim Demaille <akim@epita.fr>
12504
12505 Separate parser tables computation and output.
12506
12507 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12508 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12509 (yydefgoto, yydefact, high): Move to...
12510 * src/tables.h, src/tables.c: here.
12511 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12512 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12513 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12514 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12515 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12516 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12517 (action_row, save_row, token_actions, save_column, default_goto)
12518 (goto_actions, sort_actions, matching_state, pack_vector)
12519 (table_ninf_remap, pack_table, prepare_actions): Move to...
12520 * src/tables.c: here.
12521 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12522 * src/output.c (token_actions, output_base, output_conflicts)
12523 (output_check): Merge into...
12524 (prepare_actions): this.
12525 (actions_output): Rename as...
12526 (user_actions_output): this.
12527 * src/main.c (main): Call tables_generate and tables_free.
12528
125292002-07-31 Akim Demaille <akim@epita.fr>
12530
12531 Steal GCC's --time-report support.
12532
12533 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12534 stolen/adjusted from GCC.
12535 * m4/stage.m4: Remove time related checks.
12536 * m4/timevar.m4: New.
12537 * configure.in: Adjust.
12538 * src/system.h: Adjust to using timevar.h.
12539 * src/getargs.h, src/getargs.c: Support trace_time for
12540 --trace=time.
12541 * src/main.c (stage): Remove.
12542 (main): Replace `stage' invocations with timevar calls.
12543 * src/output.c: Insert pertinent timevar calls.
12544
125452002-07-31 Akim Demaille <akim@epita.fr>
12546
12547 Let --trace have arguments.
12548
12549 * src/getargs.h (enum trace_e): New.
12550 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12551 (long_options, short_options): --trace/-T takes an optional
12552 argument.
12553 Change all the uses of trace_flag to reflect the new flags.
12554 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12555
12556 Strengthen `stage' portability.
12557
12558 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12559 * configure.in: Use it.
12560 Don't check for malloc.h and sys/times.h.
12561 * src/system.h: Include them when appropriate.
12562 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12563 times and struct tms are available.
12564
125652002-07-30 Akim Demaille <akim@epita.fr>
12566
12567 In verbose parse error message, don't report `error' as an
12568 expected token.
12569 * tests/actions.at (Printers and Destructors): Adjust.
12570 * tests/calc.at (Calculator $1): Adjust.
12571 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12572 error message, do not report the parser accepts the error token in
12573 that state.
12574
125752002-07-30 Akim Demaille <akim@epita.fr>
12576
12577 Normalize conflict related messages.
12578
12579 * src/complain.h, src/complain.c (warn, complain): New.
12580 * src/conflicts.c (conflicts_print): Use them.
12581 (conflict_report_yacc): New, extracted from...
12582 (conflicts_print): here.
12583 * tests/conflicts.at, tests/existing.at: Adjust.
12584
125852002-07-30 Akim Demaille <akim@epita.fr>
12586
12587 Report rules which are never reduced by the parser: those hidden
12588 by conflicts.
12589
12590 * src/LR0.c (save_reductions): Don't make the final state too
12591 different: save its reduction (accept) instead of having a state
12592 without any action (no shift or goto, no reduce).
12593 Note: the final state is now a ``regular'' state, i.e., the
12594 parsers now contain `reduce 0' as default reduction.
12595 Nevertheless, since they decide to `accept' when yystate =
12596 final_state, they still will not reduce rule 0.
12597 * src/print.c (print_actions, print_reduction): Adjust.
12598 * src/output.c (action_row): Track reduced rules.
12599 (token_actions): Report rules never reduced.
12600 * tests/conflicts.at, tests/regression.at: Adjust.
12601
126022002-07-30 Akim Demaille <akim@epita.fr>
12603
12604 `stage' was accidently included in a previous patch.
12605 Initiate its autoconfiscation.
12606
12607 * configure.in: Look for malloc.h and sys/times.h.
12608 * src/main.c (stage): Adjust.
12609 Report only when trace_flag.
12610
126112002-07-29 Akim Demaille <akim@epita.fr>
12612
12613 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12614 state_number_t.
12615 (errs_t): symbol_t*, not symbol_number_t.
12616 (reductions_t): rule_t*, not rule_number_t.
12617 (FOR_EACH_SHIFT): New.
12618 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12619 * src/print.c, src/print_graph.c: Adjust.
12620
126212002-07-29 Akim Demaille <akim@epita.fr>
12622
12623 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12624
12625 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12626 (endtoken, accept): these.
12627 * src/reader.c (reader): Set endtoken's default tag to "$end".
12628 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12629 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12630 Adjust.
12631
126322002-07-29 Akim Demaille <akim@epita.fr>
12633
12634 * src/reduce.c (reduce_grammar): When the language is empty,
12635 complain about the start symbol, not the axiom.
12636 Use its location.
12637 * tests/reduce.at (Empty Language): New.
12638
126392002-07-26 Akim Demaille <akim@epita.fr>
12640
12641 * src/reader.h, src/reader.c (gram_error): ... can't get
12642 yycontrol without making too strong assumptions on the parser
12643 itself.
12644 * src/output.c (prepare_tokens): Use the real 0th value of
12645 token_translations instead of `0'.
12646 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12647 visible here.
12648 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12649 for the time being: %locations ought to provide it to yyerror.
12650
126512002-07-25 Akim Demaille <akim@epita.fr>
12652
12653 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12654 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12655 * tests/regression.at (Web2c Actions): Adjust.
12656
126572002-07-25 Akim Demaille <akim@epita.fr>
12658
12659 Stop storing rules from 1 to nrules + 1.
12660
12661 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12662 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12663 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12664 Iterate from 0 to nrules.
12665 Use rule_number_as_item_number and item_number_as_rule_number.
12666 Adjust to `derive' now containing possibly 0.
12667 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12668 Handle the `- 1' part in rule numbers from/to item numbers.
12669 * src/conflicts.c (log_resolution): Fix the message which reversed
12670 shift and reduce.
12671 * src/output.c (action_row): Initialize default_rule to -1.
12672 (token_actions): Adjust.
12673 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12674 expected output.
12675 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12676
126772002-07-25 Akim Demaille <akim@epita.fr>
12678
12679 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12680 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12681 (b4_c_knr_arg_decl): New.
12682 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12683 yyreport_parse_error.
12684
126852002-07-25 Akim Demaille <akim@epita.fr>
12686
12687 * data/yacc.c (yyreport_parse_error): New, extracted from...
12688 (yyparse): here.
12689 (yydestruct, yysymprint): Move above yyparse.
12690 Be K&R compliant.
12691
126922002-07-25 Akim Demaille <akim@epita.fr>
12693
12694 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12695 replace...
12696 (b4_sint_type, b4_uint_type): these.
12697 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12698 * tests/regression.at (Web2c Actions): Adjust.
12699
127002002-07-25 Akim Demaille <akim@epita.fr>
12701
12702 * src/gram.h (TIEM_NUMBER_MAX): New.
12703 (item_number_of_rule_number, rule_number_of_item_number): Rename
12704 as...
12705 (rule_number_as_item_number, item_number_as_rule_number): these.
12706 Adjust dependencies.
12707 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12708 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12709 (symbol_number_to_vector_number): New.
12710 (order): Of vector_number_t* type.
12711 (base_t, BASE_MAX, BASE_MIN): New.
12712 (froms, tos, width, pos, check): Of base_t type.
12713 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12714 (actrow): Of action_number_t type.
12715 (conflrow): Of unsigned int type.
12716 (table_ninf, base_ninf): New.
12717 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12718 (muscle_insert_int_table, muscle_insert_base_table)
12719 (muscle_insert_rule_number_table): New.
12720 (prepare_tokens): Output `toknum' as int_table.
12721 (action_row): Returns a rule_number_t.
12722 Use ACTION_MIN, not SHRT_MIN.
12723 (token_actions): yydefact is rule_number_t*.
12724 (table_ninf_remap): New.
12725 (pack_table): Use it for `base' and `table'.
12726 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12727 replaced with...
12728 (YYPACT_NINF, YYTABLE_NINF): these.
12729 (yypact, yytable): Compute their types instead of hard-coded
12730 `short'.
12731 * tests/regression.at (Web2c Actions): Adjust.
12732
127332002-07-19 Akim Demaille <akim@epita.fr>
12734
12735 * src/scan-gram.l (id): Can start with an underscore.
12736
127372002-07-16 Akim Demaille <akim@epita.fr>
12738
12739 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12740 Adjust all former `associativity' dependencies.
12741 * src/symtab.c (symbol_new): Default associativity is `undef', not
12742 `right'.
12743 (symbol_check_alias_consistence): Adjust.
12744
127452002-07-09 Akim Demaille <akim@epita.fr>
12746
12747 * doc/bison.texinfo: Properly set the ``header'' part.
12748 Use @dircategory ``GNU programming tools'' as per Texinfo's
12749 documentation.
12750 Use @copying.
12751
127522002-07-09 Akim Demaille <akim@epita.fr>
12753
12754 * lib/quotearg.h: Protect against multiple inclusions.
12755 * src/location.h (location_t): Add a `file' member.
12756 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12757 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12758 `error_one_per_line' support.
12759
127602002-07-09 Akim Demaille <akim@epita.fr>
12761
12762 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12763 * src/reader.c (lineno): Remove.
12764 Adjust all dependencies.
12765 (get_merge_function): Take a location and use complain_at.
12766 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12767 * tests/regression.at (Invalid inputs, Mixing %token styles):
12768 Adjust.
12769
127702002-07-09 Akim Demaille <akim@epita.fr>
12771
12772 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12773 recovery rule, and forbid extensions when --yacc.
12774 (gram_error): Use complain_at.
12775 * src/reader.c (reader): Exit if there were parse errors.
12776
127772002-07-09 Akim Demaille <akim@epita.fr>
12778
12779 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12780 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12781 Reported by R Blake <blakers@mac.com>.
12782
127832002-07-09 Akim Demaille <akim@epita.fr>
12784
12785 * data/yacc.c: Output the copyright notive in the header.
12786
127872002-07-03 Akim Demaille <akim@epita.fr>
12788
12789 * src/output.c (froms, tos): Are state_number_t.
12790 (save_column): sp, sp1, and sp2 are state_number_t.
12791 (prepare): Rename `final' as `final_state_number', `nnts' as
12792 `nterms_number', `nrules' as `rules_number', `nstates' as
12793 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12794 unused.
12795 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12796 * data/lalr1.cc (nsym_): Remove, unused.
12797
127982002-07-03 Akim Demaille <akim@epita.fr>
12799
12800 * src/lalr.h, src/lalr.c (goto_number_t): New.
12801 * src/lalr.c (goto_list_t): New.
12802 Propagate them.
12803 * src/nullable.c (rule_list_t): New.
12804 Propagate.
12805 * src/types.h: Remove.
12806
128072002-07-03 Akim Demaille <akim@epita.fr>
12808
12809 * src/closure.c (print_fderives): Use rule_rhs_print.
12810 * src/derives.c (print_derives): Use rule_rhs_print.
12811 (rule_list_t): New, replaces `shorts'.
12812 (set_derives): Add comments.
12813 * tests/sets.at (Nullable, Firsts): Adjust.
12814
128152002-07-03 Akim Demaille <akim@epita.fr>
12816
12817 * src/output.c (prepare_actions): Free `tally' and `width'.
12818 (prepare_actions): Allocate and free `order'.
12819 * src/symtab.c (symbols_free): Free `symbols'.
12820 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12821 * src/output.c (m4_invoke): Move to...
12822 * src/scan-skel.l: here.
12823 (<<EOF>>): Close yyout, and free its name.
12824
128252002-07-03 Akim Demaille <akim@epita.fr>
12826
12827 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12828
12829 * src/LR0.c (new_state): Merge into...
12830 (state_list_append): this.
12831 (new_states): Merge into...
12832 (generate_states): here.
12833 (set_states): Don't ensure a proper `errs' state member here, do it...
12834 * src/conflicts.c (conflicts_solve): here.
12835 * src/state.h, src/state.c: Comment changes.
12836 (state_t): Rename member `shifts' as `transitions'.
12837 Adjust all dependencies.
12838 (errs_new): For consistency, also take the values as argument.
12839 (errs_dup): Remove.
12840 (state_errs_set): New.
12841 (state_reductions_set, state_transitions_set): Assert that no
12842 previous value was assigned.
12843 (state_free): New.
12844 (states_free): Use it.
12845 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12846 temporary storage: use `errs' and `nerrs' as elsewhere.
12847 (set_conflicts): Allocate and free this `errs'.
12848
128492002-07-02 Akim Demaille <akim@epita.fr>
12850
12851 * lib/libiberty.h: New.
12852 * lib: Update the bitset implementation from upstream.
12853 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12854 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12855 * src/main.c: Adjust bitset stats calls.
12856
128572002-07-01 Paul Eggert <eggert@twinsun.com>
12858
12859 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12860 char, so that negative chars don't collide with $.
12861
128622002-06-30 Akim Demaille <akim@epita.fr>
12863
12864 Have the GLR tests be `warning' checked, and fix the warnings.
12865
12866 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12867 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12868 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12869 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12870 (yyaddDeferredAction): static.
12871 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12872 (yyreportParseError): yyprefix is const.
12873 yytokenp is used only when verbose.
12874 (yy__GNUC__): Replace with __GNUC__.
12875 (yypdumpstack): yyi is size_t.
12876 (yypreference): Un-yy local variables and arguments, to avoid
12877 clashes with `yyr1'. Anyway, we are not in the user name space.
12878 (yytname_size): be an int, as is compared with ints.
12879 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12880 Use them.
12881 * tests/cxx-gram.at: Use quotation to protect $1.
12882 Use AT_COMPILE to enable warnings hunts.
12883 Prototype yylex and yyerror.
12884 `Use' argc.
12885 Include `string.h', not `strings.h'.
12886 Produce and prototype stmtMerge only when used.
12887 yylex takes a location.
12888
128892002-06-30 Akim Demaille <akim@epita.fr>
12890
12891 We spend a lot of time in quotearg, in particular when --verbose.
12892
12893 * src/symtab.c (symbol_get): Store a quoted version of the key.
12894 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12895 Adjust all callers.
12896
128972002-06-30 Akim Demaille <akim@epita.fr>
12898
12899 * src/state.h (reductions_t): Rename member `nreds' as num.
12900 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12901 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12902
129032002-06-30 Akim Demaille <akim@epita.fr>
12904
12905 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12906 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12907 (shifts_to): Rename as...
12908 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12909 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12910 (TRANSITION_IS_DISABLED, transitions_to): these.
12911
129122002-06-30 Akim Demaille <akim@epita.fr>
12913
12914 * src/print.c (print_shifts, print_gotos): Merge into...
12915 (print_transitions): this.
12916 (print_transitions, print_errs, print_reductions): Align the
12917 lookaheads columns.
12918 (print_core, print_transitions, print_errs, print_state,
12919 print_grammar): Output empty lines separator before, not after.
12920 (state_default_rule_compute): Rename as...
12921 (state_default_rule): this.
12922 * tests/conflicts.at (Defaulted Conflicted Reduction),
12923 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12924 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12925
129262002-06-30 Akim Demaille <akim@epita.fr>
12927
12928 Display items as we display rules.
12929
12930 * src/gram.h, src/gram.c (rule_lhs_print): New.
12931 * src/gram.c (grammar_rules_partial_print): Use it.
12932 * src/print.c (print_core): Likewise.
12933 * tests/conflicts.at (Defaulted Conflicted Reduction),
12934 (Unresolved SR Conflicts): Adjust.
12935 (Unresolved SR Conflicts): Adjust and rename as...
12936 (Resolved SR Conflicts): this, as was meant.
12937 * tests/regression.at (Web2c Report): Adjust.
12938
129392002-06-30 Akim Demaille <akim@epita.fr>
12940
12941 * src/print.c (state_default_rule_compute): New, extracted from...
12942 (print_reductions): here.
12943 Pessimize, but clarify the code.
12944 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12945
129462002-06-30 Akim Demaille <akim@epita.fr>
12947
12948 * src/output.c (action_row): Let default_rule be always a rule
12949 number.
12950
129512002-06-30 Akim Demaille <akim@epita.fr>
12952
12953 * src/closure.c (print_firsts, print_fderives, closure):
12954 Use BITSET_EXECUTE.
12955 * src/lalr.c (lookaheads_print): Likewise.
12956 * src/state.c (state_rule_lookaheads_print): Likewise.
12957 * src/print_graph.c (print_core): Likewise.
12958 * src/print.c (print_reductions): Likewise.
12959 * src/output.c (action_row): Likewise.
12960 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
12961
129622002-06-30 Akim Demaille <akim@epita.fr>
12963
12964 * src/print_graph.c: Use report_flag.
12965
129662002-06-30 Akim Demaille <akim@epita.fr>
12967
12968 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
12969 to...
12970 * src/relation.h, src/relation.c (traverse, relation_digraph)
12971 (relation_print, relation_transpose): New.
12972
129732002-06-30 Akim Demaille <akim@epita.fr>
12974
12975 * src/state.h, src/state.c (shifts_to): New.
12976 * src/lalr.c (build_relations): Use it.
12977
129782002-06-30 Akim Demaille <akim@epita.fr>
12979
12980 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
12981 (item_number_of_rule_number, rule_number_of_item_number): New.
12982 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
12983 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
12984 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
12985 Propagate their use.
12986 Much remains to be done, in particular wrt `shorts' from types.h.
12987
129882002-06-30 Akim Demaille <akim@epita.fr>
12989
12990 * src/symtab.c (symbol_new): Initialize the `printer' member.
12991
129922002-06-30 Akim Demaille <akim@epita.fr>
12993
12994 * src/LR0.c (save_reductions): Remove, replaced by...
12995 * src/state.h, src/state.c (state_reductions_set): New.
12996 (reductions, errs): Rename as...
12997 (reductions_t, errs_t): these.
12998 Adjust all dependencies.
12999
130002002-06-30 Akim Demaille <akim@epita.fr>
13001
13002 * src/LR0.c (state_list_t, state_list_append): New.
13003 (first_state, last_state): Now symbol_list_t.
13004 (this_state): Remove.
13005 (new_itemsets, append_states, save_reductions): Take a state_t as
13006 argument.
13007 (set_states, generate_states): Adjust.
13008 (save_shifts): Remove, replaced by...
13009 * src/state.h, src/state.c (state_shifts_set): New.
13010 (shifts): Rename as...
13011 (shifts_t): this.
13012 Adjust all dependencies.
13013 * src/state.h (state_t): Remove the `next' member.
13014
130152002-06-30 Akim Demaille <akim@epita.fr>
13016
13017 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13018 escaped in slot 0.
13019
130202002-06-30 Akim Demaille <akim@epita.fr>
13021
13022 Use hash.h for the state hash table.
13023
13024 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13025 (allocate_storage): Use state_hash_new.
13026 (free_storage): Use state_hash_free.
13027 (new_state, get_state): Adjust.
13028 * src/lalr.h, src/lalr.c (states): Move to...
13029 * src/states.h (state_t): Remove the `link' member, no longer
13030 used.
13031 * src/states.h, src/states.c: here.
13032 (state_hash_new, state_hash_free, state_hash_lookup)
13033 (state_hash_insert, states_free): New.
13034 * src/states.c (state_table, state_compare, state_hash): New.
13035 * src/output.c (output_actions): Do not free states now, since we
13036 still need to know the final_state number in `prepare', called
13037 afterwards. Do it...
13038 * src/main.c (main): here: call states_free after `output'.
13039
130402002-06-30 Akim Demaille <akim@epita.fr>
13041
13042 * src/state.h, src/state.c (state_new): New, extracted from...
13043 * src/LR0.c (new_state): here.
13044 * src/state.h (STATE_ALLOC): Move to...
13045 * src/state.c: here.
13046 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13047 * src/state.h, src/state.c: here.
13048
130492002-06-30 Akim Demaille <akim@epita.fr>
13050
13051 * src/reader.c (gensym): Rename as...
13052 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13053 (getsym): Rename as...
13054 (symbol_get): this.
13055
130562002-06-30 Akim Demaille <akim@epita.fr>
13057
13058 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13059 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13060 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13061 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13062
130632002-06-30 Akim Demaille <akim@epita.fr>
13064
13065 Make the test suite pass with warnings checked.
13066
13067 * tests/actions.at (Printers and Destructors): Improve.
13068 Avoid unsigned vs. signed issues.
13069 * tests/calc.at: Don't exercise the scanner here, do it...
13070 * tests/input.at (Torturing the Scanner): here.
13071
130722002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13073
13074 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
13075 reorganize first lines parallel to yacc.c.
13076
130772002-06-28 Akim Demaille <akim@epita.fr>
13078
13079 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13080 (b4_token_enum, b4_token_defines): New, factored from...
13081 * data/lalr1.cc, data/yacc.c, glr.c: here.
13082
130832002-06-28 Akim Demaille <akim@epita.fr>
13084
13085 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13086 unused variables.
13087 * src/output.c (merger_output): static.
13088
130892002-06-28 Akim Demaille <akim@epita.fr>
13090
13091 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
13092 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13093 pacify GCC.
13094 * src/output.c (save_row): Initialize all the variables to pacify GCC.
13095
130962002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13097
13098 Accumulated changelog for new GLR parsing features.
13099
13100 * src/conflicts.c (count_total_conflicts): Change name to
13101 conflicts_total_count.
13102 * src/conflicts.h: Ditto.
13103 * src/output.c (token_actions): Use the new name.
13104 (output_conflicts): Change conflp => conflict_list_heads, and
13105 confl => conflict_list for better readability.
13106 * data/glr.c: Use the new names.
13107 * NEWS: Add self to GLR announcement.
13108
13109 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13110
13111 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13112 Akim Demaille.
13113
13114 * data/bison.glr: Change name to glr.c
13115 * data/glr.c: Renamed from bison.glr.
13116 * data/Makefile.am: Add glr.c
13117
13118 * src/getargs.c:
13119
13120 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
13121 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
13122
13123 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13124
13125 * data/bison.glr: Be sure to restore the
13126 current #line when returning to the skeleton contents after having
13127 exposed the input file's #line.
13128
13129 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13130
13131 * data/bison.glr: Bring up to date with changes to bison.simple.
13132
13133 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13134
13135 * data/bison.glr: Correct definitions that use b4_prefix.
13136 Various reformatting.
13137 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13138 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13139 yytokenp argument; now part of stack.
13140 (yychar): Define to behave as documented.
13141 (yyclearin): Ditto.
13142
13143 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13144
13145 * src/reader.h: Add declaration for free_merger_functions.
13146
13147 * src/reader.c (merge_functions): New variable.
13148 (get_merge_function): New function.
13149 (free_merger_functions): New function.
13150 (readgram): Check for %prec that is not followed by a symbol.
13151 Handle %dprec and %merge declarations.
13152 (packgram): Initialize dprec and merger fields in rules array.
13153
13154 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13155 conflict_list_cnt, conflict_list_free): New variables.
13156 (table_grow): Also grow conflict_table.
13157 (prepare_rules): Output dprec and merger tables.
13158 (conflict_row): New function.
13159 (action_row): Output conflict lists for GLR parser. Don't use
13160 default reduction in conflicted states for GLR parser so that there
13161 are spaces for the conflict lists.
13162 (save_row): Also save conflict information.
13163 (token_actions): Allocate conflict list.
13164 (merger_output): New function.
13165 (pack_vector): Pack conflict table, too.
13166 (output_conflicts): New function to output yyconflp and yyconfl.
13167 (output_check): Allocate conflict_tos.
13168 (output_actions): Output conflict tables, also.
13169 (output_skeleton): Output b4_mergers definition.
13170 (prepare): Output b4_max_rhs_length definition.
13171 Use 'bison.glr' as default skeleton for GLR parsers.
13172
13173 * src/gram.c (glr_parser): New flag.
13174 (grammar_free): Call free_merger_functions.
13175
13176 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13177 all pairs of conflicting reductions, rather than just all tokens
13178 causing conflicts. Needed to size conflict tables.
13179 (conflicts_output): Modify call to count_rr_conflicts for new
13180 interface.
13181 (conflicts_print): Ditto.
13182 (count_total_conflicts): New function.
13183
13184 * src/reader.h (merger_list): New type.
13185 (merge_functions): New variable.
13186
13187 * src/lex.h (tok_dprec, tok_merge): New token types.
13188
13189 * src/gram.h (rule_s): Add dprec and merger fields.
13190 (glr_parser): New flag.
13191
13192 * src/conflicts.h (count_total_conflicts): New function.
13193
13194 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13195
13196 * doc/bison.texinfo (Generalized LR Parsing): New section.
13197 (GLR Parsers): New section.
13198 (Language and Grammar): Mention GLR parsing.
13199 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13200 Correct typo ("tge" -> "the").
13201
13202 * data/bison.glr: New skeleton for GLR parsing.
13203
13204 * tests/cxx-gram.at: New tests for GLR parsing.
13205
13206 * tests/testsuite.at: Include cxx-gram.at.
13207
13208 * tests/Makefile.am: Add cxx-gram.at.
13209
13210 * src/parse-gram.y:
13211
13212 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13213
13214 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
13215
132162002-06-27 Akim Demaille <akim@epita.fr>
13217
13218 * src/options.h, src/options.c: Remove.
13219 * src/getargs.c (short_options, long_options): New.
13220
132212002-06-27 Akim Demaille <akim@epita.fr>
13222
13223 * data/bison.simple, data/bison.c++: Rename as...
13224 * data/yacc.c, data/lalr1.cc: these.
13225 * doc/bison.texinfo (Environment Variables): Remove.
13226
132272002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13228
13229 * src/getargs.c (report_argmatch): Initialize strtok().
13230
132312002-06-20 Akim Demaille <akim@epita.fr>
13232
13233 * data/bison.simple (b4_symbol_actions): New, replaces...
13234 (b4_symbol_destructor, b4_symbol_printer): these.
13235 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13236 user token numbers.
13237
132382002-06-20 Akim Demaille <akim@epita.fr>
13239
13240 * data/bison.simple (yydestructor): Rename as...
13241 (yydestruct): this.
13242
132432002-06-20 Akim Demaille <akim@epita.fr>
13244
13245 * src/symtab.h, src/symtab.c (symbol_type_set)
13246 (symbol_destructor_set, symbol_precedence_set): The location is
13247 the last argument.
13248 Adjust all callers.
13249
132502002-06-20 Akim Demaille <akim@epita.fr>
13251
13252 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13253 internals.
13254 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13255 Takes a location.
13256 * src/symtab.h, src/symtab.c (symbol_class_set)
13257 (symbol_user_token_number_set): Likewise.
13258 Adjust all callers.
13259 Promote complain_at.
13260 * tests/input.at (Type Clashes): Adjust.
13261
132622002-06-20 Akim Demaille <akim@epita.fr>
13263
13264 * data/bison.simple (YYLEX): Fix the declaration when
13265 %pure-parser.
13266
132672002-06-20 Akim Demaille <akim@epita.fr>
13268
13269 * data/bison.simple (yysymprint): Don't print the token number,
13270 just its name.
13271 * tests/actions.at (Destructors): Rename as...
13272 (Printers and Destructors): this.
13273 Also exercise %printer.
13274
132752002-06-20 Akim Demaille <akim@epita.fr>
13276
13277 * data/bison.simple (YYDSYMPRINT): New.
13278 Use it to remove many of the #if YYDEBUG/if (yydebug).
13279
132802002-06-20 Akim Demaille <akim@epita.fr>
13281
13282 * src/symtab.h, src/symtab.c (symbol_t): printer and
13283 printer_location are new members.
13284 (symbol_printer_set): New.
13285 * src/parse-gram.y (PERCENT_PRINTER): New token.
13286 Handle its associated rule.
13287 * src/scan-gram.l: Adjust.
13288 (handle_destructor_at, handle_destructor_dollar): Rename as...
13289 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13290 * src/output.c (symbol_printers_output): New.
13291 (output_skeleton): Call it.
13292 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13293 since there are already many grammar files with a user `yyprint'.
13294 Replace the calls to YYPRINT to calls to yysymprint.
13295 * tests/calc.at: Adjust.
13296 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13297 taking advantage of parser very internal details (stack size!).
13298
132992002-06-20 Akim Demaille <akim@epita.fr>
13300
13301 * src/scan-gram.l: Complete the scanner with the missing patterns
13302 to pacify Flex.
13303 Use `quote' and `symbol_tag_get' where appropriate.
13304
133052002-06-19 Akim Demaille <akim@epita.fr>
13306
13307 * tests/actions.at (Destructors): Augment to test locations.
13308 * data/bison.simple (yydestructor): Pass it the current location
13309 if locations are enabled.
13310 Prototype only when __STDC__ or C++.
13311 Change the argument names to move into the yy name space: there is
13312 user code here.
13313
133142002-06-19 Akim Demaille <akim@epita.fr>
13315
13316 * data/bison.simple (b4_pure_if): New.
13317 Use it instead of #ifdef YYPURE.
13318
133192002-06-19 Akim Demaille <akim@epita.fr>
13320
13321 * data/bison.simple (b4_location_if): New.
13322 Use it instead of #ifdef YYLSP_NEEDED.
13323
133242002-06-19 Akim Demaille <akim@epita.fr>
13325
13326 Prepare @$ in %destructor, but currently don't bind it in the
13327 skeleton, as %location use is not cleaned up yet.
13328
13329 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13330 (handle_action_at): New.
13331 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13332 a braced_code_t and a location as additional arguments.
13333 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13334 unquote one when outputting `b4_dollar_dollar'.
13335 Adjust callers.
13336 * data/bison.simple (b4_eval): Remove.
13337 (b4_symbol_destructor): Adjust.
13338 * tests/input.at (Invalid @n): Adjust.
13339
133402002-06-19 Zack Weinberg <zack@codesourcery.com>
13341
13342 * doc/bison.texinfo: Document ability to have multiple
13343 prologue sections.
13344
133452002-06-18 Akim Demaille <akim@epita.fr>
13346
13347 * src/files.c (compute_base_names): When computing the output file
13348 names from the input file name, strip the directory part.
13349
133502002-06-18 Akim Demaille <akim@epita.fr>
13351
13352 * data/bison.simple.new: Comment changes.
13353 Reported by Andreas Schwab.
13354
133552002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13356
13357 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13358 there are no `label `yyoverflowlab' defined but not used' warnings
13359 when yyoverflow is defined.
13360
133612002-06-18 Akim Demaille <akim@epita.fr>
13362
13363 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13364 new member.
13365 (symbol_destructor_set): Adjust.
13366 * src/output.c (symbol_destructors_output): Output the destructor
13367 locations.
13368 Output the symbol name.
13369 * data/bison.simple (b4_symbol_destructor): Adjust.
13370
133712002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13372 and Akim Demaille <akim@epita.fr>
13373
13374 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13375 what's left on the stack when the error recovery hits EOF.
13376 * tests/actions.at (Destructors): Complete to exercise this case.
13377
133782002-06-17 Akim Demaille <akim@epita.fr>
13379
13380 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13381 arguments is really empty, not only equal to `[]'.
13382 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13383 member.
13384 (symbol_destructor_set): New.
13385 * src/output.c (symbol_destructors_output): New.
13386 * src/reader.h (brace_code_t, current_braced_code): New.
13387 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13388 (handle_dollar): Rename as...
13389 (handle_action_dollar): this.
13390 (handle_destructor_dollar): New.
13391 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13392 (grammar_declaration): Use it.
13393 * data/bison.simple (yystos): Is always defined.
13394 (yydestructor): New.
13395 * tests/actions.at (Destructors): New.
13396 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13397
133982002-06-17 Akim Demaille <akim@epita.fr>
13399
13400 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13401 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13402 rule_length only when needed.
13403 * src/output.c (actions_output, token_definitions_output): Output
13404 the full M4 block.
13405 * src/symtab.c: Don't access directly to the symbol tag, use
13406 symbol_tag_get.
13407 * src/parse-gram.y: Use symbol_list_free.
13408
134092002-06-17 Akim Demaille <akim@epita.fr>
13410
13411 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13412 (symbol_list_prepend, get_type_name): Move to...
13413 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13414 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13415 Adjust all callers.
13416 (symbol_list_free): New.
13417 * src/scan-gram.l (handle_dollar): Takes a location.
13418 * tests/input.at (Invalid $n): Adjust.
13419
134202002-06-17 Akim Demaille <akim@epita.fr>
13421
13422 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13423 (symbol_list_prepend): New.
13424 * src/parse-gram.y (%union): `list' is a new member.
13425 (symbols.1): New, replaces...
13426 (terms_to_prec.1, nterms_to_type.1): these.
13427 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13428 Take a location as additional argument.
13429 Adjust all callers.
13430
134312002-06-15 Akim Demaille <akim@epita.fr>
13432
13433 * src/parse-gram.y: Move %token in the declaration section so that
13434 we don't depend upon CVS Bison.
13435
134362002-06-15 Akim Demaille <akim@epita.fr>
13437
13438 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13439 * src/print.c (print_core): Use it.
13440
134412002-06-15 Akim Demaille <akim@epita.fr>
13442
13443 * src/conflicts.c (log_resolution): Accept the rule involved in
13444 the sr conflicts instead of the lookahead number that points to
13445 that rule.
13446 (flush_reduce): Accept the current lookahead vector as argument,
13447 instead of the index in LA.
13448 (resolve_sr_conflict): Accept the current number of lookahead
13449 bitset to consider for the STATE, instead of the index in LA.
13450 (set_conflicts): Adjust.
13451 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13452
134532002-06-15 Akim Demaille <akim@epita.fr>
13454
13455 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13456 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13457 Adjust all dependencies.
13458 * src/lalr.c (initialize_lookaheads): Split into...
13459 (states_lookaheads_count, states_lookaheads_initialize): these.
13460 (lalr): Adjust.
13461
134622002-06-15 Akim Demaille <akim@epita.fr>
13463
13464 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13465 out of...
13466 (grammar_rules_print): here.
13467 * src/reduce.c (reduce_output): Use it.
13468 * tests/reduce.at (Useless Rules, Reduced Automaton)
13469 (Underivable Rules): Adjust.
13470
134712002-06-15 Akim Demaille <akim@epita.fr>
13472
13473 Copy BYacc's nice way to report the grammar.
13474
13475 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13476 New.
13477 Don't print the rules' location, it is confusing and useless.
13478 (rule_print): Use grammar_rhs_print.
13479 * src/print.c (print_grammar): Use grammar_rules_print.
13480
134812002-06-15 Akim Demaille <akim@epita.fr>
13482
13483 Complete and rationalize `useless thing' warnings.
13484
13485 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13486 (symbol_tag_print): New.
13487 Use them everywhere in place of accessing directly the tag member.
13488 * src/gram.h, src/gram.c (rule_print): New.
13489 Use it where a rule used to be printed `by hand'.
13490 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13491 (reduce_grammar_tables): Report the useless rules.
13492 (reduce_print): Useless things are a warning, not an error.
13493 Report it as such.
13494 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13495 (Reduced Automaton, Underivable Rules): Adjust.
13496 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13497 * tests/conflicts.at (Unresolved SR Conflicts)
13498 (Solved SR Conflicts): Adjust.
13499
135002002-06-15 Akim Demaille <akim@epita.fr>
13501
13502 Let symbols have a location.
13503
13504 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13505 (getsym): Adjust.
13506 Adjust all callers.
13507 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13508 Use location_t, not int.
13509 * src/symtab.c (symbol_check_defined): Take advantage of the
13510 location.
13511 * tests/regression.at (Invalid inputs): Adjust.
13512
135132002-06-15 Akim Demaille <akim@epita.fr>
13514
13515 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13516 (input): Don't try to initialize yylloc here, do it in the
13517 scanner.
13518 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13519 * src/gram.h (rule_t): Change line and action_line into location
13520 and action_location, of location_t type.
13521 Adjust all dependencies.
13522 * src/location.h, src/location.c (empty_location): New.
13523 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13524 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13525 (grammar_current_rule_symbol_append)
13526 (grammar_current_rule_action_append): Expect a location as argument.
13527 * src/reader.c (grammar_midrule_action): Adjust to attach an
13528 action's location as dummy symbol location.
13529 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13530 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13531 the line numbers.
13532
135332002-06-14 Akim Demaille <akim@epita.fr>
13534
13535 Grammar declarations may be found in the grammar section.
13536
13537 * src/parse-gram.y (rules_or_grammar_declaration): New.
13538 (declarations): Each declaration may end with a semicolon, not
13539 just...
13540 (grammar_declaration): `"%union"'.
13541 (grammar): Branch to rules_or_grammar_declaration.
13542
135432002-06-14 Akim Demaille <akim@epita.fr>
13544
13545 * src/main.c (main): Invoke scanner_free.
13546
135472002-06-14 Akim Demaille <akim@epita.fr>
13548
13549 * src/output.c (m4_invoke): Extracted from...
13550 (output_skeleton): here.
13551 Free tempfile.
13552
135532002-06-14 Akim Demaille <akim@epita.fr>
13554
13555 * src/parse-gram.y (directives, directive, gram)
13556 (grammar_directives, precedence_directives, precedence_directive):
13557 Rename as...
13558 (declarations, declaration, grammar, grammar_declaration)
13559 (precedence_declaration, precedence_declarator): these.
13560 (symbol_declaration): New.
13561
135622002-06-14 Akim Demaille <akim@epita.fr>
13563
13564 * src/files.c (action_obstack): Remove, unused.
13565 (output_obstack): Remove it, and all its dependencies, as it is no
13566 longer needed.
13567 * src/reader.c (epilogue_set): Build the epilogue in the
13568 muscle_obstack.
13569 * src/output.h, src/output.c (muscle_obstack): Move to...
13570 * src/muscle_tab.h, src/muscle_tab.h: here.
13571 (muscle_init): Initialize muscle_obstack.
13572 (muscle_free): New.
13573 * src/main.c (main): Call it.
13574
135752002-06-14 Akim Demaille <akim@epita.fr>
13576
13577 * src/location.h: New, extracted from...
13578 * src/reader.h: here.
13579 * src/Makefile.am (noinst_HEADERS): Merge into
13580 (bison_SOURCES): this.
13581 Add location.h.
13582 * src/parse-gram.y: Use location_t instead of Bison's.
13583 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13584 Use location_t instead of ints.
13585
135862002-06-14 Akim Demaille <akim@epita.fr>
13587
13588 * data/bison.simple, data/bison.c++: Be sure to restore the
13589 current #line when returning to the skeleton contents after having
13590 exposed the input file's #line.
13591
135922002-06-12 Akim Demaille <akim@epita.fr>
13593
13594 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13595 eager.
13596 * tests/actions.at (Exotic Dollars): New.
13597
135982002-06-12 Akim Demaille <akim@epita.fr>
13599
13600 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13601 ['"/] too eagerly.
13602 * tests/input.at (Torturing the Scanner): New.
13603
136042002-06-11 Akim Demaille <akim@epita.fr>
13605
13606 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13607 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13608 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13609 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13610 * src/reader.c (reader): Use it.
13611
136122002-06-11 Akim Demaille <akim@epita.fr>
13613
13614 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13615 Adjust all callers.
13616 (scanner_last_string_free): New.
13617
136182002-06-11 Akim Demaille <akim@epita.fr>
13619
13620 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13621 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13622 (last_string, YY_OBS_FREE): New.
13623 Use them when returning an ID.
13624
136252002-06-11 Akim Demaille <akim@epita.fr>
13626
13627 Have Bison grammars parsed by a Bison grammar.
13628
13629 * src/reader.c, src/reader.h (prologue_augment): New.
13630 * src/reader.c (copy_definition): Remove.
13631
13632 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13633 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13634 (grammar_current_rule_prec_set, grammar_current_rule_check)
13635 (grammar_current_rule_symbol_append)
13636 (grammar_current_rule_action_append): Export.
13637 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13638 (symbol_list_action_append): Remove.
13639 Hook the routines from reader.
13640 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13641 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13642
13643 * src/reader.c (read_declarations): Remove, unused.
13644
13645 * src/parse-gram.y: Handle the epilogue.
13646 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13647 (grammar_start_symbol_set): this.
13648 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13649 * src/reader.c (readgram): Remove, unused.
13650 (reader): Adjust to insert eoftoken and axiom where appropriate.
13651
13652 * src/reader.c (copy_dollar): Replace with...
13653 * src/scan-gram.h (handle_dollar): this.
13654 * src/parse-gram.y: Remove `%thong'.
13655
13656 * src/reader.c (copy_at): Replace with...
13657 * src/scan-gram.h (handle_at): this.
13658
13659 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13660 New.
13661
13662 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13663 time being.
13664
13665 * src/reader.h, src/reader.c (grammar_rule_end): New.
13666
13667 * src/parse.y (current_type, current_class): New.
13668 Implement `%nterm', `%token' support.
13669 Merge `%term' into `%token'.
13670 (string_as_id): New.
13671 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13672 type name.
13673
13674 * src/parse-gram.y: Be sure to handle properly the beginning of
13675 rules.
13676
13677 * src/parse-gram.y: Handle %type.
13678 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13679
13680 * src/parse-gram.y: More directives support.
13681 * src/options.c: No longer handle source directives.
13682
13683 * src/parse-gram.y: Fix %output.
13684
13685 * src/parse-gram.y: Handle %union.
13686 Use the prologue locations.
13687 * src/reader.c (parse_union_decl): Remove.
13688
13689 * src/reader.h, src/reader.c (epilogue_set): New.
13690 * src/parse-gram.y: Use it.
13691
13692 * data/bison.simple, data/bison.c++: b4_stype is now either not
13693 defined, then default to int, or to the contents of %union,
13694 without `union' itself.
13695 Adjust.
13696 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13697
13698 * src/output.c (actions_output): Don't output braces, as they are
13699 already handled by the scanner.
13700
13701 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13702 characters to themselves.
13703
13704 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13705 that the epilogue has a proper #line.
13706
13707 * src/parse-gram.y: Handle precedence/associativity.
13708
13709 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13710 a terminal.
13711 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13712 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13713 at all to define terminals that cannot be emitted.
13714
13715 * src/scan-gram.l: Escape M4 characters.
13716
13717 * src/scan-gram.l: Working properly with escapes in user
13718 strings/characters.
13719
13720 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13721 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13722 grammar.
13723 Use more modest sizes, as for the time being the parser does not
13724 release memory, and therefore the process swallows a huge amount
13725 of memory.
13726
13727 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13728 stricter %token grammar.
13729
13730 * src/symtab.h (associativity): Add `undef_assoc'.
13731 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13732 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13733
13734 * tests/regression.at (Invalid %directive): Remove, as it is now
13735 meaningless.
13736 (Invalid inputs): Adjust to the new error messages.
13737 (Token definitions): The new grammar doesn't allow too many
13738 eccentricities.
13739
13740 * src/lex.h, src/lex.c: Remove.
13741 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13742 (copy_character, copy_string2, copy_string, copy_identifier)
13743 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13744 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13745 (parse_action): Remove.
13746 * po/POTFILES.in: Adjust.
13747
137482002-06-11 Akim Demaille <akim@epita.fr>
13749
13750 * src/reader.c (parse_action): Don't store directly into the
13751 rule's action member: return the action as a string.
13752 Don't require `rule_length' as an argument: compute it.
13753 (grammar_current_rule_symbol_append)
13754 (grammar_current_rule_action_append): New, eved out from
13755 (readgram): here.
13756 Remove `action_flag', `rulelength', unused now.
13757
137582002-06-11 Akim Demaille <akim@epita.fr>
13759
13760 * src/reader.c (grammar_current_rule_prec_set).
13761 (grammar_current_rule_check): New, eved out from...
13762 (readgram): here.
13763 Remove `xaction', `first_rhs': useless.
13764 * tests/input.at (Type clashes): New.
13765 * tests/existing.at (GNU Cim Grammar): Adjust.
13766
137672002-06-11 Akim Demaille <akim@epita.fr>
13768
13769 * src/reader.c (grammar_midrule_action): New, Eved out from
13770 (readgram): here.
13771
137722002-06-11 Akim Demaille <akim@epita.fr>
13773
13774 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13775 New.
13776 (readgram): Use them as replacement of inlined code, crule and
13777 crule1.
13778
137792002-06-11 Akim Demaille <akim@epita.fr>
13780
13781 * src/reader.c (grammar_end, grammar_symbol_append): New.
13782 (readgram): Use them.
13783 Make the use of `p' as local as possible.
13784
137852002-06-10 Akim Demaille <akim@epita.fr>
13786
13787 GCJ's parser requires the tokens to be defined before the prologue.
13788
13789 * data/bison.simple: Output the token definition before the user's
13790 prologue.
13791 * tests/regression.at (Braces parsing, Duplicate string)
13792 (Mixing %token styles): Check the output from bison.
13793 (Early token definitions): New.
13794
137952002-06-10 Akim Demaille <akim@epita.fr>
13796
13797 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13798 assigning twice the same user number to a token, so that we can
13799 use it in...
13800 * src/lex.c (lex): here.
13801 Also use `symbol_class_set' instead of hand written code.
13802 * src/reader.c (parse_assoc_decl): Likewise.
13803
138042002-06-10 Akim Demaille <akim@epita.fr>
13805
13806 * src/symtab.c, src/symtab.c (symbol_class_set)
13807 (symbol_user_token_number_set): New.
13808 * src/reader.c (parse_token_decl): Use them.
13809 Use a switch instead of ifs.
13810 Use a single argument.
13811
138122002-06-10 Akim Demaille <akim@epita.fr>
13813
13814 Remove `%thong' support as it is undocumented, unused, duplicates
13815 `%token's job, and creates useless e-mail traffic with people who
13816 want to know what it is, why it is undocumented, unused, and
13817 duplicates `%token's job.
13818
13819 * src/reader.c (parse_thong_decl): Remove.
13820 * src/options.c (option_table): Remove "thong".
13821 * src/lex.h (tok_thong): Remove.
13822
138232002-06-10 Akim Demaille <akim@epita.fr>
13824
13825 * src/symtab.c, src/symtab.c (symbol_type_set)
13826 (symbol_precedence_set): New.
13827 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13828 (value_components_used): Remove, unused.
13829
138302002-06-09 Akim Demaille <akim@epita.fr>
13831
13832 Move symbols handling code out of the reader.
13833
13834 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13835 (axiom): Move to...
13836 * src/symtab.h, src/symtab.c: here.
13837
13838 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13839 * src/reader.c (startval): Rename as...
13840 * src/symtab.h, src/symtab.c (startsymbol): this.
13841 * src/reader.c: Adjust.
13842
13843 * src/reader.c (symbol_check_defined, symbol_make_alias)
13844 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13845 (token_translations_init)
13846 Move to...
13847 * src/symtab.c: here.
13848 * src/reader.c (packsymbols): Move to...
13849 * src/symtab.h, src/symtab.c (symbols_pack): here.
13850 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13851 argument.
13852
138532002-06-03 Akim Demaille <akim@epita.fr>
13854
13855 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13856 then statements.
13857
138582002-06-03 Akim Demaille <akim@epita.fr>
13859
13860 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13861 structs with non literals.
13862 * src/scan-skel.l: never-interactive.
13863 * src/conflicts.c (enum conflict_resolution_e): No trailing
13864 comma.
13865 * src/getargs.c (usage): Split long literal strings.
13866 Reported by Hans Aberg.
13867
138682002-05-28 Akim Demaille <akim@epita.fr>
13869
13870 * data/bison.c++: Use C++ ostreams.
13871 (cdebug_): New member.
13872
138732002-05-28 Akim Demaille <akim@epita.fr>
13874
13875 * src/output.c (output_skeleton): Be sure to allocate enough room
13876 for `/' _and_ for `\0' in full_skeleton.
13877
138782002-05-28 Akim Demaille <akim@epita.fr>
13879
13880 * data/bison.c++: Catch up with bison.simple:
13881 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13882 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13883 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13884 and popping traces.
13885
138862002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13887
13888 * src/output.c (output_skeleton): Put an explicit path in front of
13889 the skeleton file name, rather than relying on the -I directory,
13890 to partially alleviate effects of having a skeleton file lying around
13891 in the current directory.
13892
138932002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13894
13895 * src/conflicts.c (log_resolution): Correct typo:
13896 obstack_printf should be obstack_fgrow1.
13897
138982002-05-26 Akim Demaille <akim@epita.fr>
13899
13900 * src/state.h (state_t): `solved_conflicts' is a new member.
13901 * src/LR0.c (new_state): Set it to 0.
13902 * src/conflicts.h, src/conflicts.c (print_conflicts)
13903 (free_conflicts, solve_conflicts): Rename as...
13904 (conflicts_print, conflicts_free, conflicts_solve): these.
13905 Adjust callers.
13906 * src/conflicts.c (enum conflict_resolution_e)
13907 (solved_conflicts_obstack): New, used by...
13908 (log_resolution): this.
13909 Adjust to attach the conflict resolution to each state.
13910 Complete the description with the precedence/associativity
13911 information.
13912 (resolve_sr_conflict): Adjust.
13913 * src/print.c (print_state): Output its solved_conflicts.
13914 * tests/conflicts.at (Unresolved SR Conflicts)
13915 (Solved SR Conflicts): Exercise --report=all.
13916
139172002-05-26 Akim Demaille <akim@epita.fr>
13918
13919 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13920 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13921 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13922 (token_number_t, item_number_as_token_number)
13923 (token_number_as_item_number, muscle_insert_token_number_table):
13924 Rename as...
13925 (symbol_number_t, item_number_as_symbol_number)
13926 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13927 these, since it is more appropriate.
13928
139292002-05-26 Akim Demaille <akim@epita.fr>
13930
13931 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13932 `Error:' lines.
13933 * data/bison.simple (yystos) [YYDEBUG]: New.
13934 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13935 error recovery.
13936 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13937
139382002-05-25 Akim Demaille <akim@epita.fr>
13939
13940 * doc/bison.texinfo (Debugging): Split into...
13941 (Tracing): this new section, its former contents, and...
13942 (Understanding): this new section.
13943 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13944 by...
13945 (report_flag): this.
13946 Adjust all dependencies.
13947 (report_args, report_types, report_argmatch): New.
13948 (usage, getargs): Report/support -r, --report.
13949 * src/options.h
13950 (struct option_table_struct): Rename as..,
13951 (struct option_table_s): this.
13952 Rename the `set_flag' member to `flag' to match with getopt_long's
13953 struct.
13954 * src/options.c (option_table): Split verbose into an entry for
13955 %verbose, and another for --verbose.
13956 Support --report/-r, so remove -r from the obsolete --raw.
13957 * src/print.c: Attach full item sets and lookaheads reports to
13958 report_flag instead of trace_flag.
13959 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
13960
139612002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13962 and Paul Eggert <eggert@twinsun.com>
13963
13964 * data/bison.simple (yyparse): Correct error handling to conform to
13965 POSIX and yacc. Specifically, after syntax error is discovered,
13966 do not reduce further before shifting the error token.
13967 Clean up the code a bit by removing the labels yyerrdefault,
13968 yyerrhandle, yyerrpop.
13969 * NEWS: Document the above.
13970
139712002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13972
13973 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
13974 type; it isn't always big enough, since it doesn't necessarily
13975 include non-terminals.
13976 (yytranslate): Expand definition of yy_token_number_type, so that
13977 the latter can be removed.
13978 (yy_token_number_type): Remove, only one use.
13979 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
13980 don't use TokenNumberType as element type.
13981
13982 * tests/regression.at: Modify expected output to agree with change
13983 to yyr1 and yytranslate.
13984
139852002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
13986
13987 * src/reader.c (parse_action): Use copy_character instead of
13988 obstack_1grow.
13989
139902002-05-13 Akim Demaille <akim@epita.fr>
13991
13992 * tests/regression.at (Token definitions): Prototype yylex and
13993 yyerror.
13994
139952002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13996
13997 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
13998 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
13999 32-bit arithmetic.
14000 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14001
140022002-05-07 Akim Demaille <akim@epita.fr>
14003
14004 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14005 avoid GCC warnings.
14006
140072002-05-07 Akim Demaille <akim@epita.fr>
14008
14009 Kill GCC warnings.
14010
14011 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14012 over the RHS of each rule.
14013 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14014 * src/state.h (state_t): Member `nitems' is unsigned short.
14015 * src/LR0.c (get_state): Adjust.
14016 * src/reader.c (packgram): Likewise.
14017 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14018 `Type'.
14019 (muscle_insert_int_table): Remove, unused.
14020 (prepare_rules): Remove `max'.
14021
140222002-05-06 Akim Demaille <akim@epita.fr>
14023
14024 * src/closure.c (print_firsts): Display of the symbol tags.
14025 (bitmatrix_print): Move to...
14026 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14027 here.
14028 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14029
140302002-05-06 Akim Demaille <akim@epita.fr>
14031
14032 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14033 hash_do_for_each.
14034
140352002-05-06 Akim Demaille <akim@epita.fr>
14036
14037 * src/LR0.c (new_state, get_state): Instead of using the global
14038 `kernel_size' and `kernel_base', have two new arguments:
14039 `core_size' and `core'.
14040 Adjust callers.
14041
140422002-05-06 Akim Demaille <akim@epita.fr>
14043
14044 * src/reader.c (packgram): No longer end `ritem' with a 0
14045 sentinel: it is not used.
14046
140472002-05-05 Akim Demaille <akim@epita.fr>
14048
14049 New experimental feature: display the lookaheads in the report and
14050 graph.
14051
14052 * src/print (print_core): When --trace-flag, display the rules
14053 lookaheads.
14054 * src/print_graph.c (print_core): Likewise.
14055 Swap the arguments.
14056 Adjust caller.
14057
140582002-05-05 Akim Demaille <akim@epita.fr>
14059
14060 * tests/torture.at (Many lookaheads): New test.
14061
140622002-05-05 Akim Demaille <akim@epita.fr>
14063
14064 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14065 (GENERATE_MUSCLE_INSERT_TABLE): this.
14066 (output_int_table, output_unsigned_int_table, output_short_table)
14067 (output_token_number_table, output_item_number_table): Replace with...
14068 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14069 (muscle_insert_short_table, muscle_insert_token_number_table)
14070 (muscle_insert_item_number_table): these.
14071 Adjust all callers.
14072 (prepare_tokens): Don't free `translations', since...
14073 * src/reader.h, src/reader.c (grammar_free): do it.
14074 Move to...
14075 * src/gram.h, src/gram.c (grammar_free): here.
14076 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14077 b4_translate_max.
14078
140792002-05-05 Akim Demaille <akim@epita.fr>
14080
14081 * src/output.c (output_unsigned_int_table): New.
14082 (prepare_rules): `i' is unsigned.
14083 `prhs', `rline', `r2' are unsigned int.
14084 Rename muscle `rhs_number_max' as `rhs_max'.
14085 Output muscles `prhs_max', `rline_max', and `r2_max'.
14086 Free rline and r1.
14087 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14088 to compute types instead of constant types.
14089 * tests/regression.at (Web2c Actions): Adjust.
14090
140912002-05-04 Akim Demaille <akim@epita.fr>
14092
14093 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14094 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14095 Adjust dependencies.
14096 * src/output.c (token_definitions_output): Be sure not to output a
14097 `#define 'a'' when fed with `%token 'a' "a"'.
14098 * tests/regression.at (Token definitions): New.
14099
141002002-05-03 Paul Eggert <eggert@twinsun.com>
14101
14102 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14103 for K&R C.
14104
141052002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14106
14107 * Makefile.am (SUBDIRS): Remove intl.
14108 (EXTRA_DIST): Add config/config.rpath.
14109
141102002-05-03 Akim Demaille <akim@epita.fr>
14111
14112 * data/bison.simple (m4_if): Don't output empty enums.
14113 And actually, output valid enum definitions :(.
14114
141152002-05-03 Akim Demaille <akim@epita.fr>
14116
14117 * configure.bat: Remove, completely obsolete.
14118 * Makefile.am (EXTRA_DIST): Adjust.
14119 Don't distribute config.rpath...
14120 * config/Makefile.am (EXTRA_DIST): Do it.
14121
141222002-05-03 Akim Demaille <akim@epita.fr>
14123
14124 * configure.in (GETTEXT_VERSION): New.
14125 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14126
141272002-05-03 Akim Demaille <akim@epita.fr>
14128
14129 * data/bison.simple (b4_token_enum): New.
14130 (b4_token_defines): Use it to output tokens both as #define and
14131 enums.
14132 Suggested by Paul Eggert.
14133 * src/output.c (token_definitions_output): Don't output spurious
14134 white spaces.
14135
141362002-05-03 Akim Demaille <akim@epita.fr>
14137
14138 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14139
141402002-05-02 Robert Anisko <robert@lrde.epita.fr>
14141
14142 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14143 Update the stack class, give a try to deque as the default container.
14144
141452002-05-02 Akim Demaille <akim@epita.fr>
14146
14147 * data/bison.simple (yyparse): Do not implement @$ = @1.
14148 (YYLLOC_DEFAULT): Adjust to do it.
14149 * doc/bison.texinfo (Location Default Action): Fix.
14150
141512002-05-02 Akim Demaille <akim@epita.fr>
14152
14153 * src/reader.c (parse_braces): Merge into...
14154 (parse_action): this.
14155
141562002-05-02 Akim Demaille <akim@epita.fr>
14157
14158 * configure.in (ALL_LINGUAS): Remove.
14159 * po/LINGUAS, hr.po: New.
14160
141612002-05-02 Akim Demaille <akim@epita.fr>
14162
14163 Remove the so called hairy (semantic) parsers.
14164
14165 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14166 * src/gram.h, src/gram.c (semantic_parser): Remove.
14167 (rule_t): Remove the guard and guard_line members.
14168 * src/lex.h (token_t): remove tok_guard.
14169 * src/options.c (option_table): Remove %guard and %semantic_parser
14170 support.
14171 * src/output.c, src/output.h (guards_output): Remove.
14172 (prepare): Adjust.
14173 (token_definitions_output): Don't output the `T'
14174 tokens (???).
14175 (output_skeleton): Don't output the guards.
14176 * src/files.c, src/files.c (attrsfile): Remove.
14177 * src/reader.c (symbol_list): Remove the guard and guard_line
14178 members.
14179 Adjust dependencies.
14180 (parse_guard): Remove.
14181 * data/bison.hairy: Remove.
14182 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14183 BISON_HAIRY.
14184
141852002-05-02 Akim Demaille <akim@epita.fr>
14186
14187 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14188 (parse_guard): Rename the formal argument `stack_offset' as
14189 `rule_length', which is more readable.
14190 Adjust callers.
14191 (copy_at, copy_dollar): Instead of outputting the hard coded
14192 values of $$, $n and so forth, output invocation to b4_lhs_value,
14193 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
14194 Note: this patch partially drops `semantic-parser' support: it
14195 always does `rule_length - n', where semantic parsers ought to
14196 always use `-n'.
14197 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14198 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14199
142002002-05-02 Akim Demaille <akim@epita.fr>
14201
14202 * configure.in (AC_INIT): Bump to 1.49b.
14203 (AM_INIT_AUTOMAKE): Short invocation.
14204
142052002-05-02 Akim Demaille <akim@epita.fr>
14206
14207 Version 1.49a.
14208
142092002-05-01 Akim Demaille <akim@epita.fr>
14210
14211 * src/skeleton.h: Remove.
14212
142132002-05-01 Akim Demaille <akim@epita.fr>
14214
14215 * src/skeleton.h: Fix the #endif.
14216 Reported by Magnus Fromreide.
14217
142182002-04-26 Paul Eggert <eggert@twinsun.com>
14219
14220 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14221 Define if we define YYSTYPE and YYLTYPE, respectively.
14222 (YYCOPY): Fix [] quoting problem in the non-GCC case.
14223
142242002-04-25 Robert Anisko <robert@lrde.epita.fr>
14225
14226 * src/scan-skel.l: Postprocess quadrigraphs.
14227
14228 * src/reader.c (copy_character): New function, used to output
14229 single characters while replacing `[' and `]' with quadrigraphs, to
14230 avoid troubles with M4 quotes.
14231 (copy_comment): Output characters with copy_character.
14232 (read_additionnal_code): Likewise.
14233 (copy_string2): Likewise.
14234 (copy_definition): Likewise.
14235
14236 * tests/calc.at: Exercise M4 quoting.
14237
142382002-04-25 Akim Demaille <akim@epita.fr>
14239
14240 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14241 between `!' and the command.
14242 Reported by Paul Eggert.
14243
142442002-04-24 Robert Anisko <robert@lrde.epita.fr>
14245
14246 * tests/calc.at: Exercise prologue splitting.
14247
14248 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14249 `b4_post_prologue' instead of `b4_prologue'.
14250
14251 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14252 muscles.
14253 (output): Free pre_prologue_obstack and post_prologue_obstack.
14254 * src/files.h, src/files.c (attrs_obstack): Remove.
14255 (pre_prologue_obstack, post_prologue_obstack): New.
14256 * src/reader.c (copy_definition): Add a parameter to specify the
14257 obstack to fill, instead of using attrs_obstack unconditionally.
14258 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14259 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14260
142612002-04-23 Paul Eggert <eggert@twinsun.com>
14262
14263 * data/bison.simple: Remove unnecessary commentary and white
14264 space differences from 1_29-branch.
14265 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14266
14267 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14268 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14269 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14270 constructors or destructors.
14271
14272 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14273
142742002-04-23 Akim Demaille <akim@epita.fr>
14275
14276 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14277 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14278 location with columns.
14279 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14280 All reported by Paul Eggert.
14281
142822002-04-22 Akim Demaille <akim@epita.fr>
14283
14284 * src/reduce.c (dump_grammar): Move to...
14285 * src/gram.h, src/gram.c (grammar_dump): here.
14286 Be sure to separate long item numbers.
14287 Don't read the members of a rule's prec if its nil.
14288
142892002-04-22 Akim Demaille <akim@epita.fr>
14290
14291 * src/output.c (table_size, table_grow): New.
14292 (MAXTABLE): Remove, replace uses with table_size.
14293 (pack_vector): Instead of dying when the table is too big, grow it.
14294
142952002-04-22 Akim Demaille <akim@epita.fr>
14296
14297 * data/bison.simple (yyr1): Its type is that of a token number.
14298 * data/bison.c++ (r1_): Likewise.
14299 * tests/regression.at (Web2c Actions): Adjust.
14300
143012002-04-22 Akim Demaille <akim@epita.fr>
14302
14303 * src/reader.c (token_translations_init): 256 is now the default
14304 value for the error token, i.e., it will be assigned another
14305 number if the user assigned 256 to one of her tokens.
14306 (reader): Don't force 256 to error.
14307 * doc/bison.texinfo (Symbols): Adjust.
14308 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14309 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14310 etc. instead of 10, 20, 30 (which was used to `jump' over error
14311 (256) and undefined (2)).
14312
143132002-04-22 Akim Demaille <akim@epita.fr>
14314
14315 Propagate more token_number_t.
14316
14317 * src/gram.h (token_number_as_item_number)
14318 (item_number_as_token_number): New.
14319 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14320 Use it to create output_item_number_table and
14321 output_token_number_table.
14322 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14323 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14324 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14325 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14326
143272002-04-22 Akim Demaille <akim@epita.fr>
14328
14329 * src/output.h, src/output.c (get_lines_number): Remove.
14330
143312002-04-19 Akim Demaille <akim@epita.fr>
14332
14333 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14334 as Lex/Flex'.
14335 (Debugging): More details about enabling the debugging features.
14336 (Table of Symbols): Describe $$, $n, @$, and @n.
14337 Suggested by Tim Josling.
14338
143392002-04-19 Akim Demaille <akim@epita.fr>
14340
14341 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14342
143432002-04-10 Akim Demaille <akim@epita.fr>
14344
14345 * src/system.h: Rely on HAVE_LIMITS_H.
14346 Suggested by Paul Eggert.
14347
143482002-04-09 Akim Demaille <akim@epita.fr>
14349
14350 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14351 full stderr, and strip it according to the bison options, instead
14352 of composing the error message from different bits.
14353 This makes it easier to check for several error messages.
14354 Adjust all the invocations.
14355 Add an invocation exercising the error token.
14356 Add an invocation demonstrating a stupid error message.
14357 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14358 Adjust the tests.
14359 Error message are for stderr, not stdout.
14360
143612002-04-09 Akim Demaille <akim@epita.fr>
14362
14363 * src/gram.h, src/gram.c (error_token_number): Remove, use
14364 errtoken->number.
14365 * src/reader.c (reader): Don't specify the user token number (2)
14366 for $undefined, as it uselessly prevents using it.
14367 * src/gram.h (token_number_t): Move to...
14368 * src/symtab.h: here.
14369 (state_t.number): Is a token_number_t.
14370 * src/print.c, src/reader.c: Use undeftoken->number instead of
14371 hard coded 2.
14372 (Even though this 2 is not the same as above: the number of the
14373 undeftoken remains being 2, it is its user token number which
14374 might not be 2).
14375 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14376 `user_token_number_max'.
14377 Output `undef_token_number'.
14378 * data/bison.simple, data/bison.c++: Use them.
14379 Be sure to map invalid yylex return values to
14380 `undef_token_number'. This saves us from gratuitous SEGV.
14381
14382 * tests/conflicts.at (Solved SR Conflicts)
14383 (Unresolved SR Conflicts): Adjust.
14384 * tests/regression.at (Web2c Actions): Adjust.
14385
143862002-04-08 Akim Demaille <akim@epita.fr>
14387
14388 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14389 Adding #line.
14390 Remove the duplicate `typedefs'.
14391 (RhsNumberType): Fix the declaration and various other typos.
14392 Use __ofile__.
14393 * data/bison.simple: Use __ofile__.
14394 * src/scan-skel.l: Handle __ofile__.
14395
143962002-04-08 Akim Demaille <akim@epita.fr>
14397
14398 * src/gram.h (item_number_t): New, the type of item numbers in
14399 RITEM. Note that it must be able to code symbol numbers as
14400 positive number, and the negation of rule numbers as negative
14401 numbers.
14402 Adjust all dependencies (pretty many).
14403 * src/reduce.c (rule): Remove this `short *' pointer: use
14404 item_number_t.
14405 * src/system.h (MINSHORT, MAXSHORT): Remove.
14406 Include `limits.h'.
14407 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14408 (shortcpy): Remove.
14409 (MAXTABLE): Move to...
14410 * src/output.c (MAXTABLE): here.
14411 (prepare_rules): Use output_int_table to output rhs.
14412 * data/bison.simple, data/bison.c++: Adjust.
14413 * tests/torture.at (Big triangle): Move the limit from 254 to
14414 500.
14415 * tests/regression.at (Web2c Actions): Ajust.
14416
14417 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14418 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14419 passes, but produces negative #line number, once fixed, GCC is
14420 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14421 C), it passes.
14422 * src/state.h (state_h): Code input lines on ints, not shorts.
14423
144242002-04-08 Akim Demaille <akim@epita.fr>
14425
14426 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14427 and then the grammar.
14428
144292002-04-08 Akim Demaille <akim@epita.fr>
14430
14431 * src/system.h: No longer using strndup.
14432
144332002-04-07 Akim Demaille <akim@epita.fr>
14434
14435 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14436 * src/output.c (output_table_data): Return the longest number.
14437 (prepare_tokens): Output `token_number_max').
14438 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14439 New.
14440 Use them to define yy_token_number_type/TokenNumberType.
14441 Use this type for yytranslate.
14442 * tests/torture.at (Big triangle): Push the limit from 124 to
14443 253.
14444 * tests/regression.at (Web2c Actions): Adjust.
14445
144462002-04-07 Akim Demaille <akim@epita.fr>
14447
14448 * tests/torture.at (Big triangle): New.
14449 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14450 * tests/existing.at: here.
14451
144522002-04-07 Akim Demaille <akim@epita.fr>
14453
14454 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14455 nritems.
14456 Adjust dependencies.
14457
144582002-04-07 Akim Demaille <akim@epita.fr>
14459
14460 * src/reader.c: Normalize increments to prefix form.
14461
144622002-04-07 Akim Demaille <akim@epita.fr>
14463
14464 * src/reader.c, symtab.c: Remove debugging code.
14465
144662002-04-07 Akim Demaille <akim@epita.fr>
14467
14468 Rename all the `bucket's as `symbol_t'.
14469
14470 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14471 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14472 * src/symtab.c, src/symtab.h (bucket): Rename as...
14473 (symbol_t): this.
14474 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14475 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14476 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14477 (buckets_new, buckets_free, buckets_do): Rename as...
14478 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14479 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14480 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14481 (symbols_new, symbols_free, symbols_do): these.
14482
144832002-04-07 Akim Demaille <akim@epita.fr>
14484
14485 Use lib/hash for the symbol table.
14486
14487 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14488 EOF.
14489 * src/lex.c (lex): Set the `number' member of new terminals.
14490 * src/reader.c (bucket_check_defined, bucket_make_alias)
14491 (bucket_check_alias_consistence, bucket_translation): New.
14492 (reader, grammar_free, readgram, token_translations_init)
14493 (packsymbols): Adjust.
14494 (reader): Number the predefined tokens.
14495 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14496 for predefined tokens.
14497 * src/symtab.h (bucket): Remove all the hash table related
14498 members.
14499 * src/symtab.c (symtab): Replace by...
14500 (bucket_table): this.
14501 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14502 (buckets_new, buckets_do): New.
14503
145042002-04-07 Akim Demaille <akim@epita.fr>
14505
14506 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14507 (start_symbol, max_user_token_number, semantic_parser)
14508 (error_token_number): Initialize.
14509 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14510 Initialize.
14511 (reader): Don't.
14512 (errtoken, eoftoken, undeftoken, axiom): Extern.
14513
145142002-04-07 Akim Demaille <akim@epita.fr>
14515
14516 * src/gram.h (rule_s): prec and precsym are now pointers
14517 to the bucket giving the priority/associativity.
14518 Member `associativity' removed: useless.
14519 * src/reduce.c, src/conflicts.c: Adjust.
14520
145212002-04-07 Akim Demaille <akim@epita.fr>
14522
14523 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14524 Properly escape the symbols' TAG when outputting them.
14525
145262002-04-07 Akim Demaille <akim@epita.fr>
14527
14528 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14529
145302002-04-07 Akim Demaille <akim@epita.fr>
14531
14532 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14533 (LArule): this, which is an array to rule_t*.
14534 * src/print.c, src/conflicts.c: Adjust.
14535
145362002-04-07 Akim Demaille <akim@epita.fr>
14537
14538 * src/gram.h (rule_t): Rename `number' as `user_number'.
14539 `number' is a new member.
14540 Adjust dependencies.
14541 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14542
145432002-04-07 Akim Demaille <akim@epita.fr>
14544
14545 As a result of the previous patch, it is no longer needed
14546 to reorder ritem itself.
14547
14548 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14549
145502002-04-07 Akim Demaille <akim@epita.fr>
14551
14552 Be sure never to walk through RITEMS, but use only data related to
14553 the rules themselves. RITEMS should be banished.
14554
14555 * src/output.c (output_token_translations): Rename as...
14556 (prepare_tokens): this.
14557 In addition to `translate', prepare the muscles `tname' and
14558 `toknum', which were handled by...
14559 (output_rule_data): this.
14560 Remove, and move the remainder of its outputs into...
14561 (prepare_rules): this new routines, which also merges content from
14562 (output_gram): this.
14563 (prepare_rules): Be sure never to walk through RITEMS.
14564 (output_stos): Rename as...
14565 (prepare_stos): this.
14566 (output): Always invoke prepare_states, after all, just don't use it
14567 in the output if you don't need it.
14568
145692002-04-07 Akim Demaille <akim@epita.fr>
14570
14571 * src/LR0.c (new_state): Display `nstates' as the name of the
14572 newly created state.
14573 Adjust to initialize first_state and last_state if needed.
14574 Be sure to distinguish the initial from the final state.
14575 (new_states): Create the itemset of the initial state, and use
14576 new_state.
14577 * src/closure.c (closure): Now that the initial state has its
14578 items properly set, there is no need for a special case when
14579 creating `ruleset'.
14580
14581 As a result, now the rule 0, reducing to $axiom, is visible in the
14582 outputs. Adjust the test suite.
14583
14584 * tests/conflicts.at (Solved SR Conflicts)
14585 (Unresolved SR Conflicts): Adjust.
14586 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14587 * tests/conflicts.at (S/R in initial): New.
14588
145892002-04-07 Akim Demaille <akim@epita.fr>
14590
14591 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14592 the RHS of the rules.
14593 * src/output.c (output_gram): Likewise.
14594
145952002-04-07 Akim Demaille <akim@epita.fr>
14596
14597 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14598 bucket.
14599 Adjust all dependencies.
14600 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14601 `number' of the buckets too.
14602 * src/gram.h: Include `symtab.h'.
14603 (associativity): Move to...
14604 * src/symtab.h: here.
14605 No longer include `gram.h'.
14606
146072002-04-07 Akim Demaille <akim@epita.fr>
14608
14609 * src/gram.h, src/gram.c (rules_rhs_length): New.
14610 (ritem_longest_rhs): Use it.
14611 * src/gram.h (rule_t): `number' is a new member.
14612 * src/reader.c (packgram): Set it.
14613 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14614 the end of `rules', and count them out of `nrules'.
14615 (reduce_output, dump_grammar): Adjust.
14616 * src/print.c (print_grammar): It is no longer needed to check for
14617 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14618 * tests/reduce.at (Reduced Automaton): New test.
14619
146202002-04-07 Akim Demaille <akim@epita.fr>
14621
14622 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14623 lacking `+ 1' to nrules, Bison reported as useless a token if it
14624 was used solely to set the precedence of the last rule...
14625
146262002-04-07 Akim Demaille <akim@epita.fr>
14627
14628 * data/bison.c++, data/bison.simple: Don't output the current file
14629 name in #line, to avoid useless diffs between two identical
14630 outputs under different names.
14631
146322002-04-07 Akim Demaille <akim@epita.fr>
14633
14634 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14635 Normalize loops to using `< nrules + 1', not `<= nrules'.
14636
146372002-04-07 Akim Demaille <akim@epita.fr>
14638
14639 * TODO: Update.
14640
146412002-04-07 Akim Demaille <akim@epita.fr>
14642
14643 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14644 bucket.value as bucket.number.
14645
146462002-04-07 Akim Demaille <akim@epita.fr>
14647
14648 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14649 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14650 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14651 RHS, instead of being an index in RITEMS.
14652
146532002-04-04 Paul Eggert <eggert@twinsun.com>
14654
14655 * doc/bison.texinfo: Update copyright date.
14656 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14657 (Symbols): Warn about running Bison in one character set,
14658 but compiling and/or running in an incompatible one.
14659 Warn about character code 256, too.
14660
146612002-04-03 Paul Eggert <eggert@twinsun.com>
14662
14663 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14664 YYERROR_VERBOSE is nonzero, not whether it is defined.
14665
14666 Merge changes from bison-1_29-branch.
14667
146682002-03-20 Paul Eggert <eggert@twinsun.com>
14669
14670 Merge fixes from Debian bison_1.34-1.diff.
14671
14672 * configure.in (AC_PREREQ): 2.53.
14673
146742002-03-20 Akim Demaille <akim@epita.fr>
14675
14676 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14677
146782002-03-19 Paul Eggert <eggert@twinsun.com>
14679
14680 * src/bison.simple (YYCOPY): New macro.
14681 (YYSTACK_RELOCATE): Use it.
14682 Remove Type arg; no longer needed. All callers changed.
14683 (yymemcpy): Remove; no longer needed.
14684
14685 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14686 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14687
146882002-03-19 Akim Demaille <akim@epita.fr>
14689
14690 Test and fix the #line outputs.
14691
14692 * tests/atlocal.at (GCC): New.
14693 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14694 (Prologue synch line, %union synch line, Postprologue synch line)
14695 (Action synch line, Epilogue synch line): New tests.
14696 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14697 * data/bison.simple, data/bison.c++: Use it.
14698
146992002-03-19 Akim Demaille <akim@epita.fr>
14700
14701 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14702 (Solved SR Conflicts, %expect not enough, %expect right)
14703 (%expect too much): Move to...
14704 * tests/conflicts.at: this new file.
14705
147062002-03-19 Akim Demaille <akim@epita.fr>
14707
14708 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14709 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14710 that we can move to enums for instance.
14711 * src/output.c (token_definitions_output): Output a list of
14712 `token-name, token-number' instead of the #define.
14713 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14714
147152002-03-14 Akim Demaille <akim@epita.fr>
14716
14717 Use Gettext 0.11.1.
14718
147192002-03-09 Robert Anisko <robert@lrde.epita.fr>
14720
14721 * data/bison.c++: Make the user able to add members to the generated
14722 parser by subclassing.
14723
147242002-03-05 Robert Anisko <robert@lrde.epita.fr>
14725
14726 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14727 a character.
14728 Reported by Nicolas Tisserand and Nicolas Burrus.
14729
147302002-03-04 Robert Anisko <robert@lrde.epita.fr>
14731
14732 * src/reader.c: Warn about lacking semi-colons, do not complain.
14733
147342002-03-04 Robert Anisko <robert@lrde.epita.fr>
14735
14736 * data/bison.c++: Remove a debug line.
14737
147382002-03-04 Robert Anisko <robert@lrde.epita.fr>
14739
14740 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14741 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14742 provide a default implementation.
14743
147442002-03-04 Akim Demaille <akim@epita.fr>
14745
14746 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14747 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14748 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14749 * tests/semantic.at (Parsing Guards): Similarly.
14750 * src/reader.at (readgram): Complain if the last rule is not ended
14751 with a semi-colon.
14752
147532002-03-04 Akim Demaille <akim@epita.fr>
14754
14755 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14756 * src/closure.c: here.
14757 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14758 RTC.
14759 * src/warshall.h, src/warshall.c: Remove.
14760 * tests/sets.at (Broken Closure): Adjust.
14761
147622002-03-04 Akim Demaille <akim@epita.fr>
14763
14764 * src/output.c (output_skeleton): tempdir is const.
14765 bytes_read is unused.
14766
147672002-03-04 Akim Demaille <akim@epita.fr>
14768
14769 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14770 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14771 Update.
14772 From Michael Hayes.
14773
147742002-03-04 Akim Demaille <akim@epita.fr>
14775
14776 * src/closure.c (closure): `r' is unused.
14777
147782002-03-04 Akim Demaille <akim@epita.fr>
14779
14780 * tests/sets.at (Broken Closure): Add the ending `;'.
14781 * src/reader.at (readgram): Complain if a rule is not ended with a
14782 semi-colon.
14783
147842002-03-04 Akim Demaille <akim@epita.fr>
14785
14786 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14787 (count_sr_conflicts): Use bitset_count.
14788 * src/reduce.c (inaccessable_symbols): Ditto.
14789 (bits_size): Remove.
14790 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14791
147922002-03-04 Akim Demaille <akim@epita.fr>
14793
14794 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14795 * src/reduce.c: Remove the `bitset_zero's following the
14796 `bitset_create's, as now it is performed by the latter.
14797
147982002-03-04 Akim Demaille <akim@epita.fr>
14799
14800 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14801 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14802 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14803 latest sources from Michael.
14804
148052002-03-04 Akim Demaille <akim@epita.fr>
14806
14807 * src/output.c (output): Don't free the grammar.
14808 * src/reader.c (grammar_free): New.
14809 * src/main.c (main): Call it and don't free symtab here.
14810
148112002-03-04 Akim Demaille <akim@epita.fr>
14812
14813 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14814 before returning.
14815 Reported by Benoit Perrot.
14816
148172002-03-04 Akim Demaille <akim@epita.fr>
14818
14819 Use bitset operations when possible, not loops over bits.
14820
14821 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14822 bitset_or.
14823 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14824 * src/reduce.c (useless_nonterminals): Formatting changes.
14825 * src/warshall.c (TC): Use bitset_or.
14826
148272002-03-04 Akim Demaille <akim@epita.fr>
14828
14829 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14830 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14831 Ditto.
14832
148332002-03-04 Akim Demaille <akim@epita.fr>
14834
14835 * src/lalr.c (F): Now a bitset*.
14836 Adjust all dependencies.
14837
148382002-03-04 Akim Demaille <akim@epita.fr>
14839
14840 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14841 Adjust all dependencies.
14842
148432002-03-04 Akim Demaille <akim@epita.fr>
14844
14845 * src/L0.c, src/LR0.h (nstates): Be size_t.
14846 Adjust comparisons (signed vs unsigned).
14847 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14848 bitset*.
14849 Adjust all dependencies.
14850
148512002-03-04 Akim Demaille <akim@epita.fr>
14852
14853 * src/closure.c (firsts): Now, also a bitset.
14854 Adjust all dependencies.
14855 (varsetsize): Remove, now unused.
14856 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14857
148582002-03-04 Akim Demaille <akim@epita.fr>
14859
14860 * src/print.c: Convert to use bitset.h, not hand coded iterations
14861 over ints.
14862
148632002-03-04 Akim Demaille <akim@epita.fr>
14864
14865 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14866
148672002-03-04 Akim Demaille <akim@epita.fr>
14868
14869 * src/closure.c (ruleset): Be a bitset.
14870 (rulesetsize): Remove.
14871
148722002-03-04 Akim Demaille <akim@epita.fr>
14873
14874 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14875 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14876 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14877 * src/closure.c (fderives): Be an array of bitsets.
14878
148792002-02-28 Robert Anisko <robert@lrde.epita.fr>
14880
14881 * data/bison.c++: Merge the two generated headers. Insert a copyright
14882 notice in each output file.
14883
148842002-02-28 Akim Demaille <akim@epita.fr>
14885
14886 * data/bison.c++: Copy the prologue of bison.simple to fetch
14887 useful M4 definitions, such as b4_header_guard.
14888
148892002-02-25 Akim Demaille <akim@epita.fr>
14890
14891 * src/getargs.c (version): Give the name of the authors, and use a
14892 translator friendly scheme for the bgr
14893 copyright notice.
14894
148952002-02-25 Akim Demaille <akim@epita.fr>
14896
14897 * src/output.c (header_output): Remove, now handled completely via
14898 M4.
14899
149002002-02-25 Akim Demaille <akim@epita.fr>
14901
14902 * m4/m4.m4: New, from CVS Autoconf.
14903 * configure.in: Invoke it.
14904 * src/output.c (output_skeleton): Use its result instead of the
14905 hard coded name.
14906
149072002-02-25 Akim Demaille <akim@epita.fr>
14908
14909 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14910 Fileutils 4.1.5.
14911 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14912 * src/output.c (output_skeleton): Use mkstemp to create a real
14913 temporary file.
14914 Move the filling of `skeleton' and its muscle to...
14915 (prepare): here.
14916 (output): Move the definition of the prologue muscle to...
14917 (prepare): here.
14918 * src/system.h (DEFAULT_TMPDIR): New.
14919
149202002-02-14 Paul Eggert <eggert@twinsun.com>
14921
14922 Remove the support for C++ namespace cleanliness; it was
14923 causing more problems than it was curing, since it didn't work
14924 properly on some nonstandard C++ compilers. This can wait
14925 for a proper C++ parser.
14926
14927 * NEWS: Document this.
14928 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14929 of C++, as it's treated like C now.
14930 * src/bison.simple (YYSTD): Remove.
14931 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14932 Treat C++ just like Standard C instead of trying to support
14933 namespace cleanliness.
14934
149352002-02-14 Akim Demaille <akim@epita.fr>
14936
14937 * tests/regression.at (else): Adjust to Andreas' change.
14938
149392002-02-14 Akim Demaille <akim@epita.fr>
14940
14941 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14942
149432002-02-13 Andreas Schwab <schwab@suse.de>
14944
14945 * src/output.c (output_rule_data): Don't output NULL, it might
14946 not be defined yet.
14947
149482002-02-11 Robert Anisko <robert@lrde.epita.fr>
14949
14950 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
14951 (Copyright notice): Update.
14952
149532002-02-11 Akim Demaille <akim@epita.fr>
14954
14955 * tests/regression.at (%nonassoc and eof): Don't include
14956 nonportable headers.
14957
149582002-02-08 Robert Anisko <robert@lrde.epita.fr>
14959
14960 * data/bison.c++: Correct error recovery. Make the user able to
14961 initialize the starting location.
14962
149632002-02-07 Akim Demaille <akim@epita.fr>
14964
14965 * tests/input.at: New.
14966
149672002-02-07 Robert Anisko <robert@lrde.epita.fr>
14968
14969 * data/bison.c++: Replace some direct m4 expansions by constants. Be
14970 more consistent when naming methods and variables. Put preprocessor
14971 directives around tables only needed for debugging.
14972
149732002-02-07 Robert Anisko <robert@lrde.epita.fr>
14974
14975 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14976 C++ parsers.
14977 (yy::b4_name::parse): Use print_.
14978
149792002-02-07 Robert Anisko <robert@lrde.epita.fr>
14980
14981 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
14982
149832002-02-07 Robert Anisko <robert@lrde.epita.fr>
14984
14985 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
14986 C++ parsers.
14987 (yy::b4_name::parse): Build verbose error messages, and use error_.
14988
149892002-02-06 Robert Anisko <robert@lrde.epita.fr>
14990
14991 * data/bison.c++: Fix m4 quoting in comments.
14992
149932002-02-06 Robert Anisko <robert@lrde.epita.fr>
14994
14995 * data/bison.c++: Adjust the parser code. Fix some muscles that were
14996 not expanded by m4.
14997
149982002-02-05 Akim Demaille <akim@epita.fr>
14999
15000 * data/bison.c++: Adjust to the M4 back end.
15001 More is certainly needed.
15002
150032002-02-05 Akim Demaille <akim@epita.fr>
15004
15005 Give a try to M4 as a back end.
15006
15007 * lib/readpipe.c: New, from wdiff.
15008 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15009 BISON_HAIRY.
15010 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15011 specific values. Now it is m4 that performs the lookup.
15012 * src/parse-skel.y: Remove.
15013 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15014 * src/output.c (actions_output, guards_output)
15015 (token_definitions_output): No longer keeps track of the output
15016 line number, hence remove the second argument.
15017 (guards_output): Check against the guard member of a rule, not the
15018 action member.
15019 Adjust callers.
15020 (output_skeleton): Don't look for the skeleton location, let m4 do
15021 that.
15022 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15023 file will be used.
15024 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15025 (prepare): Given that for the time being changesyntax is not
15026 usable in M4, rename the muscles using `-' to `_'.
15027 Define `defines_flag', `output_parser_name' and `output_header_name'.
15028 * src/output.h (actions_output, guards_output)
15029 (token_definitions_output): Adjust prototypes.
15030 * src/scan-skel.l: Instead of scanning the skeletons, it now
15031 processes the output of m4: `__oline__' and `#output'.
15032 * data/bison.simple: Adjust to be used by M4(sugar).
15033 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15034 to date.
15035 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15036 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15037 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15038 shamelessly stolen from CVS Autoconf.
15039
150402002-02-05 Akim Demaille <akim@epita.fr>
15041
15042 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15043 * configure.in: Check for the declarations of free and malloc.
15044 * src/muscle_tab.c: Adjust.
15045
150462002-02-05 Akim Demaille <akim@epita.fr>
15047
15048 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15049 which have no values.
15050
150512002-02-05 Akim Demaille <akim@epita.fr>
15052
15053 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15054 * data/: here.
15055
150562002-01-29 Paul Eggert <eggert@twinsun.com>
15057
15058 * src/bison.simple (YYSIZE_T): Do not define merely because
15059 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15060 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15061
150622002-01-27 Akim Demaille <akim@epita.fr>
15063
15064 Fix `%nonassoc and eof'.
15065
15066 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15067 which were not properly copied! Replace
15068 memcpy (res->errs, src->errs, src->nerrs);
15069 with
15070 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15071 !!!
15072 * tests/regression.at (%nonassoc and eof): Adjust to newest
15073 Autotest: `.' is not in the PATH.
15074
150752002-01-27 Akim Demaille <akim@epita.fr>
15076
15077 * tests/sets.at (AT_EXTRACT_SETS): New.
15078 (Nullable): Use it.
15079 (Firsts): New.
15080
150812002-01-26 Akim Demaille <akim@epita.fr>
15082
15083 * tests/actions.at, tests/calc.at, tests/headers.at,
15084 * tests/torture.at: Adjust to the newest Autotest which no longer
15085 forces `.' in the PATH.
15086
150872002-01-25 Akim Demaille <akim@epita.fr>
15088
15089 * tests/regression.at (%nonassoc and eof): New.
15090 Suggested by Robert Anisko.
15091
150922002-01-24 Akim Demaille <akim@epita.fr>
15093
15094 Bison dumps core when trying to complain about broken input files.
15095 Reported by Cris van Pelt.
15096
15097 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15098 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15099 into...
15100 (Invalid inputs): Strengthen: exercise parse_percent_token.
15101
151022002-01-24 Robert Anisko <robert.anisko@epita.fr>
15103
15104 * src/Makefile.am: Add bison.c++.
15105 * src/bison.c++: New skeleton.
15106
151072002-01-21 Paolo Bonzini <bonzini@gnu.org>
15108
15109 * po/it.po: New.
15110
151112002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15112
15113 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15114
151152002-01-20 Marc Autret <marc@gnu.org>
15116
15117 * src/files.c (compute_output_file_names): Fix
15118
151192002-01-20 Marc Autret <marc@gnu.org>
15120
15121 * tests/output.at: New test.
15122 * src/files.c (compute_base_names): Don't map extensions when
15123 the YACC flag is set, use defaults.
15124 Reported by Evgeny Stambulchik.
15125
151262002-01-20 Marc Autret <marc@gnu.org>
15127
15128 * src/system.h: Need to define __attribute__ away for non-GCC
15129 compilers as well (i.e., the vendor C compiler).
15130 Suggested by Albert Chin-A-Young.
15131
151322002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15133
15134 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15135 canonical definition.
15136 * src/system.h: Use the canonical definition for PARAMS (avoids
15137 a conflict with the macro from lib/hash.h).
15138
151392002-01-11 Akim Demaille <akim@epita.fr>
15140
15141 * configure.in: Use AC_FUNC_STRNLEN.
15142 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
15143
151442002-01-09 Akim Demaille <akim@epita.fr>
15145
15146 * src/files.c, src/files.h (output_infix): New.
15147 (tab_extension): Remove.
15148 (compute_base_names): Compute the former, drop the latter.
15149 * src/output.c (prepare): Insert the muscles `output-infix', and
15150 `output-suffix'.
15151 * src/parse-skel.y (string, string.1): New.
15152 (section.header): Use it.
15153 (section.yacc): Remove.
15154 (prefix): Remove too.
15155 * src/scan-skel.l: Adjust.
15156 * src/bison.simple, src/bison.hairy: Adjust.
15157
151582002-01-09 Akim Demaille <akim@epita.fr>
15159
15160 * configure.in (WERROR_CFLAGS): Compute it.
15161 * src/Makefile.am (CFLAGS): Pass it.
15162 * tests/atlocal.in (CFLAGS): Idem.
15163 * src/files.c: Fix a few warnings.
15164 (get_extension_index): Remove, unused.
15165
151662002-01-08 Akim Demaille <akim@epita.fr>
15167
15168 * src/getargs.c (AS_FILE_NAME): New.
15169 (getargs): Use it to convert DOSish file names.
15170 * src/files.c (base_name): Rename as full_base_name to avoid
15171 clashes with `base_name ()'.
15172 (filename_split): New.
15173 (compute_base_names): N-th rewrite, using filename_split.
15174
151752002-01-08 Akim Demaille <akim@epita.fr>
15176
15177 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15178 New, stolen from the Fileutils 4.1.
15179 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15180 * configure.in: Check for the presence of memrchr, and of its
15181 prototype.
15182
151832002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15184
15185 * lib/hash.h (__P): Added definition for this macro.
15186 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15187 BUILT_SOURCES, to ensure they are generated first.
15188 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15189 %error-verbose to allow bootstrapping with bison 1.30x.
15190
151912002-01-06 Akim Demaille <akim@epita.fr>
15192
15193 * src/reader.c (parse_braces): Don't fetch the next char, the
15194 convention is to fetch on entry.
15195 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15196 'switch' without a following semicolon.
15197 * tests/regression.at (braces parsing): New.
15198
151992002-01-06 Akim Demaille <akim@epita.fr>
15200
15201 Bison is dead wrong in its RR conflict reports.
15202
15203 * tests/torture.at (GNU Cim Grammar): New.
15204 * src/conflicts.c (count_rr_conflicts): Fix.
15205
152062002-01-06 Akim Demaille <akim@epita.fr>
15207
15208 Creating package.m4 from configure.ac causes too many problems.
15209
15210 * tests/Makefile.am (package.m4): Create it by hand,
15211 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15212
152132002-01-06 Akim Demaille <akim@epita.fr>
15214
15215 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15216 skeleton.h.
15217
152182002-01-04 Paul Eggert <eggert@twinsun.com>
15219
15220 * doc/bison.texinfo (Debugging):
15221 Remove YYSTDERR; it's no longer defined or used.
15222 Also, s/cstdio.h/cstdio/.
15223
152242002-01-03 Akim Demaille <akim@epita.fr>
15225
15226 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15227
152282002-01-03 Akim Demaille <akim@epita.fr>
15229
15230 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15231 tracing code to --trace, wait for a better --trace option, with
15232 args.
15233
152342002-01-03 Akim Demaille <akim@epita.fr>
15235
15236 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15237 The ISO C++ standard is extremely clear about it: stderr is
15238 considered a macro, not a regular symbol (see table 94 `Header
15239 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15240 Therefore std:: does not apply to it. It still does with fprintf.
15241 Also, s/cstdio.h/cstdio/.
15242
152432002-01-03 Akim Demaille <akim@epita.fr>
15244
15245 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15246 for non system headers.
15247
152482002-01-02 Akim Demaille <akim@epita.fr>
15249
15250 Equip the skeleton chain with location tracking, runtime trace,
15251 pure parser and scanner.
15252
15253 * src/parse-skel.y: Request a pure parser, locations, and prefix
15254 renaming.
15255 (%union): Having several members with the same type does not help
15256 type mismatches, simplify.
15257 (YYPRINT, yyprint): New.
15258 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15259 (skel_error): this.
15260 Handle locations.
15261 * src/scan-skel.l: Adjust to these changes.
15262 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15263 (LOCATION_PRINT, skel_control_t): New.
15264
152652001-12-30 Akim Demaille <akim@epita.fr>
15266
15267 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15268 replace `gb' with BLANKS.
15269 * src/scan-skel.l: Adjust.
15270
152712001-12-30 Akim Demaille <akim@epita.fr>
15272
15273 * src/system.h: We don't need nor want bcopy.
15274 Throw away MS-DOS crap: we don't need getpid.
15275 * configure.in: We don't need strndup. It was even causing
15276 problems: because Flex includes the headers *before* us,
15277 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15278 not visible.
15279 * lib/xstrndup.c: New.
15280 * src/scan-skel.l: Use it.
15281 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15282 * src/parse-skel.y: Use %directives instead of #defines.
15283
152842001-12-30 Akim Demaille <akim@epita.fr>
15285
15286 * src/skeleton.h: New.
15287 * src/output.c (output_parser, output_master_parser): Remove, dead
15288 code.
15289 * src/output.h (get_lines_number, actions_output, guards_output)
15290 (token_definitions_output): Prototype them.
15291 * src/parse-skel.y: Add the license notice.
15292 Include output.h and skeleton.h.
15293 (process_skeleton): Returns void, and takes a single parameter.
15294 * src/scan-skel.l: Add the license notice.
15295 Include skeleton.h.
15296 Don't use %option yylineno: it seems that then Flex imagines
15297 REJECT has been used, and therefore it won't reallocate its
15298 buffers (which makes no other sense to me than a bug). It results
15299 in warnings for `unused: yy_flex_realloc'.
15300
153012001-12-30 Robert Anisko <robert.anisko@epita.fr>
15302
15303 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15304 (MUSCLE_INSERT_PREFIX): ...to there.
15305 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15306 (MUSCLE_INSERT_PREFIX): Move from here...
15307
15308 * src/bison.hairy: Add a section directive. Put braces around muscle
15309 names. This parser skeleton is still broken, but Bison should not
15310 choke on a bad muscle 'syntax'.
15311 * src/bison.simple: Add a section directive. Put braces around muscle
15312 names.
15313
15314 * src/files.h (strsuffix, stringappend): Add declarations.
15315 (tab_extension): Add declaration.
15316 (short_base_name): Add declaration.
15317
15318 * src/files.c (strsuffix, stringappend): No longer static. These
15319 functions are used in the skeleton parser.
15320 (tab_extension): New.
15321 (compute_base_names): Use the computations done in this function
15322 to guess if the generated parsers should have '.tab' in their
15323 names.
15324 (short_base_name): No longer static.
15325
15326 * src/output.c (output_skeleton): New.
15327 (output): Disable call to output_master_parser, and give a try to
15328 a new skeleton handling system.
15329 (guards_output, actions_output): No longer static.
15330 (token_definitions_output, get_lines_number): No longer static.
15331
15332 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15333
15334 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
15335 parse-skel.y.
15336
15337 * src/parse-skel.y: New file.
15338 * src/scan-skel.l: New file.
15339
153402001-12-29 Akim Demaille <akim@epita.fr>
15341
15342 %name-prefix is broken.
15343
15344 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15345 Adjust all dependencies.
15346 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15347 %name-prefix.
15348
15349 Renaming yylval but not yylloc is not consistent. Now we do.
15350
15351 * src/bison.simple: Prefix yylloc if used.
15352 * doc/bison.texinfo (Decl Summary): Document that.
15353
153542001-12-29 Akim Demaille <akim@epita.fr>
15355
15356 * doc/bison.texinfo: Promote `%long-directive' over
15357 `%long_directive'.
15358 Remove all references to fixed-output-files, yacc is enough.
15359
153602001-12-29 Akim Demaille <akim@epita.fr>
15361
15362 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15363 user prologue. These are defaults.
15364 * tests/actions.at (Mid-rule actions): Make sure the user can
15365 define YYDEBUG and YYERROR_VERBOSE.
15366
153672001-12-29 Akim Demaille <akim@epita.fr>
15368
15369 * src/output.c (header_output): Don't forget to export YYLTYPE and
15370 yylloc.
15371 * tests/headers.at (export YYLTYPE): New, make sure it does.
15372 * tests/regression.at (%union and --defines, Invalid CPP headers):
15373 Move to...
15374 * tests/headers.at: here.
15375
153762001-12-29 Akim Demaille <akim@epita.fr>
15377
15378 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15379
153802001-12-29 Akim Demaille <akim@epita.fr>
15381
15382 * tests/actions.at (Mid-rule actions): Output on a single line
15383 instead of several.
15384
153852001-12-29 Akim Demaille <akim@epita.fr>
15386
15387 * doc/bison.texinfo: Formatting changes.
15388
153892001-12-29 Akim Demaille <akim@epita.fr>
15390
15391 Don't store the token defs in a muscle, just be ready to output it
15392 on command. Now possible via `symbols'. Fixes a memory leak.
15393
15394 * src/output.c (token_definitions_output): New.
15395 (output_parser, header_output): Use it.
15396 * src/reader.c (symbols_save): Remove.
15397
153982001-12-29 Akim Demaille <akim@epita.fr>
15399
15400 * src/bison.simple: Do not provide a default for YYSTYPE and
15401 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15402 default.
15403
154042001-12-29 Akim Demaille <akim@epita.fr>
15405
15406 Mid-rule actions are simply... ignored!
15407
15408 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15409 the empty-rule associated to the dummy symbol, not to the host
15410 rule.
15411 * tests/actions.at (Mid-rule actions): New.
15412
154132001-12-29 Akim Demaille <akim@epita.fr>
15414
15415 Memory leak.
15416
15417 * src/reader.c (reader): Free grammar.
15418
154192001-12-29 Akim Demaille <akim@epita.fr>
15420
15421 Memory leak.
15422
15423 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15424 since it allocates it for each state, although only one is needed.
15425 (allocate_storage): Do it here.
15426
154272001-12-29 Akim Demaille <akim@epita.fr>
15428
15429 * src/options.h, src/options.c (create_long_option_table): Rename
15430 as...
15431 (long_option_table_new): this, with a clearer prototype.
15432 (percent_table): Remove, unused,
15433 * src/getargs.c (getargs): Adjust.
15434
154352001-12-29 Akim Demaille <akim@epita.fr>
15436
15437 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15438 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15439 as states.
15440
154412001-12-29 Akim Demaille <akim@epita.fr>
15442
15443 * src/lalr.c (build_relations): Rename `states' as `states1'.
15444 Sorry, I don't understand exactly what it is, no better name...
15445
154462001-12-29 Akim Demaille <akim@epita.fr>
15447
15448 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15449 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15450 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15451 as rules.
15452
154532001-12-29 Akim Demaille <akim@epita.fr>
15454
15455 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15456 ago.
15457
154582001-12-29 Akim Demaille <akim@epita.fr>
15459
15460 * src/reader.c, src/reader.h (user_toknums): Remove.
15461 Adjust all users to use symbols[i]->user_token_number.
15462
154632001-12-29 Akim Demaille <akim@epita.fr>
15464
15465 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15466 Adjust all users to use symbols[i]->prec or ->assoc.
15467
154682001-12-29 Akim Demaille <akim@epita.fr>
15469
15470 * src/reader.c, src/reader.h (tags): Remove.
15471 Adjust all users to use symbols[i]->tag.
15472
154732001-12-29 Akim Demaille <akim@epita.fr>
15474
15475 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15476 and rule_table.
15477 * src/reader.c (packsymbols): Fill this table.
15478 Drop sprec.
15479 * src/conflicts.c (resolve_sr_conflict): Adjust.
15480 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15481 single table.
15482 Use symbols[i]->tag instead of tags[i].
15483
154842001-12-29 Akim Demaille <akim@epita.fr>
15485
15486 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15487 In addition, put a comment in there, to replace...
15488 * tests/regression.at (%union and C comments): Remove.
15489
154902001-12-29 Akim Demaille <akim@epita.fr>
15491
15492 * tests/regression.at (Web2c Actions): Blindly move the actual
15493 output as expected output. The contents *seem* right to me, but I
15494 can't pretend reading perfectly parser tables... Nonetheless, all
15495 the other tests pass correctly, the table look OK, even though the
15496 presence of `$axiom' is to be noted: AFAICS it is useless (but
15497 harmless).
15498
154992001-12-29 Akim Demaille <akim@epita.fr>
15500
15501 * src/reader.c (readgram): Don't add the rule 0 if there were no
15502 rules read. In other words, add it _after_ having performed
15503 grammar sanity checks.
15504 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15505
155062001-12-29 Akim Demaille <akim@epita.fr>
15507
15508 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15509 visible, and some states have now a different number.
15510
155112001-12-29 Akim Demaille <akim@epita.fr>
15512
15513 * src/reader.c (readgram): Bind the initial rule's lineno to that
15514 of the first rule.
15515 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15516 (Solved SR Conflicts): Adjust rule 0's line number.
15517
155182001-12-29 Akim Demaille <akim@epita.fr>
15519
15520 Fix the `GAWK Grammar' failure.
15521
15522 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15523 the reductions of the first state which was mistakenly confused
15524 with the final state because precisely final_state was initialized
15525 to 0.
15526 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15527 now noticed by Bison.
15528 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15529 have a reduction on $default.
15530
155312001-12-29 Akim Demaille <akim@epita.fr>
15532
15533 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15534 rule line numbers.
15535 * src/closure.c (print_closure): Likewise.
15536 * src/derives.c (print_derives): Likewise.
15537 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15538 now.
15539
155402001-12-29 Akim Demaille <akim@epita.fr>
15541
15542 * src/lalr.c (lookaheads_print): New.
15543 (lalr): Call it when --trace-flag.
15544 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15545 are dumped.
15546
155472001-12-29 Akim Demaille <akim@epita.fr>
15548
15549 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15550 when walking through ritem, even via rule->rhs.
15551 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15552 (useful_production, useless_nonterminals): Likewise.
15553 (reduce_grammar_tables): Likewise, plus update nritems.
15554 * src/nullable.c (set_nullable): Likewise.
15555 * src/lalr.c (build_relations): Likewise.
15556 * tests/sets.at (Nullable): Adjust.
15557 Fortunately, now, the $axiom is no longer nullable.
15558
155592001-12-29 Akim Demaille <akim@epita.fr>
15560
15561 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15562 the 0-sentinel.
15563 * src/gram.c (ritem_longest_rhs): Likewise.
15564 * src/reduce.c (nonterminals_reduce): Likewise.
15565 * src/print_graph.c (print_graph): Likewise.
15566 * src/output.c (output_rule_data): Likewise.
15567 * src/nullable.c (set_nullable): Likewise.
15568
155692001-12-29 Akim Demaille <akim@epita.fr>
15570
15571 * src/output.c: Comment changes.
15572
155732001-12-27 Paul Eggert <eggert@twinsun.com>
15574
15575 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15576 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15577 Sparc, as they were causing more porting problems than the
15578 (minor) performance improvement was worth.
15579
15580 Also, catch up with 1.31's YYSTD.
15581
155822001-12-27 Akim Demaille <akim@epita.fr>
15583
15584 * src/output.c (output_gram): Rely on nritems, not the
15585 0-sentinel. See below.
15586 Use -1 as separator, not 0.
15587 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15588 Rely on -1 as separator in yyrhs, instead of 0.
15589 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15590 twice `Now at end of input', therefore there are two lines less to
15591 expect.
15592
155932001-12-27 Akim Demaille <akim@epita.fr>
15594
15595 * tests/regression.at (Unresolved SR Conflicts):
15596 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15597 below.
15598
155992001-12-27 Akim Demaille <akim@epita.fr>
15600
15601 * src/LR0.c (new_state): Recognize the final state by the fact it
15602 is reached by eoftoken.
15603 (insert_start_shifting_state, insert_eof_shifting_state)
15604 (insert_accepting_state, augment_automaton): Remove, since now
15605 these states are automatically computed from the initial state.
15606 (generate_states): Adjust.
15607 * src/print.c: When reporting a rule number to the user, substract
15608 1, so that the axiom rule is rule 0, and the first user rule is 1.
15609 * src/reduce.c: Likewise.
15610 * src/print_graph.c (print_core): For the time being, just as for
15611 the report, depend upon --trace-flags to dump the full set of
15612 items.
15613 * src/reader.c (readgram): Once the grammar read, insert the rule
15614 0: `$axiom: START-SYMBOL $'.
15615 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15616 number of the states has changed (the final state is no longer
15617 necessarily the last), catch up.
15618
156192001-12-27 Akim Demaille <akim@epita.fr>
15620
15621 Try to make the use of the eoftoken valid. Given that its value
15622 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15623 is used instead of > 0 where appropriate, (ii), depend upon nritems
15624 instead of the 0-sentinel.
15625
15626 * src/gram.h, src/gram.c (nritems): New.
15627 Expected to be duplication of nitems, but for the time being...
15628 * src/reader.c (packgram): Assert nritems and nitems are equal.
15629 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15630 * src/closure.c (print_closure, print_fderives): Likewise.
15631 * src/gram.c (ritem_print): Likewise.
15632 * src/print.c (print_core, print_grammar): Likewise.
15633 * src/print_graph.c: Likewise.
15634
156352001-12-27 Akim Demaille <akim@epita.fr>
15636
15637 * src/main.c (main): If there are complains after grammar
15638 reductions, then output the report anyway if requested, then die.
15639 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15640 * src/reader.c (eoftoken): New.
15641 (parse_token_decl): If the token being defined has value `0', it
15642 is the eoftoken.
15643 (packsymbols): No longer hack `tags' to insert `$' by hand.
15644 Be sure to preserve the value of the eoftoken.
15645 (reader): Make sure eoftoken is defined.
15646 Initialize nsyms to 0: now eoftoken is created just like the others.
15647 * src/print.c (print_grammar): Don't special case the eof token.
15648 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15649 lie anyway, albeit pleasant.
15650 * tests/calc.at: Exercise error messages with eoftoken.
15651 Change the grammar so that empty input is invalid.
15652 Adjust expectations.
15653 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15654
156552001-12-27 Akim Demaille <akim@epita.fr>
15656
15657 * configure.in: Check the protos of strchr ans strspn.
15658 Replace strchr if needed.
15659 * src/system.h: Provide the protos of strchr, strspn and memchr if
15660 missing.
15661 * lib/strchr.c: New.
15662 * src/reader.c (symbols_save): Use strchr.
15663
156642001-12-27 Akim Demaille <akim@epita.fr>
15665
15666 * src/print.c, src/print_graph.c (escape): New.
15667 Use it to quote the TAGS outputs.
15668 * src/print_graph.c (print_state): Now errors are in red, and
15669 reductions in green.
15670 Prefer high to wide: output the state number on a line of its own.
15671
156722001-12-27 Akim Demaille <akim@epita.fr>
15673
15674 * src/state.h, src/state.c (reductions_new): New.
15675 * src/LR0.c (set_state_table): Let all the states have a
15676 `reductions', even if reduced to 0.
15677 (save_reductions): Adjust.
15678 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15679 * src/print.c (print_reductions, print_actions): Adjust.
15680 * src/output.c (action_row): Adjust.
15681
156822001-12-27 Akim Demaille <akim@epita.fr>
15683
15684 * src/state.h, src/state.c (errs_new, errs_dup): New.
15685 * src/LR0.c (set_state_table): Let all the states have an errs,
15686 even if reduced to 0.
15687 * src/print.c (print_errs, print_reductions): Adjust.
15688 * src/output.c (output_actions, action_row): Adjust.
15689 * src/conflicts.c (resolve_sr_conflict): Adjust.
15690
156912001-12-27 Akim Demaille <akim@epita.fr>
15692
15693 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15694
156952001-12-27 Akim Demaille <akim@epita.fr>
15696
15697 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15698 * src/print.c: here.
15699 (lookaheadset, shiftset): New, used as additional storage by
15700 print_reductions.
15701 (print_results): Adjust.
15702 (print_shifts, print_gotos, print_errs): New, extracted from...
15703 (print_actions): here.
15704 * src/print_graph.c (print_actions): Remove dead code.
15705
157062001-12-27 Akim Demaille <akim@epita.fr>
15707
15708 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15709 `$n' and `@n'.
15710
157112001-12-27 Akim Demaille <akim@epita.fr>
15712
15713 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15714 (build_relations): Adjust.
15715
157162001-12-27 Akim Demaille <akim@epita.fr>
15717
15718 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15719 duplication.
15720
157212001-12-27 Akim Demaille <akim@epita.fr>
15722
15723 * src/reader.c (packgram): Catch nitems overflows.
15724
157252001-12-27 Akim Demaille <akim@epita.fr>
15726
15727 * src/files.c, src/files.h (guard_obstack): Remove.
15728 * src/output.c (output): Adjust.
15729 * src/reader.c (parse_braces): New, factoring...
15730 (copy_action, copy_guard): these two which are renamed as...
15731 (parse_action, parse_guard): these.
15732 As a voluntary consequence, using braces around guards is now
15733 mandatory.
15734
157352001-12-27 Akim Demaille <akim@epita.fr>
15736
15737 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15738 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15739 members.
15740 (symbol_list_new): Adjust.
15741 (copy_action): action_line is the first line, not the last.
15742 (copy_guard): Just as for actions, store the `action' only, not
15743 the switch/case/break flesh.
15744 Don't parse the user action that might follow the guard, let...
15745 (readgram): do it, i.e., now, there can be an action after a
15746 guard.
15747 In other words the guard is just explicitly optional.
15748 (packgram): Adjust.
15749 * src/output.c (guards_output): New.
15750 (output_parser): Call it when needed.
15751 (output): Also free the guard and attrs obstacks.
15752 * src/files.c, src/files.h (obstack_save): Remove.
15753 (output_files): Remove.
15754 As a result, if one needs the former `.act' file, using an
15755 appropriate skeleton which requires actions and guards is now
15756 required.
15757 * src/main.c (main): Adjust.
15758 * tests/semantic.at: New.
15759 * tests/regression.at: Use `input.y' as input file name.
15760 Avoid 8+3 problems by requiring input.c when the test needs the
15761 parser.
15762
157632001-12-27 Akim Demaille <akim@epita.fr>
15764
15765 * src/reader.c (symbol_list_new): Be sure to initialize all the
15766 fields.
15767
157682001-12-27 Akim Demaille <akim@epita.fr>
15769
15770 All the hacks using a final pseudo state are now useless.
15771
15772 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15773 * src/lalr.c (nLA): New.
15774 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15775 instead of lookaheadsp from the pseudo state (nstate + 1).
15776
157772001-12-27 Akim Demaille <akim@epita.fr>
15778
15779 * src/output.c (action_row, token_actions): Use a state_t instead
15780 of a integer, and nlookaheads instead of the following state's
15781 lookaheadsp.
15782
157832001-12-27 Akim Demaille <akim@epita.fr>
15784
15785 * src/conflicts.c (log_resolution, flush_shift)
15786 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15787 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15788 (conflicts_print, print_reductions): Use a state_t instead of an
15789 integer when referring to a state.
15790 As much as possible, depend upon nlookaheads, instead of the
15791 `lookaheadsp' member of the following state (since lookaheads of
15792 successive states are successive, the difference between state n + 1
15793 and n served as the number of lookaheads for state n).
15794 * src/lalr.c (add_lookback_edge): Likewise.
15795 * src/print.c (print_core, print_actions, print_state)
15796 (print_results): Likewise.
15797 * src/print_graph.c (print_core, print_actions, print_state)
15798 (print_graph): Likewise.
15799 * src/conflicts.h: Adjust.
15800
158012001-12-27 Akim Demaille <akim@epita.fr>
15802
15803 * src/bison.hairy: Formatting/comment changes.
15804 ANSIfy.
15805 Remove `register' indications.
15806 Add plenty of `static'.
15807
158082001-12-27 Akim Demaille <akim@epita.fr>
15809
15810 * src/output.c (prepare): Drop the muscle `ntbase' which
15811 duplicates ntokens.
15812 * src/bison.simple: Formatting/comment changes.
15813 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15814 is an undocumented synonym.
15815
158162001-12-22 Akim Demaille <akim@epita.fr>
15817
15818 * src/output.c (output_table_data): Change the prototype to use
15819 `int' for array ranges: some invocations do pass an int, not a
15820 short.
15821 Reported by Wayne Green.
15822
158232001-12-22 Akim Demaille <akim@epita.fr>
15824
15825 Some actions of web2c.y are improperly triggered.
15826 Reported by Mike Castle.
15827
15828 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15829 * tests/regression.at (Web2c): Rename as...
15830 (Web2c Report): this.
15831 (Web2c Actions): New.
15832
158332001-12-22 Akim Demaille <akim@epita.fr>
15834
15835 Reductions in web2c.y are improperly reported.
15836 Reported by Mike Castle.
15837
15838 * src/conflicts.c (print_reductions): Fix.
15839 * tests/regression.at (Web2c): New.
15840
158412001-12-18 Akim Demaille <akim@epita.fr>
15842
15843 Some host fail on `assert (!"foo")', which expands to
15844 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15845 Reported by Nelson Beebee.
15846
15847 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15848 `#define it_succeeded 0' and `assert (it_succeeded)'.
15849
158502001-12-17 Marc Autret <autret_m@epita.fr>
15851
15852 * src/bison.simple: Don't hard code the skeleton line and filename.
15853 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15854 New line counter 'skeleton_line' (skeleton-line muscle).
15855
158562001-12-17 Paul Eggert <eggert@twinsun.com>
15857
15858 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15859 YYDEBUG must be defined to a nonzero value.
15860
15861 * src/bison.simple (yytname): Do not assume that the user defines
15862 YYDEBUG to a properly parenthesized expression.
15863
158642001-12-17 Akim Demaille <akim@epita.fr>
15865
15866 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15867 nlookaheads is a new member.
15868 Adjust all users.
15869 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15870 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15871 state.
15872
158732001-12-17 Akim Demaille <akim@epita.fr>
15874
15875 * src/files.h, src/files.c (open_files, close_files): Remove.
15876 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15877 let...
15878 * src/reader.c (reader): Do it.
15879
158802001-12-17 Akim Demaille <akim@epita.fr>
15881
15882 * src/conflicts.c (print_reductions): Formatting changes.
15883
158842001-12-17 Akim Demaille <akim@epita.fr>
15885
15886 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15887 (flush_reduce): New.
15888 (resolve_sr_conflict): Adjust.
15889
158902001-12-17 Akim Demaille <akim@epita.fr>
15891
15892 * src/output.c (output_obstack): Be static and rename as...
15893 (format_obstack): this, to avoid any confusion with files.c's
15894 output_obstack.
15895 * src/reader.h (muscle_obstack): Move to...
15896 * src/output.h: here, since it's defined in output.c.
15897
158982001-12-17 Akim Demaille <akim@epita.fr>
15899
15900 * src/output.c (action_row, save_column, default_goto)
15901 (sort_actions, matching_state, pack_vector): Better variable
15902 locality.
15903
159042001-12-17 Akim Demaille <akim@epita.fr>
15905
15906 * src/output.c: Various formatting changes.
15907
159082001-12-17 Akim Demaille <akim@epita.fr>
15909
15910 * src/files.c (output_files): Free the output_obstack.
15911 * src/main.c (main): Call print and print_graph conditionally.
15912 * src/print.c (print): Work unconditionally.
15913 * src/print_graph.c (print_graph): Work unconditionally.
15914 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15915
159162001-12-16 Marc Autret <autret_m@epita.fr>
15917
15918 * src/output.c (actions_output): Fix. When we use %no-lines,
15919 there is one less line per action.
15920
159212001-12-16 Marc Autret <autret_m@epita.fr>
15922
15923 * src/bison.simple: Remove a useless #line directive.
15924 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15925 * src/output.c (get_lines_number): New.
15926 (output_parser): Adjust, now takes care about the lines of a
15927 output muscles.
15928 Fix line numbering.
15929 (actions_output): Computes the number of lines taken by actions.
15930 (output_master_parser): Insert new skeleton which is the name of
15931 the output parser file name.
15932
159332001-12-15 Marc Autret <autret_m@epita.fr>
15934
15935 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15936
159372001-12-15 Marc Autret <autret_m@epita.fr>
15938
15939 * src/output.c (output_gram): Keep track of the hairy one.
15940
159412001-12-15 Akim Demaille <akim@epita.fr>
15942
15943 Make `make distcheck' work.
15944
15945 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15946 system.h which uses libgettext.h.
15947
159482001-12-15 Akim Demaille <akim@epita.fr>
15949
15950 * src/nullable.c (set_nullable): Useless rules must be skipped,
15951 otherwise, since we range over their symbols, we might look at a
15952 nonterminal which no longer ``exists'', i.e., it is not counted in
15953 `nvars', hence we overflow our arrays.
15954
159552001-12-15 Akim Demaille <akim@epita.fr>
15956
15957 The header can also be produced directly, without any obstack!
15958 Yahoo!
15959
15960 * src/files.c, src/files.h (defines_obstack): Remove.
15961 (compute_header_macro): Global.
15962 (defines_obstack_save): Remove.
15963 * src/reader.c (parse_union_decl): No longer output to
15964 defines_obstack: its content can be found in the `stype' muscle
15965 anyway.
15966 (output_token_translations): Merge into...
15967 (symbols_output): this.
15968 Rename as...
15969 (symbols_save): this.
15970 (reader): Adjust.
15971 * src/output.c (header_output): New.
15972 (output): Call it.
15973
159742001-12-15 Akim Demaille <akim@epita.fr>
15975
15976 * src/reader.c (parse_union_decl): Instead of handling two obstack
15977 simultaneously, use one to define the `stype' muscle, and use the
15978 value of the latter to fill defines_obstack.
15979 (copy_comment): Remove.
15980 (copy_comment2): Work for a single obstack.
15981 Rename as...
15982 (copy_comment): this.
15983
159842001-12-15 Akim Demaille <akim@epita.fr>
15985
15986 * src/lex.c, src/lex.h (xgetc): No longer static.
15987 * src/reader.c (parse_union_decl): Revamp.
15988
159892001-12-15 Akim Demaille <akim@epita.fr>
15990
15991 Still making progress in separating Bison into (i) input, (ii)
15992 process, (iii) output: now we can directly output the parser file
15993 without using table_obstack at all.
15994
15995 * src/files.c, src/files.h (table_obstack): Bye bye.
15996 (parser_file_name): New.
15997 * src/files.c (compute_output_file_names): Compute it.
15998 * src/output.c (actions_output, output_parser)
15999 (output_master_parser): To a file instead of an obstack.
16000
160012001-12-15 Akim Demaille <akim@epita.fr>
16002
16003 Attach actions to rules, instead of pre-outputting them to
16004 actions_obstack.
16005
16006 * src/gram.h (rule_t): action and action_line are new members.
16007 * src/reader.c (symbol_list): Likewise.
16008 (copy_action): Save the actions within the rule.
16009 (packgram): Save them in rule_table.
16010 * src/output.c (actions_output): New.
16011 (output_parser): Use it on `%%actions'.
16012 (output_rule_data): Don't free rule_table.
16013 (output): Do it.
16014 (prepare): Don't save the `action' muscle.
16015 * src/bison.simple: s/%%action/%%actions/.
16016
160172001-12-15 Akim Demaille <akim@epita.fr>
16018
16019 * src/reader.c (copy_action): When --yacc, don't append a `;'
16020 to the user action: let it fail if lacking.
16021 Suggested by Arnold Robbins and Tom Tromey.
16022
160232001-12-14 Akim Demaille <akim@epita.fr>
16024
16025 * src/lex.c (literalchar): Simply return the char you decoded, non
16026 longer mess around with obstacks and int pointers.
16027 Adjust all callers.
16028
160292001-12-14 Akim Demaille <akim@epita.fr>
16030
16031 * src/lex.c (literalchar): Don't escape the special characters,
16032 just decode them, and keep them as char (before, eol was output as
16033 the 2 char string `\n' etc.).
16034 * src/output.c (output_rule_data): Use quotearg to output the
16035 token strings.
16036
160372001-12-13 Paul Eggert <eggert@twinsun.com>
16038
16039 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16040 Do not infringe on the global user namespace when using C++.
16041 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16042 All uses of `fprintf' and `stderr' changed.
16043
16044 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16045
160462001-12-13 Akim Demaille <akim@epita.fr>
16047
16048 The computation of nullable is broken: it doesn't handle empty
16049 RHS's properly.
16050
16051 * tests/torture.at (GNU AWK Grammar): New.
16052 * tests/sets.at (Nullable): New.
16053 * src/nullable.c (set_nullable): Instead of blindly looping over
16054 `ritems', loop over the rules, and then over their rhs's.
16055
16056 Work around Autotest bugs.
16057
16058 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16059 frame, because Autotest understand lines starting with a `+' as
16060 traces from the shell. Then, they are not processed properly.
16061 Admittedly an Autotest bug, but we don't have time to wait for
16062 Autotest to catch up.
16063 * tests/regression.at (Broken Closure): Adjust to the new table
16064 frames.
16065 Move to...
16066 * tests/sets.at: here.
16067
160682001-12-13 Akim Demaille <akim@epita.fr>
16069
16070 * src/closure.c (closure): Use nrules instead of playing tricks
16071 with BITS_PER_WORD.
16072
160732001-12-13 Akim Demaille <akim@epita.fr>
16074
16075 * src/print.c (print_actions): Output the handling of `$' as the
16076 traces do: shifting the token EOF. Before EOF was treated as a
16077 nonterminal.
16078 * tests/regression.at: Adjust some tests.
16079 * src/print_graph.c (print_core): Complete the set of items via
16080 closure. The next-to-final and final states are still unsatisfying,
16081 but that's to be addressed elsewhere.
16082 No longer output the rule numbers, but do output the state number.
16083 A single loop for the shifts + gotos is enough, but picked a
16084 distinct color for each.
16085 (print_graph): Initialize and finalize closure.
16086
160872001-12-13 Akim Demaille <akim@epita.fr>
16088
16089 * src/reader.c (readgram): Remove dead code, an strip useless
16090 braces.
16091 (get_type): Remove, unused.
16092
160932001-12-12 Akim Demaille <akim@epita.fr>
16094
16095 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16096 on that of lib/error.c.
16097
160982001-12-12 Akim Demaille <akim@epita.fr>
16099
16100 Some hosts don't like `/' in includes.
16101
16102 * src/system.h: Include libgettext.h without qualifying the path.
16103 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16104 $(top_srcdir).
16105
161062001-12-11 Marc Autret <autret_m@epita.fr>
16107
16108 * src/output.c (output_parser): Remove useless muscle.
16109
161102001-12-11 Marc Autret <autret_m@epita.fr>
16111
16112 * src/bison.simple: Remove #line just before %%epilogue. It
16113 is now handled in ...
16114 * src/reader.c (read_additionnal_code): Add the output of a
16115 #line for the epilogue.
16116
161172001-12-10 Marc Autret <autret_m@epita.fr>
16118
16119 * src/reader.c (copy_definition): Re-use CPP-outed code which
16120 replace precedent remove.
16121 * src/bison.simple: Remove #line before %%prologue because
16122 %%input-line is wrong at this time.
16123
161242001-12-10 Marc Autret <autret_m@epita.fr>
16125
16126 * src/reader.c (symbols_output): Clean up.
16127 * src/output.c (output_gram, output): Clean up.
16128
161292001-12-10 Akim Demaille <akim@epita.fr>
16130
16131 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16132 * src/LR0.c (set_state_table): here.
16133 * src/lalr.c (lalr): Call it.
16134
161352001-12-10 Akim Demaille <akim@epita.fr>
16136
16137 * src/state.h (shifts): Remove the `number' member: shifts are
16138 attached to state, hence no longer need to be labelled with a
16139 state number.
16140
161412001-12-10 Akim Demaille <akim@epita.fr>
16142
16143 Now that states have a complete set of members, the linked list of
16144 shifts is useless: just fill directly the state's shifts member.
16145
16146 * src/state.h (shifts): Remove the `next' member.
16147 * src/LR0.c (first_state, last_state): Remove.
16148 Adjust the callers.
16149 (augment_automaton): Don't look for the shifts that must be added
16150 a shift on EOF: it is those of the state we looked for! But now,
16151 since shifts are attached, it is no longer needed to looking
16152 merely by its id: its number.
16153
161542001-12-10 Akim Demaille <akim@epita.fr>
16155
16156 * src/LR0.c (augment_automaton): Better variable locality.
16157 Remove an impossible branch: if there is a state corresponding to
16158 the start symbol being shifted, then there is shift for the start
16159 symbol from the initial state.
16160
161612001-12-10 Akim Demaille <akim@epita.fr>
16162
16163 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16164 only when appropriate: when insert_start_shifting_state' is not
16165 invoked.
16166 * tests/regression.at (Rule Line Numbers): Adjust.
16167
161682001-12-10 Akim Demaille <akim@epita.fr>
16169
16170 * src/LR0.c (augment_automaton): Now that all states have shifts,
16171 merge the two cases addition shifts to the initial state.
16172
161732001-12-10 Akim Demaille <akim@epita.fr>
16174
16175 * src/lalr.c (set_state_table): Move to...
16176 * src/LR0.c: here.
16177 * src/lalr.c (lalr): Don't call it...
16178 * src/LR0.c (generate_states): do it.
16179 * src/LR0.h (first_state): Remove, only the table is used.
16180
161812001-12-10 Akim Demaille <akim@epita.fr>
16182
16183 * src/LR0.h (first_shift, first_reduction): Remove.
16184 * src/lalr.c: Don't use first_shift: find shifts through the
16185 states.
16186
161872001-12-10 Akim Demaille <akim@epita.fr>
16188
16189 * src/LR0.c: Attach shifts to states as soon as they are
16190 computed.
16191 * src/lalr.c (set_state_table): Instead of assigning shifts to
16192 state, just assert that the mapping was properly done.
16193
161942001-12-10 Akim Demaille <akim@epita.fr>
16195
16196 * src/LR0.c (insert_start_shift): Rename as...
16197 (insert_start_shifting_state): this.
16198 (insert_eof_shifting_state, insert_accepting_state): New.
16199 (augment_automaton): Adjust.
16200 Better locality of the variables.
16201 When looking if the start_symbol is shifted from the initial
16202 state, using `while (... symbol != start_symbol ...)' sounds
16203 better than `while (... symbol < start_symbol ...)': If fail
16204 to see how the order between symbols could be relevant!
16205
162062001-12-10 Akim Demaille <akim@epita.fr>
16207
16208 * src/getargs.h: Don't declare `spec_name_prefix' and
16209 `spec_file_prefix', declared by src/files.h.
16210 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16211 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16212 * src/output.c (prepare): Adjust.
16213 * src/reader.c (symbols_output): Likewise.
16214 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16215
162162001-12-10 Akim Demaille <akim@epita.fr>
16217
16218 * src/muscle_tab.c (muscle_init): NULL is a better default than
16219 `"0"'.
16220
162212001-12-10 Akim Demaille <akim@epita.fr>
16222
16223 * src/reader.c (reader): Calling symbols_output once is enough.
16224
162252001-12-10 Akim Demaille <akim@epita.fr>
16226
16227 Now that states have a complete set of members, the linked list of
16228 reductions is useless: just fill directly the state's reductions
16229 member.
16230
16231 * src/state.h (struct reductions): Remove member `number' and
16232 `next'.
16233 * src/LR0.c (first_reduction, last_reduction): Remove.
16234 (save_reductions): Don't link the new reductions, store them in
16235 this_state.
16236 * src/lalr.c (set_state_table): No need to attach reductions to
16237 states, it's already done.
16238 * src/output.c (output_actions): No longer free the shifts, then
16239 the reductions, then the states: free all the states and their
16240 members.
16241
162422001-12-10 Akim Demaille <akim@epita.fr>
16243
16244 * src/options.c (OPTN, DRTV, BOTH): New.
16245 (option_table): Use them.
16246
16247 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16248 the job of system.h.
16249 * src/options.c: Don't include stdio.h and xalloc.h for the same
16250 reasons.
16251
162522001-12-10 Akim Demaille <akim@epita.fr>
16253
16254 * src/output.c (output, prepare): Make sure the values of the
16255 muscles `action' and `prologue' are 0-terminated.
16256
162572001-12-10 Akim Demaille <akim@epita.fr>
16258
16259 Clean up GCC warnings.
16260
16261 * src/reader.c (copy_action): `buf' is not used.
16262 (parse_skel_decl): Be static.
16263 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16264 * src/options.h (create_long_option_table): Have a real prototype.
16265 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16266 (hash_delete_at): Return const void *.
16267 Adjust casts to preserve the const.
16268
162692001-12-10 Akim Demaille <akim@epita.fr>
16270
16271 * configure.in: Require 2.52g.
16272 M4 is not needed, but AUTOM4TE is.
16273 * m4/m4.m4: Remove.
16274 * tests/Makefile.am: Adjust.
16275
162762001-12-10 Akim Demaille <akim@epita.fr>
16277
16278 One structure for states is enough, even though theoretically
16279 there are LR(0) states and LALR(1) states.
16280
16281 * src/lalr.h (state_t): Remove.
16282 (state_table): Be state_t **, not state_t *.
16283 * src/state.h (core, CORE_ALLOC): Rename as...
16284 (state_t, STATE_ALLOC): this.
16285 Add the LALR(1) members: shifts, reductions, errs.
16286 * src/LR0.c (state_table): Rename as...
16287 (state_hash): this, to avoid name clashes with the global
16288 `state_table'.
16289 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16290 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16291
162922001-12-10 Akim Demaille <akim@epita.fr>
16293
16294 Bison dumps core on bash.y.
16295 Reported by Pascal Bart.
16296
16297 * src/warshall.c (bitmatrix_print): New.
16298 (TC): Use it.
16299 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
16300 j must be the outer loop.
16301 * tests/regression.at (Broken Closure): New.
16302
163032001-12-05 Akim Demaille <akim@epita.fr>
16304
16305 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16306 its argument.
16307 Reported by Peter Hamorsky.
16308
163092001-12-05 Akim Demaille <akim@epita.fr>
16310
16311 * src/conflicts.c (err_table): Remove.
16312 (resolve_sr_conflict): Adjust.
16313 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16314 Rename as...
16315 (state_t.reductions, state_t.shifts): this.
16316
163172001-12-05 Akim Demaille <akim@epita.fr>
16318
16319 * src/reduce.c (reduce_grammar_tables): No longer disable the
16320 removal of useless rules via CPP but via `if (0)', so that the
16321 compiler still check the code is valid.
16322 For instance, it should have noticed `rline' no longer exists: use
16323 the `line' member of rule_t.
16324 * src/gram.c (dummy, rline): Remove, unused.
16325
163262001-12-05 Akim Demaille <akim@epita.fr>
16327
16328 * src/output.c (pack_vector): Use assert, not berror.
16329 * src/main.c (berror): Remove, unused.
16330
163312001-12-05 Akim Demaille <akim@epita.fr>
16332
16333 New experimental feature: if --verbose --trace output all the
16334 items of a state, not only its kernel.
16335
16336 * src/print.c (print_core): If `trace_flag', then invoke closure
16337 before outputting the items of the state (print_core is no longer
16338 a correct name them).
16339 (print_results): Invoke new_closure/free_closure if needed.
16340
163412001-12-05 Akim Demaille <akim@epita.fr>
16342
16343 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16344 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16345 (nitemset): for consistency with the rest of the project.
16346
163472001-12-05 Akim Demaille <akim@epita.fr>
16348
16349 * src/closure.c (print_closure): Improve.
16350 (closure): Use it for printing input and output.
16351
163522001-12-05 Akim Demaille <akim@epita.fr>
16353
16354 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16355 indexed by nonterminals.
16356
163572001-12-05 Akim Demaille <akim@epita.fr>
16358
16359 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16360 what it was!).
16361 * src/warshall.h: Remove accidental duplication of the content.
16362
163632001-12-05 Akim Demaille <akim@epita.fr>
16364
16365 * src/closure.c (set_fderives): De-obfuscate.
16366
163672001-12-05 Akim Demaille <akim@epita.fr>
16368
16369 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16370
163712001-12-05 Akim Demaille <akim@epita.fr>
16372
16373 * src/closure.c (set_firsts): De-obfuscate.
16374
163752001-12-05 Akim Demaille <akim@epita.fr>
16376
16377 * src/output.c (action_row): De-obfuscate
16378 using the good o' techniques: arrays not pointers, variable
16379 locality, BITISSET, RESETBIT etc.
16380
163812001-12-05 Akim Demaille <akim@epita.fr>
16382
16383 Pessimize the code to simplify it: from now on, all the states
16384 have a valid SHIFTS, which NSHIFTS is possibly 0.
16385
16386 * src/LR0.c (shifts_new): Be global and move to..
16387 * src/state.c, src/state.h: here.
16388 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16389 * src/print_graph: Adjust.
16390
163912001-12-05 Akim Demaille <akim@epita.fr>
16392
16393 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16394 * src/conflicts.c: Use it.
16395 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16396 incorrectly ``simplified''.
16397
163982001-12-05 Akim Demaille <akim@epita.fr>
16399
16400 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16401 using the good o' techniques: arrays not pointers, variable
16402 locality, BITISSET, RESETBIT etc.
16403
164042001-12-05 Akim Demaille <akim@epita.fr>
16405
16406 * src/state.h (SHIFT_SYMBOL): New.
16407 * src/conflicts.c: Use it to deobfuscate.
16408
164092001-12-05 Akim Demaille <akim@epita.fr>
16410
16411 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16412 (print_reductions): De-obfuscate using the good o' techniques:
16413 arrays not pointers, variable locality, BITISSET.
16414
164152001-12-05 Akim Demaille <akim@epita.fr>
16416
16417 * src/conflicts.c (print_reductions): Arrays, not pointers.
16418 Use BITISSET.
16419
164202001-12-05 Akim Demaille <akim@epita.fr>
16421
16422 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16423
164242001-12-05 Akim Demaille <akim@epita.fr>
16425
16426 * src/conflicts.c (print_reductions): Improve variable locality.
16427
164282001-12-05 Akim Demaille <akim@epita.fr>
16429
16430 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16431
164322001-12-05 Akim Demaille <akim@epita.fr>
16433
16434 * src/conflicts.c (print_reductions): Improve variable locality.
16435
164362001-12-05 Akim Demaille <akim@epita.fr>
16437
16438 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16439 * src/lalr.c: Use them.
16440
164412001-12-05 Akim Demaille <akim@epita.fr>
16442
16443 * src/LR0.c (augment_automaton): Formatting changes.
16444 Better variable locality.
16445
164462001-12-05 Akim Demaille <akim@epita.fr>
16447
16448 * src/lalr.c (matrix_print): New.
16449 (transpose): Use it.
16450 Use arrays instead of pointers.
16451
164522001-12-05 Akim Demaille <akim@epita.fr>
16453
16454 * src/lalr.c (maxrhs): Move to...
16455 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16456 * src/lalr.c (build_relations): Adjust.
16457
164582001-12-05 Akim Demaille <akim@epita.fr>
16459
16460 * src/lalr.c (transpose): Free the memory allocated to the
16461 argument, as it is replaced by the results by the unique caller.
16462 (build_relations): Merely invoke transpose: it handles the memory
16463 deallocation.
16464 Improve variable locality.
16465 Avoid variables used as mere abbreviations.
16466 (compute_lookaheads): Use arrays instead of pointers.
16467
164682001-12-05 Akim Demaille <akim@epita.fr>
16469
16470 * src/lalr.c (initialize_F): Improve variable locality.
16471 Avoid variables used as mere abbreviations.
16472
164732001-12-05 Akim Demaille <akim@epita.fr>
16474
16475 * src/derives.c (print_derives): Display the ruleno.
16476 * src/lalr.c (initialize_F, transpose): Better variable locality
16477 to improve readability.
16478 Avoid variables used as mere abbreviations.
16479
164802001-12-05 Akim Demaille <akim@epita.fr>
16481
16482 * src/lalr.c (traverse): Use arrays instead of pointers.
16483
164842001-12-05 Akim Demaille <akim@epita.fr>
16485
16486 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16487 the handling of squeue.
16488 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16489
164902001-12-05 Akim Demaille <akim@epita.fr>
16491
16492 Because useless nonterminals are now kept alive (instead of being
16493 `destroyed'), we now sometimes examine them, and store information
16494 related to them. Hence we need to know their number, and adjust
16495 memory allocations.
16496
16497 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16498 static.
16499 * src/LR0.c (allocate_itemsets): The memory allocated to
16500 `symbol_count' was used for two different purpose: once to count
16501 the number of occurrences of each symbol, and later reassigned to
16502 `shift_symbol', containing the symbol that can be shifted from a
16503 given state.
16504 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16505 only, and...
16506 (new_itemsets): Allocate `shift_symbol' here.
16507 (allocate_itemsets): symbol_count includes useless nonterminals.
16508 Make room for them.
16509 (free_storage): Use `free', not `XFREE', for pointers that cannot
16510 be null.
16511
165122001-12-05 Akim Demaille <akim@epita.fr>
16513
16514 * src/nullable.c (set_nullable): Deobfuscate the handling of
16515 ritem.
16516 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16517
165182001-12-05 Akim Demaille <akim@epita.fr>
16519
16520 * src/gram.c, src/gram.h (ritem_print): New.
16521 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16522 (This useless function was defined only to work around VMS linkers
16523 that can't handle compilation units with variables only).
16524 * src/reduce.c (dump_grammar): Use it to trace the construction of
16525 ritem.
16526
165272001-12-04 Paul Eggert <eggert@twinsun.com>
16528
16529 * src/bison.simple (union yyalloc): Change member names
16530 to be the same as the stack names.
16531 (yyparse): yyptr is now union yyalloc *, not char *.
16532 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16533 and may generate better code on some machines.
16534 (yystpcpy): Use prototype if __STDC__ is defined, not just
16535 if __cplusplus is defined.
16536
165372001-11-30 Akim Demaille <akim@epita.fr>
16538
16539 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16540 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16541 Gettext doesn't compile cleanly, and dies with -Werror.
16542 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16543 Include WARNING_CFLAGS here.
16544 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16545 before being defined.
16546
165472001-11-27 Paul Eggert <eggert@twinsun.com>
16548
16549 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16550 First arg is int, not unsigned.
16551 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16552 (SIZE_MAX, UINT_MAX): New macros.
16553 (quotearg_n_options): Abort if N is negative.
16554 Avoid overflow check on hosts where size_t is 64 bits and int
16555 is 32 bits, as overflow is impossible there.
16556 Fix off-by-one typo that caused unnecessary reallocation.
16557
165582001-11-29 Paul Eggert <eggert@twinsun.com>
16559
16560 Name space cleanup in generated parser.
16561
16562 * doc/bison.texinfo (Bison Parser): Discuss system headers
16563 and their effect on the user name space.
16564
16565 * src/bison.simple:
16566 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16567 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16568 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16569
16570 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16571 on user names when possible.
16572
16573 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16574 Simplify test for whather <alloca.h> exists.
16575
16576 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16577
16578 (<stdio.h>): Include if YYDEBUG.
16579
16580 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16581 ! defined (yyoverflow) && ! defined (yymemcpy).
16582
16583 (yymemcpy, yyparse): Rename local variables as needed so that
16584 they all begin with 'yy'.
16585
16586 (yystrlen, yystpcpy): New functions.
16587
16588 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16589 All uses changed.
16590
16591 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16592 instead of relying on string.h functions. Use YYSTACK_ALLOC
16593 and YYSTACK_FREE instead of malloc and free.
16594
165952001-11-30 Akim Demaille <akim@epita.fr>
16596
16597 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16598 before their first uses.
16599 (YYBISON, YYPURE): Move to the top of the output.
16600
166012001-11-30 Akim Demaille <akim@epita.fr>
16602
16603 * tests/reduce.at (Useless Nonterminals): Fix.
16604
166052001-11-30 Akim Demaille <akim@epita.fr>
16606
16607 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16608 if body instead of `;' to pacify GCC's warnings.
16609
166102001-11-30 Akim Demaille <akim@epita.fr>
16611
16612 Instead of mapping the LHS of unused rules to -1, keep the LHS
16613 valid, but flag the rules as invalid.
16614
16615 * src/gram.h (rule_t): `useful' is a new member.
16616 * src/print.c (print_grammar): Adjust.
16617 * src/derives.c (set_derives): Likewise.
16618 * src/reader.c (packgram, reduce_output): Likewise.
16619 * src/reduce.c (reduce_grammar_tables): Likewise.
16620 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16621
166222001-11-30 Akim Demaille <akim@epita.fr>
16623
16624 * src/reduce.c (reduce_output): Formatting changes.
16625 * src/print.c (print_results, print_grammar): Likewise.
16626 * tests/regression.at (Rule Line Numbers)
16627 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16628
166292001-11-30 Akim Demaille <akim@epita.fr>
16630
16631 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16632 useless nonterminals, move them at the end of the symbol arrays.
16633 (reduce_output): Adjust.
16634 * tests/reduce.at (Useless Nonterminals): Adjust.
16635
166362001-11-30 Akim Demaille <akim@epita.fr>
16637
16638 * src/reduce.c: Various comment/formatting changes.
16639 (nonterminals_reduce): New, extracted from...
16640 (reduce_grammar_tables): here.
16641 (reduce_grammar): Call nonterminals_reduce.
16642
166432001-11-29 Paul Eggert <eggert@twinsun.com>
16644
16645 * src/bison.simple (YYSTACK_REALLOC): Remove.
16646 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16647 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16648 New macros.
16649 (union yyalloc): New type.
16650 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16651 an arbitrary restriction on hosts where size_t is wider than int.
16652
16653 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16654 a parser stack overflow. Allocate just one block of memory for all
16655 three stacks, instead of allocating three blocks; this typically is
16656 faster and reduces fragmentation.
16657
16658 Do not limit the number of items in the stack to a value that fits
16659 in 'int', as this is an arbitrary limit on hosts with 64-bit
16660 size_t and 32-bit int.
16661
166622001-11-29 Marc Autret <autret_m@epita.fr>
16663
16664 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16665 of defining YYERROR_VERBOSE.
16666 [AT_DATA]: $4 is now out of C declarations in the prologue.
16667
166682001-11-28 Marc Autret <autret_m@epita.fr>
16669
16670 * src/reader.c (parse_dquoted_param): New.
16671 (parse_skel_decl): Use it.
16672 * src/lex.h: Add its prototype.
16673 * src/lex.c (literalchar): Become not static.
16674
166752001-11-28 Marc Autret <autret_m@epita.fr>
16676
16677 * src/output.h: And put its extern declaration here.
16678 * src/output.c (error_verbose): Define here.
16679 (prepare): Echo name modification.
16680 * src/getargs.h: Clean its extern declaration.
16681 * src/getargs.c (error_verbose_flag): Remove.
16682 (getargs): Remove case 'e'.
16683 * src/options.c (option_table): 'error-verbose' is now seen as simple
16684 percent option.
16685 Include output.h.
16686
16687 * src/reader.c (read_declarations): Remove case tok_include.
16688 (parse_include_decl): Remove.
16689 * src/lex.h (token_t): Remove tok_include.
16690 * src/options.c (option_table): 'include' is now a simple command line
16691 option.
16692
166932001-11-28 Marc Autret <autret_m@epita.fr>
16694
16695 * src/bison.simple: Adjust muscle names.
16696 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16697 * src/output.c (prepare): s/_/-/ for the muscles names.
16698 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16699
167002001-11-28 Marc Autret <autret_m@epita.fr>
16701
16702 * src/bison.simple: Fix debug.
16703 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16704
167052001-11-28 Akim Demaille <akim@epita.fr>
16706
16707 * src/LR0.c (shifts_new): New.
16708 (save_shifts, insert_start_shift, augment_automaton): Use it.
16709
167102001-11-28 Akim Demaille <akim@epita.fr>
16711
16712 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16713 keep ruleno only.
16714
167152001-11-28 Akim Demaille <akim@epita.fr>
16716
16717 * src/closure.c (closure): Instead of looping over word in array
16718 then bits in words, loop over bits in array.
16719
167202001-11-28 Akim Demaille <akim@epita.fr>
16721
16722 * src/closure.c (closure): No longer optimize the special case
16723 where all the bits of `ruleset[r]' are set to 0, to make the code
16724 clearer.
16725
167262001-11-28 Akim Demaille <akim@epita.fr>
16727
16728 * src/closure.c (closure): `r' and `c' are new variables, used to
16729 de-obfuscate accesses to RULESET and CORE.
16730
167312001-11-28 Akim Demaille <akim@epita.fr>
16732
16733 * src/reduce.c (reduce_print): Use ngettext.
16734 (dump_grammar): Improve the trace accuracy.
16735
167362001-11-28 Akim Demaille <akim@epita.fr>
16737
16738 * src/reduce.c (dump_grammar): Don't translate trace messages.
16739
167402001-11-28 Akim Demaille <akim@epita.fr>
16741
16742 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16743 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16744 as all tags are free'ed afterwards.
16745 From Enrico Scholz.
16746
167472001-11-27 Paul Eggert <eggert@twinsun.com>
16748
16749 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16750 use alloca when we didn't want to, and vice versa.
16751
167522001-11-27 Marc Autret <autret_m@epita.fr>
16753
16754 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16755 initialization.
16756 * src/output.c (prepare): Remove its update.
16757
167582001-11-27 Marc Autret <autret_m@epita.fr>
16759
16760 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16761 Use %error-verbose.
16762
167632001-11-27 Marc Autret <autret_m@epita.fr>
16764
16765 * src/bison.simple: Remove YYERROR_VERBOSE using.
16766 Use %%error_verbose.
16767 (yyparse): Likewise.
16768 * src/output.c (prepare): Give its final value.
16769 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16770 * src/getargs.h: Add its extern declaration.
16771 * src/getargs.c (error_verbose_flag): New int.
16772 (getargs): Update to catch new case.
16773 * src/options.c (option_table): 'error-verbose' is a new option.
16774 (shortopts): Update.
16775
167762001-11-27 Akim Demaille <akim@epita.fr>
16777
16778 * src/system.h: Use intl/libgettext.h.
16779 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16780
167812001-11-27 Akim Demaille <akim@epita.fr>
16782
16783 * tests/torture.at (Exploding the Stack Size with Malloc):
16784 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16785
167862001-11-27 Akim Demaille <akim@epita.fr>
16787
16788 * src/files.c: Include error.h.
16789 Reported by Hans Aberg.
16790
167912001-11-26 Marc Autret <autret_m@epita.fr>
16792
16793 * src/reader.c (parse_include_decl): New, not yet implemented.
16794 (read_declarations): Add case tok_include.
16795 * src/getargs.h (include): Add its extern definition.
16796 * src/getargs.c (include): New const char *.
16797 (getargs): Add case '-I'.
16798 * src/options.c (option_table): Add include as command line and
16799 percent option.
16800 * src/lex.h (token_t): Add tok_include.
16801
168022001-11-26 Akim Demaille <akim@epita.fr>
16803
16804 * src/reader.c (readgram): Make sure rules for mid-rule actions
16805 have a lineno equal to that of their host rule.
16806 Reported by Hans Aberg.
16807 * tests/regression.at (Rule Line Numbers): New.
16808
168092001-11-26 Akim Demaille <akim@epita.fr>
16810
16811 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16812 size_ts.
16813
168142001-11-26 Akim Demaille <akim@epita.fr>
16815
16816 * src/complain.c, src/complain.h (error): Remove, provided by
16817 lib/error.[ch].
16818
168192001-11-26 Akim Demaille <akim@epita.fr>
16820
16821 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16822 issue an error message.
16823 * tests/regression.at (Invalid %directive): New.
16824 Reported by Hans Aberg.
16825
168262001-11-26 Akim Demaille <akim@epita.fr>
16827
16828 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16829 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16830
168312001-11-26 Akim Demaille <akim@epita.fr>
16832
16833 * src/conflicts.c (conflicts_print): Don't complain at all when
16834 there are no reduce/reduce conflicts, and as many shift/reduce
16835 conflicts as expected.
16836 * tests/regression.at (%expect right): Adjust.
16837
168382001-11-23 Akim Demaille <akim@epita.fr>
16839
16840 * lib/alloca.c: Update, from fileutils.
16841
168422001-11-23 Akim Demaille <akim@epita.fr>
16843
16844 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16845
168462001-11-23 Akim Demaille <akim@epita.fr>
16847
16848 * src/system.h: Include alloca.h.
16849 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16850
168512001-11-23 Akim Demaille <akim@epita.fr>
16852
16853 * src/print_graph.c (print_actions): Remove `rule', unused.
16854 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16855 pacify GCC's signed < unsigned warnings.
16856 * src/closure.c (itemsetsize): Likewise.
16857 * src/reader.c (symbol_list_new): Static.
16858
168592001-11-23 Akim Demaille <akim@epita.fr>
16860
16861 Attaching lineno to buckets is stupid, since only one copy of each
16862 symbol is kept, only the line of the first occurrence is kept too.
16863
16864 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16865 * src/reader.c (rline_allocated): Remove, unused.
16866 (symbol_list): Have a `line' member.
16867 (symbol_list_new): New.
16868 (readgram): Use it.
16869 * src/print.c (print_grammar): Output the rule line numbers.
16870 * tests/regression.at (Solved SR Conflicts)
16871 (Unresolved SR Conflicts): Adjust.
16872 Reported by Hans Aberg.
16873
168742001-11-22 Marc Autret <autret_m@epita.fr>
16875
16876 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16877
168782001-11-22 Marc Autret <autret_m@epita.fr>
16879
16880 * src/muscle_tab.c (muscle_init): Remove initialization of
16881 skeleton muscle.
16882 * src/output.c (output_master_parser): Do it here.
16883
168842001-11-20 Akim Demaille <akim@epita.fr>
16885
16886 * po/sv.po: New.
16887 * configure.in (ALL_LINGUAS): Adjust.
16888 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16889 longer contains strings to translate.
16890
168912001-11-19 Akim Demaille <akim@epita.fr>
16892
16893 * src/conflicts.c (conflicts_print): Add a missing \n.
16894
168952001-11-19 Akim Demaille <akim@epita.fr>
16896
16897 * src/nullable.c (nullable_print): New.
16898 (set_nullable): Call it when tracing.
16899 Better locality of variables.
16900
169012001-11-19 Akim Demaille <akim@epita.fr>
16902
16903 * src/print.c (print_actions): Better locality of variables.
16904
169052001-11-19 Akim Demaille <akim@epita.fr>
16906
16907 * src/derives.c (print_derives): Fix and enrich.
16908 * src/closure.c (print_fderives): Likewise.
16909
169102001-11-19 Akim Demaille <akim@epita.fr>
16911
16912 * src/closure.c (itemsetend): Remove, replaced with...
16913 (itemsetsize): new.
16914
169152001-11-19 Akim Demaille <akim@epita.fr>
16916
16917 * src/LR0.c (kernel_end): Remove, replaced with...
16918 (kernel_size): new.
16919
169202001-11-19 Akim Demaille <akim@epita.fr>
16921
16922 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16923 to clarify.
16924
169252001-11-19 Akim Demaille <akim@epita.fr>
16926
16927 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16928
169292001-11-19 Akim Demaille <akim@epita.fr>
16930
16931 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16932 trace messages.
16933 * src/LR0.c: Likewise.
16934 (allocate_itemsets): Use arrays instead of pointers to clarify.
16935
169362001-11-19 Akim Demaille <akim@epita.fr>
16937
16938 * src/getargs.c (statistics_flag): Replace with...
16939 (trace_flag): New.
16940 (longopts): Accept --trace instead of --statistics.
16941 * src/getargs.h, src/options.c: Adjust.
16942 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16943 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16944
169452001-11-19 Akim Demaille <akim@epita.fr>
16946
16947 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
16948 pointers to clarify the code.
16949 (save_reductions, save_shifts): Factor common parts of alternatives.
16950
169512001-11-19 Akim Demaille <akim@epita.fr>
16952
16953 * src/LR0.c (new_state, get_state): Complete TRACE code.
16954 * src/closure.c: Include `reader.h' to get `tags', needed by the
16955 trace code.
16956 Rename the conditional DEBUG as TRACE.
16957 Output consistently TRACEs to stderr, not stdout.
16958 * src/derives.c: Likewise.
16959 * src/reduce.c: (inaccessable_symbols): Using if is better style
16960 than goto.
16961 Use `#if TRACE' instead of `#if 0' for tracing code.
16962
169632001-11-19 Akim Demaille <akim@epita.fr>
16964
16965 * src/system.h (LIST_FREE, shortcpy): New.
16966 * src/LR0.c: Use them.
16967 * src/output.c (free_itemsets, free_reductions, free_shifts):
16968 Remove, replaced by LIST_FREE.
16969
169702001-11-19 Akim Demaille <akim@epita.fr>
16971
16972 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
16973 (REDUCTIONS_ALLOC): New.
16974 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
16975 allocation.
16976
169772001-11-19 Akim Demaille <akim@epita.fr>
16978
16979 * src/LR0.c (new_state): Complete trace code.
16980 * src/nullable.c (set_nullable): Don't translate traces.
16981
169822001-11-19 Akim Demaille <akim@epita.fr>
16983
16984 * src/print_graph.c (print_core): Better locality of variables.
16985 * src/print.c (print_core): Likewise.
16986
169872001-11-19 Akim Demaille <akim@epita.fr>
16988
16989 * src/vcg.c: You do the output, so you are responsible of the
16990 handling of VCG syntax, in particular: use quotearg.
16991 * src/print_graph.c: Don't.
16992 (print_actions): Don't output the actions as part of the nodes,
16993 since that's the job of the edges.
16994 (print_state): Don't output by hand: fill the node description,
16995 and ask for its output.
16996
169972001-11-19 Akim Demaille <akim@epita.fr>
16998
16999 * src/bison.simple (yyparse): When verbosely reporting an error,
17000 no longer put additional quotes around token names.
17001 * tests/calc.at: Adjust.
17002
170032001-11-19 Akim Demaille <akim@epita.fr>
17004
17005 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17006 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17007 * src/output.c: Adjust.
17008
170092001-11-19 Akim Demaille <akim@epita.fr>
17010
17011 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17012 (rule_t): this.
17013 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17014
170152001-11-19 Akim Demaille <akim@epita.fr>
17016
17017 * src/gram.h (rule_t): New.
17018 (rule_table): New.
17019 (rrhs, rlhs): Remove, part of state_t.
17020 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17021 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17022 * src/reader.c, src/reduce.c: Adjust.
17023
170242001-11-19 Akim Demaille <akim@epita.fr>
17025
17026 * src/reader.c (symbols_output): New, extracted from...
17027 (packsymbols): Here.
17028 (reader): Call it.
17029
170302001-11-19 Akim Demaille <akim@epita.fr>
17031
17032 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17033 (maxrhs): this new function.
17034
170352001-11-19 Akim Demaille <akim@epita.fr>
17036
17037 * src/lalr.c (F): New macro to access the variable F.
17038 Adjust.
17039
170402001-11-19 Akim Demaille <akim@epita.fr>
17041
17042 * src/lalr.h (LA): New macro to access the variable LA.
17043 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17044 * src/lalr.c: Adjust.
17045
170462001-11-19 Akim Demaille <akim@epita.fr>
17047
17048 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17049 (set_state_table): handle the `lookaheads' members.
17050
170512001-11-19 Akim Demaille <akim@epita.fr>
17052
17053 * src/lalr.h (lookaheads): Removed array, whose contents is now
17054 a member of...
17055 (state_t): this structure.
17056 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17057 Adjust.
17058
170592001-11-19 Akim Demaille <akim@epita.fr>
17060
17061 * src/lalr.h (consistent): Removed array, whose contents is now
17062 a member of...
17063 (state_t): this structure.
17064 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17065 Adjust.
17066
170672001-11-19 Akim Demaille <akim@epita.fr>
17068
17069 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17070 contents are now members of...
17071 (state_t): this structure.
17072 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17073 Adjust.
17074
170752001-11-19 Akim Demaille <akim@epita.fr>
17076
17077 * src/lalr.h (state_t): New.
17078 (state_table): Be a state_t * instead of a core **.
17079 (accessing_symbol): Remove, part of state_t.
17080 * src/lalr.c: Adjust.
17081 (set_accessing_symbol): Merge into...
17082 (set_state_table): this.
17083 * src/print_graph.c, src/conflicts.c: Adjust.
17084
170852001-11-14 Akim Demaille <akim@epita.fr>
17086
17087 * tests/calc.at, tests/output.at, tests/regression.at,
17088 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17089 now the tests are run in private dirs, therefore AC_CLEANUP and
17090 family can be simplified to 0-ary.
17091 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17092 use abs. path to find config.h.
17093 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17094 stderr, there can be way too much random noise.
17095 Instead pass -Werror to GCC and rely on the exit status.
17096 Reported by Wolfram Wagner.
17097
170982001-11-14 Akim Demaille <akim@epita.fr>
17099
17100 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17101 defined only if yyoverflow is defined, to avoid `warning: unused
17102 variable `yyvs1''.
17103 Reported by The Test Suite.
17104
171052001-11-14 Akim Demaille <akim@epita.fr>
17106
17107 * src/print.c: Include reduce.h.
17108 Reported by Hans Aberg.
17109
171102001-11-14 Akim Demaille <akim@epita.fr>
17111
17112 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17113 Revert a previous patch: these are really const.
17114 * src/conflicts.c (conflict_report): Additional useless pair of
17115 braces to pacify GCC's warnings for `if () if () {} else {}'.
17116 * src/lex.c (parse_percent_token): Replace equal_offset with
17117 arg_offset.
17118 arg is const.
17119 Be sure to strdup `arg' when used, since there is no reason for
17120 token_buffer not to change.
17121
171222001-11-14 Akim Demaille <akim@epita.fr>
17123
17124 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17125 definition.
17126 * src/main.c (main): Use them.
17127 Suggested by Hans Aberg.
17128
171292001-11-12 Akim Demaille <akim@epita.fr>
17130
17131 * src/system.h (ngettext): Now that we use ngettext, be sure to
17132 provide a default definition when NLS are not used.
17133
171342001-11-12 Akim Demaille <akim@epita.fr>
17135
17136 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17137 Use @kbd to denote user input.
17138 (Language and Grammar): ANSIfy the example.
17139 Adjust its layout for info/notinfo.
17140 (Location Tracking Calc): Output error messages to stderr.
17141 Output locations in a more GNUtically correct way.
17142 Fix a couple of Englishos.
17143 Adjust @group/@end group pairs.
17144
171452001-11-12 Akim Demaille <akim@epita.fr>
17146
17147 %expect was not functioning at all.
17148
17149 * src/conflicts.c (expected_conflicts): Set to -1.
17150 (conflict_report): Use ngettext.
17151 (conflicts_print): Check %expect and make its violation an error.
17152 * doc/bison.texinfo (Expect Decl): Adjust.
17153 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17154 * tests/regression.at (%expect not enough, %expect right)
17155 (%expect too much): New.
17156
171572001-11-12 Akim Demaille <akim@epita.fr>
17158
17159 * tests/regression.at (Conflicts): Rename as...
17160 (Unresolved SR Conflicts): this.
17161 (Solved SR Conflicts): New.
17162
171632001-11-12 Akim Demaille <akim@epita.fr>
17164
17165 * src/reduce.c (print_results): Rename as...
17166 (reduce_output): This.
17167 Output to OUT, passed as argument, instead of output_obstack.
17168 (dump_grammar): Likewise.
17169 (reduce_free): New.
17170 Also free V1.
17171 (reduce_grammar): No longer call reduce_output, since...
17172 * src/print.c (print_results): do it.
17173 * src/main.c (main): Call reduce_free;
17174
171752001-11-12 Akim Demaille <akim@epita.fr>
17176
17177 * src/conflicts.c (print_reductions): Accept OUT as argument.
17178 Output to it, not to output_obstack.
17179 * src/print.c (print_actions): Adjust.
17180
171812001-11-12 Akim Demaille <akim@epita.fr>
17182
17183 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17184 the result instead of using...
17185 (src_total, rrc_total, src_count, rrc_count): Remove.
17186 (any_conflicts): Remove.
17187 (print_conflicts): Split into...
17188 (conflicts_print, conflicts_output): New.
17189 * src/conflicts.h: Adjust.
17190 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
17191 * src/print.c (print_grammar): Issue `\n' between two rules.
17192 * tests/regression.at (Conflicts): New.
17193 Reported by Tom Lane.
17194
171952001-11-12 Akim Demaille <akim@epita.fr>
17196
17197 * tests/regression.at (Invalid input): Remove, duplicate with
17198 ``Invalid input: 1''.
17199
172002001-11-12 Akim Demaille <akim@epita.fr>
17201
17202 * tests/torture.at (AT_DATA_STACK_TORTURE)
17203 (Exploding the Stack Size with Alloca)
17204 (Exploding the Stack Size with Malloc): New.
17205
172062001-11-12 Akim Demaille <akim@epita.fr>
17207
17208 * src/bison.simple (YYSTACK_REALLOC): New.
17209 (yyparse) [!yyoverflow]: Use it and free the old stack.
17210 Reported by Per Allansson.
17211
172122001-11-12 Pascal Bart <pascal.bart@epita.fr>
17213
17214 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17215 define CPP macro, which substitute YYSTYPE by yystype.
17216 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17217 with yyltype/YYLTYPE. This allows inclusion of the generated
17218 header within the parser if the compiler, such as GGC, accepts
17219 multiple equivalent #defines.
17220 From Akim.
17221
172222001-11-05 Akim Demaille <akim@epita.fr>
17223
17224 * src/reader.c (symbols_output): New, extracted from...
17225 (packsymbols): here.
17226 (reader): Adjust.
17227
172282001-11-05 Akim Demaille <akim@epita.fr>
17229
17230 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17231
172322001-11-05 Akim Demaille <akim@epita.fr>
17233
17234 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17235 pattern.
17236
172372001-11-05 Akim Demaille <akim@epita.fr>
17238
17239 * src/options.h (struct option_table_struct): set_flags is void*.
17240 * src/options.c (longopts): Support `--output' and `%output'.
17241 (usage): Adjust.
17242 * src/lex.h (tok_setopt): Remove, replaced with...
17243 (tok_intopt, tok_stropt): these new guys.
17244 * src/lex.c (getopt.h): Not needed.
17245 (token_buffer, unlexed_token_buffer): Not const.
17246 (percent_table): Promote `-' over `_' in directive names.
17247 Active `%name-prefix', `file-prefix', and `output'.
17248 (parse_percent_token): Accept possible arguments to directives.
17249 Promote `-' over `_' in directive names.
17250
172512001-11-04 Akim Demaille <akim@epita.fr>
17252
17253 * doc/bison.texinfo (Decl Summary): Split the list into
17254 `directives for grammars' and `directives for bison'.
17255 Sort'em.
17256 Add description of `%name-prefix', `file-prefix', and `output'.
17257 Promote `-' over `_' in directive names.
17258 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17259 Simplify the description of `--name-prefix'.
17260 Promote `-' over `_' in directive names.
17261 Promote `--output' over `--output-file'.
17262 Fix the description of `--defines'.
17263 * tests/output.at: Exercise %file-prefix and %output.
17264
172652001-11-02 Akim Demaille <akim@epita.fr>
17266
17267 * doc/refcard.tex: Update.
17268
172692001-11-02 Akim Demaille <akim@epita.fr>
17270
17271 * src/symtab.h (SUNDEF): New.
17272 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17273 stand for `uninitialized', instead of 0.
17274 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17275 * src/lex.c (lex): Adjust.
17276
17277 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17278 Number it 0.
17279 Let yylex return it instead of a plain 0.
17280 Reported by Dick Streefland.
17281
172822001-11-02 Akim Demaille <akim@epita.fr>
17283
17284 * tests/regression.at (Mixing %token styles): New test.
17285
172862001-11-02 Akim Demaille <akim@epita.fr>
17287
17288 * src/reader.c (parse_thong_decl): Formatting changes.
17289 (token_translations_init): New, extracted from...
17290 (packsymbols): Here.
17291 Adjust.
17292
172932001-11-01 Akim Demaille <akim@epita.fr>
17294
17295 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17296 Check that `9foo.y' produces correct cpp guards.
17297 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17298 guards.
17299 Reported by Wwp.
17300
173012001-11-01 Akim Demaille <akim@epita.fr>
17302
17303 * tests/regression.at (Invalid input: 2): New.
17304 * src/lex.c (unlexed_token_buffer): New.
17305 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17306 too.
17307 Reported by Wwp.
17308
173092001-11-01 Akim Demaille <akim@epita.fr>
17310
17311 * tests/calc.at: Catch up with 1.30.
17312 * configure.in: Bump to 1.49a.
17313 Adjust to newer Autotest.
17314
173152001-10-19 Pascal Bart <pascal.bart@epita.fr>
17316
17317 * src/conflicts.c: Move global variables rrc_total and src_total ...
17318 (print_conflicts): here.
17319 * src/output.c (output): Free global variable user_toknums.
17320 * src/lex.c (token_obstack): Become static.
17321
173222001-10-18 Akim Demaille <akim@epita.fr>
17323
17324 * tests/atlocal.in (GCC): Add.
17325 * tests/calc.at: s/m4_match/m4_bmatch/.
17326 s/m4_patsubst/m4_bpatsubst/.
17327 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17328 * configure.in: AC_SUBST(GCC).
17329
173302001-10-14 Marc Autret <autret_m@epita.fr>
17331
17332 * src/options.c (create_long_option_table): Fix.
17333
173342001-10-10 Akim Demaille <akim@epita.fr>
17335
17336 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17337
173382001-10-04 Akim Demaille <akim@epita.fr>
17339
17340 * src/reader.c (parse_union_decl): Push the caracters in
17341 union_obstack, not attrs_obstack.
17342
173432001-10-04 Akim Demaille <akim@epita.fr>
17344
17345 Merge in the branch 1.29.
17346
17347 * src/reader.c (packsymbols): Use a temporary obstack for
17348 `%%tokendef', since output_stack is already used elsewhere.
17349
17350 2001-10-02 Akim Demaille <akim@epita.fr>
17351
17352 Bump 1.29d.
17353
17354 2001-10-02 Akim Demaille <akim@epita.fr>
17355
17356 Version 1.29c.
17357
17358 2001-10-02 Akim Demaille <akim@epita.fr>
17359
17360 * tests/regression.at (Invalid CPP headers): New.
17361 From Alexander Belopolsky.
17362 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17363
17364 2001-10-02 Akim Demaille <akim@epita.fr>
17365
17366 * tests/regression.at (Invalid input): New.
17367 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17368 Reported by Shura.
17369
17370 2001-10-02 Akim Demaille <akim@epita.fr>
17371
17372 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17373
17374 2001-10-02 Akim Demaille <akim@epita.fr>
17375
17376 * src/output.c (output_parser): Assert `skeleton'.
17377 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17378 systems.
17379 From Shura.
17380
17381 2001-10-01 Marc Autret <autret_m@epita.fr>
17382
17383 * src/lex.h: Echo modifications.
17384 * src/lex.c (unlex): Parameter is now token_t.
17385 From Hans Aberg.
17386
17387 2001-10-01 Marc Autret <autret_m@epita.fr>
17388
17389 * src/main.c: Include lex.h.
17390 From Hans Aberg.
17391
17392 2001-09-29 Akim Demaille <akim@epita.fr>
17393
17394 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17395
17396 2001-09-28 Akim Demaille <akim@epita.fr>
17397
17398 * tests/testsuite.at: Update to newer Autotest.
17399 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17400
17401 2001-09-27 Akim Demaille <akim@epita.fr>
17402
17403 Position independent wrapper.
17404
17405 * tests/bison: Remove.
17406 * tests/bison.in: New.
17407 * configure.in: Adjust.
17408
17409 2001-09-27 Paul Eggert <eggert@twinsun.com>
17410
17411 Port quotearg fixes from tar 1.13.24.
17412
17413 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17414 tm to be declared.
17415 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17416 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17417
17418 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17419 * m4/mbrtowc.m4: New file.
17420 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17421 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17422
17423 2001-09-27 Akim Demaille <akim@epita.fr>
17424
17425 Bump to 1.29c.
17426
17427 2001-09-27 Akim Demaille <akim@epita.fr>
17428
17429 Version 1.29b.
17430
17431 2001-09-25 Akim Demaille <akim@epita.fr>
17432
17433 * src/system.h: Include `xalloc.h'.
17434 Remove it from the C files.
17435 * src/files.c (output_files): Free the obstacks.
17436 * src/lex.c (init_lex): Rename as...
17437 (lex_init): this.
17438 (lex_free): New.
17439 * src/main.c (main): Use it.
17440
17441 2001-09-24 Marc Autret <autret_m@epita.fr>
17442
17443 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17444 to output informations in fout (FILE*).
17445 (open_graph, close_graph): Likewise.
17446 (output_graph, output_edge, output_node): Likewise.
17447 * src/vcg.h: Update function prototypes.
17448 * src/print_graph.c (print_graph): Open output graph file.
17449 (print_actions): Adjust.
17450 * src/files.h: Remove extern declaration.
17451 * src/files.c: Remove graph_obstack declaration.
17452 (open_files): Remove graph_obstack initialization.
17453 (output_files): Remove graph_obstack saving.
17454
17455 2001-09-24 Marc Autret <autret_m@epita.fr>
17456
17457 * src/files.c (compute_output_file_names): Fix.
17458
17459 2001-09-24 Marc Autret <autret_m@epita.fr>,
17460 Akim Demaille <akim@epita.fr>
17461
17462 * src/reader.c (reader): Remove call to free_symtab ().
17463 * src/main.c (main): Call it here.
17464 Include symtab.h.
17465 * src/conflicts.c (initialize_conflicts): Rename as...
17466 (solve_conflicts): this.
17467 * src/print.c (print_core, print_actions, print_state)
17468 (print_grammar): Dump to a file instead a `output_obstack'.
17469 (print_results): Dump `output_obstack', and then proceed with the
17470 FILE *.
17471 * src/files.c (compute_output_file_names, close_files): New.
17472 (output_files): Adjust.
17473 * src/main.c (main): Adjust.
17474
17475 2001-09-23 Marc Autret <autret_m@epita.fr>
17476
17477 * src/files.c (compute_header_macro): Computes header macro name
17478 from spec_defines_file when given.
17479
17480 2001-09-23 Marc Autret <autret_m@epita.fr>
17481
17482 * src/files.c (output_files): Add default extensions.
17483
17484 2001-09-22 Akim Demaille <akim@epita.fr>
17485
17486 * src/conflicts.c (finalize_conflicts): Rename as...
17487 (free_conflicts): this.
17488
17489 2001-09-22 Akim Demaille <akim@epita.fr>
17490
17491 * src/gram.c (gram_free): Rename back as...
17492 (dummy): this.
17493 (output_token_translations): Free `token_translations'.
17494 * src/symtab.c (free_symtab): Free the tag field.
17495
17496 2001-09-22 Akim Demaille <akim@epita.fr>
17497
17498 Remove `translations' as it is always set to true.
17499
17500 * src/gram.h: Adjust.
17501 * src/reader.c (packsymbols, parse_token_decl): Adjust
17502 * src/print.c (print_grammar): Adjust.
17503 * src/output.c (output_token_translations): Adjust.
17504 * src/lex.c (lex): Adjust.
17505 * src/gram.c: Be sure the set pointers to NULL.
17506 (dummy): Rename as...
17507 (gram_free): this.
17508
17509 2001-09-22 Akim Demaille <akim@epita.fr>
17510
17511 * configure.in: Invoke AM_LIB_DMALLOC.
17512 * src/system.h: Use dmalloc.
17513 * src/LR0.c: Be sure to have pointers initialized to NULL.
17514 (allocate_itemsets): Allocate kernel_items only if needed.
17515
17516 2001-09-22 Akim Demaille <akim@epita.fr>
17517
17518 * configure.in: Bump to 1.29b.
17519 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17520 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17521 need xmalloc.c in calc.y.
17522 From Pascal Bart.
17523
17524 2001-09-21 Akim Demaille <akim@epita.fr>
17525
17526 Version 1.29a.
17527 * Makefile.maint, config/config.guess, config/config.sub,
17528 * config/missing: Update from masters.
17529 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17530 upon package.m4.
17531 * configure.in (ALL_LINGUAS): Add `tr'.
17532
17533 2001-09-21 Akim Demaille <akim@epita.fr>
17534
17535 * tests/Makefile.am (package.m4): Move to...
17536 ($(srcdir)/$(TESTSUITE)): here.
17537
17538 2001-09-20 Akim Demaille <akim@epita.fr>
17539
17540 * src/complain.c: No longer try to be standalone: use system.h.
17541 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17542 * src/complain.h: Likewise.
17543 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17544 Remove the unused variable `n'.
17545 From Albert Chin-A-Young.
17546
17547 2001-09-18 Marc Autret <autret_m@epita.fr>
17548
17549 * doc/bison.1: Update.
17550 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17551 descriptions.
17552 (Option Cross Key): Update.
17553 Add --graph.
17554
17555 2001-09-18 Marc Autret <autret_m@epita.fr>
17556
17557 * tests/regression.at: New test (comment in %union).
17558
17559 2001-09-18 Marc Autret <autret_m@epita.fr>
17560
17561 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17562 do that.
17563 Reported by Keith Browne.
17564
17565 2001-09-18 Marc Autret <autret_m@epita.fr>
17566
17567 * tests/output.at: Add tests for --defines and --graph.
17568
17569 2001-09-18 Marc Autret <autret_m@epita.fr>
17570
17571 * tests/output.at: Removes tests of %{header,src}_extension features.
17572
17573 2001-09-18 Akim Demaille <akim@epita.fr>
17574
17575 * tests/Makefile.am (package.m4): New.
17576 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17577 (_AT_CHECK_CALC_ERROR): Likewise.
17578 Factor the `, ' part of verbose error messages.
17579
17580 2001-09-18 Marc Autret <autret_m@epita.fr>
17581
17582 * src/getargs.c (longopts): Declare --defines and --graph as options
17583 with optional arguments.
17584 * src/files.h: Add extern declarations.
17585 * src/files.c (spec_graph_file, spec_defines_file): New.
17586 (output_files): Update.
17587 Remove CPP-outed code.
17588
17589 2001-09-18 Marc Autret <autret_m@epita.fr>
17590
17591 Turn off %{source,header}_extension feature.
17592
17593 * src/files.c (compute_exts_from_gf): Update.
17594 (compute_exts_from_src): Update.
17595 (output_files): CPP-out useless code.
17596 * src/files.h: Remove {header,source}_extension extern declarations.
17597 * src/reader.c (parse_dquoted_param): CPP-out.
17598 (parse_header_extension_decl): Remove.
17599 (parse_source_extension_decl): Remove.
17600 (read_declarations): Remove cases tok_{hdrext,srcext}.
17601 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17602 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17603
17604 2001-09-10 Akim Demaille <akim@epita.fr>
17605
17606 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17607 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17608 (AT_CHECK_OUTPUT): this.
17609 Merely check ls' exit status, its output is useless.
17610
17611 2001-09-10 Akim Demaille <akim@epita.fr>
17612
17613 * tests/calc.at: Use m4_match.
17614 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17615
17616 2001-09-10 Marc Autret <autret_m@epita.fr>,
17617 Akim Demaille <akim@epita.fr>
17618
17619 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17620 enum color_e.
17621 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17622 to `normal'.
17623 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17624 * src/lex.h: Adjust prototype.
17625 (token_t): Add `tok_undef'.
17626 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17627 (parse_percent_token): Now returns token_t.
17628 Add default statement in switch.
17629 (lex): Separate `c' as an input variable, from the token_t result
17630 part.
17631 (unlexed): Is a token_t.
17632
17633 2001-09-10 Akim Demaille <akim@epita.fr>
17634
17635 * configure.in: Bump to 1.29a.
17636
17637 2001-09-07 Akim Demaille <akim@epita.fr>
17638
17639 Version 1.29.
17640
17641 2001-08-30 Akim Demaille <akim@epita.fr>
17642
17643 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17644 * m4/atconfig.m4: Remove.
17645 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17646 * tests/bison: New.
17647 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17648 m4_if, m4_patsubst, and m4_regexp.
17649 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17650 `input' file instead of echo.
17651
17652 2001-08-29 Akim Demaille <akim@epita.fr>
17653
17654 Bump to 1.28e.
17655
17656 2001-08-29 Akim Demaille <akim@epita.fr>
17657
17658 Version 1.28d.
17659
17660 2001-08-29 Paul Eggert <eggert@twinsun.com>
17661
17662 * src/bison.simple (yyparse): Don't take the address of an
17663 item before the start of an array, as that doesn't conform to
17664 the C Standard.
17665
17666 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17667
17668 * doc/bison.texinfo (Location Tracking Calc): New node.
17669
17670 2001-08-29 Paul Eggert <eggert@twinsun.com>
17671
17672 * src/output.c (output): Do not define const, as this now
17673 causes more problems than it cures.
17674
17675 2001-08-29 Akim Demaille <akim@epita.fr>
17676
17677 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17678 the nodes.
17679 Be sure to tag the `detailmenu'.
17680
17681 2001-08-29 Akim Demaille <akim@epita.fr>
17682
17683 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17684 download in a tmp dir.
17685
17686 2001-08-28 Marc Autret <autret_m@epita.fr>
17687
17688 * config/depcomp: New file.
17689
17690 2001-08-28 Marc Autret <autret_m@epita.fr>
17691
17692 * doc/bison.1 (mandoc): Adjust.
17693 From Juan Manuel Guerrero.
17694
17695 2001-08-28 Marc Autret <autret_m@epita.fr>
17696
17697 * src/print_graph.c (print_state): Fix.
17698
17699 2001-08-27 Marc Autret <autret_m@epita.fr>
17700
17701 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17702 char * members.
17703 Echo modifications to the functions prototypes.
17704 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17705
17706 2001-08-27 Marc Autret <autret_m@epita.fr>
17707
17708 * src/vcg.c: Include `xalloc.h'.
17709 (add_colorentry): New.
17710 (add_classname): New.
17711 (add_infoname): New.
17712 * src/vcg.h: Add new prototypes.
17713
17714 2001-08-27 Akim Demaille <akim@epita.fr>
17715
17716 * Makefile.maint: Sync. again with CVS Autoconf.
17717
17718 2001-08-27 Akim Demaille <akim@epita.fr>
17719
17720 * Makefile.maint: Formatting changes.
17721 (po-update, cvs-update, update): New targets.
17722 (AMTAR): Remove.
17723
17724 2001-08-27 Akim Demaille <akim@epita.fr>
17725
17726 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17727 * Makefile.maint: Sync. with CVS Autoconf.
17728
17729 2001-08-27 Marc Autret <autret_m@epita.fr>
17730
17731 * src/vcg.h (struct infoname_s): New.
17732 (struct colorentry_s): New.
17733 (graph_s): New fields {vertical,horizontal}_order in structure.
17734 Add `infoname' field.
17735 Add `colorentry' field;
17736 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17737 (G_HORIZONTAL_ORDER): New.
17738 (G_INFONAME): New.
17739 (G_COLORENTRY): New.
17740 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17741 Add output of `infoname'.
17742 Add output of `colorentry'.
17743
17744 2001-08-27 Marc Autret <autret_m@epita.fr>
17745
17746 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17747 This one shadowed a global parameter.
17748
17749 2001-08-24 Marc Autret <autret_m@epita.fr>
17750
17751 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17752 instead of `unsigned'.
17753 (print_state): Do not call obstack_object_size () in obstack_grow ()
17754 to avoid macro variables shadowing.
17755
17756 2001-08-23 Marc Autret <autret_m@epita.fr>
17757
17758 * src/lex.c (percent_table): Typo: s/naem/name/.
17759 Add graph option.
17760 Normalize new options declarations.
17761
17762 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17763
17764 * tests/suite.at: Exercise %header_extension and %source_extension.
17765
17766 2001-08-16 Marc Autret <autret_m@epita.fr>
17767
17768 * src/reader.c (parse_dquoted_param): New.
17769 (parse_header_extension_decl): Use it.
17770 (parse_source_extension_decl): Likewise.
17771
17772 2001-08-16 Marc Autret <autret_m@epita.fr>
17773
17774 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17775 (get_xxxx_str): Use assert () instead of complain ().
17776 Remove return invokations in default cases.
17777 (get_decision_str): Modify default behaviour. Remove second argument.
17778 Echo modifications on calls.
17779 (output_graph): Fix.
17780
17781 2001-08-16 Marc Autret <autret_m@epita.fr>
17782
17783 * src/getargs.c (usage): Update with ``-g, --graph''.
17784
17785 2001-08-16 Marc Autret <autret_m@epita.fr>
17786
17787 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17788 (Option Cross Key): Likewise.
17789 * doc/bison.1: Update.
17790
177912001-09-25 Pascal Bart <pascal.bart@epita.fr>
17792
17793 * src/output.c (output_master_parser): Don't finish action_obstack.
17794 (output_parser): Don't care about the muscle action, here.
17795 (prepare): Copy the action_obstack in the action muscle.
17796 (output): Free action_obstack.
17797
177982001-09-23 Pascal Bart <pascal.bart@epita.fr>
17799
17800 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17801 will contain `%union' declaration.
17802 (parse_union_decl): Delete #line directive output.
17803 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17804 informations about %union.
17805 (parse_union_decl): Copy the union_obstack in the muscle stype.
17806 * src/bison.simple: Add new #line directive.
17807 Add typdef %%stype YYSTYPE.
17808
178092001-09-23 Pascal Bart <pascal.bart@epita.fr>
17810
17811 * src/bison.simple: Add new `#line' directive.
17812
178132001-09-22 Pascal Bart <pascal.bart@epita.fr>
17814
17815 * src/bison.simple: New `#line' directive.
17816 * src/output.c (output_parser): Support new dynamic muscle input_line.
17817
178182001-09-22 Marc Autret <autret_m@epita.fr>
17819
17820 * src/output.c (output_master_parser): New.
17821 (output_parser): Be more re-entrant.
17822
178232001-09-21 Marc Autret <autret_m@epita.fr>
17824
17825 * src/reader.c (copy_definition, parse_union_decl): Update and use
17826 `linef' muscle.
17827 (copy_action): Likewise.
17828 Use obstack_1grow ().
17829 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17830
178312001-09-21 Marc Autret <autret_m@epita.fr>
17832
17833 * src/options.c (option_table): Adjust.
17834 * src/lex.c (parse_percent_token): Fix.
17835
178362001-09-20 Pascal Bart <pascal.bart@epita.fr>
17837
17838 * src/options.c (symtab.h): Include it, need by lex.h.
17839
178402001-09-20 Pascal Bart <pascal.bart@epita.fr>
17841
17842 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17843 is now an option_table_struct*.
17844 (option_strcmp): New function option_strcmp.
17845 (parse_percent_token): Call option_strcmp.
17846 * src/getargs.c (xalloc.h, options.h): Include it.
17847 (getargs): Call create_long_option_table.
17848 (getargs): Free longopts at the end of the function.
17849 (shortopts): Move in options.c.
17850 * src/options.c (create_long_option_table): New function. Convert
17851 information from option_table to option structure.
17852 * src/reader.c (options.h): Include it.
17853
17854 * src/Makefile.am: Adjust.
17855 * src/options.c (option_table): Create from longopts and percent_table.
17856 * src/getargs.c (longopts): Delete.
17857 * src/lex.c (struct percent_table_struct): Delete.
17858 (percent_table): Delete.
17859 (options.h): Include it.
17860 * src/options.c: Create.
17861 * src/options.h: Create.
17862 Declare enum opt_access_e.
17863 Define struct option_table_struct.
17864
178652001-09-20 Marc Autret <autret_m@epita.fr>
17866
17867 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17868 sections of Bison.
17869
178702001-09-19 Pascal Bart <pascal.bart@epita.fr>
17871
17872 * src/bison.simple: s/%%filename/%%skeleton.
17873 * src/muscle_tab.c (getargs.h): Include it.
17874 (muscle_init): Insert new muscle skeleton.
17875
178762001-09-18 Pascal Bart <pascal.bart@epita.fr>
17877
17878 * src/output.c (output_parser): Delete unused variable actions_dumped.
17879
178802001-09-07 Pascal Bart <pascal.bart@epita.fr>
17881
17882 * src/output.c (output): Delete call to reader_output_yylsp.
17883 * src/reader.c (reader): Likewise.
17884 * src/reader.h: Delete declaration of reader_output_yylsp.
17885
178862001-09-02 Marc Autret <autret_m@epita.fr>
17887
17888 * src/reader.c: Include muscle_tab.h.
17889 (parse_union_decl): Update.
17890 (parse_macro_decl): Rename parse_muscle_decl.
17891 Update to use renamed functions and variable.
17892 (read_declarations, copy_action, read_additionnal_code, : Updated
17893 with correct variables and functions names.
17894 (packsymbols, reader): Likewise.
17895
17896 * src/reader.h (muscle_obstack): Extern declaration update.
17897
17898 * src/output.c: Include muscle_tab.h
17899 In all functions using macro_insert, change by using muscle_insert ().
17900 (macro_obstack): Rename muscle_obstack.
17901 Echo modifications in the whole file.
17902 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17903 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17904 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17905
17906 * src/muscle_tab.h: Update double inclusion macros.
17907 (macro_entry_s): Rename muscle_entry_s.
17908 Update prototypes.
17909
17910 * src/muscle_tab.c: Include muscle_tab.h.
17911 Rename macro_tabble to muscle_table.
17912 (mhash1, mhash2, mcmp): Use muscle_entry.
17913 (macro_init): Rename muscle_init. Update.
17914 (macro_insert): Rename muscle_insert. Update.
17915 (macro_find): Rename muscle_find. Update.
17916
17917 * src/main.c: Include muscle_tab.h.
17918 (main): Call muscle_init ().
17919 * src/Makefile.am (bison_SOURCES): Echo modifications.
17920
179212001-09-02 Marc Autret <autret_m@epita.fr>
17922
17923 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17924
17925 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17926
179272001-09-02 Marc Autret <autret_m@epita.fr>
17928
17929 * src/macrotab.c, src/macrotab.h: Remove.
17930
179312001-09-01 Pascal Bart <pascal.bart@epita.fr>
17932
17933 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17934 filename.
17935
179362001-09-01 Marc Autret <autret_m@epita.fr>
17937
17938 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17939 to an explicit value to activate the feature. We do it here.
17940
179412001-08-31 Pascal Bart <pascal.bart@epita.fr>
17942
17943 * src/output.c (prepare): Delete the `filename' muscule insertion.
17944 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17945 (parse_union_decl): Likewise.
17946 * src/macrotab.c (macro_init): Initialize filename by infile.
17947
179482001-08-31 Marc Autret <autret_m@epita.fr>
17949
17950 * src/bison.simple (YYLSP_NEEDED): New definition.
17951 * src/output.c (prepare): Add macro insertion of `locations_flag'
17952
179532001-08-31 Pascal Bart <pascal.bart@epita.fr>
17954
17955 * src/output.c (prepare): Delete insertion of previous muscles,
17956 and insert the `prefix' muscles.
17957 * src/macrotab.c (macro_init): Likewise.
17958 (macro_init): Initialization prefix directive by `yy'.
17959 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17960 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
17961 yylval, yydebug, yyerror, yynerrs and yyparse.
17962 New directive `#define' to substitute yydebug, ... with option
17963 name_prefix.
17964
179652001-08-31 Pascal Bart <pascal.bart@epita.fr>
17966
17967 * src/main.c (main): Standardize.
17968 * src/output.c (output_table_data, output_parser): Likewise.
17969 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
17970
179712001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
17972
17973 * src/reader.c (read_additionnal_code): Rename %%user_code to
17974 %%epilogue.
17975 * src/output.c (output): Rename %%declarations to %%prologue.
17976 * src/bison.simple: Echo modifications.
17977
179782001-08-31 Marc Autret <autret_m@epita.fr>
17979
17980 * src/reader.c (readgram): CleanUp.
17981 (output_token_defines): Likewise.
17982 (packsymbols): Likewise.
17983 (reader): Likewise.
17984 * src/output.c (output): CPP-out useless code.
17985
179862001-08-31 Pascal Bart <pascal.bart@epita.fr>
17987
17988 * src/reader.c (reader): Delete obsolete call to function
17989 output_trailers and output_headers.
17990 * src/output.h: Remove obsolete functions prototypes of output_headers
17991 and output_trailers.
17992
179932001-08-30 Pascal Bart <pascal.bart@epita.fr>
17994
17995 * src/main.c: Include macrotab.h.
17996 * src/macrotab.h (macro_entry_s): Constify fields.
17997 Adjust functions prototypes.
17998 * src/macrotab.c (macro_insert): Constify key and value.
17999 (macro_find): Constify key.
18000 (macro_insert): Include 'xalloc.h'
18001 (macro_insert): Use XMALLOC.
18002 (macro_find): Constify return value.
18003 * src/output.c (output_table_data): Rename table to table_data.
18004 (output_parser): Constify macro_key, macro_value.
18005
180062001-08-30 Marc Autret <autret_m@epita.fr>
18007
18008 * src/reader.c (parse_skel_decl): New.
18009 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
18010 * src/lex.h (token_t): New token `tok_skel'.
18011 * src/lex.c (percent_table): Add skeleton option entry.
18012 Standardize.
18013
180142001-08-29 Marc Autret <autret_m@epita.fr>
18015
18016 * src/bison.simple: Add %%user_code directive at the end.
18017 * src/reader.c (read_additionnal_code): New.
18018 (reader): Use it.
18019 * src/output.c (output_program): Remove.
18020 (output): Update.
18021
180222001-08-28 Marc Autret <autret_m@epita.fr>
18023
18024 * src/output.c (output_actions): Clean up.
18025 (output_gram): CPP-out useless code.
18026 * src/reader.c (reader): Clean up, CPP-out useless code.
18027
180282001-08-28 Pascal Bart <pascal.bart@epita.fr>
18029
18030 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
18031 directive.
18032 * src/bison.simple: Add `%%definitions'.
18033
180342001-08-28 Marc Autret <autret_m@epita.fr>
18035
18036 * config/depcomp: New file.
18037
180382001-08-27 Paul Eggert <eggert@twinsun.com>
18039
18040 * src/bison.simple (yyparse): Don't take the address of an
18041 item before the start of an array, as that doesn't conform to
18042 the C Standard.
18043
180442001-08-27 Robert Anisko <robert.anisko@epita.fr>
18045
18046 * src/output.c (output): Remove the initialization of the macro
18047 obstack. It was done too late here.
18048
18049 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18050 completely wrong.
18051 (reader): Initialize the macro obstack here, since we need it to grow
18052 '%define' directives.
18053
18054 * src/reader.h: Declare the macro obstack as extern.
18055
180562001-08-27 Robert Anisko <robert.anisko@epita.fr>
18057
18058 * src/output.c (output_parser): Fix. Store single '%' characters in
18059 the output obstack instead of throwing them away.
18060
180612001-08-27 Akim Demaille <akim@epita.fr>
18062
18063 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18064
180652001-08-25 Robert Anisko <robert.anisko@epita.fr>
18066
18067 * lib/Makefile.am: Adjust.
18068
180692001-08-25 Robert Anisko <robert.anisko@epita.fr>
18070
18071 * src/bison.simple: Update and add '%%' directives.
18072
180732001-08-25 Robert Anisko <robert.anisko@epita.fr>
18074
18075 * src/reader.c (reader): Remove calls to 'output_headers' and
18076 'output_trailers'. Remove some C output.
18077 (readgram): Disable a piece of code that was writing a default
18078 definition for 'YYSTYPE'.
18079 (reader_output_yylsp): Remove.
18080 (packsymbols): Output token defintions to a macro.
18081 (copy_definition): Disable C output.
18082
18083 * src/reader.c (parse_macro_decl): New function used to parse macro
18084 declarations.
18085 (copy_string2): Put the body of copy_string into this new function.
18086 Add a parameter to let the caller choose whether he wants to copy the
18087 string delimiters or not.
18088 (copy_string): Be a simple call to copy_string2 with the last argument
18089 bound to true.
18090 (read_declarations): Add case for macro definition.
18091 (copy_identifier): New.
18092 (parse_macro_decl): Read macro identifiers using copy_identifier
18093 rather than lex.
18094
180952001-08-25 Robert Anisko <robert.anisko@epita.fr>
18096
18097 * src/output.c (prepare): Add prefixed names.
18098 (output_parser): Output semantic actions.
18099 (output_parser): Fix bug on '%%line' directives.
18100
18101 * src/output.c (output_headers): Remove. The C code printed by this
18102 function should now be in the skeletons.
18103 (output_trailers): Remove.
18104 (output): Disable call to 'reader_output_yylsp'.
18105 (output_rule_data): Do not output tables to the table obstack.
18106
18107 * src/output.c: Remove some C dedicated output.
18108 Improve the use of macro and output obstacks.
18109 (output_defines): Remove.
18110
18111 * src/output.c (output_token_translations): Associate 'translate'
18112 table with a macro. No output to the table obstack.
18113 (output_gram): Same for 'rhs' and 'prhs'.
18114 (output_stos): Same for 'stos'.
18115 (output_rule_data): Same for 'r1' and 'r2'.
18116 (token_actions): Same for 'defact'.
18117 (goto_actions): Same for 'defgoto'.
18118 (output_base): Same for 'pact' and 'pgoto'.
18119 (output_table): Same for 'table'.
18120 (output_check): Same for 'check'.
18121
18122 * src/output.c (output_table_data): New function.
18123 (output_short_table): Remove.
18124 (output_short_or_char_table): Remove.
18125
18126 * src/output.c (output_parser): Replace most of the skeleton copy code
18127 with something new. Skeletons are now processed character by character
18128 rather than line by line, and Bison looks for '%%' macros. This is the
18129 first step in making Bison's output process (a lot) more flexible.
18130 (output_parser): Use the macro table.
18131
181322001-08-25 Robert Anisko <robert.anisko@epita.fr>
18133
18134 * src/main.c (main): Initialize the macro table.
18135
181362001-08-25 Robert Anisko <robert.anisko@epita.fr>
18137
18138 * src/lex.c (percent_table): Add tok_define.
18139 * src/lex.h: Add tok_define.
18140
181412001-08-25 Robert Anisko <robert.anisko@epita.fr>
18142
18143 * src/macrotab.c: New file.
18144 * src/macrotab.h: New file.
18145 * src/Makefile.am: Update.
18146
181472001-08-25 Robert Anisko <robert.anisko@epita.fr>
18148
18149 * lib/hash.c: New file.
18150 * lib/hash.h: New file.
18151 * lib/Makefile.am: Update.
18152
181532001-08-15 Akim Demaille <akim@epita.fr>
18154
18155 Version 1.28c.
18156
181572001-08-15 Marc Autret <autret_m@epita.fr>
18158
18159 * src/reader.c (readgram): Indent output macro YYSTYPE.
18160 (packsymbols): Likewise.
18161 (output_token_defines): Likewise.
18162 * src/files.c: Standardize.
18163 (compute_header_macro): New.
18164 (defines_obstack_save): New. Use compute_header_macro.
18165 (output_files): Update. Use defines_obstack_save.
18166
181672001-08-15 Akim Demaille <akim@epita.fr>
18168
18169 * doc/bison.texinfo (Table of Symbols): Document
18170 YYSTACK_USE_ALLOCA.
18171
181722001-08-15 Akim Demaille <akim@epita.fr>
18173
18174 * missing: Update from CVS Automake.
18175 * config/config.guess, config/config.sub, config/texinfo.tex:
18176 Update from gnu.org.
18177
181782001-08-15 Akim Demaille <akim@epita.fr>
18179
18180 * Makefile.maint: Sync with CVS Autoconf.
18181
181822001-08-14 Pascal Bart <pascal.bart@epita.fr>
18183
18184 * doc/bison.texinfo: Include GNU Free Documentation License from
18185 `fdl.texi'.
18186 * doc/fdl.texi: Add to package.
18187
181882001-08-14 Marc Autret <autret_m@epita.fr>
18189
18190 Turn on %{source,header}_extension features.
18191
18192 * src/lex.c (percent_table): Un-CPP out header_extension and
18193 source_extension.
18194 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
18195 (compute_exts_from_src): Remove conditions. It restores priorities
18196 between options.
18197
181982001-08-14 Marc Autret <autret_m@epita.fr>
18199
18200 * src/files.c (compute_base_names): Add extensions computing when
18201 `--file-prefix' used.
18202 Standardize function calls.
18203
182042001-08-13 Marc Autret <autret_m@epita.fr>
18205
18206 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
18207 defining it (defined but null disables alloca).
18208
182092001-08-13 Marc Autret <autret_m@epita.fr>
18210
18211 * src/bison.simple (_yy_memcpy): CPP reformat.
18212
182132001-08-13 Pascal Bart <pascal.bart@epita.fr>
18214
18215 * tests/atconfig.in (CPPFLAGS): Fix.
18216
182172001-08-10 Pascal Bart <pascal.bart@epita.fr>
18218
18219 * doc/bison.texinfo: Include GNU General Public License from
18220 `gpl.texi'.
18221 * doc/gpl.texi: Add to package.
18222
182232001-08-10 Marc Autret <autret_m@epita.fr>
18224
18225 * src/print_graph.h: Fix.
18226 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18227
182282001-08-10 Akim Demaille <akim@epita.fr>
18229
18230 * src/system.h: Provide default declarations for stpcpy, strndup,
18231 and strnlen.
18232
182332001-08-10 Robert Anisko <anisko_r@epita.fr>
18234
18235 * doc/bison.texinfo (Locations): Update @$ stuff.
18236
182372001-08-09 Robert Anisko <anisko_r@epita.fr>
18238
18239 * src/bison.simple (YYLLOC_DEFAULT): Update.
18240 (yyparse): Adjust.
18241
182422001-08-08 Marc Autret <autret_m@epita.fr>
18243
18244 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
18245 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18246 Reported by Fabrice Bauzac.
18247
182482001-08-08 Marc Autret <autret_m@epita.fr>
18249
18250 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18251 * src/vcg.c (output_node): Fix.
18252 * src/vcg.h: Cleanup.
18253 * src/print_graph.c: Add comments.
18254 (node_output_size): New global variable. Simplify the formatting of
18255 the VCG graph output.
18256 (print_actions): Unused code is now used. It notifies the final state
18257 and no action states in the VCG graph. It also give the reduce actions.
18258 The `shift and goto' edges are red and the `go to state' edges are
18259 blue.
18260 Get the current node name and node_obstack by argument.
18261 (node_obstack): New variable.
18262 (print_state): Manage node_obstack.
18263 (print_core): Use node_obstack given by argument.
18264 A node is not only computed here but in print_actions also.
18265 (print_graph): CPP out useless code instead of commenting it.
18266
182672001-08-07 Pascal Bart <pascal.bart@epita.fr>
18268
18269 * tests/atconfig.in (CPPFLAGS): Fix.
18270
182712001-08-07 Akim Demaille <akim@epita.fr>
18272
18273 * src/print_graph.c (quote): New.
18274 (print_core): Use it.
18275
182762001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
18277
18278 * src/vcg.c (complain.h): Include it.
18279 Unepitaize `return' invocations.
18280 [NDEBUG] (main): Remove.
18281 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
18282 * src/files.c (open_files): Initialize graph_obstack.
18283 * src/print_graph.c (print_actions): CPP out useless code.
18284 (print_core): Don't output the last `\n' in labels.
18285 Use `quote'.
18286 * src/files.c (output_files): Output the VCG file.
18287 * src/main.c (main): Invoke print_graph ();
18288
182892001-08-06 Marc Autret <autret_m@epita.fr>
18290
18291 Automaton VCG graph output.
18292 Using option ``-g'' or long option ``--graph'', you can generate
18293 a gram_filename.vcg file containing a VCG description of the LALR (1)
18294 automaton of your grammar.
18295
18296 * src/main.c: Call to print_graph() function.
18297 * src/getargs.h: Update.
18298 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18299 (graph_flag): New flag.
18300 (longopts): Update.
18301 (getargs): Add case `g'.
18302 * src/files.c (graph_obstack): New obstack struct.
18303 (open_files): Initialize new obstack.
18304 (output_files): Saves graph_obstack if required.
18305 * src/files.h (graph_obstack): New extern declaration.
18306 * src/Makefile.am: Add new source files.
18307
183082001-08-06 Marc Autret <autret_m@epita.fr>
18309
18310 * src/print_graph.c, src/print_graph.h (graph): New.
18311 * src/vcg.h: New file.
18312 * src/vcg.c: New file, VCG graph handling.
18313
183142001-08-06 Marc Autret <autret_m@epita.fr>
18315
18316 Add of %source_extension and %header_extension which specify
18317 the source or/and the header output file extension.
18318
18319 * src/files.c (compute_base_names): Remove initialisation of
18320 src_extension and header_extension.
18321 (compute_exts_from_gf): Update.
18322 (compute_exts_from_src): Update.
18323 (output_files): Update.
18324 * src/reader.c (parse_header_extension_decl): New.
18325 (parse_source_extension_decl): New.
18326 (read_declarations): New case statements for the new tokens.
18327 * src/lex.c (percent_table): Add entries for %source_extension
18328 and %header_extension.
18329 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18330
183312001-08-06 Marc Autret <autret_m@epita.fr>
18332
18333 * configure.in: Bump to 1.28c.
18334 * doc/bison.texinfo: Texinfo thingies.
18335
183362001-08-04 Pascal Bart <pascal.bart@epita.fr>
18337
18338 * tests/atconfig.in (CPPFLAGS): Add.
18339 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18340
183412001-08-03 Akim Demaille <akim@epita.fr>
18342
18343 Version 1.28b.
18344
183452001-08-03 Akim Demaille <akim@epita.fr>
18346
18347 * tests/Makefile.am (check-local): Ship testsuite.
18348 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18349 Include `string.h'.
18350
183512001-08-03 Akim Demaille <akim@epita.fr>
18352
18353 * configure.in: Try using -Wformat when compiling.
18354
183552001-08-03 Akim Demaille <akim@epita.fr>
18356
18357 * configure.in: Bump to 1.28b.
18358
183592001-08-03 Akim Demaille <akim@epita.fr>
18360
18361 * src/complain.c: Adjust strerror_r portability issues.
18362
183632001-08-03 Akim Demaille <akim@epita.fr>
18364
18365 Version 1.28a.
18366
183672001-08-03 Akim Demaille <akim@epita.fr>
18368
18369 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18370 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18371 * src/getargs.c: Include complain.h.
18372 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18373 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18374
183752001-08-03 Akim Demaille <akim@epita.fr>
18376
18377 * src/reader.c (readgram): Display hidden chars in error messages.
18378
183792001-08-03 Akim Demaille <akim@epita.fr>
18380
18381 Update to gettext 0.10.39.
18382
183832001-08-03 Akim Demaille <akim@epita.fr>
18384
18385 * lib/strspn.c: New.
18386
183872001-08-01 Marc Autret <autret_m@epita.fr>
18388
18389 * doc/bison.texinfo: Update.
18390 * doc/bison.1 (mandoc): Update.
18391 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18392 * src/files.c: Support output files extensions computing.
18393 (src_extension): New static variable.
18394 (header_extension): New static variable.
18395 (tr): New function.
18396 (get_extension_index): New function, gets the index of an extension
18397 filename in a string.
18398 (compute_exts_from_gf): New function, computes extensions from the
18399 grammar file extension.
18400 (compute_exts_from_src): New functions, computes extensions from the
18401 C source file extension, file given by ``-o'' option.
18402 (compute_base_names): Update.
18403 (output_files): Update.
18404
184052001-08-01 Robert Anisko <anisko_r@epita.fr>
18406
18407 * doc/bison.texi: Document @$.
18408 (Locations): New section.
18409
184102001-07-18 Akim Demaille <akim@epita.fr>
18411
18412 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18413 * config/prev-version.txt, config/move-if-change: New.
18414 * Makefile.am: Adjust.
18415
184162001-07-08 Pascal Bart <pascal.bart@epita.fr>
18417
18418 * src/bison.simple (yyparse): Suppress warning `comparaison
18419 between signed and unsigned'.
18420
184212001-07-05 Pascal Bart <pascal.bart@epita.fr>
18422
18423 * src/getargs.h (raw_flag): Remove.
18424 * src/getargs.c: Die on `-r'/`--raw'.
18425 * src/lex.c (parse_percent_token): Die on `%raw'.
18426 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18427 * tests/calc.at: Suppress test with option `--raw'.
18428
184292001-07-14 Akim Demaille <akim@epita.fr>
18430
18431 * config/: New.
18432 * configure.in: Require Autoconf 2.50.
18433 Update to gettext 0.10.38.
18434
184352001-03-16 Akim Demaille <akim@epita.fr>
18436
18437 * doc/bison.texinfo: ANSIfy the examples.
18438
184392001-03-16 Akim Demaille <akim@epita.fr>
18440
18441 * getargs.c (skeleton): New variable.
18442 (longopts): --skeleton is a new option.
18443 (shortopts, getargs): -S is a new option.
18444 * getargs.h: Declare skeleton.
18445 * output.c (output_parser): Use it.
18446
184472001-03-16 Akim Demaille <akim@epita.fr>
18448
18449 * m4/strerror_r.m4: New.
18450 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18451 * lib/error.h, lib/error.c: Update.
18452
184532001-03-16 Akim Demaille <akim@epita.fr>
18454
18455 * src/getargs.c (longopts): Clean up.
18456
184572001-02-21 Akim Demaille <akim@epita.fr>
18458
18459 * src/reader.c (gensym): `gensym_count' is your own.
18460 Use a static buf to create the symbol name, as token_buffer is no
18461 longer a buffer.
18462
184632001-02-08 Akim Demaille <akim@epita.fr>
18464
18465 * src/conflicts.c (conflict_report): Be sure not to append to res
18466 between two calls, which could happen if both first sprintf were
18467 skipped, but not the first cp += strlen.
18468
184692001-02-08 Akim Demaille <akim@epita.fr>
18470
18471 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18472 New, from fileutils 4.0.37.
18473 * configure.in: Require Autoconf 2.49c. I took some time before
18474 making this decision. This is the only way out for portability
18475 issues in Bison, it would mean way too much duplicate effort to
18476 import in Bison features implemented in 2.49c since 2.13.
18477 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18478
184792001-02-02 Akim Demaille <akim@epita.fr>
18480
18481 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18482 * lib/xalloc.h, lib/xmalloc.c: Update.
18483
184842001-01-19 Akim Demaille <akim@epita.fr>
18485
18486 Get rid of the ad hoc handling of token_buffer in the scanner: use
18487 the obstacks.
18488
18489 * src/lex.c (token_obstack): New.
18490 (init_lex): Initialize it. No longer call...
18491 (grow_token_buffer): this. Remove it.
18492 Adjust all the places which used it to use the obstack.
18493
184942001-01-19 Akim Demaille <akim@epita.fr>
18495
18496 * src/lex.h: Rename all the tokens:
18497 s/\bENDFILE\b/tok_eof/g;
18498 s/\bIDENTIFIER\b/tok_identifier/g;
18499 etc.
18500 Let them be enums, not #define, to ease debugging.
18501 Adjust all the code.
18502
185032001-01-18 Akim Demaille <akim@epita.fr>
18504
18505 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18506 * src/lex.c (maxtoken, grow_token_buffer): Static.
18507
185082001-01-18 Akim Demaille <akim@epita.fr>
18509
18510 Since we now use obstacks, more % directives can be enabled.
18511
18512 * src/lex.c (percent_table): Also accept `%yacc',
18513 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18514 `%debug'.
18515 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18516 instead of returning a token.
18517 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18518 * src/reader.c (read_declarations): Adjust.
18519 * src/files.c (open_files): Don't call `compute_base_names', don't
18520 compute `attrsfile' since they depend upon data which might be
18521 *in* the input file now.
18522 (output_files): Do it here.
18523 * src/output.c (output_headers): Document the fact that this patch
18524 introduces a guaranteed SEGV for semantic parsers.
18525 * doc/bison.texinfo: Document them.
18526 * tests/suite.at: Exercise these %options.
18527
185282000-12-20 Akim Demaille <akim@epita.fr>
18529
18530 Also handle the output file (--verbose) with obstacks.
18531
18532 * files.c (foutput): Remove.
18533 (output_obstack): New.
18534 Adjust all dependencies.
18535 * src/conflicts.c: Return a string.
18536 * src/system.h (obstack_grow_string): Rename as...
18537 (obstack_sgrow): this. Be ready to work with non literals.
18538 (obstack_fgrow4): New.
18539
185402000-12-20 Akim Demaille <akim@epita.fr>
18541
18542 * src/files.c (open_files): Fix the computation of short_base_name
18543 in the case of `-o foo.tab.c'.
18544
185452000-12-20 Akim Demaille <akim@epita.fr>
18546
18547 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18548 (copy_dollar): Now that everything uses obstacks, get rid of the
18549 FILE * parameters.
18550
185512000-12-20 Akim Demaille <akim@epita.fr>
18552
18553 * src/files.c (open_files): Actually the `.output' file is based
18554 on the short_base_name, not base_name.
18555 * tests/suite.at (Checking output file names): Adjust.
18556
185572000-12-20 Akim Demaille <akim@epita.fr>
18558
18559 * src/bison.s1: Remove, we now use directly...
18560 * src/bison.simple: this.
18561 * src/Makefile.am: Use pkgdata instead of data.
18562
185632000-12-20 Akim Demaille <akim@epita.fr>
18564
18565 * src/files.c (guard_obstack): New.
18566 (open_files): Initialize it.
18567 (output_files): Dump it...
18568 * src/files.h: Export it.
18569 * src/reader.c (copy_guard): Use it.
18570
185712000-12-19 Akim Demaille <akim@epita.fr>
18572
18573 * src/files.c (outfile, defsfile, actfile): Removed as global
18574 vars.
18575 (open_files): Don't compute them.
18576 (output_files): Adjust.
18577 (base_name, short_base_name): Be global.
18578 Adjust dependencies.
18579
185802000-12-19 Akim Demaille <akim@epita.fr>
18581
18582 * src/files.c (strsuffix): New.
18583 (stringappend): Be just like strcat but allocate.
18584 (base_names): Eve out from open_files.
18585 Try to simplify the rather hairy computation of base_name and
18586 short_base_name.
18587 (open_files): Use it.
18588 * tests/suite.at (Checking output file names): New test.
18589
185902000-12-19 Akim Demaille <akim@epita.fr>
18591
18592 * src/system.h (obstack_grow_literal_string): Rename as...
18593 (obstack_grow_string): this.
18594 * src/output.c (output_parser): Recognize `%% actions' instead of
18595 `$'.
18596 * src/bison.s1: s/$/%% actions/.
18597 * src/bison.hairy: Likewise.
18598
185992000-12-19 Akim Demaille <akim@epita.fr>
18600
18601 * src/output.c (output_parser): Compute the `#line' lines when
18602 there are.
18603 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18604 Suggested by Hans Aberg.
18605
186062000-12-19 Akim Demaille <akim@epita.fr>
18607
18608 Let the handling of the skeleton files be local to the procedures
18609 that use it.
18610
18611 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18612 longer static.
18613 (fparser, open_extra_files): Remove.
18614 (open_files, output_files): Don't take care of fparser.
18615 * src/files.h: Adjust.
18616 * src/output.c (output_parser): Open and close the file to the
18617 skeleton.
18618 * src/reader.c (read_declarations): When %semantic_parser, open
18619 fguard.
18620
186212000-12-19 Akim Demaille <akim@epita.fr>
18622
18623 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18624 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18625
186262000-12-19 Akim Demaille <akim@epita.fr>
18627
18628 * src/files.c (open_files): Yipee! We no longer need all the code
18629 looking for `/tmp' since we have no tmp file.
18630
186312000-12-19 Akim Demaille <akim@epita.fr>
18632
18633 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18634 New macros.
18635 * src/files.c (open_files): Less dependency on MSDOS etc.
18636
186372000-12-14 Akim Demaille <akim@epita.fr>
18638
18639 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18640 Provide a default definition.
18641 Use it when executing the default @ action.
18642 * src/reader.c (reader_output_yylsp): No longer include
18643 `timestamp' and `text' in the default YYLTYPE.
18644
186452000-12-12 Akim Demaille <akim@epita.fr>
18646
18647 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18648 (copy_guard): Quote the file names.
18649 Reported by Laurent Mascherpa.
18650
186512000-12-12 Akim Demaille <akim@epita.fr>
18652
18653 * src/output.c (output_headers, output_program, output): Be sure
18654 to escape special characters when outputting filenames.
18655 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18656 (output_headers): Don't depend on them, Use ACTSTR.
18657
186582000-11-17 Akim Demaille <akim@epita.fr>
18659
18660 * lib/obstack.h: Formatting changes.
18661 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18662 prevents type checking.
18663 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18664 cast the value to (void *): assigning a `foo *' to a `void *'
18665 variable is valid.
18666 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18667 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18668 append characters.
18669
186702000-11-17 Akim Demaille <akim@epita.fr>
18671
18672 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18673 as...
18674 (suite.m4, regression.m4, calc.m4): these.
18675 * tests/atgeneral.m4: Update from CVS Autoconf.
18676
186772000-11-17 Akim Demaille <akim@epita.fr>
18678
18679 * tests/regression.m4 (%union and --defines): New test,
18680 demonstrating a current bug in the obstack implementation.
18681
186822000-11-17 Akim Demaille <akim@epita.fr>
18683
18684 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18685 macros.
18686 Use them to declare the variables which are global or local to
18687 `yyparse'.
18688
186892000-11-17 Akim Demaille <akim@epita.fr>
18690
18691 * acconfig.h: Remove, no longer used.
18692
186932000-11-07 Akim Demaille <akim@epita.fr>
18694
18695 * src: s/Copyright (C)/Copyright/g.
18696
186972000-11-07 Akim Demaille <akim@epita.fr>
18698
18699 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18700 defining.
18701 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18702
187032000-11-07 Akim Demaille <akim@epita.fr>
18704
18705 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18706 Merge in a single CPP if/else.
18707
187082000-11-07 Akim Demaille <akim@epita.fr>
18709
18710 * src/output.c (output): Remove useless variables.
18711 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18712 argument `data' for consistency with the prototypes.
18713 Qualify it `const'.
18714 (obstack_copy, obstack_copy0): Rename the second argument as
18715 `address' for consistency. Qualify it `const'.
18716 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18717 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18718 `const' their input argument (`data' or `address').
18719 Adjust the corresponding macros to include `const' in casts.
18720
187212000-11-03 Akim Demaille <akim@epita.fr>
18722
18723 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18724 s/PFILE1/BISON_HAIRY/.
18725 Adjust dependencies.
18726
187272000-11-03 Akim Demaille <akim@epita.fr>
18728
18729 For some reason, this was not applied.
18730
18731 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18732 `unlink': it's no longer used.
18733
187342000-11-03 Akim Demaille <akim@epita.fr>
18735
18736 * src/files.c (skeleton_find): New function, eved out of...
18737 (open_files, open_extra_files): here.
18738
187392000-11-03 Akim Demaille <akim@epita.fr>
18740
18741 Don't use `atexit'.
18742
18743 * src/files.c (obstack_save): New function.
18744 (done): Rename as...
18745 (output_files): this.
18746 Use `obstack_save'.
18747 * src/main.c (main): Don't use `atexit' to register `done', since
18748 it no longer has to remove tmp files, just call `output_files'
18749 when there are no errors.
18750
187512000-11-02 Akim Demaille <akim@epita.fr>
18752
18753 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18754 `unlink': it's no longer used.
18755 * src/files.h: Formatting changes.
18756
187572000-11-02 Akim Demaille <akim@epita.fr>
18758
18759 Remove the last uses of mktemp and unlink/delete.
18760
18761 * src/files.c (fdefines, ftable): Removed.
18762 (defines_ostack, table_obstack): New.
18763 Adjust dependencies of the former into uses of the latter.
18764 * src/output.c (output_short_or_char_table, output_short_table):
18765 Convert to using obstacks.
18766 * src/reader.c (copy_comment2): Accept one FILE * and two
18767 obstacks.
18768 (output_token_defines, reader_output_yylsp): Use obstacks.
18769 * src/system.h (obstack_fgrow3): New.
18770 * po/POTFILES.in: Adjust.
18771
187722000-11-01 Akim Demaille <akim@epita.fr>
18773
18774 Change each use of `fattrs' into a use of `attrs_obstack'.
18775
18776 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18777 * src/files.c (fattrs): Remove.
18778 (attrs_obstack): New.
18779 Adjust all dependencies.
18780 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18781
187822000-11-01 Akim Demaille <akim@epita.fr>
18783
18784 Introduce obstacks.
18785 Change each use of `faction' into a use of `action_obstack'.
18786
18787 * lib/obstack.h, lib/obstack.c: New files.
18788 * src/files.c (faction): Remove.
18789 (action_obstack): New.
18790 Adjust all dependencies.
18791
187922000-10-20 Akim Demaille <akim@epita.fr>
18793
18794 * lib/quote.h (PARAMS): New macro. Use it.
18795
187962000-10-16 Akim Demaille <akim@epita.fr>
18797
18798 * src/output.c (output_short_or_char_table): New function.
18799 (output_short_table, output_token_translations): Use it.
18800 (goto_actions): Use output_short_table.
18801
188022000-10-16 Akim Demaille <akim@epita.fr>
18803
18804 * src/symtab.c (bucket_new): New function.
18805 (getsym): Use it.
18806
18807 * src/output.c (output_short_table): New argument to display the
18808 comment associated with the table.
18809 Adjust dependencies.
18810 (output_gram): Use it.
18811 (output_rule_data): Nicer output layout for YYTNAME.
18812
188132000-10-16 Akim Demaille <akim@epita.fr>
18814
18815 * src/lex.c (read_typename): New function.
18816 (lex): Use it.
18817 * src/reader.c (copy_dollar): Likewise.
18818
188192000-10-16 Akim Demaille <akim@epita.fr>
18820
18821 * src/reader.c (copy_comment2): Expect the input stream to be on
18822 the `/' which is suspected to open a comment, instead of being
18823 called after `//' or `/*' was read.
18824 (copy_comment, copy_definition, parse_union_decl, copy_action)
18825 (copy_guard): Adjust.
18826
188272000-10-16 Akim Demaille <akim@epita.fr>
18828
18829 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18830 `read_signed_integer'.
18831
188322000-10-16 Akim Demaille <akim@epita.fr>
18833
18834 * src/reader.c (copy_dollar): New function.
18835 (copy_guard, copy_action): Use it.
18836
188372000-10-16 Akim Demaille <akim@epita.fr>
18838
18839 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18840 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18841 New files, from Fileutils 4.0.27.
18842 * src/main.c (printable_version): Remove.
18843 * src/lex.c, src/reader.c: Use `quote'.
18844
188452000-10-04 Akim Demaille <akim@epita.fr>
18846
18847 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18848
188492000-10-04 Akim Demaille <akim@epita.fr>
18850
18851 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18852
188532000-10-04 Akim Demaille <akim@epita.fr>
18854
18855 When a literal string is used to define two different tokens,
18856 `bison -v' segfaults.
18857 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18858
18859 * tests/regression.m4: New file.
18860 Include the core of the sample provided by Piotr Gackiewicz.
18861 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18862 properly.
18863
188642000-10-04 Akim Demaille <akim@epita.fr>
18865
18866 * src/reader.c (parse_expect_decl): Keep `count' within the size
18867 of `buffer'.
18868 From Neil Booth.
18869
188702000-10-02 Paul Eggert <eggert@twinsun.com>
18871
18872 * bison.s1 (yyparse): Assign the default value
18873 unconditionally, to avoid a GCC warning and make the parser a
18874 tad smaller.
18875
188762000-10-02 Akim Demaille <akim@epita.fr>
18877
18878 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18879 options.
18880
188812000-10-02 Akim Demaille <akim@epita.fr>
18882
18883 * src/derives.c, src/print.c, src/reduce.c: To ease the
18884 translation, move some `\n' out of the translated strings.
18885
188862000-10-02 Akim Demaille <akim@epita.fr>
18887
18888 The location tracking mechanism is precious for parse error
18889 messages. Nevertheless, it is enabled only when `@n' is used in
18890 the grammar, which is a different issue (you can use it in error
18891 message, but not in the grammar per se). Therefore, there should
18892 be another means to enable it.
18893
18894 * src/getargs.c (getargs): Support `--locations'.
18895 (usage): Report it.
18896 * src/getargs.h (locationsflag): Export it.
18897 * src/lex.c (percent_table): Support `%locations'.
18898 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18899 with `locationsflag'.
18900 * doc/bison.texinfo: Document `--locations' and `%locations'.
18901 Sort the options.
18902 * tests/calc.m4: Test it.
18903
18904 For regularity of the names, replace each
18905 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18906 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18907 In addition replace each `flag' with `_flag'.
18908
189092000-10-02 Akim Demaille <akim@epita.fr>
18910
18911 Also test parse error messages, including with YYERROR_VERBOSE.
18912
18913 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18914 associative).
18915 Use it to check the computations.
18916 Use it to check `nonassoc' is honored.
18917 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18918 `--yyerror-verbose'.
18919 (_AT_CHECK_CALC): Adjust to this option.
18920 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18921
189222000-10-02 Akim Demaille <akim@epita.fr>
18923
18924 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18925 the latter demonstrates a flaw in the handling of non debugging
18926 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18927 was used in order to simplify:
18928
18929 #if YYDEBUG
18930 if (yydebug)
18931 {
18932 ...
18933 }
18934 #endif
18935
18936 into
18937
18938 if (yydebug)
18939 {
18940 ...
18941 }
18942
18943 unfortunately this leads to a CPP conflict when
18944 `--name-prefix=foo' is used since it produces `#define yydebug
18945 foodebug'.
18946
18947 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
18948 (YYDPRINTF): New macro.
18949 Spread its use.
18950 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
18951 the bison options.
18952 Also test `--verbose', `--defines' and `--name-prefix'.
18953
189542000-10-02 Akim Demaille <akim@epita.fr>
18955
18956 Improve the readability of the produced parsers.
18957
18958 * src/bison.s1: Formatting changes.
18959 Improve the comment related to the `$' mark.
18960 (yydefault): Don't fall through to `yyresume': `goto' there.
18961 * src/output.c (output_parser): When the `$' is met, skip the end
18962 of its line.
18963 New variable, `number_of_dollar_signs', to check there's exactly
18964 one `$' in the parser skeleton.
18965
189662000-10-02 Akim Demaille <akim@epita.fr>
18967
18968 * lib/xstrdup.c: New file, from the fileutils.
18969 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
18970 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
18971 instead of strlen + xmalloc + strcpy.
18972 * src/symtab.c (copys): Remove, use xstrdup instead.
18973
189742000-10-02 Akim Demaille <akim@epita.fr>
18975
18976 * src/gram.h (associativity): New enum type which replaces the
18977 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
18978 `right_assoc', `left_assoc' and `non_assoc'.
18979 Adjust all dependencies.
18980 * src/reader.c: Formatting changes.
18981 (LTYPESTR): Don't define it, use it as a literal in
18982 `reader_output_yylsp'.
18983 * src/symtab.h (symbol_class): New enum type which replaces the
18984 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
18985 `sunknown', `stoken and `snterm'.
18986
189872000-10-02 Akim Demaille <akim@epita.fr>
18988
18989 * src/getargs.c (fixed_outfiles): Rename as...
18990 (yaccflag): for consistency and accuracy.
18991 Adjust dependencies.
18992
189932000-10-02 Akim Demaille <akim@epita.fr>
18994
18995 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
18996 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
18997 difficult and introduced a lot of core dump. It turns out that
18998 Bison used an implementation of `xmalloc' based on `calloc', and
18999 at various places it does depend upon the initialization to 0. I
19000 have not tried to isolate the pertinent places, and all the former
19001 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19002 someone should address this issue.
19003
19004 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19005 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19006 files.
19007 Adjust dependencies.
19008 * src/warshall.h: New file.
19009 Propagate.
19010
190112000-10-02 Akim Demaille <akim@epita.fr>
19012
19013 Various anti-`extern in *.c' changes.
19014
19015 * src/system.h: Include `assert.h'.
19016
190172000-10-02 Akim Demaille <akim@epita.fr>
19018
19019 * src/state.h (nstates, final_state, first_state, first_shift)
19020 (first_reduction): Move their exportation from here...
19021 * src/LR0.h: to here.
19022 Adjust dependencies.
19023 * src/getargs.c (statisticsflag): New variable.
19024 Add support for `--statistics'.
19025 Adjust dependencies.
19026
19027 Remove a lot of now useless `extern' statements in most files.
19028
190292000-10-02 Akim Demaille <akim@epita.fr>
19030
19031 * src/LR0.h: New file.
19032 Propagate its use.
19033
190342000-10-02 Akim Demaille <akim@epita.fr>
19035
19036 * src/print.h: New file.
19037 Propagate its use.
19038 * src/print.c: Formatting and ordering changes.
19039 (verbose, terse): Replace with...
19040 (print_results): this new function.
19041 Adjust dependencies.
19042
190432000-10-02 Akim Demaille <akim@epita.fr>
19044
19045 * src/conflicts.c (conflict_report): New function.
19046 (conflict_log, verbose_conflict_log): Replace with...
19047 (print_conflicts): this function.
19048 Adjust dependencies.
19049 * src/conflicts.h: New file.
19050 Propagate its inclusion.
19051
190522000-10-02 Akim Demaille <akim@epita.fr>
19053
19054 * src/nullable.h: New file.
19055 Propagate its inclusion.
19056 * src/nullable.c: Formatting changes.
19057
190582000-10-02 Akim Demaille <akim@epita.fr>
19059
19060 * src/reduce.h: New file.
19061 Propagate its inclusion.
19062 * src/reduce.c: Topological sort and other formatting changes.
19063 (bool, TRUE, FALSE): Move their definition to...
19064 * src/system.h: here.
19065
190662000-10-02 Akim Demaille <akim@epita.fr>
19067
19068 * src/files.c: Formatting changes.
19069 (tryopen, tryclose, openfiles): Rename as...
19070 (xfopen, xfclose, open_files): this.
19071 (stringappend): static.
19072 * src/files.h: Complete the list of exported symbols.
19073 Propagate its use.
19074
190752000-10-02 Akim Demaille <akim@epita.fr>
19076
19077 * src/reader.h: New file.
19078 Propagate its use instead of tedious list of `extern' and
19079 prototypes.
19080 * src/reader.c: Formatting changes, topological sort,
19081 s/register//.
19082
190832000-10-02 Akim Demaille <akim@epita.fr>
19084
19085 * src/lex.h: Prototype `lex.c' exported functions.
19086 * src/reader.c: Adjust.
19087 * src/lex.c: Formatting changes.
19088 (safegetc): Rename as...
19089 (xgetc): this.
19090
190912000-10-02 Akim Demaille <akim@epita.fr>
19092
19093 * src/lalr.h: New file.
19094 Propagate its inclusion instead of prototypes and `extern'.
19095 * src/lalr.c: Formatting changes, topological sorting etc.
19096
190972000-10-02 Akim Demaille <akim@epita.fr>
19098
19099 * src/output.c (token_actions): Introduce a temporary array,
19100 YYDEFACT, that makes it possible for this function to use
19101 output_short_table.
19102
191032000-10-02 Akim Demaille <akim@epita.fr>
19104
19105 `user_toknums' is output as a `short[]' in `output.c', while it is
19106 defined as a `int[]' in `reader.c'. For consistency with the
19107 other output tables, `user_toknums' is now defined as a table of
19108 shorts.
19109
19110 * src/reader.c (user_toknums): Be a short table instead of an int
19111 table.
19112 Adjust dependencies.
19113
19114 Factor the short table outputs.
19115
19116 * src/output.c (output_short_table): New function.
19117 * src/output.c (output_gram, output_stos, output_rule_data)
19118 (output_base, output_table, output_check): Use it.
19119
191202000-10-02 Akim Demaille <akim@epita.fr>
19121
19122 * src/output.c (output): Topological sort of the functions, in
19123 order to get rid of the `static' prototypes.
19124 No longer use `register'.
19125 * src/output.h: New file.
19126 Propagate its inclusion in files explicitly prototyping functions
19127 from output.c.
19128
191292000-09-21 Akim Demaille <akim@epita.fr>
19130
19131 * src/atgeneral.m4: Update from Autoconf.
19132
191332000-09-21 Akim Demaille <akim@epita.fr>
19134
19135 * src/closure.h: New file.
19136 * src/closure.c: Formatting changes, topological sort over the
19137 functions, use of closure.h.
19138 (initialize_closure, finalize_closure): Rename as...
19139 (new_closure, free_closure): these. Adjust dependencies.
19140 * src/LR0.c: Formatting changes, topological sort, use of
19141 cloture.h.
19142 (initialize_states): Rename as...
19143 (new_states): this.
19144 * src/Makefile.am (noinst_HEADERS): Adjust.
19145
191462000-09-20 Akim Demaille <akim@epita.fr>
19147
19148 * src/acconfig.h: Don't protect config.h against multiple
19149 inclusion.
19150 Don't define PARAMS.
19151 * src/system.h: Define PARAMS.
19152 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19153 purpose of config.h. system.h must not try to fix wrong
19154 definitions in config.h.
19155
191562000-09-20 Akim Demaille <akim@epita.fr>
19157
19158 * src/derives.h: New file.
19159 * src/main.c, src/derives.h: Use it.
19160 Formatting changes.
19161 * src/Makefile.am (noinst_HEADERS): Adjust.
19162
191632000-09-20 Akim Demaille <akim@epita.fr>
19164
19165 * tests/atgeneral.m4: Update from Autoconf.
19166 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19167 (AT_CHECK_CALC): New macros.
19168 Use these macros to test bison with options `', `--raw',
19169 `--debug', `--yacc', `--yacc --debug'.
19170
191712000-09-19 Akim Demaille <akim@epita.fr>
19172
19173 * src/output.c: Formatting changes.
19174 * src/machine.h: Remove, leaving its contents in...
19175 * src/system.h: here.
19176 Include stdio.h.
19177 Adjust all dependencies on stdio.h and machine.h.
19178 * src/getargs.h: New file.
19179 Let all `extern' declarations about getargs.c be replaced with
19180 inclusion of `getargs.h'.
19181 * src/Makefile.am (noinst_HEADERS): Adjust.
19182
19183 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19184 scope.
19185 (yyerror): Returns void, not int.
19186 * doc/bison.texinfo: Formatting changes.
19187
191882000-09-19 Akim Demaille <akim@epita.fr>
19189
19190 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19191 portable.
19192
191932000-09-18 Akim Demaille <akim@epita.fr>
19194
19195 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19196 * src/Makefile.am (INCLUDES): Don't.
19197 Be ready to fetch headers in lib/.
19198
191992000-09-18 Akim Demaille <akim@epita.fr>
19200
19201 * doc/bison.texinfo: Update the copyright.
19202 ANSIfy and GNUify the examples.
19203 Remove the old menu.
19204
192052000-09-18 Akim Demaille <akim@epita.fr>
19206
19207 First set of tests: use the `calc' example from the documentation.
19208
19209 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19210 is defined only when YYDEBUG is.
19211 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19212 * src/files.c (tryopen, tryclose): Formatting changes.
19213 Move to the top and be static.
19214 * src/reader.c (read_signed_integer): Likewise.
19215 * tests/calc.m4: New file.
19216 * Makefile.am, suite.m4: Adjust.
19217 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19218
192192000-09-18 Akim Demaille <akim@epita.fr>
19220
19221 Add support for an Autotest test suite for Bison.
19222
19223 * m4/m4.m4, m4/atconfig.m4: New files.
19224 * m4/Makefile.am (EXTRA_DIST): Adjust.
19225 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19226 files.
19227 * src/getargs.c: Display a more standard --version message.
19228 * src/reader.c (reader): Formatting changes.
19229 No longer depend upon VERSION_STRING.
19230 * configure.in: No longer use `dnl'.
19231 Set up the test suite and the new directory `tests/.
19232 (VERSION_STRING): Remove.
19233
192342000-04-14 Akim Demaille <akim@epita.fr>
19235
19236 * src/reader.c (copy_comment2): New function, same as former
19237 `copy_comment', but outputs into two FILE *.
19238 (copy_comment): Use it.
19239 (parse_union_decl): Use it.
19240 (get_type, parse_start_decl): Use the same `invalid' message.
19241 (parse_start_decl, parse_union_decl): Use the same `multiple'
19242 message.
19243 (parse_union_decl, copy_guard, copy_action): Use the same
19244 `unmatched' message.
19245 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19246
192472000-03-31 Akim Demaille <akim@epita.fr>
19248
19249 * src/files.c (tryopen, tryclose): Move to the top.
19250 Be static.
19251
192522000-03-31 Akim Demaille <akim@epita.fr>
19253
19254 * src/main.c (main): Don't call `done', exit does it.
19255
192562000-03-31 Akim Demaille <akim@epita.fr>
19257
19258 * allocate.c: s/return (foo)/return foo/.
19259 * lalr.c: Likewise.
19260 * LR0.c: Likewise.
19261 * output.c: Likewise.
19262 * reader.c: Likewise.
19263 * symtab.c: Likewise.
19264 * vmsgetargs.c: Likewise.
19265
192662000-03-31 Akim Demaille <akim@epita.fr>
19267
19268 Clean up the error reporting functions.
19269
19270 * src/report.c: New file.
19271 * src/report.h: Likewise.
19272 * src/Makefile.am: Adjust.
19273 * m4/error.m4: New file.
19274 * m4/Makefile.am: Adjust.
19275 * configure.in (jm_PREREQ_ERROR): Call it.
19276 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19277 Remove.
19278 (fatal, fatals): Remove. All callers use complain.c::fatal.
19279 (warn, warni, warns, warnss, warnss): Remove. All callers use
19280 complain.c::complain.
19281 (toomany): Remove, use fatal instead.
19282 * src/files.c (done): No argument, use complain_message_count.
19283 * src/main.c (main): Register `done' to `atexit'.
19284
19285 * src/getargs.c (usage): More `fputs', less `fprintf'.
19286
192872000-03-28 Akim Demaille <akim@epita.fr>
19288
19289 * lib/: New directory.
19290 * Makefile.am (SUBDIRS): Adjust.
19291 * configure.in: Adjust.
19292 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19293 useless.
19294 * src/alloca.c: Moved to lib/.
19295 * src/getopt.c: Likewise.
19296 * src/getopt1.c: Likewise.
19297 * src/getopt.h: Likewise.
19298 * src/ansi2knr.c: Likewise.
19299 * src/ansi2knr.1: Likewise.
19300 * src/Makefile.am: Adjust.
19301 * lib/Makefile.am: New file.
19302
193032000-03-28 Akim Demaille <akim@epita.fr>
19304
19305 * src/getargs.c (usage): Refresh the help message.
19306
193072000-03-17 Akim Demaille <akim@epita.fr>
19308
19309 * src/getopt1.c: Updated from textutils 2.0e
19310 * src/getopt.c: Likewise.
19311 * src/getopt.h: Likewise.
19312
193132000-03-17 Akim Demaille <akim@epita.fr>
19314
19315 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19316 the file name, not the whole `#line LINE FILE'.
19317
193182000-03-17 Akim Demaille <akim@epita.fr>
19319
19320 On syntax errors, report the token on which we choked.
19321
19322 * src/bison.s1 (yyparse): In the label yyerrlab, when
19323 YYERROR_VERBOSE, add yychar in msg.
19324
193252000-03-17 Akim Demaille <akim@epita.fr>
19326
19327 * src/reader.c (copy_at): New function.
19328 (copy_guard): Use it.
19329 (copy_action): Use it.
19330
193312000-03-17 Akim Demaille <akim@epita.fr>
19332
19333 Be kind to translators, save some useless translations.
19334
19335 * src/main.c (banner): New function.
19336 (fatal_banner): Use it.
19337 (warn_banner): Use it.
19338
193392000-03-17 Akim Demaille <akim@epita.fr>
19340
19341 * src/reader.c (copy_definition): Use copy_string and
19342 copy_comment. Removed now unused `match', `ended',
19343 `cplus_comment'.
19344 (copy_comment, copy_string): Moved, to be visible from
19345 copy_definition.
19346
193472000-03-17 Akim Demaille <akim@epita.fr>
19348
19349 * src/reader.c (copy_string): Declare `static inline'. No
19350 problems with inline, since it is checked by configure.
19351 (copy_comment): Likewise.
19352
193532000-03-17 Akim Demaille <akim@epita.fr>
19354
19355 * src/reader.c (packsymbols): Formatting changes.
19356
193572000-03-17 Akim Demaille <akim@epita.fr>
19358
19359 * src/reader.c (copy_comment): New function, factored out from:
19360 (copy_action): Use it. Removed now unused `match', `ended',
19361 `cplus_comment'.
19362 (copy_guard): Likewise.
19363
193642000-03-17 Akim Demaille <akim@epita.fr>
19365
19366 * src/reader.c (copy_string): New function, factored out from:
19367 (copy_action): Use it.
19368 (copy_guard): Likewise.
19369
193702000-03-17 Akim Demaille <akim@epita.fr>
19371
19372 Change the handling of @s so that they behave exactly like $s.
19373 There is now a pseudo variable @$ (readble and writable), location
19374 of the lhs of the rule (by default ranging from the location of
19375 the first symbol of the rhs, to the location of the last symbol,
19376 or, if the rhs is empty, YYLLOC).
19377
19378 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19379 yyval.
19380 (yyparse): When providing a default semantic action, provide a
19381 default location action.
19382 (after the $): No longer change `*YYLSP', just stack YYLOC the
19383 same way you stack YYVAL.
19384 * src/reader.c (read_declarations): Use warns.
19385 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19386 (copy_action, case '@'): Likewise.
19387 Use a standard error message, to save useless work from
19388 translators.
19389
193902000-03-17 Akim Demaille <akim@epita.fr>
19391
19392 * src/bison.s1: Formatting and cosmetics changes.
19393 * src/reader.c: Likewise.
19394 Update the Copyright notice.
19395
193962000-03-17 Akim Demaille <akim@epita.fr>
19397
19398 * src/bison.s1 (#line): All set to `#line' only, since the
19399 Makefile now handles them.
19400
194012000-03-16 Akim Demaille <akim@epita.fr>
19402
19403 * src/output.c (output_rule_data): Output the documentation of
19404 some of the tables.
19405 (Copyright notice): Update.
19406 Formatting changes.
19407
194082000-03-16 Akim Demaille <akim@epita.fr>
19409
19410 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19411 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19412 One `#if YYDEBUG' remains, since it uses variables which are
19413 defined only if `YYDEBUG != 0'.
19414
194152000-03-16 Akim Demaille <akim@epita.fr>
19416
19417 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19418 and related variables so that the similarities are highlighted.
19419
194202000-03-16 Akim Demaille <akim@epita.fr>
19421
19422 * src/bison.s1: Properly indent CPP directives.
19423
194242000-03-16 Akim Demaille <akim@epita.fr>
19425
19426 * src/bison.s1: Properly indent the `alloca' CPP section.
19427
194282000-03-16 Akim Demaille <akim@epita.fr>
19429
19430 Do not hard code values of directories in `configure.in'.
19431 Update the `configure' tool chain.
19432
19433 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19434 src/makefile.am.
19435 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19436 (AC_OUTPUT): Add m4/Makefile.
19437 Bump to bison 1.28a, 1.29 has never been released.
19438 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19439 handled via src/Makefile.am.
19440 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19441 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19442 autoheader.
19443 * Makefile.am (SUBDIRS): Add m4.
19444 (ACLOCAL_AM_FLAGS): New variable.
19445 (AUTOMAKE_OPTIONS): Add check-news.
19446 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19447 the proper line number and file name.
19448 (DEFS): Propagate the location of bison library files and of the
19449 locale files.
19450 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19451 builddir.
19452 * acinclude.m4: Remove, replaced by the directory m4.
19453 * m4/Makefile.am (EXTRA_DIST): New variable.
19454 * m4/gettext.m4: New file, from the fileutils.
19455 * m4/lcmessage.m4: Likewise
19456 * m4/progtest.m4: Likewise.
19457 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19458
194592000-03-10 Akim Demaille <akim@epita.fr>
19460
19461 * src/closure.c:
19462 Formatting changes of various comments.
19463 Respect the GNU coding standards at various places.
19464 Don't use `_()' when no translation is needed.
19465
194661999-12-13 Jesse Thilo <jthilo@gnu.org>
19467
19468 * src/files.c:
19469 OS/2 honors TMPDIR environment variable.
19470
194711999-12-13 Jesse Thilo <jthilo@gnu.org>
19472
19473 * doc/bison.texinfo: Tweaked spelling and grammar.
19474 Updated ISBN.
19475 Removed reference to price of printed copy.
19476 Mention BISON_SIMPLE and BISON_HAIRY.
19477
194781999-12-13 Jesse Thilo <jthilo@gnu.org>
19479
19480 * configure.in, NEWS:
19481 Bison 1.29 released.
19482
194831999-10-27 Jesse Thilo <jthilo@gnu.org>
19484
19485 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19486 Added reference card.
19487
194881999-07-26 Jesse Thilo <jthilo@gnu.org>
19489
19490 * po/ru.po: Added Russian translation.
19491
194921999-07-26 Jesse Thilo <jthilo@gnu.org>
19493
19494 * configure.in: Added Russian translation.
19495
194961999-07-06 Jesse Thilo <jthilo@gnu.org>
19497
19498 * configure.in, NEWS, README:
19499 Released version 1.28.
19500
195011999-06-14 Jesse Thilo <jthilo@gnu.org>
19502
19503 * src/system.h:
19504 Squashed redefinition warning on some systems.
19505
19506 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19507 Have configure build version string instead of relying on ANSI string
19508 concatentation.
19509
195101999-06-14 Jesse Thilo <jthilo@gnu.org>
19511
19512 * po/POTFILES.in: Got rid of version.c.
19513
195141999-06-14 Jesse Thilo <jthilo@gnu.org>
19515
19516 * acconfig.h, configure.in:
19517 Have configure build version string instead of relying on ANSI string
19518 concatentation.
19519
195201999-06-08 Jesse Thilo <jthilo@gnu.org>
19521
19522 * doc/bison.1:
19523 Dropped mention of `+' for long-named options.
19524
195251999-05-30 Jesse Thilo <jthilo@gnu.org>
19526
19527 * src/files.c: Added <unistd.h> for unlink().
19528
19529 * src/Makefile.am, src/system.h:
19530 I18n fixes.
19531
195321999-05-30 Jesse Thilo <jthilo@gnu.org>
19533
19534 * README: Added a FAQ list.
19535
19536 * configure.in, acconfig.h:
19537 I18n fixes.
19538
195391999-05-30 Jesse Thilo <jthilo@gnu.org>
19540
19541 * doc/FAQ, doc/Makefile.am:
19542 Added a FAQ list.
19543
195441999-05-19 Jesse Thilo <jthilo@gnu.org>
19545
19546 * src/alloc.h, src/symtab.h, src/version.c:
19547 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19548
195491999-04-18 Jesse Thilo <jthilo@gnu.org>
19550
19551 * src/.cvsignore, src/Makefile.am:
19552 Reorganized: sources in `src', documentation in `doc'.
19553
19554 * src/lex.c (literalchar):
19555 fixed the code for escaping double quotes (thanks
19556 Jonathan Czisny.)
19557
195581999-04-18 Jesse Thilo <jthilo@gnu.org>
19559
19560 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19561 Adjusted paths to reflect directory reorganization.
19562
195631999-04-18 Jesse Thilo <jthilo@gnu.org>
19564
19565 * doc/.cvsignore, doc/Makefile.am:
19566 Reorganized: sources in `src', documentation in `doc'.
19567
195681999-04-18 Jesse Thilo <jthilo@gnu.org>
19569
19570 * configure.in:
19571 Updated AC_INIT file to reflect directory reorganization.
19572
19573 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19574 Reorganized: sources in `src', documentation in `doc'.
19575
195761999-04-13 Jesse Thilo <jthilo@gnu.org>
19577
19578 * src/allocate.c:
19579 Don't declare calloc() and realloc() if not necessary.
19580
195811999-04-13 Jesse Thilo <jthilo@gnu.org>
19582
19583 * configure.in, acconfig.h, acinclude.m4:
19584 Don't declare calloc() and realloc() if not necessary.
19585
195861999-03-23 Jesse Thilo <jthilo@gnu.org>
19587
19588 * po/.cvsignore: Added i18n support.
19589
195901999-03-23 Jesse Thilo <jthilo@gnu.org>
19591
19592 * acconfig.h, configure.in, Makefile.am:
19593 Added i18n support.
19594
195951999-03-22 Jesse Thilo <jthilo@gnu.org>
19596
19597 * src/bison.s1: Fixed #line numbers.
19598
195991999-03-15 Jesse Thilo <jthilo@gnu.org>
19600
19601 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19602 Added PO files from Translation Project.
19603
196041999-03-03 Jesse Thilo <jthilo@gnu.org>
19605
19606 * Makefile.am:
19607 Added support for non-ANSI compilers (ansi2knr).
19608
196091999-02-16 Jesse Thilo <jthilo@gnu.org>
19610
19611 * configure.in: Bumped version number to 1.27.
19612
19613 * Makefile.am:
19614 Added `bison.simple' to list of files removed by `make distclean'.
19615
196161999-02-12 Jesse Thilo <jthilo@gnu.org>
19617
19618 * src/files.c, src/files.h:
19619 Defined locations of parser files in config.h instead of Makefile.
19620
196211999-02-12 Jesse Thilo <jthilo@gnu.org>
19622
19623 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19624 Defined locations of parser files in config.h instead of Makefile.
19625
196261999-02-09 Jesse Thilo <jthilo@gnu.org>
19627
19628 * Makefile.am:
19629 Removed inappropriate use of $< macro.
19630
196311999-02-05 Jesse Thilo <jthilo@gnu.org>
19632
19633 * po/Makefile.in.in, po/POTFILES.in:
19634 Add `po' directory skeleton.
19635
196361999-01-27 Jesse Thilo <jthilo@gnu.org>
19637
19638 * README: Document help-bison list.
19639
19640 * configure.in: Add check for mkstemp().
19641
196421999-01-20 Jesse Thilo <jthilo@gnu.org>
19643
19644 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19645 Hush a few compiler warnings.
19646
19647 * src/files.c:
19648 Add tryclose(), which verifies that fclose was successful.
19649 Hush a couple of compiler warnings.
19650
196511999-01-20 Jesse Thilo <jthilo@gnu.org>
19652
19653 * Makefile.am, OChangeLog:
19654 ChangeLog is now automatically generated. Include the old version as
19655 OChangeLog.
19656
196571999-01-14 Jesse Thilo <jthilo@gnu.org>
19658
19659 * 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:
19660 Update FSF address.
19661
196621999-01-14 Jesse Thilo <jthilo@gnu.org>
19663
19664 * doc/bison.texinfo: Fix formatting glitch.
19665
19666 * doc/bison.texinfo: Update FSF address.
19667
196681999-01-14 Jesse Thilo <jthilo@gnu.org>
19669
19670 * acconfig.h: Update FSF address.
19671
196721999-01-08 Jesse Thilo <jthilo@gnu.org>
19673
19674 * src/system.h:
19675 Don't define PACKAGE here, since config.h defines it.
19676
196771998-12-30 Jesse Thilo <jthilo@gnu.org>
19678
19679 * src/reader.c: Update copyright date.
19680
19681 * src/main.c:
19682 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19683 favor of output directly to stderr (avoids buffer overruns).
19684
19685 * src/reader.c: Some checks for premature EOF.
19686
19687 * 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:
19688 Use prototypes if the compiler understands them.
19689
19690 * src/files.c: Honor TMPDIR on Unix hosts.
19691 Use prototypes if the compiler understands them.
19692
19693 * src/reader.c:
19694 Fix a couple of buffer overrun bugs.
19695 Use prototypes if the compiler understands them.
19696
19697 * src/system.h: Include unistd.h and ctype.h.
19698 Use #ifdef instead of #if for NLS symbols.
19699
197001998-12-30 Jesse Thilo <jthilo@gnu.org>
19701
19702 * doc/bison.texinfo:
19703 Delete comment "consider using @set for edition number, etc..." since
19704 we now are doing so.
19705
197061998-12-30 Jesse Thilo <jthilo@gnu.org>
19707
19708 * configure.in:
19709 Use prototypes if the compiler understands them.
19710
19711 * NEWS: Document 1.26 highlights.
19712
19713 * Makefile.am: Require Automake 1.3 or later.
19714
19715 * acconfig.h:
19716 Use prototypes if the compiler understands them.
19717
197181998-12-29 Jesse Thilo <jthilo@gnu.org>
19719
19720 * src/version.c:
19721 Use VERSION symbol from automake for version number.
19722
197231998-12-29 Jesse Thilo <jthilo@gnu.org>
19724
19725 * acconfig.h, configure.in, version.cin:
19726 Use VERSION symbol from automake for version number.
19727
197281998-11-28 Jesse Thilo <jthilo@gnu.org>
19729
19730 * Makefile.am:
19731 Distribute original version of simple parser (bison.s1), not built
19732 version (bison.simple).
19733
197341998-11-28 Jesse Thilo <jthilo@gnu.org>
19735
19736 * doc/bison.texinfo: Add info dir entry.
19737
19738 * doc/bison.texinfo:
19739 Let automake put version number into documentation.
19740
197411998-11-26 Jesse Thilo <jthilo@gnu.org>
19742
19743 * src/bison.cld, src/build.com, src/vmshlp.mar:
19744 Add non-RCS files from /gd/gnu/bison.
19745
197461998-11-26 Jesse Thilo <jthilo@gnu.org>
19747
19748 * doc/bison.1:
19749 Document the BISON_HAIRY and BISON_SIMPLE variables.
19750
197511998-11-25 Jesse Thilo <jthilo@gnu.org>
19752
19753 * src/version.c: Build version.c automatically.
19754
19755 * src/reader.c:
19756 Fix token numbering (used to start at 258, not 257).
19757
19758 * src/system.h: Include config.h.
19759
19760 * src/getargs.c: Update bug report address.
19761
19762 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19763 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19764
197651998-11-25 Jesse Thilo <jthilo@gnu.org>
19766
19767 * Makefile.am:
19768 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19769
19770 * configure.in, version.cin:
19771 Build version.c automatically.
19772
19773 * AUTHORS: Add AUTHORS file.
19774
19775 * README: Update bug report address.
19776
19777 * bison.simple:
19778 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19779
19780 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19781 Add automake stuff.
19782
197831998-11-25 Jesse Thilo <jthilo@gnu.org>
19784
19785 * doc/bison.texinfo: Clean up some formatting.
19786
197871998-05-05 Richard Stallman <rms@gnu.org>
19788
19789 * doc/bison.texinfo:
19790 Explain better why to make a pure parser.
19791
197921998-01-05 Richard Stallman <rms@gnu.org>
19793
19794 * src/files.c (openfiles):
19795 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19796 find a temporary directory, if possible. Do not unlink files while
19797 they are open.
19798
197991997-08-25 Richard Stallman <rms@gnu.org>
19800
19801 * src/reader.c (stack_offset;):
19802 Change some warni to warns.
19803
19804 * src/lex.c (literalchar): Use warns, not warni.
19805
198061997-06-28 Richard Stallman <rms@gnu.org>
19807
19808 * src/bison.s1: Add a Bison version comment.
19809
19810 * src/main.c (fatal, warn, berror):
19811 Use program_name.
19812
198131997-06-28 Richard Stallman <rms@gnu.org>
19814
19815 * Makefile.in (bison_version): New variable.
19816 (dist): Use that variable.
19817 (bison.s1): Substitute the Bison version into bison.simple.
19818
19819 * bison.simple: Add a Bison version comment.
19820
198211997-06-18 Richard Stallman <rms@gnu.org>
19822
19823 * src/main.c (fatal, warn, berror):
19824 Make error messages standard.
19825 (toomany): Improve error message text.
19826
19827 * 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:
19828 new.h renamed to alloc.h.
19829
198301997-06-18 Richard Stallman <rms@gnu.org>
19831
19832 * Makefile.in: new.h renamed to alloc.h.
19833
198341997-05-24 Richard Stallman <rms@gnu.org>
19835
19836 * src/lex.c (literalchar):
19837 Fix the code for escaping \, " and '.
19838
19839 (lex): Avoid trouble when there are many chars
19840 to discard in a char literal with just several chars in it.
19841
198421997-05-17 Richard Stallman <rms@gnu.org>
19843
19844 * src/bison.s1:
19845 Use malloc, if using alloca is troublesome.
19846 (YYSTACK_USE_ALLOCA): New flag macro.
19847 Define it for some systems and compilers.
19848 (YYSTACK_ALLOC): New macro.
19849 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19850 If it was malloc'd, free it.
19851
198521997-05-17 Richard Stallman <rms@gnu.org>
19853
19854 * bison.simple:
19855 Use malloc, if using alloca is troublesome.
19856 (YYSTACK_USE_ALLOCA): New flag macro.
19857 Define it for some systems and compilers.
19858 (YYSTACK_ALLOC): New macro.
19859 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19860 If it was malloc'd, free it.
19861
198621997-04-23 Richard Stallman <rms@gnu.org>
19863
19864 * src/bison.s1:
19865 (alloca) [__hpux]: Always define as __builtin_alloca.
19866
198671997-04-23 Richard Stallman <rms@gnu.org>
19868
19869 * bison.simple:
19870 (alloca) [__hpux]: Always define as __builtin_alloca.
19871
198721997-04-22 Richard Stallman <rms@gnu.org>
19873
19874 * src/bison.s1:
19875 [__hpux]: Include alloca.h (right for HPUX 10)
19876 instead of declaring alloca (right for HPUX 9).
19877
19878 * src/bison.s1 (__yy_memcpy):
19879 Declare arg `count' as unsigned int.
19880 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19881
198821997-04-22 Richard Stallman <rms@gnu.org>
19883
19884 * bison.simple:
19885 [__hpux]: Include alloca.h (right for HPUX 10)
19886 instead of declaring alloca (right for HPUX 9).
19887
19888 * bison.simple (__yy_memcpy):
19889 Declare arg `count' as unsigned int.
19890 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19891
198921997-01-03 Richard Stallman <rms@gnu.org>
19893
19894 * src/allocate.c: [__STDC__ or _MSC_VER]:
19895 Declare calloc and realloc to return void *.
19896
198971997-01-02 Richard Stallman <rms@gnu.org>
19898
19899 * src/system.h:
19900 [_MSC_VER]: Include stdlib.h and process.h.
19901 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19902
19903 * src/main.c (main): Return FAILURE as a value.
19904 (printable_version): Declare arg as int, not char.
19905
199061997-01-02 Richard Stallman <rms@gnu.org>
19907
19908 * Makefile.in (dist):
19909 Explicitly check for symlinks, and copy them.
19910
199111996-12-19 Richard Stallman <rms@gnu.org>
19912
19913 * src/files.c:
19914 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19915
199161996-12-18 Paul Eggert <eggert@gnu.org>
19917
19918 * src/bison.s1 (yyparse):
19919 If __GNUC__ and YYPARSE_PARAM are both defined,
19920 declare yyparse to have a void * argument.
19921
199221996-12-18 Paul Eggert <eggert@gnu.org>
19923
19924 * bison.simple (yyparse):
19925 If __GNUC__ and YYPARSE_PARAM are both defined,
19926 declare yyparse to have a void * argument.
19927
199281996-12-17 Richard Stallman <rms@gnu.org>
19929
19930 * src/reduce.c (nbits): Add some casts.
19931
199321996-08-12 Richard Stallman <rms@gnu.org>
19933
19934 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19935
199361996-08-12 Richard Stallman <rms@gnu.org>
19937
19938 * bison.simple: Test _MSDOS as well as _MSDOS_.
19939
199401996-07-31 Richard Stallman <rms@gnu.org>
19941
19942 * src/bison.s1:
19943 [__sun && __i386]: Include alloca.h.
19944
199451996-07-31 Richard Stallman <rms@gnu.org>
19946
19947 * bison.simple:
19948 [__sun && __i386]: Include alloca.h.
19949
199501996-07-30 Richard Stallman <rms@gnu.org>
19951
19952 * src/bison.s1: Comment change.
19953
19954 * src/bison.s1: Test _MSDOS_, not MSDOS.
19955
199561996-07-30 Richard Stallman <rms@gnu.org>
19957
19958 * bison.simple: Comment change.
19959
19960 * bison.simple: Test _MSDOS_, not MSDOS.
19961
199621996-06-01 Richard Stallman <rms@gnu.org>
19963
19964 * 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:
19965 Insert `_' macro around many string constants.
19966
19967 * src/main.c:
19968 Insert `_' macro around many string constants.
19969
19970 (main): Call setlocale, bindtextdomain and textdomain.
19971
19972 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
19973 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
19974 [ENABLE_NLS]: Include libintl.h.
19975 [ENABLE_NLS] (gettext): Define.
19976 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
19977 (N_, PACKAGE, LOCALEDIR): New macros.
19978
199791996-06-01 Richard Stallman <rms@gnu.org>
19980
19981 * POTFILES.in: New file.
19982
19983 * Makefile.in (allocate.o):
19984 Define target explicitly.
19985
19986 * Makefile.in (CFLAGS): Set to @CFLAGS@.
19987 (LDFLAGS): Set to @LDFLAGS@.
19988 (configure): Run autoconf only if preceding `cd' succeeds.
19989 (bison.s1): Redirect output to temporary file then move the
19990 temporary to the target, rather than redirecting directly to bison.s1.
19991 (clean): Remove config.status and config.log.
19992 (distclean): Don't remove config.status here.
19993
199941996-05-12 Richard Stallman <rms@gnu.org>
19995
19996 * src/bison.s1:
19997 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
19998
199991996-05-12 Richard Stallman <rms@gnu.org>
20000
20001 * bison.simple:
20002 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20003
200041996-05-11 Richard Stallman <rms@gnu.org>
20005
20006 * src/bison.s1 (__yy_memcpy):
20007 Really reorder the args, as was supposedly done on Feb 14 1995.
20008 (yyparse): Calls changed accordingly.
20009
200101996-05-11 Richard Stallman <rms@gnu.org>
20011
20012 * Makefile.in (dist): Don't use $(srcdir).
20013
20014 * bison.simple (__yy_memcpy):
20015 Really reorder the args, as was supposedly done on Feb 14 1995.
20016 (yyparse): Calls changed accordingly.
20017
200181996-01-27 Richard Stallman <rms@gnu.org>
20019
20020 * src/output.c (output_rule_data):
20021 Test YYERROR_VERBOSE in the conditional
20022 around the definition of ttyname.
20023
200241995-12-29 Richard Stallman <rms@gnu.org>
20025
20026 * src/bison.s1:
20027 Fix line numbers in #line commands.
20028
200291995-12-29 Richard Stallman <rms@gnu.org>
20030
20031 * bison.simple:
20032 Fix line numbers in #line commands.
20033
200341995-12-27 Richard Stallman <rms@gnu.org>
20035
20036 * src/bison.s1 (YYPARSE_PARAM_DECL):
20037 In C++, make it always null.
20038 (YYPARSE_PARAM_ARG): New macro.
20039 (yyparse): Use YYPARSE_PARAM_ARG.
20040
200411995-12-27 Richard Stallman <rms@gnu.org>
20042
20043 * bison.simple (YYPARSE_PARAM_DECL):
20044 In C++, make it always null.
20045 (YYPARSE_PARAM_ARG): New macro.
20046 (yyparse): Use YYPARSE_PARAM_ARG.
20047
200481995-11-29 Richard Stallman <rms@gnu.org>
20049
20050 * doc/bison.texinfo:
20051 Describe literal string tokens, %raw, %no_lines, %token_table.
20052
200531995-11-29 Daniel Hagerty <hag@gnu.org>
20054
20055 * doc/bison.texinfo: Fixed update date
20056
200571995-10-16 Richard Stallman <rms@gnu.org>
20058
20059 * src/version.c: Version 1.25.
20060
200611995-10-16 Richard Stallman <rms@gnu.org>
20062
20063 * NEWS: *** empty log message ***
20064
200651995-10-16 Richard Stallman <rms@gnu.org>
20066
20067 * doc/bison.1, doc/bison.rnh:
20068 Add new options.
20069
200701995-10-15 Richard Stallman <rms@gnu.org>
20071
20072 * src/vmsgetargs.c, src/getargs.c:
20073 Added -n, -k, and -raw switches.
20074 (noparserflag, toknumflag, rawtoknumflag): New variables.
20075
20076 * src/symtab.h (SALIAS):
20077 New #define for adding aliases to %token.
20078 (struct bucket): Added `alias' field.
20079
20080 * src/reduce.c (reduce_grammar):
20081 Revise error message.
20082 (print_notices): Remove final `.' from error message.
20083
20084 * src/reader.c (reader_output_yylsp):
20085 New function.
20086 (readgram): Use `#if 0' around code that accepted %command
20087 inside grammar rules: The documentation doesn't allow it,
20088 and it will fail since the %command processors scan for the next %.
20089 (parse_token_decl): Extended the %token
20090 declaration to allow a multi-character symbol as an alias.
20091 (parse_thong_decl): New function.
20092 (read_declarations): Added %thong declarations.
20093 (read_declarations): Handle NOOP to deal with allowing
20094 % declarations as another means to specify the flags.
20095 (readgram): Allow %prec prior to semantics embedded in a rule.
20096 (skip_to_char, read_declarations, copy_definition)
20097 (parse_token_decl, parse_start_decl, parse_type_decl)
20098 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20099 (get_type_name, copy_guard, copy_action, readgram)
20100 (get_type, packsymbols): Revised most error messages.
20101 Changed `fatal' to `warnxxx' to avoid aborting for error.
20102 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20103 (read_declarations): Improve the error message for
20104 an invalid character. Do not abort.
20105 (read_declarations, copy_guard, copy_action): Use
20106 printable_version to avoid unprintable characters in printed output.
20107 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20108 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20109 Allow the type of a non-terminal can be given
20110 more than once, as long as all specifications give the same type.
20111
20112 * src/output.c:
20113 (output_headers, output_trailers, output, output_gram)
20114 (output_rule_data): Implement noparserflag variable.
20115 Implement toknumflag variable.
20116 (output): Call reader_output_yylsp to output LTYPESTR.
20117
20118 * src/main.c (main):
20119 If reader sees an error, don't process the grammar.
20120 (fatals): Updated to not use VARARGS1.
20121 (printable_version, int_to_string, warn, warni, warns, warnss)
20122 (warnsss): New error reporting functions. Avoid abort for error.
20123
20124 * src/lex.h:
20125 Added THONG and NOOP for alias processing.
20126 Added SETOPT for the new code that allows setting options with %flags.
20127
20128 * src/lex.c:
20129 Include getopt.h. Add some extern decls.
20130 (safegetc): New function to deal with EOF gracefully.
20131 (literalchar); new function to deal with reading \ escapes.
20132 (lex): Use literalchar.
20133 (lex): Implemented "..." tokens.
20134 (literalchar, lex, parse_percent_token): Made tokenbuffer
20135 always contain the token. This includes growing the token
20136 buffer while reading an integer.
20137 (parse_percent_token): Replaced if-else statement with percent_table.
20138 (parse_percent_token): Added % declarations as another
20139 way to specify the flags -n, -l, and -r. Also added hooks for
20140 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20141 major changes to files.c.
20142 (lex) Retain in the incoming stream a character following
20143 an incorrect '/'.
20144 (skip_white_space, lex): Revised most error messages
20145 and changed fatal to warn to avoid aborting.
20146 (percent_table): Added %thong declarations.
20147
20148 * src/gram.h: Comment changes.
20149
20150 * src/files.c (openfiles, open_extra_files, done):
20151 Add faction flag
20152 and actfile file. Handle noparserflag. Both for -n switch.
20153
20154 * src/conflicts.c (resolve_sr_conflict):
20155 Remove use of alloca.
20156
201571995-06-01 Jim Meyering <meyering@gnu.org>
20158
20159 * doc/bison.texinfo: *** empty log message ***
20160
201611995-05-06 Richard Stallman <rms@gnu.org>
20162
20163 * src/bison.s1: Comment change.
20164
201651995-05-06 Richard Stallman <rms@gnu.org>
20166
20167 * bison.simple: Comment change.
20168
201691995-05-03 Richard Stallman <rms@gnu.org>
20170
20171 * src/version.c: Version now 1.24.
20172
20173 * src/bison.s1: Change distribution terms.
20174
20175 * src/version.c: Version now 1.23.
20176
201771995-05-03 Richard Stallman <rms@gnu.org>
20178
20179 * doc/bison.texinfo:
20180 Rewrite "Conditions for Using Bison".
20181 Update version to 1.24.
20182
201831995-05-03 Richard Stallman <rms@gnu.org>
20184
20185 * bison.simple: Change distribution terms.
20186
201871995-02-23 Richard Stallman <rms@gnu.org>
20188
20189 * src/files.c: Test __VMS_POSIX as well as VMS.
20190
201911995-02-14 Jim Meyering <meyering@gnu.org>
20192
20193 * src/bison.s1 (__yy_memcpy):
20194 Renamed from __yy_bcopy to avoid
20195 confusion. Reverse FROM and TO arguments to be consistent with
20196 those of memcpy.
20197
201981995-02-14 Jim Meyering <meyering@gnu.org>
20199
20200 * bison.simple (__yy_memcpy):
20201 Renamed from __yy_bcopy to avoid
20202 confusion. Reverse FROM and TO arguments to be consistent with
20203 those of memcpy.
20204
202051994-11-10 David J. MacKenzie <djm@gnu.org>
20206
20207 * NEWS: reformat
20208
20209 * NEWS: New file.
20210
20211 * Makefile.in (DISTFILES): Include NEWS.
20212
20213 * Makefile.in (DISTFILES):
20214 Include install-sh, not install.sh.
20215
20216 * configure.in: Update to Autoconf v2 macro names.
20217
202181994-10-05 David J. MacKenzie <djm@gnu.org>
20219
20220 * Makefile.in: fix typo
20221
20222 * Makefile.in (prefix, exec_prefix):
20223 Let configure set them.
20224
202251994-09-28 David J. MacKenzie <djm@gnu.org>
20226
20227 * Makefile.in: Set datadir to $(prefix)/share.
20228
202291994-09-15 Richard Stallman <rms@gnu.org>
20230
20231 * src/bison.s1:
20232 Update copyright notice and GPL version.
20233
202341994-09-15 Richard Stallman <rms@gnu.org>
20235
20236 * bison.simple:
20237 Update copyright notice and GPL version.
20238
202391994-07-12 Richard Stallman <rms@gnu.org>
20240
20241 * src/reduce.c, src/reader.c:
20242 entered into RCS
20243
202441994-05-05 David J. MacKenzie <djm@gnu.org>
20245
20246 * Makefile.in: entered into RCS
20247
202481994-03-26 Richard Stallman <rms@gnu.org>
20249
20250 * src/bison.s1: entered into RCS
20251
202521994-03-26 Richard Stallman <rms@gnu.org>
20253
20254 * bison.simple: entered into RCS
20255
202561994-03-25 Richard Stallman <rms@gnu.org>
20257
20258 * src/main.c: entered into RCS
20259
202601994-03-24 Richard Stallman <rms@gnu.org>
20261
20262 * src/conflicts.c: entered into RCS
20263
202641994-01-02 Richard Stallman <rms@gnu.org>
20265
20266 * Makefile.in: *** empty log message ***
20267
202681993-11-21 Richard Stallman <rms@gnu.org>
20269
20270 * src/bison.s1: *** empty log message ***
20271
202721993-11-21 Richard Stallman <rms@gnu.org>
20273
20274 * doc/bison.texinfo: entered into RCS
20275
20276 * doc/bison.texinfo: *** empty log message ***
20277
202781993-11-21 Richard Stallman <rms@gnu.org>
20279
20280 * bison.simple: *** empty log message ***
20281
202821993-10-25 David J. MacKenzie <djm@gnu.org>
20283
20284 * doc/bison.texinfo: *** empty log message ***
20285
202861993-10-19 Richard Stallman <rms@gnu.org>
20287
20288 * src/bison.s1: *** empty log message ***
20289
202901993-10-19 Richard Stallman <rms@gnu.org>
20291
20292 * bison.simple: *** empty log message ***
20293
202941993-10-14 Richard Stallman <rms@gnu.org>
20295
20296 * src/bison.s1: *** empty log message ***
20297
202981993-10-14 Richard Stallman <rms@gnu.org>
20299
20300 * bison.simple: *** empty log message ***
20301
203021993-09-14 David J. MacKenzie <djm@gnu.org>
20303
20304 * doc/bison.texinfo: *** empty log message ***
20305
203061993-09-13 Noah Friedman <friedman@gnu.org>
20307
20308 * Makefile.in: *** empty log message ***
20309
203101993-09-10 Richard Stallman <rms@gnu.org>
20311
20312 * src/conflicts.c: *** empty log message ***
20313
20314 * src/system.h: entered into RCS
20315
203161993-09-10 Richard Stallman <rms@gnu.org>
20317
20318 * doc/bison.1: entered into RCS
20319
203201993-09-06 Noah Friedman <friedman@gnu.org>
20321
20322 * src/version.c: entered into RCS
20323
203241993-09-06 Noah Friedman <friedman@gnu.org>
20325
20326 * Makefile.in: *** empty log message ***
20327
203281993-07-30 David J. MacKenzie <djm@gnu.org>
20329
20330 * Makefile.in: *** empty log message ***
20331
203321993-07-24 Richard Stallman <rms@gnu.org>
20333
20334 * src/bison.s1: *** empty log message ***
20335
203361993-07-24 Richard Stallman <rms@gnu.org>
20337
20338 * bison.simple: *** empty log message ***
20339
203401993-07-08 David J. MacKenzie <djm@gnu.org>
20341
20342 * Makefile.in: *** empty log message ***
20343
203441993-07-04 Richard Stallman <rms@gnu.org>
20345
20346 * src/bison.s1: *** empty log message ***
20347
203481993-07-04 Richard Stallman <rms@gnu.org>
20349
20350 * bison.simple: *** empty log message ***
20351
203521993-06-26 David J. MacKenzie <djm@gnu.org>
20353
20354 * src/getargs.c: entered into RCS
20355
203561993-06-26 David J. MacKenzie <djm@gnu.org>
20357
20358 * doc/bison.texinfo: *** empty log message ***
20359
20360 * doc/bison.1: New file.
20361
203621993-06-25 Richard Stallman <rms@gnu.org>
20363
20364 * src/getargs.c: New file.
20365
203661993-06-16 Richard Stallman <rms@gnu.org>
20367
20368 * src/bison.s1: *** empty log message ***
20369
203701993-06-16 Richard Stallman <rms@gnu.org>
20371
20372 * bison.simple: *** empty log message ***
20373
203741993-06-03 Richard Stallman <rms@gnu.org>
20375
20376 * src/bison.s1: New file.
20377
203781993-06-03 Richard Stallman <rms@gnu.org>
20379
20380 * doc/bison.texinfo: *** empty log message ***
20381
203821993-06-03 Richard Stallman <rms@gnu.org>
20383
20384 * bison.simple: New file.
20385
203861993-05-19 Richard Stallman <rms@gnu.org>
20387
20388 * doc/bison.texinfo: New file.
20389
203901993-05-07 Noah Friedman <friedman@gnu.org>
20391
20392 * Makefile.in: *** empty log message ***
20393
203941993-04-28 Noah Friedman <friedman@gnu.org>
20395
20396 * src/reader.c: *** empty log message ***
20397
203981993-04-23 Noah Friedman <friedman@gnu.org>
20399
20400 * src/alloc.h: entered into RCS
20401
204021993-04-20 David J. MacKenzie <djm@gnu.org>
20403
20404 * src/version.c: *** empty log message ***
20405
20406 * src/files.c, src/allocate.c:
20407 entered into RCS
20408
20409 * src/reader.c: *** empty log message ***
20410
20411 * src/lex.c: entered into RCS
20412
20413 * src/conflicts.c: New file.
20414
20415 * src/symtab.c: entered into RCS
20416
20417 * src/alloc.h: New file.
20418
20419 * src/LR0.c: entered into RCS
20420
204211993-04-18 Noah Friedman <friedman@gnu.org>
20422
20423 * src/reader.c: New file.
20424
20425 * src/version.c: *** empty log message ***
20426
204271993-04-18 Noah Friedman <friedman@gnu.org>
20428
20429 * Makefile.in: *** empty log message ***
20430
204311993-04-17 Noah Friedman <friedman@gnu.org>
20432
20433 * Makefile.in: *** empty log message ***
20434
204351993-04-15 Richard Stallman <rms@gnu.org>
20436
20437 * src/main.c, src/files.c:
20438 New file.
20439
204401993-04-15 Noah Friedman <friedman@gnu.org>
20441
20442 * configure.in: entered into RCS
20443
20444 * configure.in: *** empty log message ***
20445
20446 * configure.in: New file.
20447
204481993-04-14 Richard Stallman <rms@gnu.org>
20449
20450 * Makefile.in: New file.
20451
204521993-04-13 Richard Stallman <rms@gnu.org>
20453
20454 * src/version.c: New file.
20455
204561993-03-25 Richard Stallman <rms@gnu.org>
20457
20458 * src/output.c: entered into RCS
20459
204601992-09-25 Richard Stallman <rms@gnu.org>
20461
20462 * configure.bat: entered into RCS
20463
204641992-06-22 Richard Stallman <rms@gnu.org>
20465
20466 * src/vmsgetargs.c: entered into RCS
20467
204681992-06-22 Richard Stallman <rms@gnu.org>
20469
20470 * doc/bison.rnh: entered into RCS
20471
204721992-04-20 David J. MacKenzie <djm@gnu.org>
20473
20474 * README: entered into RCS
20475
204761992-01-22 Richard Stallman <rms@gnu.org>
20477
20478 * src/machine.h: entered into RCS
20479
204801991-12-21 Richard Stallman <rms@gnu.org>
20481
20482 * src/lalr.c, src/closure.c:
20483 entered into RCS
20484
204851991-12-20 Richard Stallman <rms@gnu.org>
20486
20487 * src/state.h: entered into RCS
20488
204891991-12-18 Richard Stallman <rms@gnu.org>
20490
20491 * src/print.c, src/nullable.c, src/derives.c:
20492 entered into RCS
20493
204941991-11-03 David J. MacKenzie <djm@gnu.org>
20495
20496 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20497 entered into RCS
20498
204991988-09-09 Richard Stallman <rms@gnu.org>
20500
20501 * src/bison.hairy: entered into RCS
20502
205031987-12-16 Richard Stallman <rms@gnu.org>
20504
20505 * REFERENCES: entered into RCS
20506
20507
20508 -----
20509
20510 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20511 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
20512 Free Software Foundation, Inc.
20513
20514 Copying and distribution of this file, with or without
20515 modification, are permitted provided the copyright notice and this
20516 notice are preserved.
20517
20518$Id$