]> git.saurik.com Git - bison.git/blob - ChangeLog
6a019e334ae2e9d80de43baca2418a47deb4c213
[bison.git] / ChangeLog
1 2008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
5 * bootstrap.conf (gnulib_modules): Add unsetenv.
6 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
7 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
8 (/setenv.m4): Add.
9 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
10 the first argument because it may become position-dependent, and unset
11 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
12 Add comments explaining these issues in more detail.
13
14 2008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
15
16 Add .gitignore everywhere based on .cvsignore.
17 * .gitignore: New.
18 * build-aux/.gitignore: New.
19 * data/.gitignore: New.
20 * doc/.gitignore: New.
21 * etc/.gitignore: New.
22 * examples/.gitignore: New.
23 * examples/calc++/.gitignore: New.
24 * lib/.gitignore: New.
25 * m4/.gitignore: New.
26 * po/.gitignore: New.
27 * runtime-po/.gitignore: New.
28 * src/.gitignore: New.
29 * tests/.gitignore: New.
30
31 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
32
33 * NEWS (2.3b+): New section, empty for now.
34 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
35
36 2008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
37
38 * NEWS (2.3b): Update release date since there has been a delay in
39 getting the announcements and tarballs out.
40
41 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
42
43 * NEWS: Version 2.3b.
44 * configure.ac (AC_INIT): Likewise.
45 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
46
47 2008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
48
49 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
50 been doing it for years.
51 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
52 (Release Procedure): Add FIXME about make alpha being unmaintained.
53
54 2008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
55
56 * data/yacc.c: Reformat m4 a little for readability.
57 * src/lalr.c (build_relations): Correct comment.
58
59 2008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
60
61 DJGPP specific issue.
62 * djgpp/config.sed: Fixes required to run configure scripts generated
63 by autoconf 2.62.
64
65 2008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
66
67 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
68 coordinator@translationproject.org.
69
70 2008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
71
72 * THANKS: Add Eric Blake.
73
74 2008-04-23 Eric Blake <ebb9@byu.net>
75
76 Revert prior patch, by working around autoconf regression.
77 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
78 ("Output file name: ("): Uncomment test.
79 ("Output file name: )"): Likewise.
80 Based on an idea from Noah Misch.
81
82 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
83
84 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
85 2.61. Reported by Juan Manuel Guerrero at
86 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
87 * tests/output.at ("Output file name: ("): Comment out test case for
88 now.
89 ("Output file name: )"): Likewise.
90
91 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
92
93 * GNUmakefile: Update git-version-gen invocation so make dist
94 succeeds.
95
96 2008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
97
98 Update to the current gnulib CVS repository, and fix trigraph handling
99 in Bison.
100 * bootstrap: Update gnulib CVS repository URL.
101 (symlink_to_dir): Encapsulate the code that guarantees the destination
102 directory exists into...
103 (check_dst_dir): ... this new function, and...
104 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
105 fail when copying files into lib/uniwidth/.
106 * src/output.c (prepare_symbols): When writing yytname muscles, where
107 symbol names will be encoded in C-string literals, tell quotearg to
108 escape trigraphs. This used to be the default in gnulib.
109 * tests/regression.at (Token definitions): Because of the change in
110 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
111 escapes trigraphs in symbol names. Thus, yytname no longer has
112 trigraphs unnecessarily doubly escaped. Update test case output.
113 Extend test case to be sure Bison's own error messages will no longer
114 have trigraphs in symbol names unnecessarily escaped once.
115
116 2008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
117
118 Fix make dist infinite loop reported by Juan Manuel Guerrero at
119 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
120 * .cvsignore: Add .version.
121 * .version.in: New.
122 * bootstrap.conf (gnulib_modules): Add git-version-gen.
123 * configure.ac (AC_CONFIG_FILES): Add .version.
124 * build-aux/.cvsignore: Add git-version-gen.
125
126 2008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
127
128 * NEWS (2.3a+): Mention that -g now takes an argument.
129 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
130 consistency. Update the -g and -x entries now that they take
131 arguments. Use brackets to indicate optional arguments.
132 * src/getargs.c (usage): Explain the relationship between arguments of
133 long and short options more completely. Document --defines and -d
134 separately since the former takes an argument but, for POSIX Yacc, the
135 latter does not.
136 (short_options): Let -W take an optional argument like --warnings.
137 (getargs): Sort cases.
138
139 2008-02-28 Akim Demaille <demaille@gostai.com>
140
141 * doc/bison.texinfo: Fix a few typos.
142
143 2008-02-28 Akim Demaille <akim@epita.fr>
144
145 * doc/bison.texinfo (Bison Options): Document -W.
146 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
147
148 2008-02-28 Akim Demaille <akim@epita.fr>
149
150 * src/getargs.c (short_options): Split and sort for readability.
151 -g and -x take optional arguments, just like their long options.
152 * build-aux/cross-options.pl: Use /x to make the regexp easier to
153 understand.
154 Fix the handling of $opt which resulted in all the argument to be
155 considered as optional.
156
157 2008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
158
159 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
160 say its interface is experimental.
161 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
162 Java.
163 (Bison Options): In the -L and --language entry, mention Java.
164 (Java Bison Interface): Say the interface is experimental.
165 * src/getargs.c (usage): Mention -L and --language.
166
167 * NEWS (2.3a+): Say the push parsing interface is experimental.
168 * doc/bison.texinfo (Push Decl): Likewise.
169 (Decl Summary): Likewise in the "%define api.push_pull" entry.
170 (Push Parser Function): Likewise.
171 (Pull Parser Function): Likewise.
172 (Parser Create Function): Likewise.
173 (Parser Delete Function): Likewise.
174 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
175 yypull_parse, and yypush_parse entries.
176
177 * NEWS (2.3a+): Mention XML support, and say the schema is
178 experimental.
179 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
180 * src/getargs.c (usage): Say the XML schema is experimental.
181
182 * NEWS (2.3a+): Say option instead of flag.
183
184 2008-02-21 Wojciech Polak <polak@gnu.org>
185
186 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
187 text.
188
189 2008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
190
191 Fix impure push parser compile error reported by Bob Rossi at
192 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
193 * data/yacc.c: Clean up whitespace in the output a little.
194 (yypstate_allocated): Define for impure push parsers regardless of
195 whether the pull interface is also requested.
196 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
197 check impure push parsers without the pull interface.
198
199 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
200 yyerror takes arguments specified by %parse-param while yypstate_new
201 does not.
202 * doc/bison.texinfo (Parser Create Function): Document that
203 yypstate_new returns 0 for multiple impure parser instances.
204 * tests/push.at (Push Parsing: Multiple impure instances): Update
205 expected stderr output.
206
207 2008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
208
209 * runtime-po/POTFILES.in (push.c): Remove.
210
211 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
212
213 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
214 * data/push.c: Rename to...
215 * data/yacc.c: ... this, overwriting it.
216 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
217 `%push-pull-parser' -> `%define api.push_pull "both"'.
218 Remove old yacc.c tests, and update push.c tests to yacc.c.
219
220 2008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
221
222 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
223 `"%code top" blocks' instead of `%code "top" blocks'.
224 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
225 Clean up whitespace in the output a little.
226
227 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
228
229 Fix documentation problems reported by Tim Josling at
230 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
231 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
232 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
233 integers. Explain the effect of literal string aliases on error
234 messages. Copy token 0 documentation from the C++ skeleton
235 documentation.
236
237 2008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
238
239 Accept a token number in a %left, %right, or %nonassoc for POSIX
240 conformance. Reported by Tim Josling at
241 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
242 * NEWS (2.3a+): Mention.
243 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
244 and code numbers are treated by precedence declarations.
245 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
246 of symbols.1.
247 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
248 of symbol.
249 (symbol.prec): New, just like symbol but allows INT.
250 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
251 longer holds.
252 * tests/regression.at (Token number in precedence declaration): New
253 test case.
254
255 2008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
256
257 DJGPP specific issues.
258 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
259 be changed. Copyright timestamp adjusted.
260 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
261 be changed. Copyright timestamp adjusted.
262 * djgpp/config.site: Copyright timestamp adjusted.
263 * djgpp/config_h.sed: Copyright timestamp adjusted.
264 * djgpp/djunpack.bat: Copyright timestamp adjusted.
265 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
266 filename translation list.
267 * djgpp/subpipe.c (init_subpipe): Check the environment variables
268 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
269 files shall be created. Before trying to use the temp dir where the
270 environment variable points to check that the dir really exists. If
271 not default to the cwd as temp dir. Copyright timestamp adjusted.
272 * djgpp/subpipe.h: Copyright timestamp adjusted.
273 * djgpp/testsuite.sed: Copyright timestamp adjusted.
274
275 2008-01-30 Paul Eggert <eggert@cs.ucla.edu>
276
277 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
278
279 2008-01-09 Paul Eggert <eggert@cs.ucla.edu>
280
281 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
282 Problem reported by Claudio Saavedra in
283 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
284
285 2008-01-05 Wojciech Polak <polak@gnu.org>
286
287 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
288 document's title with the input grammar file name.
289
290 2007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
291
292 Automate regression testing of the XML/XSLT implementation. Discussed
293 starting at
294 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
295 * configure.ac (XSLTPROC): New substitution.
296 * Makefile.am (maintainer-xml-check): New phony target invoking...
297 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
298 invoking make maintainer-check with BISON_TEST_XML=1.
299 * tests/atlocal.in (XSLTPROC): New.
300 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
301 not to report reachable memory when Bison is expected to have a
302 non-zero exit status and (2) to compare XML/XSLT output with --graph
303 and --report=all output for every working grammar when
304 BISON_TEST_XML=1.
305 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
306 (AT_BISON_CHECK_XML): New.
307 (AT_QUELL_VALGRIND): New.
308 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
309 (AT_CHECK): ... don't redefine this since this was the old way to
310 quell Valgrind.
311 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
312 AT_BISON_CHECK invocations.
313 * tests/c++.at: Likewise.
314 * tests/calc.at: Likewise.
315 * tests/conflicts.at: Likewise.
316 * tests/cxx-type.at: Likewise.
317 * tests/existing.at: Likewise.
318 * tests/glr-regression.at: Likewise.
319 * tests/headers.at: Likewise.
320 * tests/input.at: Likewise.
321 * tests/java.at: Likewise.
322 * tests/output.at: Likewise.
323 * tests/push.at: Likewise.
324 * tests/reduce.at: Likewise.
325 * tests/regression.at: Likewise.
326 * tests/sets.at: Likewise.
327 * tests/skeletons.at: Likewise.
328 * tests/synclines.at: Likewise.
329 * tests/torture.at: Likewise.
330 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
331 tends to hang xsltproc.
332 (Big horizontal): Likewise.
333
334 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
335
336 In XML output, remove redundant class attribute on symbol element.
337 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
338 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
339 look up a symbol to determine whether it's a nonterminal or terminal.
340 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
341 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
342
343 Add prec/assoc information to XML output.
344 * src/gram.c (grammar_rules_print_xml): For each rule that has a
345 %prec, add a percent_prec attribute.
346 * src/print-xml.c (print_grammar): For each terminal that has a
347 precedence or associativity, add a prec or assoc attribute.
348 (xml_indent): New.
349 (xml_puts): Use xml_indent.
350 (xml_printf): Use xml_indent.
351 * src/print-xml.h (xml_indent): Prototype.
352
353 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
354 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
355
356 2007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
357
358 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
359 (bison:ruleByNumber): ... this for clarity.
360 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
361 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
362 (xsl:template match="reduction"): Update.
363 (xsl:template match="item"): Update.
364 (xsl:template match="reduction"): Update.
365
366 In the XML output, don't print the list of rules where symbols appear.
367 Compute it in XSLT instead. Discussed at
368 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
369 * data/xslt/bison.xsl (bison:ruleByLhs): New.
370 (bison:ruleByRhs): New.
371 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
372 bison:ruleByRhs.
373 (xsl:template match="terminal/rule"): Remove.
374 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
375 bison:ruleByRhs.
376 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
377 Remove.
378 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
379 bison:ruleByRhs and mode="number-link" for rule template.
380 (xsl:template match="terminal/rule"): Remove.
381 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
382 bison:ruleByRhs and mode="number-link" for rule template.
383 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
384 Rewrite as...
385 (xsl:template match="rule" mode="number-link"): ... this.
386 * src/print-xml.c (print_grammar): Don't print the list of rules.
387
388 2007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
389
390 Don't let --report affect XML output; always print all information.
391 Discussed at
392 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
393 * src/conflicts.c (log_resolution): Implement.
394 * src/print-xml.c (print_core): Implement.
395 (print_state): Implement.
396 (print_xml): Implement.
397
398 * NEWS (2.3a+): Fix quotes.
399 * src/parse-gram.y (prologue_declaration): For consistency with -v,
400 don't let %verbose clear the list specified by --report.
401
402 2007-11-26 Akim Demaille <akim@epita.fr>
403
404 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
405
406 2007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
407
408 In the XML output, list useless and unused symbols and rules with the
409 useful ones and add a "usefulness" attribute. Discussed starting at
410 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
411 * src/gram.c (grammar_rules_partial_print_xml): Remove.
412 (grammar_rules_print_xml): Print all rules instead of just those
413 useful in the grammar, and add a "usefulness" attribute.
414 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
415 * src/print-xml.c (print_rules_useless_in_parser): Remove.
416 (print_grammar): Print all nonterminals instead of just useful ones,
417 and add a "usefulness" attribute to nonterminals and terminals.
418 (print_xml): Don't print a separate "reductions" or
419 "rules-useless-in-parser" element.
420 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
421 (reduce_xml): Remove.
422 (reduce_token_unused_in_grammar): New.
423 (reduce_nonterminal_useless_in_grammar): New.
424 * src/reduce.h (reduce_xml): Remove prototype.
425 (reduce_token_unused_in_grammar): Add prototype.
426 (reduce_nonterminal_useless_in_grammar): Add prototype.
427 * data/xslt/xml2text.xsl: Update for XML changes.
428 * data/xslt/xml2xhtml.xsl: Update for XML changes.
429 * tests/reduce.at (Useless Terminals): Update output.
430 (Useless Rules): Update output.
431 (Reduced Automaton): Update output.
432
433 Say "Terminals unused in grammar" instead of "Unused terminals".
434 * NEWS (2.3a+): Update.
435 * doc/bison.texinfo (Understanding): Update example output.
436 * src/reduce.c (reduce_output): Implement.
437 * data/xslt/xml2text.xsl: Implement.
438 * data/xslt/xml2xhtml.xsl: Implement.
439
440 2007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
441
442 Accept --report-file=FILE to override the default `.output' filename.
443 * NEWS (2.3a+): Mention.
444 * doc/bison.texinfo (Bison Options): Add an entry.
445 * src/files.c (compute_output_file_names): Don't override
446 spec_verbose_file if already set.
447 * src/getargs.c (usage): Document --report-file.
448 (REPORT_FILE_OPTION): New anonymous enum member.
449 (long_options): Add entry for it.
450 (getargs): Add case for it setting spec_verbose_file.
451
452 * build-aux/cross-options.pl: Don't record a short option just because
453 there's an arg.
454 * doc/.cvsignore: Add yacc.1.
455
456 2007-11-14 Akim Demaille <akim@epita.fr>
457
458 * doc/yacc.1.in: New.
459 * configure.ac, doc/Makefile.am: Adjust.
460 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
461 config.h symbol.
462 Use AC_SUBST for assignments too.
463 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
464
465 2007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
466
467 * src/gram.c: Remove comments that duplicate comments in gram.h.
468
469 When reporting useless rules and nonterminals, say "useless in grammar"
470 instead of "useless", and say "useless in parser" instead of "never
471 reduced". Discussed starting at
472 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
473 * NEWS (2.3a+): Mention this change.
474 * data/xslt/xml2text.xsl: Update output text and expected input XML
475 element names to match changes below.
476 * data/xslt/xml2xhtml.xsl: Likewise.
477 (xsl:template match="bison-xml-report"): Add missing entry in Table of
478 Contents: "Rules useless in parser due to conflicts".
479 * doc/bison.texinfo (Decl Summary): Reword a little.
480 (Understanding): Update example output for changes below.
481 * src/gram.c: (rule_useful_p): Rename to...
482 (rule_useful_in_grammar_p): ... this.
483 (rule_useless_p): Rename to...
484 (rule_useless_in_grammar_p): ... this.
485 (rule_never_reduced_p): Rename to...
486 (rule_useless_in_parser_p): ... this.
487 (grammar_rules_print): Update for renames.
488 (grammar_rules_print_xml): Update for renames.
489 (grammar_rules_never_reduced_report): Rename to...
490 (grammar_rules_useless_report): ... this since it is used for either
491 kind of useless rule.
492 * src/gram.h: Reword comments and update function names in prototypes.
493 * src/main.c (main): Say "rule useless in parser due to conflicts".
494 * src/print-xml.c (print_rules_never_reduced): Rename to...
495 (print_rules_useless_in_parser): ... this, and rename output XML
496 element "rules-never-reduced" to "rules-useless-in-parser".
497 (print_xml): Update for rename.
498 * src/print.c (print_results): Say "Rules useless in parser due to
499 conflicts".
500 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
501 (nonterminals_reduce): Say "nonterminal useless in grammar".
502 (reduce_output): Say "Nonterminals useless in grammar".
503 Say "Rules useless in grammar".
504 (reduce_xml): Rename output XML element "useless" to
505 "useless-in-grammar".
506 (reduce_print): Don't report the count of grammatically useless rules
507 as "rules never reduced" just because %yacc is specified.
508 In the correct report of this count, say nonterminal(s) and rule(s)
509 "useless in grammar".
510 * tests/conflicts.at (S/R in initial): Update expected output.
511 (Defaulted Conflicted Reduction): Likewise.
512 (Unreachable States After Conflict Resolution): Likewise.
513 * tests/existing.at (GNU pic Grammar): Likewise.
514 * tests/reduce.at (Useless Nonterminals): Likewise.
515 (Useless Rules): Likewise.
516 (Reduced Automaton): Likewise.
517 (Underivable Rules): Likewise.
518 (Empty Language): Likewise.
519
520 2007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
521
522 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
523 here document and before the EOF so that BSD's implementation of Bourne
524 shell doesn't parse the delimiter as part of the here document.
525 * doc/.cvsignore: Add cross-options.texi.
526 * src/getargs.c (usage): Add a blank line after the warning categories.
527
528 2007-11-08 Paolo Bonzini <bonzini@gnu.org>
529
530 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
531
532 2007-11-05 Akim Demaille <akim@epita.fr>
533
534 Remove Id: from bison.1.
535 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
536 (perl -0777 -pi -e 's/\.PP\nId): New.
537 (.x.1): Use it to ignore the version control revision.
538
539 2007-11-05 Akim Demaille <demaille@gostai.com>
540
541 * build-aux/Makefile.am: Ship cross-options.pl.
542 * doc/Makefile.am: Always refer to cross-options.texi with
543 $(srcdir).
544 (MAINTAINERCLEANFILES): Add it.
545
546 2007-11-04 Akim Demaille <demaille@gostai.com>
547
548 Generate the long/short option cross-table.
549 * build-aux/cross-options.pl: New.
550 * doc/Makefile.am (cross-options.texi): New.
551 * doc/bison.texinfo: Use it.
552
553 2007-11-04 Akim Demaille <demaille@gostai.com>
554
555 Generate bison.1 using help2man.
556 * doc/common.x, doc/bison.x: New.
557 * doc/Makefile.am (bison.1, .x.1): New.
558 The code is taken from autoconf-2.61/man/Makefile.am.
559 * configure.ac: Look for help2man.
560
561 2007-11-04 Akim Demaille <demaille@gostai.com>
562
563 Complete --help.
564 * src/getargs.c (usage): Document -W, make it clear that -d,
565 -g and -x have optional arguments.
566
567 2007-11-04 Akim Demaille <demaille@gostai.com>
568
569 Find sha1sum when named gsha1sum.
570 * bootstrap (find_tool): New.
571 ($SHA1SUM): New.
572
573 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
574
575 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
576 at
577 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
578 * NEWS (2.3a+): Mention.
579 * data/bison.m4 (b4_pure_if): Don't define it here.
580 * data/c.m4 (b4_identification): Depend on individual skeletons to
581 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
582 values of the %define variables api.pure or api.push_pull. Define
583 YYPURE, YYPUSH, and YYPULL accordingly.
584 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
585 glr.cc has already defined b4_pure_flag.
586 * data/push.c: Define b4_pure_if based on `%define api.pure'.
587 Remove YYPUSH and YYPULL since they're back in b4_identification again.
588 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
589 * doc/bison.texinfo (Pure Decl): Update.
590 (Push Decl): Update.
591 (Decl Summary): Add api.pure to %define entry.
592 In %pure-parser entry, say it's deprecated and reference %define.
593 (Pure Calling): Update.
594 (Error Reporting): Update.
595 (C++ Scanner Interface): Update.
596 (How Can I Reset the Parser): Update.
597 (Table of Symbols): In %pure-parser entry, say it's deprecated and
598 reference %define.
599 * src/getargs.c (pure_parser): Remove global variable.
600 * src/getargs.h (pure_parser): Remove extern.
601 * src/output.c (prepare): Don't define pure_flag muscle.
602 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
603 wrapper around `%define api.pure'.
604 * tests/calc.at (Simple LALR Calculator): Update.
605 (Simple GLR Calculator): Update.
606 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
607 Update.
608 (GLR: Resolve ambiguity, pure, locations): Update.
609 (GLR: Merge conflicting parses, pure, no locations): Update.
610 (GLR: Merge conflicting parses, pure, locations): Update.
611 * tests/glr-regression.at (Uninitialized location when reporting
612 ambiguity): Update
613 * tests/input.at (Unused %define api.pure): New test case.
614 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
615 AT_PURE_IF and AT_PURE_AND_LOC_IF.
616 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
617
618 2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
619
620 %define push_pull -> %define api.push_pull. Discussed starting at
621 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
622 * data/push.c: Expect the new name.
623 * data/yacc.c: Likewise.
624 * doc/bison.texinfo (Push Decl): Update.
625 (Decl Summary): Update %define entry.
626 (Push Parser Function): Update.
627 (Pull Parser Function): Update.
628 (Parser Create Function): Update.
629 (Parser Delete Function): Update.
630 * tests/calc.at (Simple LALR Calculator): Update.
631 * tests/input.at (%define enum variables): Update.
632 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
633 (Push Parsing: Multiple impure instances): Update.
634 (Push Parsing: Unsupported Skeletons): Update.
635 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
636 (Exploding the Stack Size with Malloc): Update.
637
638 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
639 other entries some.
640
641 2007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
642
643 For the XML output's terminal element, rename @number to @token-number,
644 and add @symbol-number. In the nonterminal element, rename @number to
645 @symbol-number. Discussed starting at
646 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
647 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
648 renames.
649 (xsl:template match="nonterminal"): Likewise.
650 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
651 (xsl:template match="nonterminal"): Likewise.
652 * src/print-xml.c (print_grammar): Implement.
653
654 2007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
655
656 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
657 2007-10-11 change, the child elements here are items not rules.
658 (xsl:template match="item"): New.
659 (xsl:template match="rule"): Update for new reduced itemset.
660 (xsl:template match="point"): Remove.
661 (xsl:template match="empty"): For consistency with --graph, don't
662 output "/* empty */".
663 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
664 line-wrap, don't pass a negative value as first-line-length since this
665 won't work with the following changes.
666 (xsl:template name="line-wrap"): Simplify slightly.
667 (xsl:template name="ws-search"): Eliminate recursion.
668 * src/print_graph.c (print_core): Don't print a reduction's lookahead
669 set next to an item whose dot is not at the end of the RHS even if it
670 happens to be associated with the same rule.
671
672 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
673
674 Add %define lr.keep_unreachable_states.
675 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
676 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
677 * src/main.c (main): Implement it.
678 * tests/conflicts.at (Unreachable States After Conflict Resolution):
679 Extend to test it, and fix a typo.
680
681 2007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
682
683 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
684 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
685 the example .output text.
686 * tests/regression.at (Extra lookahead sets in report): Improve wording
687 of comments.
688
689 2007-10-17 Wojciech Polak <polak@gnu.org>
690
691 * src/print-xml.c (print_grammar): Renamed
692 <terminal> and <nonterminal> attributes:
693 "type" to "number" and "symbol" to "name".
694 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
695 Use new attribute names.
696 (xsl:template match="nonterminal"): Likewise.
697 * data/xslt/xml2xhtml.xsl: Likewise.
698
699 2007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
700
701 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
702 (Option Cross Key): Likewise.
703
704 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
705 next to an item whose dot is not at the end of the RHS even if it
706 happens to be associated with the same rule.
707 * src/print.c (print_core): Likewise.
708 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
709 (Resolved SR Conflicts): Update output.
710 * tests/regression.at (Extra lookahead sets in report): New test case.
711
712 2007-10-11 Wojciech Polak <polak@gnu.org>
713
714 * src/print-xml.c (print_core): Remove item set
715 redundancy.
716 * data/xslt/bison.xsl (bison:ruleNumber): New key.
717 Improve processing time. Suggested by Joel E. Denny.
718 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
719 Write xsl:param "required" attribute as comment.
720 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
721 (xsl:template match="rule"): Support new reduced itemset.
722 (xsl:template match="point"): Remove.
723 * data/xslt/xml2xhtml.xsl: Likewise.
724
725 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
726
727 * src/getargs.c (version): Update copyright year.
728
729 2007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
730
731 Make xml2dot.xsl and --graph produce the same output.
732 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
733 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
734 escaped later.
735 (xsl:template name="output-node"): Use the new escape template instead
736 of the string-replace template directly.
737 (xsl:template name="output-edge"): Likewise.
738 (xsl:template name="escape"): New, escapes backslashes and newlines in
739 addition to quotation marks.
740 * src/graphviz.c (start_graph, output_node, output_edge): Add
741 whitespace to output for legibility.
742
743 Make xml2text.xsl and --report produce the same output, and remove the
744 XML "conflicts" element since a conflict summary is easily extracted
745 from the automaton.
746 * data/xslt/bison.xsl: New.
747 (xsl:template match="state" mode="bison:count-conflicts): New.
748 * data/xslt/xml2text.xsl: Import bison.xsl.
749 (xsl:template match="bison-xml-report"): Instead of styling the
750 "conflicts" element, style the "automaton" element with mode
751 "conflicts". Unlike the former, the latter lists S/R and R/R
752 conflicts for a state on the same line.
753 (xsl:template match="conflicts"): Remove.
754 (xsl:template match="conflict"): Remove.
755 (xsl:template match="terminal"): Line-wrap the list of rules in which
756 the terminal is used.
757 (xsl:template match="nonterminal"): Likewise for nonterminals.
758 (xsl:template match="automaton" mode="conflicts"): New.
759 (xsl:template match="state" mode="conflicts"): New.
760 (xsl:template name="line-wrap"): New.
761 (xsl:template name="ws-search"): New.
762 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
763 (xsl:template match="bison-xml-report"): Instead of styling the
764 "conflicts" element, style the "automaton" element with mode
765 "conflicts."
766 (xsl:template match="conflicts"): Remove.
767 (xsl:template match="conflict"): Remove.
768 (xsl:template match="automaton" mode="conflicts"): New.
769 (xsl:template match="state" mode="conflicts): New.
770 * src/conflicts.c (conflicts_output_xml): Remove.
771 * src/conflicts.h (conflicts_output_xml): Remove prototype.
772 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
773 * src/print.c (print_grammar): Consistently wrap at the 66th column so
774 the corresponding XSLT is easier. Also, never wrap between a word and
775 the comma that follows it.
776
777 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
778
779 Improve C++ namespace support. Discussed starting at
780 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
781 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
782 b4_namespace_close): New macros that interpret the %define variable
783 "namespace" so its value can contain "::" to indicate nested
784 namespaces.
785 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
786 the above macros.
787 * data/lalr1.cc (b4_namespace): Likewise.
788 * data/location.cc (b4_namespace): Likewise.
789 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
790 inside a new table in the general %define entry. Document `%define
791 namespace' there as well. Point the %name-prefix entry to it since it
792 explains it more completely in the case of C++.
793 (C++ Bison Interface): Mention `%define namespace' instead of
794 %name-prefix.
795 (Table of Symbols): Remove the `%define push_pull' entry. The %define
796 entry suffices.
797 * tests/c++.at (Relative namespace references): New test case.
798 (Absolute namespace references): New test case.
799 (Syntactically invalid namespace references): New test case.
800 * tests/input.at (C++ namespace reference errors): New test case.
801
802 2007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
803
804 Add syncline support and location accessor to internal %define
805 interfaces.
806 * data/bison.m4 (b4_percent_define_get_loc): New.
807 (b4_percent_define_get_syncline): New.
808 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
809 (b4_percent_define_default): Record defining location as line 1 rather
810 than 0 for the sake of synchronizing #line's, and define
811 b4_percent_define_syncline(VARIABLE).
812 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
813 * src/muscle_tab.c (muscle_syncline_grow): New.
814 (muscle_code_grow): Use muscle_syncline_grow.
815 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
816 define b4_percent_define_syncline(VARIABLE).
817 (muscle_percent_define_get_loc): New.
818 (muscle_percent_define_get_syncline): New.
819 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
820 remove some unused variables.
821 (muscle_percent_define_default): Record defining location as line 1
822 rather than 0 for the sake of synchronizing #line's, and define
823 b4_percent_define_syncline(VARIABLE).
824 (muscle_percent_define_check_values): Use
825 muscle_percent_define_get_loc.
826 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
827 (muscle_percent_define_get_syncline): Prototype.
828 * tests/skeletons.at (%define Boolean variables: invalid skeleton
829 defaults): Update output for location change.
830 (Complaining during macro argument expansion): Extend to test
831 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
832
833 2007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
834
835 Fix some error-reporting macro bugs.
836 * data/bison.m4 (b4_cat): New.
837 (b4_error, b4_error_at): Use b4_cat to send error directives directly
838 to stdout so they don't become arguments to other macros. Update
839 comments and add examples.
840 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
841 add examples.
842 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
843 after printing the error directive so that M4 doesn't report subsequent
844 problems that are induced by this problem.
845 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
846 instead of just in them. Recognize @\n in both places. Both expand to
847 the empty string. Needed by b4_cat.
848 * tests/skeletons.at (Complaining during macro argument expansion):
849 New test case.
850 (Fatal errors make M4 exit immediately): New test case.
851
852 2007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
853
854 Implement --print-datadir.
855 * src/getargs.c (usage): Mention.
856 (PRINT_DATADIR_OPTION): New anonymous enum member.
857 (long_options): Add entry for it.
858 (getargs): Add case for it calling compute_pkgdatadir.
859 * src/output.c (output_skeleton): Encapsulate data directory
860 computation from here...
861 (prepare): ... and from here...
862 (compute_pkgdatadir): ... into this new function.
863 * src/output.h (compute_pkgdatadir): Prototype.
864
865 2007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
866
867 * src/print-xml.c (escape_bufs): New static global variable
868 replacing...
869 (xml_escape_n): ... the static local variable buf here.
870 (print_xml): Free memory for escape_bufs.
871 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
872
873 2007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
874
875 Replace `%push-parser' and `%push-pull-parser' with
876 `%define push_pull "push"' and `%define push_pull "both"'.
877 `%define push_pull "pull"' is the default.
878 * doc/bison.texinfo (Push Decl, Push Parser Function,
879 Pull Parser Function, Parser Create Function, Parser Delete Function):
880 Update declarations.
881 (Decl Summary, Table of Symbols): Replace %push-parser and
882 %push-pull-parser entries with a %define push_pull entry.
883 * data/bison.m4 (b4_percent_define_check_values): New macro.
884 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
885 definitions...
886 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
887 definitions...
888 * data/push.c: ... to here and compute them from the value of the
889 %define variable push_pull.
890 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
891 parsing requests here...
892 * data/yacc.c: ... hack this to switch to push.c any time
893 b4_use_push_pull_flag or the %define variable push_pull is set. This
894 will go away when we mv push.c yacc.c.
895 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
896 push parsing is not supported since unused %define variables are
897 reported anyway.
898 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
899 * src/muscle_tab.h (muscle_percent_define_check_values): Update
900 comments for consistency with b4_percent_define_check_values.
901 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
902 muscles.
903 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
904 Remove.
905 (prologue_declaration): Remove %push-parser and %push-pull-parser
906 rules.
907 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
908 * tests/calc.at: Update declarations.
909 * tests/input.at (%define enum variables): New test case.
910 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
911 declaration.
912 (Push Parsing: Multiple impure instances): Update declaration.
913 (Push Parsing: Unsupported Skeletons): New test case.
914 * tests/torture.at (Exploding the Stack Size with Alloca): Update
915 declaration.
916 (Exploding the Stack Size with Malloc): Update declaration.
917
918 2007-09-24 Wojciech Polak <polak@gnu.org>
919
920 Add XSLT transformations.
921
922 * data/xslt/xml2dot.xsl: Transform XML into DOT.
923 * data/xslt/xml2text.xsl: Transform XML into plain text.
924 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
925 * data/Makefile.am (xsltdir): New variable.
926 (dist_xslt_DATA): Add xslt/*.xsl files.
927
928 2007-09-23 Paul Eggert <eggert@cs.ucla.edu>
929
930 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
931 Problem reported by Wojciech Polak.
932 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
933 (xml_printf): Undo change I made on 21 September; that is,
934 indent 2 spaces, not 1.
935
936 2007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
937
938 Pacify ./configure --enable-gcc-warnings.
939 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
940 `char const *' instead of `char *'.
941 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
942 local variable `sep'.
943
944 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
945
946 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
947 elsewhere.
948 * src/print-xml.c: Prefer "const" after types; that's more consistent.
949 (xml_printf): Indent just 1 space for level.
950 (e_char, xlate_char): Remove.
951 (xml_escape_string): Rewrite to avoid undefined behavior (used
952 storage that was freed from the stack).
953 (xml_escape_n): Don't bother checking for subscript error.
954
955 2007-09-21 Wojciech Polak <polak@gnu.org>
956
957 Add Bison XML Automaton Report.
958
959 Add support for an -x option to generate an XML report.
960 It is not documented yet.
961 * src/print-xml.c: New file.
962 * src/print-xml.h: Likewise.
963 * lib/timevar.def (TV_XML): New var.
964 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
965 * src/conflicts.c: Include print-xml.h.
966 (solved_conflicts_xml_obstack): New var.
967 (log_resolution, conflicts_solve, conflicts_free):
968 Add support for XML report.
969 (conflicts_output_val): New function.
970 * src/conflicts.h (conflicts_output_val): New decl.
971 * src/files.c (spec_xml_file): New var.
972 (compute_output_file_names, output_file_names_free): Add XML support.
973 * src/files.h (spec_xml_file): New decl.
974 * src/getargs.c (xml_flag): New var.
975 (usage, short_options, long_options, getargs): Add XML support.
976 * src/getargs.h (xml_flag): New decl.
977 * src/gram.c: Include print-xml.h.
978 (rule_lhs_print_xml, rule_rhs_print_xml):
979 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
980 New functions.
981 * src/gram.h: Declare external ones.
982 * src/main.c: Include print-xml.h.
983 (main): Add XML support.
984 * src/reduce.c: Include print-xml.h.
985 (reduce_xml): New function.
986 * src/reduce.h: Declare it.
987 * src/state.c: Include print-xml.h.
988 (state_new): Add XML support.
989 (state_rule_lookahead_tokens_print_xml): New function.
990 * src/state.h: Declare it.
991 (struct state): New member solved_conflicts_xml.
992 * src/symtab.c (symbol_class_get_string): New function.
993 * src/symtab.h: Declare it.
994
995 2007-09-21 Paul Eggert <eggert@cs.ucla.edu>
996
997 * GNUmakefile: Switch to coreutils's version.
998 * bootstrap: Likewise.
999 * Makefile.cfg: Adjust to new GNUmakefile.
1000 * README-hacking: Likewise.
1001
1002 Import from gnulib:
1003
1004 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
1005 Bruno Haible <bruno@clisp.org>
1006
1007 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
1008 and is a script that invokes bison. Tighten the code. Add comments.
1009
1010 2007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
1011
1012 Spell "boolean" as "Boolean". Reported by Akim Demaille.
1013 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
1014 * doc/bison.texinfo (Decl Summary): Fix.
1015 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
1016 * tests/input.at (Boolean %define variables): Update output.
1017 * tests/skeletons.at (%define boolean variables: invalid skeleton
1018 defaults): Rename to...
1019 (%define Boolean variables: invalid skeleton defaults): ... this and
1020 update output.
1021
1022 2007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
1023
1024 In impure push mode, don't allow more than one yypstate to be allocated
1025 since multiple impure parsers would corrupt yynerrs.
1026 * data/push.c (yypstate_allocated): New static global variable
1027 initialized to 0.
1028 (yypull_parse): If yypstate_new returns 0, don't report it as memory
1029 exhaustion if yypstate_allocated is 1, but still return 2.
1030 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
1031 already 1. Otherwise, set it to 1.
1032 (yypstate_delete): Set it to 0.
1033 * tests/push.at (Push Parsing: Multiple impure instances): New test
1034 case.
1035
1036 2007-08-17 Bob Rossi <bob@brasko.net>
1037
1038 * doc/bison.texinfo (Push Decl): Document the push parser.
1039 (Table of Symbols): Ditto.
1040 (Pure Decl): Ditto.
1041 (Decl Summary): Ditto.
1042 (Multiple Parsers, Push Parser Function, Pull Parser Function,
1043 Parser Create Function, Parser Delete Function):
1044 Add new push parser symbols.
1045 (Table of Symbols): Document push-parser, push-pull-parser,
1046 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
1047
1048 2007-08-15 Paul Eggert <eggert@cs.ucla.edu>
1049
1050 Update to GPLv3.
1051 * doc/gpl-3.0.texi: New file.
1052 * doc/gpl.texi: Remove.
1053 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
1054 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
1055 * README-hacking, TODO, bootstrap, bootstrap.conf:
1056 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
1057 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
1058 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
1059 * data/lalr1.cc, data/lalr1.java, data/location.cc:
1060 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
1061 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
1062 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
1063 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
1064 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
1065 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
1066 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
1067 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
1068 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
1069 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
1070 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
1071 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
1072 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
1073 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
1074 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
1075 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
1076 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
1077 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
1078 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
1079 * src/complain.c, src/complain.h, src/conflicts.c:
1080 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
1081 * src/files.h, src/flex-scanner.h, src/getargs.c:
1082 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
1083 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
1084 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
1085 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
1086 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
1087 * src/print.c, src/print.h, src/print_graph.c:
1088 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
1089 * src/reduce.h, src/relation.c, src/relation.h:
1090 * src/revision.h, src/scan-code.h, src/scan-code.l:
1091 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
1092 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
1093 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
1094 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
1095 * tests/Makefile.am, tests/actions.at, tests/c++.at:
1096 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
1097 * tests/existing.at, tests/glr-regression.at:
1098 * tests/headers.at, tests/input.at, tests/java.at:
1099 * tests/local.at, tests/output.at, tests/push.at:
1100 * tests/reduce.at, tests/regression.at, tests/sets.at:
1101 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
1102 * tests/torture.at:
1103 Update to GPLv3.
1104
1105 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1106
1107 Get rid of broken %no-parser, -n, and --no-parser implementation and
1108 documentation.
1109 * TODO: Don't mention them.
1110 * doc/bison.1: Likewise.
1111 * doc/bison.texinfo (Decl Summary): Likewise.
1112 (Bison Options): Likewise.
1113 (Option Cross Key): Likewise.
1114 * src/getargs.c (no_parser_flag): Remove global variable.
1115 (usage): Don't print description of -n and --no-parser.
1116 (long_options): Remove --no-parser entry here.
1117 (getargs): Remove -n case in the switch here.
1118 * src/getargs.h (no_parser_flag): Remove extern.
1119 * tests/regression.at (Web2c Actions): Remove comment that mentions
1120 --no-parser.
1121
1122 2007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
1123
1124 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
1125 name user variables starting with `yy'. Just pass NULL instead of a
1126 dummy local &yylval to yypush_parse.
1127 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
1128 starting with `yy'.
1129
1130 2007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
1131
1132 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
1133 true since it's then always used regardless of whether yyoverflow is
1134 defined. Reported by Christian Burger at
1135 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
1136 * THANKS: Add Christian Burger.
1137
1138 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1139 node names: say "Decl Summary" not "Bison Declaration Summary".
1140
1141 2007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
1142
1143 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
1144 determine whether this function has already complained about an invalid
1145 value for a %define boolean variable, don't check whether Bison has
1146 ever examined the value. As written, the check was a tautology.
1147 Instead, record and check for this complaint using a separate muscle.
1148
1149 2007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
1150
1151 Fix push parsing memory leak reported by Brandon Lucia at
1152 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
1153 * THANKS: Add Brandon Lucia.
1154 * data/push.c (yypstate_delete): Free the stack if it was reallocated
1155 but the parse never completed and thus freed it.
1156 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
1157 * tests/testsuite.at: Include push.at.
1158 * test/push.at: New.
1159 (Push Parsing: Memory Leak for Early Deletion): New test case.
1160
1161 2007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
1162
1163 Improve handling of multiple S/R conflicts in the same state and of S/R
1164 conflicts involving multiple reductions.
1165 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
1166 set for a state here or Bison will abort if it is reassigned on a
1167 later conflicted reduction in the same state.
1168 Similarly, don't finalize and assign the solved conflicts report here
1169 or it will be lost if it is reassigned on a later conflicted reduction
1170 in the same state.
1171 (set_conflicts): Instead, assign them both here after all S/R conflicts
1172 in the state have been fully examined.
1173 * src/print.c (shift_set): Rename to...
1174 (no_reduce_set): ... this.
1175 (print_reductions): Update for rename, and add %nonassoc error action
1176 tokens to no_reduce_set so that, when printing the first remaining
1177 reduction on an error action token, the reduction is enclosed in
1178 brackets.
1179 (print_results): Update for rename.
1180 * tests/conflicts.at (Solved conflicts report for multiple reductions
1181 in a state): New test case.
1182 (%nonassoc error actions for multiple reductions in a state): New test
1183 case.
1184
1185 * src/main.c (main): Don't depend on C99 features.
1186
1187 2007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
1188
1189 * build-aux/.cvsignore: Add compile.
1190 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
1191 uniwidth.
1192
1193 2007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
1194
1195 * bootstrap (slurp): Create target directories that don't exist.
1196 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
1197
1198 2007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
1199
1200 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
1201 than item number.
1202 * closure.c (closure): Likewise.
1203 * state.h (reductions): Comment sorting of rules.
1204 (state): Comment sorting of items.
1205
1206 2007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
1207
1208 Fix C++ test cases after recent Gnulib changes. Discussed starting at
1209 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
1210 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
1211 definition in order to avoid Gnulib headers since we don't use config.h
1212 here.
1213 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
1214 rather than AT_DATA so that config.h is included.
1215
1216 2007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
1217
1218 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
1219 instead of fprintf. Guard these functions with #if YYDEBUG instead of
1220 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
1221 and so that YYFPRINTF is guaranteed to be defined here.
1222
1223 2007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
1224
1225 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
1226 with...
1227 (muscle_percent_define_check_values): ... this more helpful function.
1228 Again, it's not used yet, but it will be.
1229 * src/muscle_tab.h: Likewise.
1230
1231 Improve some comments in parser table construction.
1232 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
1233 (generate_states): Don't mention ruleset, which is internal to closure.
1234 * src/closure.c (closure): Explain sorting of core and itemset, which
1235 is required for this function to behave correctly.
1236 * src/closure.h (closure): Mention sorting.
1237
1238 2007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
1239
1240 * src/lalr.c (state_lookahead_tokens_count): For code readability,
1241 move the check for disabled transitions to an aver since conflict
1242 resolution hasn't happened yet.
1243
1244 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
1245 labels a state as inconsistent just because it has error transitions.
1246 The original form of this check appeared in revision 1.1 of lalr.c,
1247 which was committed on 1991-12-21. Now (at least), changing the
1248 consistency label on such a state appears to have no useful effect in
1249 any of the places it is examined, which I enumerate below. The key
1250 point to understanding each item in this enumeration is that a state
1251 with an error transition is labelled consistent in the first place only
1252 if it has no rules, so the check cannot matter for states that have
1253 rules. (1) Labelling a state as inconsistent will cause set_conflicts
1254 to try to identify its conflicts, and a state must have *rules* to have
1255 conflicts. (2) Labelling a state as inconsistent will affect how
1256 action_row sets the default *rule* for the state. (3) Labelling a
1257 state as inconsistent will cause build_relations to add lookback edges
1258 to *rules* in that state.
1259 * src/state.h (struct state): Word the comment for member consistent
1260 more carefully.
1261
1262 2007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
1263
1264 Don't depend on C99 features.
1265 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
1266 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
1267 * src/reader.c (check_and_convert_grammar): Fix for-loop.
1268 * src/state.c (state_mark_reachable_states): Fix for-loop.
1269 (state_remove_unreachable_states): Fix for-loop.
1270
1271 Don't widen struct state with member reachable just to temporarily
1272 record reachability. Instead, use a local bitset.
1273 * src/state.h (struct state): Remove member.
1274 * src/state.c (state_new): Don't initialize it.
1275 (state_mark_reachable_states): Rename to...
1276 (state_record_reachable_states): ... this, and use bitset.
1277 (state_remove_unreachable_states): Use bitset.
1278
1279 2007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
1280
1281 * src/Makefile.am (yacc): Quote target action commands properly so
1282 that the yacc script isn't corrupt. Reported by Hans Aberg at
1283 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
1284
1285 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
1286 the case of pure parsers. Reported by Frans Englich at
1287 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
1288 * THANKS: Add Frans Englich.
1289
1290 * NEWS (2.3a+): In the %code entry, reference section `Bison
1291 Declaration Summary' from the manual now since the %code summary has
1292 moved there.
1293 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
1294 in the rules section must be terminated by semicolons.
1295
1296 2007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1297
1298 Extend the front-end API for %define variables to more completely
1299 mirror the back-end. This will be useful in the future.
1300 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
1301 Update comments to mention the new front-end counterparts of these
1302 macros.
1303 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
1304 for muscle_string_decode and muscle_location_decode.
1305 (muscle_string_decode): New static function.
1306 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
1307 (muscle_percent_define_get, muscle_percent_define_ifdef): New
1308 functions.
1309 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
1310 muscle_percent_define_get to mimic the b4_percent_define_flag_if
1311 implementation more closely.
1312 (muscle_percent_define_invalid_value): New function.
1313 * src/muscle_tab.h (muscle_percent_define_get,
1314 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
1315 Prototype.
1316
1317 2007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
1318
1319 * NEWS (2.3a+): Mention yesterday's state-removal change.
1320 (2.3a): Remove the %language entry, which was added after 2.3a.
1321 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
1322 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
1323 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
1324 tests/existing.at: Update copyright date.
1325
1326 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1327
1328 If conflict resolution makes states unreachable, remove those states,
1329 report rules that are then unused, and don't report conflicts in those
1330 states.
1331 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
1332 New global function.
1333 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
1334 function.
1335 * src/main.c (main): After conflict resolution, remove the unreachable
1336 states and update all data structures that reference states by number.
1337 * src/state.c (state_new): Initialize each state's reachable member to
1338 false.
1339 (state_mark_reachable_states): New static function.
1340 (state_remove_unreachable_states): New global function.
1341 * src/state.h (struct state): Add member bool reachable.
1342 (state_remove_unreachable_states): Prototype.
1343 * tests/conflicts.at (Unreachable States After Conflict Resolution):
1344 New test case.
1345 * tests/existing.at (GNU pic Grammar): Update test case output now that
1346 an unused rule is discovered.
1347
1348 2007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
1349
1350 Minor code cleanup in parser table construction.
1351 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
1352 (new_itemsets, save_reductions): Update for rename to nitemset.
1353 * src/closure.c (nritemset): Rename to...
1354 (nitemset): ... this since the "r" appears to meaningless and isn't
1355 used in the comments.
1356 (closure): Update for rename.
1357 * src/closure.h (nritemset): Update extern to...
1358 (nitemset): ... this.
1359 * src/lalr.c (LA): Fix a typo in comments.
1360 * src/print.c (print_core): Update for rename to nitemset.
1361 * src/print_graph.c (print_graph): Likewise.
1362 * src/state.h: Fix some typos in header comments.
1363
1364 2007-04-04 Paul Eggert <eggert@cs.ucla.edu>
1365
1366 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
1367 still sticks to ASCII. Sorry!
1368
1369 * README-hacking: New file, taken mostly from coreutils, with changes
1370 for Bison. Contains much of the contents of:
1371 * README-cvs: Remove.
1372 * bootstrap: Sync from gnulib.
1373 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
1374 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
1375
1376 2007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
1377
1378 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
1379 Setzer.
1380 (Java Differences): Fix some typos.
1381 * THANKS: Add Sebastian Setzer.
1382
1383 2007-03-07 Paolo Bonzini <bonzini@gnu.org>
1384
1385 * data/java.m4 (b4_single_class_if): Remove.
1386 (b4_abstract_if): Look at "%define abstract".
1387 (b4_lexer_if): New.
1388 (b4_union_name): Rename...
1389 (b4_yystype): ... to this. Map to "%define stype".
1390 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
1391 b4_maybe_throws): Fix quoting.
1392 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
1393 * data/lalr1.java (Lexer interface): Always define.
1394 (Lexer interface within parser class): Remove.
1395 (YYLexer class): New, used when "%code lexer" is present.
1396 (constructor): When "%code lexer" is used, pass %lex-param
1397 to the lexer constructor.
1398 (yylex, yyparse): Remove %lex-param from method invocations
1399 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
1400
1401 * doc/bison.texinfo (Java Bison Interface): Mention "%define
1402 abstract". Rename "%define union_name" to "%define stype".
1403 Rename method names according to previous patch.
1404 (Java Scanner Interface): Describe "%code lexer" instead of
1405 "%pure-parser" and "%define single_class".
1406 (Java Differences): Mention "%code lexer".
1407
1408 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
1409 Include scanner here, using macros from tests/local.at.
1410 (AT_DATA_CALC_Y): Remove final argument.
1411 (_AT_CHECK_JAVA_CALC): Likewise.
1412 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
1413 of %locations and %error-verbose.
1414 (main): Test with and without %lex-param.
1415 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
1416 (AT_BISON_OPTION_POPDEFS): Pop it.
1417
1418 2007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1419
1420 DJGPP spefic issue. Inhibit the use of disallowed characters for
1421 file name genertion on Win98, WinXP, etc. These are |<>":?*\
1422 and concern testsuite case 46.
1423 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
1424 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
1425 * djgpp/config.bat: Inhibit the use of disallowed characters.
1426
1427 2007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
1428
1429 Miscellaneous %define and %code cleanup.
1430 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
1431 values are interpreted.
1432 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
1433 documentation a little more.
1434 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
1435 muscle_percent_define_insert, muscle_percent_code_grow): New
1436 functions/macros.
1437 * src/muscle_tab.h (muscle_percent_define_insert,
1438 muscle_percent_code_grow): Prototype.
1439 * src/parse-gram.y (prologue_declaration): Use
1440 muscle_percent_define_insert and muscle_percent_code_grow when parsing
1441 %define and %code directives.
1442
1443 Make it easy to share %define boolean variables between the front-end
1444 and back-end. Though not used yet, this will be useful in the future.
1445 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
1446 Bison uses of names rather than just skeleton uses of names.
1447 (b4_percent_define_get, b4_percent_define_ifdef): Rename
1448 b4_percent_define_skeleton_variables(VARIABLE) to
1449 b4_percent_define_bison_variables(VARIABLE).
1450 (b4_percent_code_get, b4_percent_code_ifdef): Rename
1451 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
1452 b4_percent_code_bison_qualifiers(QUALIFIER).
1453 (b4_check_user_names_wrap): Update for renames.
1454 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
1455 muscle_percent_define_default): New functions mimicking
1456 b4_percent_define_flag_if and b4_percent_define_default.
1457
1458 For %define variables, report locations for invalid values and
1459 redefinitions.
1460 * data/bison.m4 (b4_percent_define_flag_if): Read
1461 b4_percent_define_loc(VARIABLE) to report the location of an invalid
1462 value for VARIABLE.
1463 (b4_percent_define_default): Save a special location in
1464 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
1465 must later be reported as invalid.
1466 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
1467 functions.
1468 (muscle_percent_define_insert): Record the location of VARIABLE in
1469 muscle percent_define_loc(VARIABLE), and use it to report the previous
1470 location for a redefinition.
1471 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
1472 (muscle_percent_define_default): Update like b4_percent_define_default.
1473 (muscle_grow_user_name_list): Rename to...
1474 (muscle_user_name_list_grow): ... this for consistency and use
1475 muscle_location_grow.
1476 * src/muscle_tab.h (muscle_location_grow): Prototype.
1477 * tests/input.at (%define errors): Update expected output.
1478 * tests/skeletons.at (%define boolean variables: invalid skeleton
1479 defaults): New test case.
1480
1481 2007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
1482
1483 * src/print.c (lookahead_set, state_default_rule): Remove.
1484 (print_reductions): Replace state_default_rule invocation with
1485 equivalent use of yydefact, which was computed in token_actions in
1486 tables.c.
1487 (print_results): Don't allocate lookahead_set.
1488
1489 2007-02-27 Paolo Bonzini <bonzini@gnu.org>
1490
1491 * data/lalr1.java: Prefix all private members with yy.
1492
1493 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
1494
1495 Use YYFPRINTF instead of fprintf where appropriate. Reported by
1496 Sebastien Fricker at
1497 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
1498 * THANKS: Add Sebastien Fricker.
1499 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
1500 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
1501 accept a variable number of arguments.
1502
1503 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
1504
1505 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
1506
1507 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1508
1509 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
1510 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
1511 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
1512
1513 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
1514
1515 Undo my 2007-02-07 change, switching back to the c-strcase module
1516 introduced in the 2007-02-03 change. Bruno Haible reported that
1517 the 2007-02-07 change would be dangerous in Turkish if we add a
1518 language whose name contains "i", since "i" is not lowercase "I"
1519 in Turkish.
1520 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
1521 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
1522 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
1523 * m4/.cvsignore: Remove strcase.m4.
1524 * src/getargs.c: Revert 2007-02-07 change, as follows.
1525 Include c-strcase.h.
1526 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
1527
1528 2007-02-11 Bruno Haible <bruno@clisp.org>
1529
1530 Enable the Java related testsuite tests when the only Java compiler
1531 found is a gcj < 4.3. Discussed at
1532 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
1533 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
1534
1535 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
1536
1537 * data/Makefile.am: Update copyright date.
1538 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
1539 yypstate_new returns NULL.
1540 (yypstate_new): Return NULL if malloc does.
1541 * src/reader.c (packgram): Move translation of rule actions from the
1542 beginning of packgram to...
1543 (check_and_convert_grammar): ... here right before packgram is invoked
1544 so it's easier to write more complete comments, and remove redundant
1545 code.
1546
1547 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
1548
1549 As in semantic actions, make @$ in %initial-action, %destructor, and
1550 %printer imply %locations.
1551 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
1552 scanning @$.
1553 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
1554 (@$ in %initial-action implies %locations,
1555 @$ in %destructor implies %locations,
1556 @$ in %printer implies %locations): ... these new test cases.
1557
1558 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
1559
1560 Undo most of the 2007-02-03 change, switching to the strcase module
1561 now that gnulib strcase has been fixed.
1562 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
1563 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
1564 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
1565 * m4/.cvsignore: Add strcase.m4.
1566 * src/getargs.c: Revert 2007-02-03 change, as follows.
1567 Don't include c-strcase.h.
1568 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
1569 strcasecmp has "unspecified behavior" outside the POSIX locale,
1570 but it works fine in practice if at least one argument is ASCII,
1571 as is the case in Bison.
1572
1573 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
1574
1575 * tests/java.at: Skip tests if only one of javac/java is present.
1576 Reported by Joel E. Denny.
1577 * tests/atlocal.in: Adjust copyright years.
1578
1579 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
1580
1581 * data/lalr1.java (Stack): Work around old verifiers that disallow
1582 access to the private fields of an inner class, from the outer class.
1583 We can make Stack's fields public because user code doesn't have access
1584 to the instance of Stack used by parse(). Reported by Paul Eggert.
1585
1586 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
1587
1588 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
1589 the right spot for these files?
1590 * bootstrap.conf (gnulib_modules): Add c-strcase.
1591 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
1592 c-strncasecmp.c.
1593 * src/getargs.c: Include c-strcase.h.
1594 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
1595 to avoid unspecified behavior.
1596
1597 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
1598
1599 * doc/bison.texinfo (Decl Summary): Correct typo.
1600
1601 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
1602
1603 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
1604 Complain if the value does not match empty, "true" or "false".
1605 * data/c++.m4: Adjust default definitions of %define variables.
1606 * data/java.m4: Adjust default definitions of %define variables.
1607 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
1608 to above behavior.
1609 * tests/input.at (Boolean %define variables): Test new behavior.
1610
1611 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
1612
1613 * NEWS: Mention java.
1614 * TODO: Remove things that are done.
1615 * bootstrap.conf: Add javacomp-script and javaexec-script.
1616 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
1617
1618 * data/Makefile.am: Add new files.
1619 * data/java-skel.m4: New.
1620 * data/java.m4: New.
1621 * data/lalr1.java: New.
1622
1623 * doc/bison.texinfo: Put "A Complete C++ Example" under
1624 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
1625 under Other Languages.
1626
1627 * src/getargs.c (valid_languages): Add Java.
1628 * src/getargs.h (struct bison_language): Update size of string fields.
1629
1630 * tests/Makefile.am: Add java.at.
1631 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
1632 * tests/java.at: New.
1633 * tests/testsuite.at: Include it.
1634
1635 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
1636
1637 Clean up.
1638 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
1639 at_directive_argv arguments so these no longer have to be global
1640 variables. Also, update the implementation for the following changes.
1641 (fail_for_at_directive_too_many_args,
1642 fail_for_at_directive_too_few_args): Add at_directive_name argument.
1643 (at_directive_name): Remove as at_directive_argv[0] will be used for
1644 this now.
1645 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
1646 for the directive name.
1647 (at_directive_argc, at_directive_argv): Make these local within
1648 skel_lex instead of global.
1649 (INITIAL): Update directive start action for above changes.
1650 (SC_AT_DIRECTIVE_ARG): Rename to...
1651 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
1652 (SC_AT_DIRECTIVE_SKIP_WS): Update.
1653 (scan_skel): Move yylex_destroy to...
1654 (skel_scanner_free): ... here.
1655 * tests/skeletons.at (installed skeleton file name): Rename to...
1656 (installed skeleton file names): ... this.
1657
1658 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
1659
1660 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
1661 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
1662 Summary" not "Directives".
1663 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
1664 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
1665 since the former is now the more complete one.
1666 (Prologue Alternatives): Likewise and do the same for %defines.
1667 (Table of Symbols): Add summary of %code, add summary of %define, and
1668 move full %code documentation to...
1669 (Decl Summary): ... here for consistency with other entries in these
1670 sections.
1671 Move %define entry in order to keep this list alphabetized.
1672 Reword %define entry a little to put less emphasis on the skeleton
1673 concept, which most users shouldn't have to think about.
1674
1675 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
1676
1677 Adjust to recent gnulib changes.
1678 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
1679 Add string.h, string_.h, unistd_.h, wchar_.h.
1680 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
1681 * src/system.h: Don't include <stpcpy.h>; this is now done by
1682 <string.h>.
1683
1684 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
1685
1686 Simplify implementation of unqualified %code, implement macros for
1687 uniform treatment of boolean %define flags. Document %define.
1688 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
1689 b4_percent_code_ifdef): New.
1690 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
1691 * data/c++.m4: Define default value for global_tokens_and_yystype.
1692 * data/glr.cc: Likewise.
1693 * data/location.cc: Use b4_percent_define_flag_if.
1694
1695 * doc/bison.texinfo (Decl Summary): Document %define.
1696
1697 * src/parse-gram.y (Unqualified %code): Change muscle name to
1698 b4_percent_code().
1699 (content.opt): Default to empty.
1700
1701 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1702
1703 Implement support for relative and absolute skeleton file names.
1704 Discussed starting at
1705 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
1706 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
1707 (Bison Options): Document in --skeleton entry.
1708 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
1709 full_skeleton can't necessarily hold all of pkgdatadir.
1710 If the specified skeleton file name contains a `/', don't prepend
1711 pkgdatadir.
1712 * src/parse-gram.y (prologue_declaration): If the specified skeleton
1713 file name contains a `/', prepend the grammar file directory.
1714 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
1715 * skeletons.at: New file.
1716 (relative skeleton file names): New test case.
1717 (installed skeleton file names): New test case.
1718 * tests/testsuite.at: Include skeletons.at.
1719
1720 * bootstrap: Update copyright to 2007.
1721
1722 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
1723
1724 * bootstrap: Remove occurrences of .#bootmp from the files.
1725
1726 2007-01-17 Akim Demaille <akim@epita.fr>
1727
1728 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
1729 nonterminals.
1730 Use per-type %printer.
1731
1732 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
1733
1734 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
1735 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1736 djgpp/config.site, src/files.c, src/files.h, src/main.c,
1737 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
1738 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
1739 tests/glr-regression.at, tests/input.at, tests/local.at,
1740 tests/output.at, tests/torture.at: Update copyright to 2007.
1741
1742 2007-01-16 Akim Demaille <akim@epita.fr>
1743
1744 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
1745 error code.
1746 (Calc++ Scanner): Exit with failure if we can't open the input
1747 file.
1748 Accept "-" standing for stdin.
1749 (Calc++ Top Level): Print the result only if the parsing was
1750 successful.
1751
1752 2007-01-16 Akim Demaille <akim@epita.fr>
1753
1754 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
1755
1756 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
1757 and Joel E. Denny <jdenny@ces.clemson.edu>
1758
1759 Clean up %define and %code implementation in M4 some. Most
1760 importantly, rename all related macros to be in the b4_percent_define
1761 and b4_percent_code namespaces. Also, complete support for `.' in
1762 %define variable names and %code qualifiers.
1763 * data/bison.m4 (b4_check_user_names): Check for special
1764 "SKELETON-NAMESPACE(name)" macros instead of using two nested
1765 m4_foreach loops.
1766 (b4_get_percent_define, b4_get_percent_code): Rename to...
1767 (b4_percent_define_get, b4_percent_code_get): ... these.
1768 Extend documentation with examples.
1769 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
1770 b4_percent_define_skeleton_variables and
1771 b4_percent_code_skeleton_qualifiers.
1772 Expect any value for the %define variable `foo' to be stored in the
1773 macro named `b4_percent_define(foo)'; expect any %code blocks for the
1774 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
1775 expect any unqualified %code blocks to be stored in a macro named
1776 `b4_percent_code_unqualified'.
1777 Use m4_indir so that %define variable names and %code qualifiers can
1778 contain `.', which is allowed by the grammar parser.
1779 (b4_percent_define_default): New macro to set a default value for a
1780 %define variable.
1781 (m4_wrap): Update wrapped code, and fix some underquoting.
1782 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
1783 Expect grammar uses of %define variables and %code qualifiers to be
1784 defined in b4_percent_define_user_variables and
1785 b4_percent_code_user_qualifiers.
1786 * data/c++.m4: Use b4_percent_define_default rather than
1787 m4_define_default. Fix some underquoting. Skeleton usage of %define
1788 variable define_location_comparison now implies skeleton usage of
1789 %define variable filename_type.
1790 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
1791 data/push.c, data/yacc.c: Update macro names.
1792 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
1793 muscle names.
1794
1795 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1796
1797 DJGPP specific issues.
1798
1799 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
1800 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
1801
1802 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1803
1804 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
1805 run parsers in all tests so that Valgrind is invoked during
1806 maintainer-check-valgrind.
1807 (Duplicate representation of merged trees): Free all semantic values.
1808 (Duplicated user destructor for lookahead): Likewise.
1809
1810 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1811
1812 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
1813 command-line prefix.
1814 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
1815 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
1816 miss Valgrind messages.
1817 (Exploding the Stack Size with Malloc): Likewise.
1818
1819 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
1820
1821 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
1822 locals. Reported by Juan Manuel Guerrero at
1823 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
1824 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
1825 Fix some indentation also.
1826 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
1827 explaining this issue.
1828
1829 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
1830 and Joel E. Denny <jdenny@ces.clemson.edu>
1831
1832 Simplify union and prologue handling, and escape union and lex/parse
1833 params with digraphs.
1834 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
1835 values to the empty string since these are no longer guaranteed
1836 initialized by the front-end.
1837 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
1838 braces around b4_user_stype since this is no longer done by the
1839 front-end.
1840 * src/files.c, src/files.h (pre_prologue_obstack,
1841 post_prologue_obstack): Remove.
1842 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
1843 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
1844 with digraphs. This fixes lex params and parse params.
1845 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
1846 * src/output.c (prepare): Remove muscle insertion of the prologues.
1847 (output): Remove freeing of pre_prologue_obstack and
1848 post_prologue_obstack.
1849 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
1850 than prologue_augment for prologue parsing so you don't need prologue
1851 obstacks.
1852 (grammar_declaration): For %union RHS, use `braceless' instead of
1853 "{...}" so that braces are already stripped and code is escaped with
1854 digraphs.
1855 * src/reader.c (prologue_augment): Remove.
1856 (reader): Remove initialization of pre_prologue_obstack and
1857 post_prologue_obstack.
1858 * src/reader.h (prologue_augment): Remove.
1859
1860 * data/c.m4: Remove stray parenthesis.
1861
1862 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1863
1864 Remove quotes from variables names in %define directives and from
1865 qualifiers in %code directives, and restrict the characters that are
1866 allowed in them to M4-friendly ones. For %define, continue to support
1867 the quoted form as a deprecated feature. Discussed starting at
1868 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
1869 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
1870 %code.
1871 * doc/bison.texinfo (Prologue Alternatives): Update.
1872 (Decl Summary): In %defines entry, update mention of `%code requires'
1873 and `%code provides'.
1874 (C++ Location Values): Update %define uses.
1875 (Calc++ Parser Interface): Likewise.
1876 (Calc++ Parser): Likewise, and update `%code requires' uses.
1877 (Table of Symbols): Update %code documentation.
1878 * src/parse-gram.y (prologue_declaration): For %define variables, use
1879 `variable' instead of `STRING'.
1880 (grammar_declaration): For %code qualifiers, use `ID' instead of
1881 `STRING'.
1882 (variable): New nonterminal that takes an `ID' or a `STRING'.
1883 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
1884 and %define uses.
1885 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
1886 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
1887 (%define errors): Update %define uses.
1888
1889 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1890
1891 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
1892 instead of muscle_insert for %define values so that M4-special
1893 characters are replaced with digraphs.
1894 * tests/input.at (%define errors): Extend to check weird values.
1895
1896 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
1897
1898 Instead of having skeletons declare all valid %define variables and
1899 %code qualifiers, provide macros that retrieve the associated values
1900 and build these lists automatically. Thus Bison will now warn when a
1901 variable or qualifier is not used by the skeleton in the current
1902 invocation regardless of whether it might sometimes be used by that
1903 skeleton in other invocations. Also, move all %define value macros to
1904 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
1905 form, which is replaced by %code.
1906 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
1907 (b4_check_user_names): ... this, and change the series of valid name
1908 arguments to a single list argument for names used in the skeleton
1909 similar to the existing list argument for names used in the grammar.
1910 Warn instead of complaining.
1911 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
1912 values and %code code, to format %code code properly, and to build
1913 lists of all %define variables and %code qualifiers used in the
1914 skeleton: b4_skeleton_percent_define_variables and
1915 b4_skeleton_percent_code_qualifiers.
1916 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
1917 Remove, and...
1918 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
1919 the skeleton names lists can finish building first. In place of
1920 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
1921 expect the lists b4_user_percent_define_variables and
1922 b4_user_percent_code_qualifiers.
1923 * data/c++.m4: Where setting default values for b4_parser_class_name,
1924 b4_location_type, b4_filename_type, b4_namespace, and
1925 b4_define_location_comparison, update their names to the
1926 b4_percent_define_ namespace.
1927 * data/glr.c: Don't use b4_check_percent_define_variables and
1928 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1929 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
1930 (b4_parser_class_name, b4_namespace): Define these using
1931 b4_get_percent_define for parser_class_name and namespace.
1932 * data/location.cc: Use b4_get_percent_define.
1933 * data/push.c: Don't use b4_check_percent_define_variables and
1934 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
1935 * data/yacc.c: Likewise, and don't call m4_exit in
1936 b4_use_push_for_pull_if or m4_wrap code will never execute.
1937 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
1938 Rename to...
1939 (muscle_grow_user_name_list): ... this for consistency with the
1940 terminology used in bison.m4.
1941 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
1942 %define variable names, and rename muscle used_percent_define_variables
1943 to user_percent_define_variables.
1944 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
1945 user_percent_code_qualifiers.
1946 (content): Remove.
1947 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
1948 {CODE} form is no longer accepted.
1949 * tests/input.at (Reject bad %code qualifiers): Rename to...
1950 (Reject unused %code qualifiers): ... this, and update test output.
1951 (%define error): Update test output.
1952
1953 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
1954
1955 Check for unrecognized %define variables similar to checking for
1956 unrecognized %code qualifiers. Check for redefined %define variables.
1957 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
1958 generalizes...
1959 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
1960 (b4_check_percent_define_variables): New, also wraps it.
1961 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
1962 variables using b4_check_percent_define_variables.
1963 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
1964 all those exercised in the test suite and all those listed in the
1965 `Default values' section of c++.m4. Are there others?
1966 * data/push.c, data/yacc.c: Declare no valid %define variables.
1967 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
1968 similar to muscle_find, but it works even when the muscle stores a
1969 const value.
1970 (muscle_grow_used_name_list): New function for constructing the used
1971 name list muscles that b4_check_for_unrecognized_names requires.
1972 * src/parse-gram.y (prologue_declaration): Warn if a variable is
1973 %define'd more than once. Define the b4_used_percent_define_variables
1974 muscle with muscle_grow_used_name_list.
1975 (grammar_declaration): Abbreviate %code code with
1976 muscle_grow_used_name_list.
1977 * tests/input.at (%define errors): New.
1978
1979 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
1980
1981 Provide warn_at, complain_at, and fatal_at function callbacks to the
1982 skeletons, and use this for %code qualifier complaints.
1983 * data/bison.m4 (b4_error_at): New, invoked by...
1984 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
1985 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
1986 @fatal_at(...@) directives.
1987 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
1988 qualifiers in b4_used_percent_code_qualifiers and to use
1989 b4_complain_at.
1990 * src/location.c, src/location.h (boundary_set_from_string): New global
1991 function.
1992 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
1993 function.
1994 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
1995 to b4_used_percent_code_qualifiers.
1996 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
1997 function.
1998 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
1999 (lineno): Rename to...
2000 (out_lineno): ... this so I don't misunderstand it again.
2001 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
2002 here; these newlines are in the input but not the output file.
2003 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
2004 (at_directive_perform): ... this new static function, and add handling
2005 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
2006 directives.
2007 * tests/input.at (Reject bad %code qualifiers): Update test output with
2008 locations and extend.
2009
2010 * tests/output.at (Output file name: [, Output file name: ]): Remove
2011 bogus comment about these tests failing.
2012
2013 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
2014
2015 Clean up b4_check_percent_code_qualifiers a little.
2016 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
2017 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
2018 documentation and add examples.
2019 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
2020 qualifiers here.
2021
2022 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
2023
2024 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
2025 unreliable -- especially when they're hidden inside another macro.
2026 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
2027 data/c.m4: Remove m4_divert(-1).
2028 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
2029 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
2030 m4_divert_push(0) and m4_divert_pop(0).
2031 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
2032 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
2033 pushed and popped by m4sugar, should be first on the stack.
2034
2035 Provide warn, complain, and fatal function callbacks to the skeletons.
2036 This provides more flexibility than m4_fatal, improves the error
2037 message format, and captures messages for translation. Discussed
2038 starting at
2039 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
2040 * data/bison.m4 (b4_error): New, invoked by...
2041 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
2042 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
2043 directives. Because these M4 macros might be called when the current
2044 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
2045 the previous removal of uses of m4_divert, which caused trouble.
2046 (b4_check_percent_code_qualifiers): Use b4_complain instead of
2047 m4_fatal to report unrecognized %code qualifiers.
2048 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
2049 push parser requests.
2050 * data/glr.c: Use b4_complain instead of m4_fatal to report
2051 non-deterministic push parser requests.
2052 Update @output usage to @output(...@) form.
2053 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
2054 report missing %defines. Update @output usage to @output(...@) form.
2055 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
2056 @output(...@) form.
2057 * src/main.c (main): Invoke skel_scanner_free.
2058 * src/scan-skel.h (skel_scanner_free): Prototype new function.
2059 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
2060 obstack_for_string from flex-scanner.h.
2061 (YY_DECL): Use to declare skel_lex static.
2062 (decode_at_digraphs): Remove; now handled in the new
2063 SC_AT_DIRECTIVE_ARG start condition.
2064 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
2065 functions.
2066 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
2067 at_directive_argv): New static globals.
2068 (INITIAL): Use fail_for_invalid_at.
2069 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
2070 recognize the start of a generalized `@directive(...@)' form and
2071 start...
2072 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
2073 directive args (using the new obstack_for_string), to decode the
2074 contained @ diagraphs, and to perform the directive. It recognizes
2075 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
2076 @output(...@).
2077 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
2078 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
2079 `@,'.
2080 (scan_skel): Initialize obstack_for_string on the first call.
2081 (skel_scanner_free): New function to free obstack_for_string.
2082 * tests/input.at (Reject bad %code qualifiers): Update test output.
2083
2084 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
2085
2086 Consolidate the 4 prologue alternative directives (%code, %requires,
2087 %provides, and %code-top) into a single %code directive with an
2088 optional qualifier field. Discussed at
2089 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
2090 * NEWS (2.3a+): Rewrite the existing entry for the prologue
2091 alternatives.
2092 * doc/bison.texinfo (Prologue Alternatives): Update.
2093 (Decl Summary): Update to %code "requires" and %code "provides".
2094 (Calc++ Parser): Update to %code "requires".
2095 (Table of Symbols): Remove entries for %requires, %provides, and
2096 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
2097 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
2098 are replaced by b4_percent_code_provides and b4_percent_code_requires,
2099 which are skeleton-specific.
2100 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
2101 declare what %code qualifiers it supports and to complain if any other
2102 qualifiers were used in the grammar.
2103 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
2104 and b4_user_code([b4_percent_code_provides]) in place of
2105 b4_user_requires and b4_user_provides.
2106 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
2107 Add b4_user_code([b4_percent_code_top]) and
2108 b4_user_code([b4_percent_code]).
2109 Invoke b4_check_percent_code_qualifiers.
2110 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2111 PERCENT_REQUIRES): Remove.
2112 (grammar_declaration): Remove RHS's for %code-top, %provides, and
2113 %requires. Rewrite the %code RHS as the unqualified form defining the
2114 muscle b4_percent_code. Add another RHS for the qualified %code form,
2115 which defines muscles of the form b4_percent_code_QUALIFIER and the
2116 b4_used_percent_code_qualifiers muscle.
2117 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
2118 PERCENT_REQUIRES): Remove.
2119 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
2120 %code "requires" and %code "provides".
2121 * tests/input.at (Reject bad %code qualifiers): New.
2122
2123 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2124
2125 Use the new code_props interface for destructors and printers.
2126 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
2127 printer_location members, and change the type of the destructor and
2128 printer members to code_props.
2129 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
2130 symbol_printer_get, semantic_type_destructor_set,
2131 semantic_type_printer_set, default_tagged_destructor_set,
2132 default_tagless_destructor_set, default_tagged_printer_set,
2133 default_tagless_printer_set): Use code_props in arguments and return
2134 types in place of char const * and location.
2135 (symbol_destructor_location_get, symbol_printer_location_get): Remove
2136 since the locations are now contained in the return of
2137 symbol_destructor_get and symbol_printer_get.
2138 * src/output.c (symbol_destructors_output, symbol_printers_output):
2139 Replace with...
2140 (symbol_code_props_output): ... this to eliminate duplicate code.
2141 (output_skeleton): Update to use symbol_code_props_output.
2142 * src/reader.c (symbol_should_be_used): Update use of
2143 symbol_destructor_get.
2144 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
2145 Update uses of the various _destructor_set and _printer_set functions.
2146 * src/symtab.c: (default_tagged_destructor_location,
2147 default_tagless_destructor_location, default_tagged_printer_location,
2148 default_tagless_printer_location): Remove since we...
2149 (default_tagged_destructor, default_tagless_destructor,
2150 default_tagged_printer, default_tagless_printer): ... change the type
2151 of these to code_props.
2152 (symbol_new, semantic_type_new, symbol_destructor_set,
2153 semantic_type_destructor_set, symbol_destructor_get,
2154 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
2155 symbol_check_alias_consistency, default_tagged_destructor_set,
2156 default_tagless_destructor_set, default_tagged_printer_set,
2157 default_tagless_printer_set): Update.
2158 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
2159 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
2160 code_props members.
2161 (symbol_print): Use SYMBOL_CODE_PRINT.
2162
2163 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
2164
2165 Use the new code_props interface for rule actions.
2166 * src/symlist.h (symbol_list): Replace action, action_location, and
2167 used members with a code_props action_props member.
2168 * src/reader.c (symbol_should_be_used, grammar_rule_check,
2169 grammar_midrule_action, grammar_current_rule_merge_set,
2170 grammar_current_rule_symbol_append, packgram): Update.
2171 * src/scan-code.h (translate_rule_action): Remove, no longer used.
2172 * src/scan-code.l (handle_action_dollar): Update.
2173 (translate_rule_action): Remove, no longer used.
2174 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
2175
2176 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2177
2178 Use the new code_props interface in parse-gram.y.
2179 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
2180 Update all uses of translate_* functions to use the new code_props
2181 interface and to use gram_scanner_last_string_free and
2182 code_scanner_last_string_free where possible.
2183 (grammar_declaration): symbol_list_destructor_set and
2184 symbol_list_printer_set now perform the translation, so don't do it
2185 here. Use gram_scanner_last_string_free where possible.
2186 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
2187 translate_code): Remove, no longer used.
2188 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
2189 symbol_list_printer_set): Perform code translation here rather than
2190 depending on the caller to do so.
2191
2192 * src/symlist.h (struct symbol_list): Correct some documentation typos.
2193 * src/scan-gram.h (gram_last_string): Remove declaration.
2194 * src/scan-gram.l (last_string): Declare it static.
2195
2196 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
2197
2198 Encapsulate code properties and related functionality for the various
2199 destructors, printers, and actions into a code_props structure and
2200 interface. This patch merely implements code_props in scan-code.h and
2201 scan-code.l. Future patches will rewrite other modules to use it.
2202 Discussed starting at
2203 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
2204 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
2205 consistently initialize const structs that have an empty location
2206 field.
2207 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
2208 to ensure consistency.
2209 * src/scan-code.h (code_props): New structure.
2210 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
2211 function, macro, and const global variable for initializing a
2212 code_props with no code.
2213 (code_props_plain_init, code_props_symbol_action_init,
2214 code_props_rule_action_init, code_props_translate_code): The rest of
2215 the new code_props functional interface. Among other things, the init
2216 functions set the code_props kind field so that
2217 code_props_translate_code will know whether to behave like
2218 translate_symbol_action, translate_rule_action, or translate_code.
2219 These old translate functions must remain until all other modules are
2220 updated to use the new code_props interface.
2221 (code_scanner_last_string_free): New function similar to
2222 gram_scanner_last_string_free.
2223 (code_scanner_free): Add documentation.
2224 * src/scan-code.l: Implement the new interface.
2225 (code_lex): Make it static, add a code_props* argument, and remove the
2226 rule argument.
2227 (last_string): New static global similar to the one in scan-gram.l.
2228 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
2229 instead of rule.
2230 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
2231 code_props since Bison may one day use this information for destructors
2232 and printers.
2233 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
2234 (handle_action_dollar): Use symbol_list_n_get and set used flag
2235 directly since symbol_list_n_used_set is removed.
2236 (translate_action): Add a code_props* argument and remove the rule,
2237 action, and location arguments. Pass the code_props* on to code_lex.
2238 (translate_rule_action, translate_symbol_action, translate_code):
2239 Rewrite as wrappers around the new code_props interface.
2240 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
2241 it would eventually need to break the encapsulation of code_props.
2242
2243 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2244
2245 * etc/.cvsignore: New.
2246
2247 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
2248
2249 Add maintainer-push-check to run maintainer-check using push parsing in
2250 place of pull parsing where available.
2251 * Makefile.am (maintainer-push-check): New.
2252 * data/bison.m4 (b4_use_push_for_pull_if): New.
2253 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
2254 appropriately based on their existing values.
2255 (yypush_parse): Don't print push-parser-specific diagnostics if push
2256 parsing is being used in place of pull parsing.
2257 * data/yacc.c: If push parsing should replace pull parsing, redirect to
2258 push.c.
2259 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
2260 variable, and insert b4_use_push_for_pull_flag into muscles.
2261 * tests/Makefile.am (maintainer-push-check): New.
2262
2263 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2264
2265 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
2266 (whether successful or failed) so that yypush_parse can be invoked
2267 again to start a new parse using the same yypstate.
2268 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
2269 check multiple yypull_parse invocations on the same yypstate. For pull
2270 mode, extend to check multiple yyparse invocations.
2271 (Exploding the Stack Size with Alloca): Extend to try with
2272 %push-pull-parser.
2273 (Exploding the Stack Size with Malloc): Likewise.
2274
2275 * tests/calc.at (Simple LALR Calculator): Don't specify
2276 %skeleton "push.c" since %push-pull-parser implies that now.
2277 * tests/headers.at (export YYLTYPE): Don't check for the push
2278 declarations. Otherwise, this test case can't be used to see if push
2279 mode can truly emulate pull mode.
2280 * tests/input.at (Torturing the Scanner): Likewise.
2281 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
2282 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
2283 AT_YACC_IF, which now includes the case of push mode since %skeleton
2284 need not be used for push mode. This will be more intuitive once
2285 push.c is renamed to yacc.c.
2286
2287 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
2288
2289 For push mode, convert yyparse from a macro to a function, invoke yylex
2290 instead of passing a yylexp argument to yypull_parse, and don't
2291 generate yypull_parse or yyparse unless %push-pull-parser is declared.
2292 Discussed starting at
2293 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
2294 * data/bison.m4 (b4_pull_if): New.
2295 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
2296 * data/push.c: Improve M4 quoting a little.
2297 (b4_generate_macro_args, b4_parenthesize): Remove.
2298 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
2299 any time a pull parser is requested.
2300 Don't #define this as a wrapper around yypull_parse. Instead, when
2301 both push and pull are requested, make it a function that does that
2302 same thing.
2303 (yypull_parse): If there's a b4_prefix, #define this to
2304 b4_prefix[pull_parse] when both push and pull are requested.
2305 Don't define this as a function unless both push and pull are
2306 requested.
2307 Remove the yylexp argument and hard-code yylex invocation instead.
2308 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
2309 %push-parser.
2310 * src/getargs.c (pull_parser): New global initialized to true.
2311 * getargs.h (pull_parser): extern it.
2312 * src/output.c (prepare): Insert pull_flag muscle.
2313 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
2314 (prologue_declaration): Set both push_parser and pull_parser = true for
2315 %push-pull-parser. Set push_parser = true and pull_parser = false for
2316 %push-parser.
2317 * src/scan-gram.l: Don't accept %push_parser as an alternative to
2318 %push-parser since there's no backward-compatibility concern here.
2319 Scan %push-pull-parser.
2320 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
2321 instead of %push-parser.
2322 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
2323 prototype it in the module that calls yyparse.
2324 * tests/input.at (Torturing the Scanner): Likewise.
2325 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
2326
2327 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
2328
2329 Update etc/bench.pl. Optimize push mode a little (the yyn change
2330 deserves most of the credit).
2331 * Makefile.am (SUBDIRS): Add etc subdirectory.
2332 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
2333 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
2334 yytoken, yyval, and yyloc declarations to...
2335 (yyparse or yypush_parse): ... here to improve performance. For
2336 yypush_parse invocations after the first, be sure to assign yyn its old
2337 value again.
2338 (yypstate_new): Don't bother initializing the yyresult field since the
2339 initial value isn't used.
2340 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
2341 remove the #define that, in push mode, set it to yyps->NAME.
2342 * etc/Makefile.am: New.
2343 * etc/bench.pl: Remove and build it instead from...
2344 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
2345 "tests/bison" from the build directory by default rather than just
2346 invoking "bison" from $PATH.
2347 (calc_grammar): Update push parser code: don't declare yylval globally,
2348 don't define yyparse_wrapper, and don't #define yyparse.
2349 (bench_grammar): Update to check all working combinations of yacc.c,
2350 push.c, impure, pure, pull, and push.
2351
2352 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2353
2354 For push mode, add pull wrappers around yypush_parse.
2355 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
2356 (yypull_parse): New function wrapping yypush_parse.
2357 (yyparse): New #define wrapping yypull_parse.
2358 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
2359 is declared.
2360 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
2361 prototype yylex in the module that calls yyparse, and don't prototype
2362 yyparse there. Otherwise, the yyparse expansion won't compile.
2363 * tests/input.at (Torturing the Scanner): Likewise.
2364
2365 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
2366
2367 Enable push parsers to operate in impure mode. Thus, %push-parser no
2368 longer implies %pure-parser. The point of this change is to move
2369 towards being able to test the push parser code by running the entire
2370 test suite as if %push-parser had been declared.
2371 * data/push.c (yypush_parse): For impure mode, remove the
2372 yypushed_char, yypushed_val, and yypushed_loc arguments.
2373 Instead, declare these as local variables initialized to the global
2374 yychar, yylval, and yylloc.
2375 For the first yypush_parse invocation only, restore the initial values
2376 of these global variables when it's time to read a token since they
2377 have been overwritten.
2378 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
2379 %push-parser.
2380 * tests/calc.at (Simple LALR(1) Calculator): Always declare
2381 %pure-parser along with %push-parser since this test case was designed
2382 for pure push parsers.
2383 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
2384 (AT_YACC_OR_PUSH_IF): New.
2385 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
2386 add a note that it's still wrong for some cases (as it has been for a
2387 while).
2388 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
2389 %push-parser no longer implies %pure-parser.
2390
2391 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2392
2393 Remove some unnecessary differences between the pull parser code and
2394 the push parser code. This patch enables yynerrs in push mode.
2395 * data/push.c: Reformat M4 a little.
2396 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
2397 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
2398 because push mode is on. Instead, if pure mode is on, move yynerrs
2399 to...
2400 (b4_declare_parser_state_variables): ... here.
2401 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
2402 to yyps->NAME so it can be used in yypush_parse.
2403 (yypush_parse): Don't omit uses of yynerrs in push mode.
2404
2405 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2406
2407 Fix bug such that the first pushed token's value and location are
2408 sometimes overwritten (sometimes by %initial-action) before being used.
2409 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
2410 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
2411 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
2412 more closely mimic the pull parser logic.
2413 Don't copy the pushed token to yychar, yylval, and yylloc until it's
2414 time to read a token, which is after any initialization of yylval and
2415 yylloc.
2416 (gottoken): Rename label to...
2417 (yyread_pushed_token): ... for clarity and to avoid infringing on the
2418 user namespace.
2419
2420 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
2421
2422 Rearrange initialization of the parser state variables so that the
2423 skeleton doesn't have to have a copy for pull mode and another for push
2424 mode. This patch also fixes at least a bug such that yylloc was not
2425 initialized (with b4_location_initial_line and
2426 b4_location_initial_column) upon calling yypush_parse. However, that
2427 initialization now overwrites the first token's location;
2428 %initial-action assigning @$ already did the same thing, and both bugs
2429 will be fixed in a later patch.
2430 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
2431 (b4_declare_parser_state_variables): Remove initialization of yytoken,
2432 yyss, yyvs, yyls, and yystacksize.
2433 (yypstate_new): Remove initialization of some yypstate fields: yystate,
2434 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
2435 yylsp.
2436 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
2437 yyps->NAME so it can be used in yypush_parse.
2438 (yyparse or yypush_parse): For yypush_parse, don't print the
2439 "Starting parse" diagnostic for invocations after the first.
2440 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
2441 yypush_parse, only do it for the first invocation.
2442 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
2443 initialization to occur in yypush_parse but only on the first
2444 invocation.
2445
2446 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2447
2448 * data/push.c: Add CPP guards around push parser declarations in both
2449 the header and the code file.
2450 In the code file, move the push parser declarations to the same place
2451 they appear in the header file.
2452 Clean up the M4 some, especially the inconsistent underquoting in
2453 some b4_c_function_def and b4_c_function_decl uses.
2454
2455 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2456
2457 Encapsulate the push parser state variables into an M4 macro so the
2458 push skeleton doesn't have to list them again for pull mode's yyparse.
2459 For push mode, remove yypush_parse's local equivalents of these
2460 variables to eliminate unnecessary copying between the two sets at
2461 run-time. This patch also fixes at least a bug related to multiple
2462 %initial-action invocations in push mode.
2463 * data/push.c (b4_declare_parser_variables): Rename to...
2464 (b4_declare_scanner_communication_variables): ... this for clarity and
2465 update both uses.
2466 (b4_declare_yyparse_variables): Remove and move its contents to the one
2467 spot where it was invoked.
2468 (b4_declare_parser_state_variables): New macro containing the parser
2469 state variables required by push mode.
2470 (struct yypstate): Replace all fields but yynew with
2471 b4_declare_parser_state_variables.
2472 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
2473 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
2474 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
2475 (yyparse or yypush_parse): For yyparse in pull mode, replace local
2476 parser state variable declarations with
2477 b4_declare_parser_state_variables.
2478 Don't initialize parser state variables when calling yypush_parse since
2479 yypstate_new already does that.
2480 Invoke the user's initial action only upon the first yypush_parse
2481 invocation.
2482 Remove all code that copies between the local parser state variables
2483 and the yypstate.
2484
2485 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
2486
2487 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
2488 prevent a name collision in a future patch where these names will
2489 sometimes be #define'd.
2490 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
2491 since it no longer has the same name as the existing argument.
2492 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
2493
2494 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
2495 and Joel E. Denny <jdenny@ces.clemson.edu>
2496
2497 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2498 that the argument is case-insensitive, and there's no `=' here.
2499 For the %skeleton entry, mention that %language is better.
2500 (Bison Options): Likewise for --language and --skeleton. Move the
2501 --skeleton entry so that the `Tuning the parser' section is sorted
2502 alphabetically on long options.
2503 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
2504 %language directive in detail here; cross-reference the %language
2505 documentation instead.
2506 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
2507 `%require "2.3b"' so that the example is always up-to-date.
2508 (Table of Symbols): Add entries for %language and %skeleton.
2509 * examples/extexi (normalize): Instead of replacing every %require
2510 argument with the current Bison version, just substitute for
2511 `@value{VERSION}'. This guarantees that we're testing what actually
2512 appears in the documentation.
2513 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
2514 rather than `@VERSION@'.
2515
2516 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2517
2518 * NEWS: Reword the %language news a bit, and put it earlier.
2519
2520 * src/getargs.c (skeleton_arg): Last arg is now location const *.
2521 Rewrite to simplify the logic.
2522 (language_argmatch): Likewise.
2523 (program_name): We now own this var.
2524 * src/getargs.h (struct bison_language): Use char[] rather than
2525 const char *.
2526
2527 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
2528 Java is supported.
2529 * src/complain.c (program_name): Remove decl; no longer needed.
2530 * src/main.c (program_name): Remove; now belongs to getargs.
2531
2532 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
2533
2534 * NEWS: Document %language.
2535
2536 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
2537
2538 * data/c-skel.m4, data/c++-skel.m4: New files.
2539 * data/glr.c: Complain on push parsers.
2540
2541 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
2542 over %skeleton.
2543 (Decl Summary): Document %language and %skeleton.
2544 (Command line): Document -L.
2545
2546 * examples/extexi: Rewrite %require directive.
2547 * examples/calc++/Makefile.am: Pass VERSION to extexi.
2548
2549 * src/files.c (compute_exts_from_gc): Look in language structure
2550 for .y extension.
2551 (compute_file_name_parts): Check whether .tab should be added.
2552 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
2553 (language, skeleton_arg, language_argmatch): New.
2554 (long_options): Add --language.
2555 (getargs): Use skeleton_arg, add -L/--language.
2556 * src/getargs.h: Include location.h.
2557 (struct bison_language, language, skeleton_arg, language_argmatch): New.
2558 * src/output.c (prepare): Pick default skeleton from struct language.
2559 Don't dispatch C skeletons here.
2560 * src/parse-gram.y (PERCENT_LANGUAGE): New.
2561 (prologue_declaration): Add "%language" rule, use skeleton_arg.
2562 * src/scan-gram.l ("%language"): New rule.
2563
2564 * tests/calc.at: Test %skeleton and %language.
2565 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
2566 (AT_GLR_IF): Look for %skeleton "glr.cc".
2567 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
2568 (AT_YACC_IF): Reject %language.
2569
2570 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
2571
2572 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
2573 since it wasn't used; only the typedef name 'semantic_type' is needed.
2574 Also, omit trailing white space.
2575
2576 * bootstrap: Sync from coreutils.
2577 (gnulib_extra_files): Add build-aux/announce.gen.
2578 (slurp): Adjust .gitignore files like .cvsignore files.
2579 * build-aux/announce-gen: Remove from CVS, since bootstrap
2580 now creates this.
2581
2582 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
2583
2584 Make %push-parser imply %pure-parser. This fixes several bugs; see
2585 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
2586 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
2587 pure_parser = true.
2588 * data/push.c: Don't bother testing b4_push_if when deciding whether
2589 to expand b4_declare_parser_variables globally.
2590 (yypush_parse): Likewise in here.
2591
2592 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
2593 (yy_reduce_print): Reformat M4 for readability.
2594
2595 2006-12-15 Bob Rossi <bob@brasko.net>
2596 and Joel Denny <jdenny@ces.clemson.edu>
2597
2598 * data/push.c (yypstate): Add typedef, and update all uses of
2599 struct yypstate to just yypstate.
2600 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
2601
2602 2006-12-14 Bob Rossi <bob@brasko.net>
2603
2604 * data/push.c (yypush_parse): Declare prototype regardless of
2605 %locations option.
2606
2607 2006-12-14 Bob Rossi <bob@brasko.net>
2608
2609 * data/push.c (yyparse): Remove the prototype and the #define when in
2610 push-parser mode.
2611
2612 2006-12-13 Bob Rossi <bob@brasko.net>
2613
2614 * data/push.c (yypstate_init): Rename to...
2615 (yypstate_new): ... this and use b4_c_function_def.
2616 (yypstate_delete): New.
2617 (yypush_parse): Change parameters yynval and yynlloc to be const.
2618 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
2619 yypstate_delete functions.
2620
2621 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
2622
2623 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
2624 strange test case titles. Reported by Bob Rossi.
2625
2626 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
2627
2628 * TODO: Add pointer to Sylvain Schmitz's work on static detection
2629 of potential ambiguities in GLR grammers.
2630
2631 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
2632
2633 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
2634 `bison ', use m4_index instead of m4_substr since chopping up a string
2635 containing M4-special characters causes problems here.
2636
2637 Fix a couple of bugs related to special characters in user-specified
2638 file names, and make it easier for skeletons to compute output file
2639 names with the same file name prefix as Bison-computed output file
2640 names.
2641 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
2642 b4_parser_file_name and b4_spec_defines_file instead of
2643 @output_parser_name@ and @output_header_name@, which are now redundant.
2644 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
2645 b4_parser_file_name, b4_spec_defines_file, and the new
2646 @basename(FILENAME@) instead of @output_parser_name@ and
2647 @output_header_name@, which inappropriately escaped the file names as
2648 C string literals.
2649 * src/files.c (all_but_ext): Remove static qualifier.
2650 (compute_output_file_names): Move `free (all_but_ext)' to...
2651 (output_file_names_free): ... here since all_but_ext is needed later.
2652 * src/files.h (all_but_ext): Extern.
2653 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
2654 exactly what MUSCLE_INSERT_STRING used to do.
2655 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
2656 characters are escaped properly.
2657 * src/output.c (prepare): Define muscle file_name_all_but_ext as
2658 all_but_ext.
2659 For pkgdatadir muscle, maintain previous functionality by using
2660 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
2661 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
2662 digraphs would never be expanded. Hopefully no one has M4-special
2663 characters in his Bison installation path.
2664 * src/scan-skel.l: Don't parse @output_header_name@ and
2665 @output_parser_name@ anymore since they're now redundant.
2666 In @output, use decode_at_digraphs.
2667 Parse a new @basename command that invokes last_component.
2668 (decode_at_digraphs): New.
2669 (BASE_QPUTS): Remove unused.
2670 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
2671 (Output file name): New tests.
2672
2673 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
2674
2675 Warn about output files that are generated by the skeletons and that
2676 conflict with other output files.
2677 * data/glr.c: Don't generate the header file here when glr.cc does.
2678 * src/files.c (file_names, file_names_count): New static globals.
2679 (compute_output_file_names): Invoke output_file_name_check for files
2680 not generated by the skeletons and remove existing checks.
2681 (output_file_name_check): New function that warns about conflicting
2682 output file names.
2683 (output_file_names_free): Free file_names.
2684 * src/files.h (output_file_name_check): Declare.
2685 * src/scan-skel.l: Invoke output_file_name_check for files generated by
2686 the skeletons.
2687 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
2688 (Conflicting output files): New tests.
2689
2690 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2691
2692 * doc/bison.texinfo: Fix a couple of typos.
2693
2694 2006-12-08 Bob Rossi <bob@brasko.net>
2695
2696 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
2697 Rename to...
2698 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
2699 update all uses.
2700 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
2701 (yypush_parse): Rename yypvars argument to yyps and remove redundant
2702 local pv.
2703 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
2704 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
2705
2706 2006-12-07 Bob Rossi <bob@brasko.net>
2707 and Joel Denny <jdenny@ces.clemson.edu>
2708
2709 * data/push.c (yypvarsinit): Change return type from void* to struct
2710 yypvars*. No longer cast to void* on return.
2711 (struct yypvars): Remove yylen since it need not be remembered between
2712 yypushparse invocations.
2713 (yypushparse): Don't copy between yylen and pv->yylen.
2714
2715 2006-12-05 Bob Rossi <bob@brasko.net>
2716
2717 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
2718 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
2719 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
2720 (struct yypvars): Remove b4_declare_parser_variables.
2721 (yypvarsinit): Remove init code for removed variables.
2722 (global scope): Do not declare b4_declare_parser_variables if
2723 push or pure mode.
2724 (yypushparse): Add b4_declare_parser_variables.
2725 Init new local variables, and remove init code for removed
2726 yypvars variables.
2727 (yyparse): Delete.
2728 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
2729 and yyparse for other modes.
2730 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
2731 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
2732 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
2733 (AT_PURE_LEX_IF): True if pure or push parser.
2734
2735 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
2736
2737 Document Yacc prologue alternatives and default %destructor's and
2738 %printer's as experimental. Don't mention Java yet. Discussed at
2739 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
2740 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
2741 (2.3a): Annotate this entry to say the old forms of these features were
2742 also experimental.
2743 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
2744 Table of Symbols): Say they're experimental. Comment out any mention
2745 of Java (we'll want this back eventually).
2746
2747 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2748
2749 Support a file name argument to %defines. Deprecate `=' in
2750 %file-prefix, %name-prefix, and %output. Discussed at
2751 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
2752 * NEWS (2.3a+): Mention.
2753 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
2754 form of %defines, and remove `=' from entries for %file-prefix,
2755 %name-prefix, and %output.
2756 * src/parse-gram.y (prologue_declaration): Implement.
2757 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
2758 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
2759 all but one occurrence of %name-prefix.
2760 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
2761 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
2762 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
2763 occurrence of each of %file-prefix and %output. Add check for %defines
2764 with argument.
2765 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
2766 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
2767 Remove the `=' from %output.
2768
2769 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
2770
2771 Don't escape $ in test case titles since Autoconf 2.61 now does that
2772 correctly.
2773 * tests/actions.at (Default %printer and %destructor are not for error
2774 or $undefined): Here.
2775 (Default %printer and %destructor are not for $accept): Here.
2776 * tests/input.at (Invalid $n and @n): Here.
2777
2778 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
2779
2780 Rename <!> to <>. Discussed starting at
2781 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
2782 * NEWS (2.3a+): Update.
2783 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
2784 Update.
2785 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
2786 * src/scan-gram.l (INITIAL): Implement.
2787 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
2788 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
2789 comment.
2790 * tests/actions.at (Default tagless %printer and %destructor,
2791 Default tagged and per-type %printer and %destructor,
2792 Default %printer and %destructor are not for error or $undefined,
2793 Default %printer and %destructor are not for $accept,
2794 Default %printer and %destructor for mid-rule values): Update.
2795 * tests/input.at (Default %printer and %destructor redeclared,
2796 Unused values with default %destructor): Update.
2797
2798 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2799
2800 Don't let %prec take a nonterminal.
2801 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
2802 token.
2803 * tests/input.at (%prec takes a token): New test checking that %prec
2804 won't take a nonterminal.
2805
2806 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2807
2808 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
2809 it was double-quoted.
2810 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
2811 grammar is maintained with Bison's highest standards.
2812 * src/getargs.c: Fix some typos in Doxygen comments.
2813
2814 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
2815
2816 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
2817 later. Reported by Paul Eggert in
2818 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
2819 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
2820 * src/scan-code.l (translate_action): Don't bother invoking
2821 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
2822 (code_scanner_free): Instead of invoking
2823 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
2824 which frees more.
2825 * src/scan-gram.l (gram_scanner_free): Likewise.
2826 * src/scan-skel.l (scan_skel): Likewise.
2827
2828 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
2829
2830 * src/files.c (tr): Change return type to void.
2831 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
2832 has been called previously for the same key.
2833 (muscle_find): Return storage instead of value so that
2834 --enable-gcc-warnings doesn't produce warnings that the return discards
2835 const. aver that the value and storage are the same since storage
2836 could potentially be NULL when value is not.
2837 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
2838 same as 0.
2839
2840 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2841
2842 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
2843 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
2844 us a slightly cleaner distribution, and also works.
2845 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
2846 gnulib changes.
2847
2848 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
2849 and Paul Eggert <eggert@cs.ucla.edu>
2850
2851 Don't let Bison leak memory except when it complains.
2852 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
2853 (spec_defines_file, dir_prefix): Now char *, not const char *,
2854 since they are freed.
2855 * src/files.c: Likewise.
2856 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
2857 Likewise.
2858 (tr): Now operates in-place. All uses changed.
2859 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
2860 values.
2861 (compute_file_name_parts, compute_output_file_names): Don't store
2862 read-only data in variables that will be freed.
2863 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
2864 src_extension, and header_extension.
2865 (output_file_names_free): New public function to free
2866 spec_verbose_file, spec_graph_file, spec_defines_file,
2867 parser_file_name, and dir_prefix.
2868 * src/getargs.c (getargs): Don't store read-only data in variables that
2869 will be freed.
2870 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
2871 (which previously existed but was unused), and quotearg_free.
2872 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
2873 * src/muscle_tab.c: Likewise.
2874 (muscle_entry): Make the value char const *,
2875 and add a new storage member that is char * and can be freed.
2876 (muscle_entry_free): New private function.
2877 (muscle_init): Use it instead of free.
2878 (muscle_insert, muscle_grow): Update and use new storage member.
2879 (muscle_code_grow): Free the string passed to muscle_grow
2880 since it's not needed anymore.
2881 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
2882 add a new `char *code' member.
2883 ("{...}"): Declare semantic type as code.
2884 * src/scan-code.h (translate_rule_action):
2885 (translate_symbol_action, translate_code, translate_action): Return
2886 `char const *' rather than `char *' since external code should not free
2887 these strings.
2888 * src/scan-code.l: Likewise.
2889 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
2890 which is "{...}" in the parser.
2891 * tests/Makefile.am (maintainer-check-valgrind): Set
2892 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
2893 Valgrind.
2894 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
2895 complain.
2896 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
2897 expecting a non-zero exit status sets --leak-check=summary and
2898 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
2899 this case, and we don't want to hear about it.
2900
2901 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
2902
2903 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
2904 instead of from the template, to simplify configuration a bit.
2905 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
2906 and m4/wint_t.m4, as they are needed with the latest gnulib.
2907
2908 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2909
2910 Disable unset/unused mid-rule value warnings by default, and recognize
2911 --warnings=midrule-values to enable them. Discussed starting at
2912 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
2913 * NEWS (2.3a+): Mention.
2914 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
2915 warnings): Add entry for midrule-values subargument.
2916 * src/reader.c (symbol_should_be_used): Don't return true just because
2917 the value is a set/used mid-rule value unless
2918 --warnings=midrule-values was specified.
2919 * tests/input.at (Unused values, Unused values before symbol
2920 declarations): Run tests with and without --warnings=midrule-values.
2921
2922 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
2923 than LIST_FREE directly.
2924
2925 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2926
2927 Finish implementing --warnings=error, which should not be implied by
2928 --warnings=all (or by its synonyms -W and --warnings without
2929 subarguments).
2930 * src/complain.c (set_warning_issued): New function to report that
2931 warnings are being treated as errors and to record an error if so.
2932 Invoke...
2933 (warn_at, warn): ... here.
2934 * src/getargs.c (warnings_args, warnings_types): Reorder so that
2935 "error - warnings are errors" does not appear above "all - all of the
2936 above".
2937 (getargs): For -W and --warnings without subarguments, don't let
2938 FLAGS_ARGMATCH set warnings_error in warnings_flag.
2939 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
2940
2941 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
2942
2943 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
2944 empty subargument list. For example: `bison --warnings= parser.y'.
2945
2946 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2947
2948 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
2949 the parser header file so that gcc doesn't warn.
2950
2951 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2952
2953 Split the default %destructor/%printer into two kinds: <*> and <!>.
2954 Discussed starting at
2955 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
2956 * NEWS (2.3a+): Mention.
2957 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
2958 previous change today related to mid-rules.
2959 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
2960 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
2961 (TYPE_TAG_ANY): Add as <*>.
2962 (TYPE_TAG_NONE): Add as <!>.
2963 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
2964 for <*> and <!>.
2965 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
2966 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
2967 * src/symlist.c (symbol_list_default_new): Split into tagged and
2968 tagless versions.
2969 (symbol_list_destructor_set, symbol_list_printer_set): Split
2970 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
2971 SYMLIST_DEFAULT_TAGLESS.
2972 * src/symlist.h: Update symbol_list_default*_new prototypes.
2973 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
2974 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
2975 * src/symtab.c (default_destructor, default_destructor_location,
2976 default_printer, default_printer_location): Split each into tagged and
2977 tagless versions.
2978 (symbol_destructor_get, symbol_destructor_location_get,
2979 symbol_printer_get, symbol_printer_location_get): Implement tagged
2980 default and tagless default cases.
2981 (default_destructor_set, default_printer_set): Split each into tagged
2982 and tagless versions.
2983 * src/symtab.h: Update prototypes.
2984 * tests/actions.at (Default %printer and %destructor): Rename to...
2985 (Default tagless %printer and %destructor): ... this, and extend.
2986 (Per-type %printer and %destructor): Rename to...
2987 (Default tagged and per-type %printer and %destructor): ... this, and
2988 extend.
2989 (Default %printer and %destructor for user-defined end token): Extend.
2990 (Default %printer and %destructor are not for error or $undefined):
2991 Update.
2992 (Default %printer and %destructor are not for $accept): Update.
2993 (Default %printer and %destructor for mid-rule values): Extend.
2994 * tests/input.at (Default %printer and %destructor redeclared): Extend.
2995 (Unused values with default %destructor): Extend.
2996
2997 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
2998
2999 Don't apply the default %destructor/%printer to an unreferenced midrule
3000 value. Mentioned at
3001 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
3002 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
3003 like $@n instead of just @n so that the default %destructor/%printer
3004 logic doesn't see them as user-defined symbols.
3005 (symbol_is_dummy): Check for both forms of the name.
3006 * src/reader.c (packgram): Remove the `$' from each midrule symbol
3007 name for which the midrule value is referenced in any action.
3008 * tests/actions.at (Default %printer and %destructor for mid-rule
3009 values): New test.
3010 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
3011 for change to dummy symbol names.
3012
3013 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3014
3015 Warn about unset midrule $$ if the corresponding $n is used.
3016 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
3017 $n usage.
3018 (packgram): Before invoking grammar_rule_check on any rule, make sure
3019 all actions have already been scanned in order to set `used' flags.
3020 Otherwise, checking that a midrule's $$ is set will not always work
3021 properly because the midrule check must forward-reference the midrule's
3022 parent rule.
3023 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
3024 warning.
3025
3026 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
3027
3028 More improvements to the documentation of the prologue alternatives:
3029 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
3030 Bison manual.
3031 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
3032 some text to clarify the relative importance of the new directives and
3033 to show how these directives may be viewed as code labels.
3034
3035 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
3036
3037 Similar to the recently removed %before-header, add %code-top as the
3038 alternative to the pre-prologue. Mentioned at
3039 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
3040 Also, let the prologue alternatives appear in the grammar section.
3041 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
3042 (prologue_declaration): Move the existing prologue alternatives to...
3043 (grammar_declaration): ... here and add %code-top.
3044 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
3045
3046 Clean up and extend documentation for the prologue alternatives.
3047 * NEWS (2.3a+): Describe prologue alternatives.
3048 * doc/bison.texinfo (Prologue): Move discussion of prologue
3049 alternatives to...
3050 (Prologue Alternatives): ... this new section, and extend it to discuss
3051 all 4 directives in detail.
3052 (Table of Symbols): Clean up discussion of prologue alternatives and
3053 add %code-top.
3054
3055 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3056
3057 DJGPP specific issues.
3058
3059 * djgpp/config.bat: config.hin has been moved to lib. Adjust
3060 config.bat accordingly.
3061 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
3062 * djgpp/config.site: Likewise.
3063
3064 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
3065
3066 Replace %*-header with %provides, %requires, %code. See discussion at
3067 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
3068
3069 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
3070 (b4_user_start_header): Remove.
3071 * data/glr.c: Use new macros instead of b4_*start_header
3072 and b4_*end_header.
3073 * data/glr.cc: Likewise.
3074 * data/lalr1.cc: Likewise.
3075 * data/push.c: Likewise.
3076 * data/yacc.c: Likewise.
3077
3078 * doc/bison.texinfo: Remove %before-header, rename
3079 %{start,end,after}-header to %requires, %provides, %code.
3080
3081 * src/parse-gram.y: Likewise (also rename token names accordingly).
3082 * src/scan-gram.l: Likewise.
3083 * tests/actions.at: Likewise.
3084
3085 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
3086
3087 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
3088 Problem reported by Joel E. Denny.
3089
3090 2006-10-14 Jim Meyering <jim@meyering.net>
3091
3092 (Sync from coreutils.)
3093 Work also when the working directory (with e.g. coreutils sources)
3094 is version controlled with git, rather than CVS.
3095 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
3096 rather than CVS.
3097 In messages and comments, say e.g., "checked-out sources",
3098 rather than "CVS sources".
3099 (version_controlled_file): New function. Work for git as well as
3100 for CVS. Don't use grep's -q option.
3101 (slurp): Call it here, in place of CVS-specific code.
3102
3103 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
3104
3105 Fix testsuite for ./configure --enable-gcc-warnings:
3106 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
3107 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
3108 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
3109 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
3110 * test/regression.at (Diagnostic that expects two alternatives):
3111 Likewise.
3112
3113 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3114
3115 * bootstrap.conf (gnulib_modules): Add config-h.
3116 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
3117 worry about HAVE_CONFIG_H.
3118 * lib/abitset.c: Likewise.
3119 * lib/bitset.c: Likewise.
3120 * lib/bitset_stats.c: Likewise.
3121 * lib/bitsetv-print.c: Likewise.
3122 * lib/bitsetv.c: Likewise.
3123 * lib/ebitset.c: Likewise.
3124 * lib/get-errno.c: Likewise.
3125 * lib/lbitset.c: Likewise.
3126 * lib/subpipe.c: Likewise.
3127 * lib/timevar.c: Likewise.
3128 * lib/vbitset.c: Likewise.
3129 * lib/bitset.c: Include "bitset.h" first, to test interface.
3130 * lib/bitset_stats.c: Include "bitset_stats.h" first.
3131 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
3132 * lib/bitsetv.c: Include "bitsetv.h" first.
3133 * lib/get-errno.c: Include "get-errno.h" first.
3134 * m4/.cvsignore: Add config-h.m4.
3135 * tests/actions.at (Default %printer and %destructor for ...):
3136 Adjust expected line numbers in output to reflect removal of #if
3137 HAVE_CONFIG_H lines.
3138 * tests/glr-regression.at (Missed %merge type warnings when ...):
3139 Likewise.
3140 * tests/regression.at (Braced code in declaration in rules section):
3141 Likewise.
3142 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
3143 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
3144 Include <config.h> unconditionally.
3145
3146 * bootstrap: Sync from coreutils, as follows:
3147
3148 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3149
3150 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
3151 variable was sometimes used without being initialized. This
3152 messed up the installation of the INSTALL file in some cases.
3153
3154 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3155
3156 * bootstrap (usage, main program, symlink_to_gnulib): Add option
3157 --copy. Inspired by a suggestion from Bruno Haible.
3158
3159 2006-10-03 Jim Meyering <jim@meyering.net>
3160
3161 * bootstrap: Undo last change to this file, since now gnulib-tool
3162 sticks with the automake default in generating dependencies.
3163
3164 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
3165
3166 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
3167 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
3168
3169 * doc/bison.1: Add copyright notice.
3170
3171 * data/glr.c: Don't include <stdarg.h>; not used.
3172
3173 * NEWS: The -g and --graph options now output graphs in Graphviz
3174 DOT format, not VCG format.
3175 * doc/bison.1: Likewise.
3176 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
3177 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
3178 of this change in
3179 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
3180 * TODO: Remove Graphviz entry.
3181 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
3182 remove vcg.c, vcg.h, vcg_defaults.h.
3183 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
3184 * src/graphviz.c, src/graphviz.h: New files.
3185 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
3186 * src/files.h: Make comment more generic.
3187 * src/main.c (main): Likewise.
3188 * src/print_graph.h: Likewise.
3189 * src/getargs.c (usage): Make usage description more generic.
3190 * src/print_graph.c: Include graphviz.h rather than vcg.h.
3191 (static_graph, fgraph): Remove. All uses changed to pass
3192 arguments instead of sharing a static var.
3193 (print_core, print_actions, print_state, print_graph):
3194 Output graphviz format rather than VCG format.
3195 * tests/.cvsignore: Remove *.vcg; add *.dot.
3196 * tests/output.at: Expect *.dot files, not *.vcg files.
3197
3198 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
3199 accommodates the 2006-10-08 change.
3200
3201 2006-10-11 Bob Rossi <bob@brasko.net>
3202
3203 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
3204 (b4_yyssa, b4_yyerror_range): New macros.
3205 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
3206 (yypvarsinit): Remove init of removed fields.
3207 (yypushparse): Remove use of removed fields; use new macros instead.
3208
3209 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
3210
3211 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
3212 in a push parser. Reindent slightly to match yacc.c better.
3213
3214 2006-10-11 Bob Rossi <bob@brasko.net>
3215
3216 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
3217 yymsg_alloc fields.
3218 (yypvarsinit, yypushparse): Remove init of removed fields.
3219 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
3220
3221 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
3222
3223 * THANKS: Add Paolo Bonzini and Bob Rossi.
3224
3225 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
3226
3227 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
3228 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
3229 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
3230 b4_define_user_cde and uses): Remove.
3231 (b4_comment, b4_prefix, b4_sync_start): New.
3232 * data/bison.m4: New file, with most of the content removed from c.m4.
3233 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
3234 * src/output.c (output_skeleton): Pass bison.m4.
3235 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
3236 only if specified.
3237
3238 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
3239
3240 Fix test failure reported by Tom Lane in
3241 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
3242 and try to make such failures easier to catch in the future.
3243 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
3244 that's now the caller's responsibility.
3245 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
3246 Set yychar = YYEOF if it's negative.
3247 * tests/actions.at (yylex): Abort if asked to read past EOF.
3248 * tests/conflicts.at (yylex): Likewise.
3249 * tests/cxx-type.at (yylex): Likewise.
3250 * tests/glr-regression.at (yylex): Likewise.
3251 * tests/input.at (yylex): Likewise.
3252 * tests/regression.at (yylex): Likewise.
3253 * tests/torture.at (yylex): Likewise.
3254
3255 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
3256
3257 Fix problems with translating English-language diagnostics.
3258 * bootstrap: Fix bug introduced in recent bootstrap changes, with
3259 respect to bison-runtime pot generation. The YY_ stuff
3260 wasn't being captured.
3261 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
3262 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
3263 * runtime-po/POTFILES.in: Add data/push.c.
3264
3265 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
3266
3267 Merge bootstrap changes from coreutils.
3268
3269 2006-09-28 Jim Meyering <jim@meyering.net>
3270
3271 Automatically generated dependencies are important even
3272 when all of the sources in a directory come from gnulib.
3273 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
3274 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
3275
3276 2006-09-23 Jim Meyering <jim@meyering.net>
3277
3278 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
3279
3280 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3281
3282 * bootstrap: Add support for --force.
3283 (usage): New function. Describe usage less tersely.
3284 (CVS_only_file): New var.
3285
3286 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
3287
3288 * data/push.c (YYPUSH_MORE): Make it an enum instead.
3289 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
3290 Adjust white space and comments to match GNU style better.
3291
3292 2006-09-20 Bob Rossi <bob@brasko.net>
3293
3294 * data/push.c (yyresult_get): Remove function.
3295 (YYPUSH_MORE): Add #define.
3296 (yypushparse): Modify return value.
3297
3298 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3299
3300 * stamp-h.in: Remove; no longer needed.
3301 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
3302 Remove config.h, config.hin, intl (no longer created).
3303 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
3304 stamp-h1.
3305
3306 Sync bootstrap from coreutils, as follows:
3307
3308 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
3309
3310 * bootstrap (symlink_to_gnulib): New function.
3311 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
3312 to copies-of-gnulib.
3313 (cp_mark_as_generated, slurp, gnulib_files):
3314 Avoid making a copy if it's the same as the old version.
3315 (gnulib_files): Add support for this variable (used by Bison).
3316
3317 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
3318
3319 * src/getargs.c (usage): Rework to use conventions similar to
3320 coreutils, to make translation a bit easier and the code a bit
3321 smaller. Problem reported by Tim Van Holder.
3322
3323 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
3324
3325 Use some of gnulib's new modules, taken from coreutils.
3326
3327 * bootstrap: Sync from coreutils, except add support for gnulib_files.
3328 * bootstrap.conf: New file.
3329 (gnulib_modules): Add configmake, inttypes, unistd.
3330 (XGETTEXT_OPTIONS): Add complain, complain_at,
3331 fatal, fatal_at, warn, warn_at, unexpected_end.
3332 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
3333 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
3334 (gl_EARLY): Add.
3335 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
3336 (gl_INIT): Add
3337 (GNULIB_AUTOCONF_SNIPPET): Remove.
3338 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
3339 the pickiest.
3340 * lib/.cvsignore: Add inttypes_.h.
3341 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
3342 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
3343 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
3344 no-longer-necessary initializations.
3345 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
3346 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
3347 use the unistd module.
3348 * src/system.h: Likewise.
3349 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
3350 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
3351 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
3352 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
3353 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
3354 * src/system.h: Include inttypes.h unconditionally, now that we
3355 use the inttypes module. Don't bother to include stdint.h, since
3356 inttypes.h now does that for us.
3357 (LOCALEDIR): Remove, now that we use the configmake module.
3358 * src/getargs.c: Include configmake.h.
3359 * src/main.c: Likewise.
3360 * src/output.c: Likewise.
3361 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
3362 not from $abs_top_builddir, since config.h moved.
3363
3364
3365 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
3366 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
3367
3368 * src/parse-gram.y (symbol_declaration): Don't put statements
3369 before declarations; it's not portable to C89.
3370 * src/scan-code.l (handle_action_at): Likewise.
3371
3372 * src/scan-code.l: Always initialize braces_level; the old code
3373 left it uninitialized and therefore had undefined behavior.
3374
3375 Don't attempt to redefine 'assert', since it runs afoul of
3376 systems where standard headers (mistakenly) include <assert.h>.
3377 Instead, define and use our own alternative, called 'aver'.
3378 * src/reader.c: Don't include assert.h, since we no longer
3379 use assert.
3380 * src/scan-code.l: Likewise.
3381 * src/system.h (assert): Remove, replacing with....
3382 (aver): New function, taking a bool arg. All uses changed.
3383 * src/tables.c (pack_vector): Ensure that aver arg is bool,
3384 not merely an integer.
3385
3386 2006-09-15 Bob Rossi <bob@brasko.net>
3387
3388 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
3389 * data/c.m4 (YYPUSH): New.
3390 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
3391 * src/getargs.c (push_parser): New var.
3392 * src/getargs.h (push_parser): New declaration.
3393 * src/output.c (prepare): Add macro insertion of `push_flag'.
3394 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
3395 (prologue_declaration): Parse %push-parser.
3396 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
3397 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
3398 list of removed lines from the traces observed.
3399 (AT_CHECK_CALC_LALR): Added push parser tests.
3400
3401 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
3402
3403 * NEWS: Version 2.3a.
3404 * configure.ac (AC_INIT): Likewise.
3405
3406 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
3407 "#define YYSTYPE int" that caused "make maintainer-check" to fail
3408 due to header ordering dependencies. I don't know why the #define
3409 was there.
3410
3411 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
3412 runtime cost when YYDEBUG is not defined, and so that some tests
3413 that used to fail now work. Problem and initial suggestion by
3414 Paolo Bonzini.
3415 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
3416 * data/glr.cc (b4_parser_class_name):
3417 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
3418 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
3419 (yydebug_) [YYDEBUG]: New member.
3420 (yycdebug_): Now defined only if YYDEBUG.
3421 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
3422 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
3423 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
3424 if YYYDEBUG.
3425 (debug_stream, set_debug_stream, debug_level, set_debug_level):
3426 Define only if YYDEBUG.
3427 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
3428 set_debug_level.
3429 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
3430 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
3431 AT_CHECK_CALC_GLR_CC that are working now.
3432
3433 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
3434
3435 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
3436 We don't need them in glr.cc, and glr.c defines them.
3437 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
3438 assumes that defining it to anything is the same as defining
3439 it to 1. Problem reported by Paolo Bonzini.
3440
3441 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
3442
3443 * data/c.m4 (b4_null, b4_case): Define.
3444 * src/output.c (prepare_symbols): Use b4_null.
3445 (user_actions_output): Use b4_case.
3446
3447 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
3448
3449 * data/glr.c (b4_shared_declarations): Put start-header first,
3450 before any #includes that we generate, so that feature-test
3451 macros work. Problem reported by Michael Deutschmann in
3452 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
3453 * data/lalr1.cc: Likewise.
3454 * doc/bison.texinfo (Prologue): Document that feature-test macros
3455 should be defined before any Bison declarations.
3456 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
3457 that depend on location.hh after, not before, Bison decls, since
3458 we now include location.hh after the first user prologue.
3459
3460 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
3461 Sander Brandenburg in
3462 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
3463 Also, fix minor white space and comment issues.
3464 (Prologue): Mention that it's better to define feature-test macros
3465 before Bison declarations. Problem reported by Michael Deutschmann.
3466
3467 * README-cvs: Fix typo: "&" should be "&&". Problem reported
3468 by Jim Meyering.
3469 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
3470 This adjusts to recent gnulib changes.
3471
3472 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3473
3474 Finish implementation of per-type %destructor/%printer. Discussed
3475 starting at
3476 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
3477 and
3478 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
3479 * NEWS (2.3+): Add a description of this feature to the default
3480 %destructor/%printer description.
3481 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
3482 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
3483 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
3484 list node contains a semantic type.
3485 * src/symtab.c, src/symtab.h: Extend with a table that associates
3486 semantic types with their %destructor's and %printer's.
3487 (semantic_type_from_uniqstr, semantic_type_get,
3488 semantic_type_destructor_set, semantic_type_printer_set): New functions
3489 composing the public interface of that table.
3490 (symbol_destructor_get, symbol_destructor_location_get,
3491 symbol_printer_get, symbol_printer_location_get): If there's no
3492 per-symbol %destructor/%printer, look up the per-type before trying
3493 the default.
3494 * tests/actions.at (Per-type %printer and %destructor): New test case.
3495 * tests/input.at (Default %printer and %destructor redeclared):
3496 Extend to check that multiple occurrences of %symbol-default in a
3497 single %destructor/%printer declaration is an error.
3498 (Per-type %printer and %destructor redeclared, Unused values with
3499 per-type %destructor): New test cases.
3500
3501 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
3502
3503 Require default %destructor/%printer to be declared using
3504 %symbol-default instead of an empty symbol list, and start working on
3505 new per-type %destructor/%printer. Discussed at
3506 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
3507 * NEWS (2.3+): Add %symbol-default to example.
3508 * bison.texinfo (Freeing Discarded Symbols): Likewise.
3509 (Table of Symbols): Add entry for %symbol-default.
3510 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
3511 (generic_symlist, generic_symlist_item): New nonterminals for creating
3512 a list in which each item is a symbol, semantic type, or
3513 %symbol-default.
3514 (grammar_declaration): Use generic_symlist in %destructor and %printer
3515 declarations instead of symbols.1 or an empty list.
3516 (symbol_declaration, precedence_declaration, symbols.1): Update actions
3517 for changes to symbol_list.
3518 * src/reader.c: Update for changes to symbol_list.
3519 * src/scan-code.l: Likewise.
3520 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
3521 * src/symlist.c, src/symlist.h: Extend such that a list node may
3522 represent a semantic type or a %symbol-default in addition to just an
3523 ordinary symbol. Add switched functions for setting %destructor's and
3524 %printer's.
3525 * tests/actions.at, tests/input.at: Add %symbol-default to all default
3526 %destructor/%printer declarations.
3527
3528 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
3529
3530 Whether the default %destructor/%printer applies to a particular symbol
3531 isn't a question of whether the user *declares* that symbol (in %token,
3532 for example). It's a question of whether the user by any means
3533 *defines* the symbol at all (by simply using a char token, for
3534 example). $end is defined by Bison whereas any other token with token
3535 number 0 is defined by the user. The error token is always defined by
3536 Bison regardless of whether the user declares it with %token, but we
3537 may one day let the user define error as a nonterminal instead.
3538 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
3539 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
3540 the meaning of "user-defined".
3541 * tests/actions.at (Default %printer and %destructor for user-declared
3542 end token): Rename to...
3543 (Default %printer and %destructor for user-defined end token): ...
3544 this.
3545
3546 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
3547 computation of whether to apply the default, don't maintain a list of
3548 every Bison-defined symbol. Instead, just check for a first character
3549 of '$', which a user symbol cannot have, and check for the error token.
3550
3551 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
3552
3553 Don't apply the default %destructor or %printer to the error token,
3554 $undefined, or $accept. This change fits the general rule that the
3555 default %destructor and %printer are only for user-declared symbols,
3556 and it solves several difficulties that are described in the new test
3557 cases listed below.
3558 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
3559 * tests/actions.at (Default %printer and %destructor are not for error
3560 or $undefined, Default %printer and %destructor are not for $accept):
3561 New test cases.
3562
3563 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
3564
3565 Allow %start after the first rule.
3566 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
3567 when parsing the first rule.
3568 (check_and_convert_grammar): Search for it here after all grammar
3569 declarations have been parsed. Skip midrules, which have dummy LHS
3570 nonterminals.
3571 * src/symtab.c (symbol_is_dummy): New function.
3572 * src/symtab.h (symbol_is_dummy): Declare it.
3573 * tests/input.at (%start after first rule): New test.
3574
3575 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3576
3577 Redo some of the previous commit: add back the ability to use
3578 non-aliased/undeclared string literals since it might be useful to
3579 those declaring %token-table.
3580 * src/reader.c (check_and_convert_grammar): Undo changes in previous
3581 commit: don't worry about complaints from symbols_pack.
3582 * src/symtab.c (symbol_new, symbol_class_set,
3583 symbol_check_alias_consistency): Undo changes in previous commit: count
3584 each string literal as a new symbol and token, assign it a symbol
3585 number, and don't complain about non-aliased string literals.
3586 (symbols_pack): Since symbol_make_alias still does not decrement symbol
3587 and token counts but does still set aliased tokens to the same number,
3588 symbol_pack_processor now leaves empty slots in the symbols array.
3589 Remove those slots.
3590 * tests/regression.at (Undeclared string literal): Remove test case
3591 added in previous commit since non-aliased string literals are allowed
3592 again.
3593 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
3594 remove unnecessary string literal declarations.
3595 * tests/sets.at (Firsts): Likewise.
3596
3597 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
3598
3599 Don't allow an undeclared string literal, but allow a string literal to
3600 be used before its declaration.
3601 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
3602 symbols_pack complained.
3603 * src/symtab.c (symbol_new): Don't count a string literal as a new
3604 symbol.
3605 (symbol_class_set): Don't count a string literal as a new token, and
3606 don't assign it a symbol number since symbol_make_alias does that.
3607 (symbol_make_alias): It's not necessary to decrement the symbol and
3608 token counts anymore. Don't assume that an alias declaration occurs
3609 before any uses of the identifier or string, and thus don't assert that
3610 one of them has the highest symbol number so far.
3611 (symbol_check_alias_consistency): Complain if there's a string literal
3612 that wasn't declared as an alias.
3613 (symbols_pack): Bail if symbol_check_alias_consistency failed since
3614 symbol_pack asserts that every token has been assigned a symbol number
3615 although undeclared string literals have not.
3616 * tests/regression.at (String alias declared after use, Undeclared
3617 string literal): New test cases.
3618 (Characters Escapes, Web2c Actions): Declare string literals as
3619 aliases.
3620 * tests/sets.at (Firsts): Likewise.
3621
3622 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
3623
3624 In the grammar scanner, STRING_FINISH unclosed constructs and return
3625 them to the parser in order to improve error messages.
3626 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
3627 SC_BRACED_CODE, SC_PROLOGUE): Implement.
3628 * tests/input.at (Unclosed constructs): New test case.
3629 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
3630 seen.
3631
3632 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
3633 unused global.
3634
3635 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
3636
3637 Handle string aliases for character tokens correctly.
3638 * src/symtab.c (symbol_user_token_number_set): If the token has an
3639 alias, check and set its alias's user token number instead of its own,
3640 which is set to indicate the alias. Previously, every occurrence of
3641 the character token in the grammar overwrote that alias indicator with
3642 the character code.
3643 * tests/input.at (String aliases for character tokens): New test.
3644
3645 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
3646
3647 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
3648
3649 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
3650
3651 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
3652 to prevent failures when building on older platforms.
3653 Check for autopoint failure.
3654 Set XGETTEXT_OPTIONS to values that check for C format strings,
3655 so that translators are warned about them (this also helps
3656 prevent core dumps).
3657
3658 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
3659 function, since it simplifies our code a bit.
3660
3661 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
3662 rather than -W, so we don't get bogus warnings about sign comparisons.
3663 Add -Wpointer-arith, since that warning is useful (it reports code
3664 that does not conform to C89 and that some compilers reject).
3665 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
3666 since it's no longer needed.
3667
3668 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
3669
3670 Clean up scanners a bit.
3671 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
3672 definitions so gcc won't warn when obstack_for_string is unused.
3673 * src/scan-code.l: config.h and system.h are already #include'd by
3674 scan-code-c.c, so get rid of them here.
3675 * src/scan-gram.l: Likewise.
3676 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
3677 definitions rather than duplicating the rest of it.
3678 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
3679
3680 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
3681
3682 Suppress signed/unsigned comparison warnings for yycheck.
3683 * data/c.m4 (b4_safest_int_type): New macro.
3684 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
3685 a signed int type, cast it to b4_safest_int_type first.
3686 * data/yacc.c: Likewise.
3687 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
3688 also overwritten.
3689
3690 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
3691
3692 * doc/bison.texinfo: Fix some typos.
3693
3694 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
3695
3696 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
3697 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
3698
3699 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
3700 the latest gnulib does this a different way.
3701 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
3702 translation was patched, so stop omitting it.
3703
3704 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3705
3706 Enable declaration of default %printer/%destructor. Make the parser
3707 use these for all user-declared grammar symbols for which the user does
3708 not declare a specific %printer/%destructor. Thus, the parser uses it
3709 for token 0 if the user declares it but not if Bison generates it as
3710 $end. Discussed starting at
3711 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
3712 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
3713 and
3714 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
3715 * NEWS (2.3+): Mention.
3716 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
3717 declare a %destructor for a mid-rule's semantic value. It's just
3718 impossible to declare one specific to it.
3719 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
3720 code. Describe default %destructor form.
3721 * src/parse-gram.y (grammar_declaration): Parse default
3722 %printer/%destructor declarations.
3723 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
3724 and symbol_destructor_location_get rather than accessing the destructor
3725 and destructor_location members of struct symbol.
3726 (symbol_printers_output): Likewise but for %printer's.
3727 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
3728 again.
3729 * src/symtab.c (default_destructor, default_destructor_location,
3730 default_printer, default_printer_location): New static global
3731 variables to record the default %destructor and %printer.
3732 (symbol_destructor_get, symbol_destructor_location_get,
3733 symbol_printer_get, symbol_printer_location_get): New functions to
3734 compute the appropriate %destructor and %printer for a symbol.
3735 (default_destructor_set, default_printer_set): New functions to set the
3736 default %destructor and %printer.
3737 * src/symtab.h: Prototype all those new functions.
3738 * tests/actions.at (Default %printer and %destructor): New test to
3739 check that the right %printer and %destructor are called, that they're
3740 not called for $end, and that $$ and @$ work correctly.
3741 (Default %printer and %destructor for user-declared end token): New
3742 test to check that the default %printer and %destructor are called for
3743 a user-declared end token.
3744 * tests/input.at (Default %printer and %destructor redeclared, Unused
3745 values with default %destructor): New tests to check related grammar
3746 warnings and errors.
3747
3748 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
3749
3750 Clean up handling of %destructor for the end token (token 0).
3751 Discussed starting at
3752 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
3753 and
3754 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
3755
3756 Make the skeletons consistent in how they pop the end token and invoke
3757 its %destructor.
3758 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
3759 state, which has token number 0, since this would invoke the
3760 %destructor for the end token.
3761 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
3762 until after shifting the end token, or else it won't be popped.
3763 * data/yacc.c (yyparse): Likewise.
3764
3765 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
3766 it's the end token. Upon termination, destroy an unshifted lookahead
3767 even when it's the end token.
3768 * data/lalr1.cc (yy::parser::parse): Likewise.
3769 * data/yacc.c (yyparse): Likewise.
3770
3771 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
3772 value warnings for the end token when the user gives the end token a
3773 %destructor.
3774
3775 * tests/actions.at (Printers and Destructors): Test all the above.
3776
3777 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
3778
3779 Update to latest gnulib and gettext versions.
3780 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
3781 Add fopen-safer.
3782 (gnulib_files): Add m4/warning.m4. Don't worry about files
3783 overwritten by autopoint.
3784 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
3785 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
3786 rejects them.
3787 Don't use autoreconf; instead, invoke autopoint etc. by hand,
3788 so that we can remove the intl files at a better time.
3789 (intl_files_to_remove): Remove aclocal.m4, since it gets
3790 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
3791 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
3792 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
3793 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
3794 Remove datarootdir hack; no longer needed.
3795 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
3796 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
3797 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
3798 strdup.h.
3799 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
3800 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
3801
3802 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
3803
3804 * bootstrap: Adjust to today's change to gnulib-tool by invoking
3805 it with --assume-autoconf='latest-stable'.
3806
3807 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
3808
3809 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
3810 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
3811 YYSTYPE' and `{'.
3812 * src/muscle_tab.h (muscle_grow): Replace the header comments with
3813 those from muscle_tab.c since the old ones are misleading.
3814
3815 2006-07-13 Akim Demaille <akim@epita.fr>
3816
3817 Support %define "KEY" {VALUE}.
3818 * src/scan-code.h, src/scan-code.l (translate_action)
3819 (translate_rule_action, translate_symbol_action, translate_code):
3820 Return char *, not const char *.
3821 * src/parse-gram.y (declaration): Rename as...
3822 (prologue_declaration): this.
3823 (string_content): Remove this nonterminal, use STRING.
3824 (braceless, content, content.opt): New nonterminal.
3825 Use them.
3826 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
3827 as value.
3828 * src/scan-gram.l (getargs.h): Don't include it.
3829
3830 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
3831
3832 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
3833 rather than a for-loop that declares a local bool variable. This
3834 should work around a compatibility problem with a Cray x1e C++
3835 compiler reported by Hung Nguyen in
3836 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
3837 The for-loop was introduced in the 2004-11-17 change but I don't
3838 know why it was needed.
3839
3840 2006-07-12 Akim Demaille <akim@epita.fr>
3841
3842 * data/c.m4: Comment changes.
3843
3844 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
3845
3846 * src/complain.c (error_message, ERROR_MESSAGE): New.
3847 To factor...
3848 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
3849 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
3850
3851 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3852
3853 * NEWS: Instead of %union, you can define and use your own union type
3854 YYSTYPE if your grammar contains at least one <type> tag.
3855 Your YYSTYPE need not be a macro; it can be a typedef.
3856 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
3857 (Union Decl, Decl Summary): Document this.
3858 * data/glr.c (YYSTYPE): Implement this.
3859 * data/glr.cc (YYSTYPE): Likewise.
3860 * data/lalr1.cc (YYSTYPE): Likewise.
3861 * data/yacc.c (YYSTYPE): Likewise.
3862 * src/output.c (prepare): Output tag_seen_flag.
3863 * src/parse-gram.y (declaration, grammar_declaration):
3864 Use 'union_seen' rather than 'typed' to determine whether
3865 %union has been seen, since grammars can now be typed without
3866 %union.
3867 (symbol_declaration, type.opt, symbol_def):
3868 Keep track of whether a tag has been seen.
3869 * src/reader.c (union_seen, tag_seen): New vars.
3870 (typed): remove.
3871 * src/reader.h (union_seen, tag_seen, typed): Likewise.
3872 * src/scan-code.l (untyped_var_seen): New variable.
3873 (handle_action_dollar): Adjust to above changes.
3874 (handle_action_dollar, handle_action_at):
3875 Improve overflow checking for outlandish numbers.
3876 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
3877 avoid new diagnostics generated by above changes.
3878 * tests/regression.at (YYSTYPE typedef): Add test to check
3879 for type tags without %union.
3880
3881 * src/symlist.c (symbol_list_length): Return int, not unsigned
3882 int, since callers expect int. This may need to get revisited
3883 once we have proper integer overflow checking.
3884
3885 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
3886 object is now static.
3887
3888 * src/getargs.c (flags_argmatch): Return void, not int,
3889 to pacify ./configure --enable-gcc-warnings.
3890
3891 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
3892 since last_string is already defined to FLEX_PREFIX (last_string).
3893
3894 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3895
3896 Implement --warnings/-W.
3897 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
3898 replaced by...
3899 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
3900 Adjust callers.
3901 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
3902 (warnings_args, warnings_types): New.
3903 (getargs, short_options, long_options): Accept -W/--warnings.
3904 Sort the options by alphabetical order, upper case letter right
3905 before its lower case.
3906
3907 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3908
3909 Change %merge result type clash warnings to errors. Discussed at
3910 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
3911 * src/reader.c (record_merge_function_type): Use complain_at.
3912 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
3913 declared later): Update test case results.
3914
3915 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
3916
3917 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
3918 to be in alphabetical order.
3919 (trace_args): Spelling fixes.
3920
3921 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
3922
3923 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
3924 so they don't collide with user-defined macros.
3925 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
3926 this was never guaranteed, and now that we're using gnulib stdint,
3927 which defines int_fast16_t to long int, the problem is exposed.
3928
3929 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
3930
3931 * data/c.m4 (b4_basename): Simplify a bit, since we don't
3932 need the full POSIX semantics (and weren't implementing them
3933 anyway).
3934
3935 Adjust to Autoconf 2.60 and today's gnulib.
3936 * bootstrap (gnulib_modules): Add stdint.
3937 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
3938 no longer copies it.
3939 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
3940 since stdint needs the former and wcwidth (which is now required
3941 by mbswidth) needs the latter.
3942 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
3943 work around a compatibility glitch between gettext 0.14.6 and
3944 Autoconf 2.60.
3945 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
3946 Do not check for uintptr_t, since new stdint module does the right
3947 thing.
3948 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
3949 Add stdint.h, stdint_.h, wcwidth.h.
3950 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
3951 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
3952 stdint.m4, wchar_t.m4, wcwidth.m4.
3953 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
3954 usual order for ../lib/*.h files.
3955 (file_name_split): Use last_component, not base_name, to adjust
3956 to gnulib changes.
3957 * src/parse-gram.h: Include <strverscmp.h> in the usual order
3958 for ../lib/*.h files.
3959 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
3960 Define unconditionally, since we now assume the stdint module.
3961 * src/scan-skel.l: Include <dirname.h>.
3962 (BASE_QPUTS): Use last_component, not base_name.
3963 * src/system.h: Include <unlocked-io.h> in the usual order
3964 for ../lib/*.h files. Include <stdint.h> unconditionally,
3965 since we now use the stdint module.
3966 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
3967 HAVE_UINTPTR_T, since we now use the stdint module.
3968 (base_name): Remove decl, since files now include <dirname.h>
3969 to get the decl.
3970
3971 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3972
3973 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
3974 New, default to 1.
3975 * data/yacc.c, data/glr.c, data/location.cc: Use them.
3976 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
3977 default.
3978 * tests/calc.at: Adjust.
3979
3980 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
3981
3982 * data/c.m4 (b4_basename): New.
3983 (b4_syncline): Also output the location of its invocation (from
3984 the skeleton).
3985 (b4_user_action, b4_define_user_action, b4_user_actions)
3986 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
3987 (b4_user_stype): New.
3988 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
3989
3990 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
3991
3992 In the grammar file, the first column is 1 not 0 on the first line as
3993 on every other line.
3994 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
3995 * tests/input.at (Torturing the Scanner): Update output.
3996
3997 * src/scan-gram.l (scanner_cursor): Declare it static.
3998
3999 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
4000
4001 In warnings, say "previous declaration" rather than "first
4002 declaration".
4003 * src/symtab.c (redeclaration): Do that here.
4004 * src/reader.c (record_merge_function_type): In the case of a result
4005 type clash, report the previous declaration rather than the very first
4006 one in the grammar file.
4007 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4008 declared later): Add a third declaration to check this behavior.
4009 * tests/input.at (Incompatible Aliases): Update output.
4010
4011 2006-06-27 Akim Demaille <akim@epita.fr>
4012
4013 * doc/Doxyfile.in: New.
4014 * doc/Makefile.am: Use it.
4015 * src/lalr.h, src/symtab.h: Initial doxygenation.
4016
4017 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4018
4019 Don't miss %merge result type warnings just because the LHS types are
4020 declared after the %merge. This continues the effort of the previous
4021 patch.
4022 * src/reader.c (get_merge_function): Don't set the merger type yet.
4023 (record_merge_function_type): New function for setting the merger type
4024 and checking for clashes.
4025 (grammar_current_rule_merge_set): Set the location of the %merge for
4026 the current rule.
4027 (packgram): Invoke record_merge_function_type for each rule now that
4028 all symbol type declarations have been parsed.
4029 * src/reader.h (merger_list.type_declaration_location): New member
4030 storing the location of the first %merge from which the type for this
4031 merging function was derived.
4032 * src/symlist.h (symbol_list.merger_declaration_location): New member
4033 storing the location of a rule's %merge, if any.
4034 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
4035 declared later): New test to catch the error fixed by the above patch.
4036
4037 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4038
4039 Get action warnings (grammar_rule_check) right even when symbol
4040 declarations appear after the rules. Discussed at
4041 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
4042 and
4043 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
4044 Don't mistake the type of $$ in a midrule to be that of its parent
4045 rule's $$.
4046 * src/reader.c (grammar_current_rule_end): Don't invoke
4047 grammar_rule_check yet since not all symbol declarations may have been
4048 parsed yet.
4049 (grammar_midrule_action): Likewise.
4050 Don't record whether the midrule's $$ has been used yet since actions
4051 haven't been translated yet.
4052 Record the midrule's parent rule and its RHS index within the parent
4053 rule.
4054 (grammar_current_rule_action_append): Don't translate the action yet
4055 since not all symbol declarations may have been parsed yet and, thus,
4056 warnings about types for $$, $n, @$, and @n can't be reported yet.
4057 (packgram): Translate the action and invoke grammar_rule_check now that
4058 all symbol declarations have been parsed.
4059 * src/scan-code.l (handle_action_dollar): Now that this is invoked
4060 after parsing the entire grammar file, the symbol list here in the case
4061 of a midrule is actually the midrule's empty RHS, so reference its
4062 parent rule's RHS where necessary.
4063 On the other hand, now that you can already know it's a midrule, you
4064 aren't forced to think $$ has the same type as its parent rule's $$.
4065 (handle_action_at): In the case of a midrule, reference the parent rule
4066 where necessary.
4067 * src/symlist.c (symbol_list_new): Initialize new midrule-related
4068 members.
4069 (symbol_list_length): Now that this is invoked after all rules have
4070 been parsed, a NULL symbol (rather than a NULL symbol list node)
4071 terminates a rule. symbol_list_print already does this correctly.
4072 * src/symlist.h (symbol_list.midrule_parent_rule,
4073 symbol_list.midrule_parent_rhs_index): New members so that midrules can
4074 remember their relationships with their parents.
4075 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
4076 fixed by the above patch.
4077 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
4078 implementing...
4079 (Unused values): ... this old test case and...
4080 (Unused values before symbol declarations): ... this new test case.
4081 This one is the same as `Unused values' except that all symbol
4082 declarations appear after the rules in order to catch the rest of the
4083 errors fixed by the above patch.
4084
4085 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
4086
4087 More cleanup.
4088 * src/reader.c (current_rule): Declare it static since it's no longer
4089 used outside this file.
4090 (grammar_current_rule_action_append): Remove redundant arguments from
4091 translate_rule_action invocation.
4092 * src/reader.h (current_rule): Remove this unused extern.
4093 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
4094 * src/scan-code.l (translate_rule_action): Likewise.
4095
4096 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
4097
4098 Clean up yesterday's patch.
4099 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
4100 to...
4101 * src/reader.c (grammar_current_rule_action_append): ... here for
4102 consistency with grammar_current_rule_symbol_append.
4103 * tests/regression.at (Braced code in declaration in rules section):
4104 Make yyerror and yylex static as usual.
4105
4106 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
4107
4108 Fix bug that mistakes braced code in a declaration in the rules section
4109 to be a rule action. Mentioned at
4110 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
4111 * src/scan-gram.l: Move midrule action detection from the start of the
4112 scanning of any braced code to...
4113 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
4114 action. For readability, use $2 and @2 rather than the equivalent
4115 global variables.
4116 * tests/regression.at (Braced code in declaration in rules section):
4117 New test to catch the error fixed by the above patch.
4118
4119 Work on code readability some.
4120 * src/scan-code.l (current_rule): Get rid of this misleading and
4121 redundant declaration: it's actually extern'ed in reader.h.
4122 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
4123 translate_action): Add a rule argument and use it instead of the global
4124 current_rule.
4125 (translate_rule_action): This already receives current_rule through an
4126 argument, so pass it on to translate_action instead of assigning
4127 current_rule to current_rule.
4128 (translate_symbol_action, translate_code): Pass rule = NULL to
4129 translate_action.
4130
4131 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
4132
4133 Rename %before-definitions to %start-header and %after-definitions to
4134 %end-header. Don't use these declarations to separate pre-prologue
4135 blocks from post-prologue blocks. Add new order-independent
4136 declarations %before-header and %after-header as alternatives to the
4137 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
4138 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
4139 * NEWS (2.3+): Update for these changes.
4140 * data/glr.c (b4_before_definitions): Update to...
4141 (b4_start_header): ... this.
4142 (b4_after_definitions): Update to...
4143 (b4_end_header): ... this.
4144 * data/glr.cc: Likewise.
4145 * data/lalr1.cc: Likewise.
4146 * data/yacc.c: Likewise.
4147 * doc/bison.texinfo (The prologue): Update names, and replace remaining
4148 prologue blocks with %*-header declarations.
4149 (Calc++ Parser): Likewise.
4150 (Decl Summary): Update names.
4151 (Table of Symbols): Update description.
4152 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
4153 (PERCENT_END_HEADER): ... this.
4154 (PERCENT_BEFORE_DEFINITIONS): Update to...
4155 (PERCENT_START_HEADER): ... this.
4156 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4157 (declaration): Update token names and m4 macro names.
4158 When parsing %end-header and %start-header, invoke translate_code
4159 before muscle_code_grow, and no longer set global booleans to remember
4160 whether these declarations have been seen.
4161 Parse new %after-header and %before-header.
4162 * src/reader.c (before_definitions, after_definitions): Remove.
4163 (prologue_augment): Accept a new bool argument to specify whether to
4164 augment the pre-prologue or post-prologue.
4165 * src/reader.h (before_definitions, after_definitions): Remove these
4166 extern's.
4167 (prologue_augment): Add new bool argument.
4168 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
4169 (PERCENT_END_HEADER): ... this.
4170 (PERCENT_BEFORE_DEFINITIONS): Update to...
4171 (PERCENT_START_HEADER): ... this.
4172 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
4173 * tests/actions.at (Printers and Destructors): Update names.
4174
4175 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
4176
4177 Add comparison operators for C++ location classes. Discussed at
4178 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
4179 * data/c++.m4 (b4_define_location_comparison): New boolean %define
4180 declaration indicating whether filename_type has an operator==. If
4181 filename_type is `std::string', it defaults to `1', `0' otherwise.
4182 * data/location.cc: Iff b4_define_location_comparison is `1', add
4183 operator== and operator!= for class position and for class location.
4184
4185 Some minor fixes.
4186 * src/scan-action.l: Remove unused file.
4187 * src/symtab.c (symbol_printer_set): Use printer_location not
4188 destructor_location.
4189 * src/symtab.h (struct symbol): Replace incorrect source comment for
4190 printer members.
4191 * tests/input.at (Incompatible Aliases): Update output with correct
4192 printer location.
4193
4194 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
4195
4196 Don't put the pre-prologue in the header file. For the yacc.c code
4197 file and the glr.c header and code files, move the pre-prologue before
4198 the token definitions. Add new %before-definitions and
4199 %after-definitions to declare code that will go in both the header file
4200 and code file. Discussed at
4201 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
4202 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
4203 and
4204 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
4205 * NEWS (2.3+): Describe these changes.
4206 * data/glr.c (b4_pre_prologue): Move from within to before...
4207 (b4_shared_declarations): ... this.
4208 Add new b4_before_definitions before b4_token_enums.
4209 Add new b4_after_definitions at the end.
4210 * data/glr.cc (b4_pre_prologue): Replace with...
4211 (b4_before_definitions): ... this in the header file.
4212 (b4_after_definitions): New near the end of the header file.
4213 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
4214 code file right before including the header file.
4215 (b4_before_definitions): New in the previous position of
4216 b4_pre_prologue in the header file.
4217 (b4_after_definitions): New near the end of the header file.
4218 * data/yacc.c: Clean up some m4 quoting especially in the header file.
4219 (b4_token_enums_defines): In the code file, move to right before
4220 YYSTYPE for consistency with the header file.
4221 (b4_before_definitions): New right before b4_token_enums_defines in
4222 both the header and code file.
4223 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
4224 header and code file.
4225 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
4226 of prologues for %union dependencies.
4227 (Decl Summary): In %defines description, mention the effect of
4228 %before-definitions and %after-definitions on the header file.
4229 (Calc++ Parser): Forward declare driver in a %before-definitions rather
4230 than in the pre-prologue so that make check succeeds.
4231 (Table of Symbols): Add entries for %before-definitions and
4232 %after-definitions.
4233 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
4234 %before-definitions.
4235 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
4236 (declaration): Parse those declarations and append to
4237 b4_before_definitions and b4_after_definitions, respectively.
4238 * src/reader.c (before_definitions, after_definitions): New bools to
4239 track whether those declarations have been seen.
4240 (prologue_augment): Add to the post-prologue if %union,
4241 %before-definitions, or %after-definitions has been seen.
4242 * src/reader.h (before_definitions, after_definitions): New extern's.
4243 * src/scan-gram.l: Scan the new declarations.
4244 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
4245 prologue block in a %before-definitions or a %after-definitions based
4246 on whether the %union is declared.
4247 * tests/regression.at (Early token definitions with --yacc, Early token
4248 definitions without --yacc): Move tests for token definitions into the
4249 post-prologue since token names are no longer defined in the
4250 pre-prologue.
4251
4252 2006-06-20 Akim Demaille <akim@epita.fr>
4253
4254 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
4255 (symbol_get): Use it.
4256 * src/parse-gram.y: Use it.
4257
4258 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
4259
4260 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
4261 build succeeds when configured with --enable-gcc-warnings.
4262
4263 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
4264
4265 * src/parse-gram.y (char_name): New function.
4266 (CHAR, STRING, string_content): For %printer, properly escape.
4267 (ID): Prefer fputs to fprintf.
4268 (id): Reindent to be consistent with other rules.
4269 Properly quote char.
4270
4271 The Translation Project changed its way of publishing translations
4272 to maintainers. I haven't received any responses to my request
4273 for supporting the old way, or for documenting the new way. I
4274 have modified 'bootstrap' to use screen scraping
4275 (in this case, HTML scraping). This is unreliable and inelegant,
4276 but I don't see any better way. Yuck.
4277 * bootstrap (TP_URL, WGET_COMMAND): New vars.
4278 (get_translations): New function, which uses HTML scraping to
4279 deduce locations of latest translations.
4280 Use this function to grab both bison and bison-runtime .po files.
4281 Don't bother priming the pump for the runtime-po domain any more,
4282 as it's now translated better than bison is.
4283
4284 2006-06-19 Akim Demaille <akim@epita.fr>
4285
4286 * src/scan-gram.l: No longer "parse" things after `%union' until
4287 `{'. Rather, return a single "%union" token.
4288 No longer make symbols: return strings, and leave the conversion
4289 to symbols to the parser.
4290 (SC_PRE_CODE, token_type): Remove.
4291 * src/parse-gram.y (%union): New field `character'.
4292 Sort tokens.
4293 (CHAR): New token.
4294 (ID, ID_COLON): Now that the scanner no longer makes them
4295 identifiers, adjust all uses to invoke symbol_get.
4296 (id_colon): New, wraps the conversion from string to symbol.
4297 (%union): Accept a possible union_name.
4298 (symbol): Now can be a char.
4299 * data/c.m4 (b4_union_name): Leave a default value.
4300 * data/glr.c, data/yacc.c: Use it.
4301
4302 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
4303
4304 For associating token numbers with token names for "yacc.c", don't use
4305 #define statements unless `--yacc' is specified; always use enum
4306 yytokentype. Most important discussions start at:
4307 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
4308 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
4309 and
4310 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
4311 * NEWS (2.3+): Mention.
4312 * data/c.m4 (b4_yacc_if): New.
4313 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
4314 token #define's.
4315 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
4316 on token name definitions.
4317 * src/getargs.c (usage): Capitalize `Yacc' in English.
4318 * src/output.c (prepare): Define b4_yacc_flag.
4319 * tests/regression.at (Early token definitions): Test that tokens names
4320 are defined before the pre-prologue not just before the post-prologue.
4321 Remove this test case and copy to...
4322 (Early token definitions with --yacc): ... this to test #define's.
4323 (Early token definitions without --yacc): ... and this to test enums.
4324
4325 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
4326
4327 * NEWS: Reword the post-2.3 change to not be so optimistic about
4328 removing the old "look-ahead" spelling.
4329 Update previous look-ahead/lookahead change reports.
4330 * REFERENCES: look-ahead -> lookahead (since that's
4331 what he actually wrote).
4332 * doc/refcard.tex: look ahead -> lookahead,
4333 look-ahead -> lookahead
4334
4335 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
4336
4337 For consistency, use `lookahead' instead of `look-ahead' or
4338 `look_ahead'. Discussed starting at
4339 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
4340 and then at
4341 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
4342 * NEWS: For the next release, note the change to `--report'.
4343 * TODO, doc/bison.1: Update English.
4344 * doc/bison.texinfo: Update English.
4345 (Understanding Your Parser, Bison Options): Document as
4346 `--report=lookahead' rather than `--report=look-ahead'.
4347 * src/conflicts.c: Update English in comments.
4348 (lookahead_set): Rename from look_ahead_set.
4349 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
4350 (resolve_sr_conflict): Rename local look_ahead_tokens to
4351 lookahead_tokens, and update other uses.
4352 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
4353 count_rr_conflicts, conflicts_free): Update uses.
4354 * src/getargs.c (report_args): Move "lookahead" before alternate
4355 spellings.
4356 (report_types): Update uses.
4357 (usage): For `--report' usage description, state `lookahead' spelling
4358 rather than `look-ahead'.
4359 * src/getargs.h (report.report_lookahead_tokens): Rename from
4360 report_look_ahead_tokens.
4361 * src/lalr.c: Update English in comments.
4362 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
4363 (state_lookahead_tokens_count): Rename from
4364 state_look_ahead_tokens_count.
4365 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4366 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
4367 Rename local n_look_ahead_tokens to n_lookahead_tokens.
4368 Update other uses.
4369 Update English in output.
4370 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
4371 * src/print.c: Update English in comments.
4372 (lookahead_set): Rename from look_ahead_set.
4373 (print_reduction): Rename argument lookahead_token from
4374 look_ahead_token.
4375 (print_core, state_default_rule, print_reductions, print_results):
4376 Update uses.
4377 * src/print_graph.c: Update English in comments.
4378 (print_core): Update uses.
4379 * src/state.c: Update English in comments.
4380 (reductions_new): Update uses.
4381 (state_rule_lookahead_tokens_print): Rename from
4382 state_rule_look_ahead_tokens_print, and update other uses.
4383 * src/state.h: Update English in comments.
4384 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
4385 (state_rule_lookahead_tokens_print): Rename from
4386 state_rule_look_ahead_tokens_print.
4387 * src/tables.c: Update English in comments.
4388 (conflict_row, action_row): Update uses.
4389 * tests/glr-regression.at
4390 (Incorrect lookahead during deterministic GLR,
4391 Incorrect lookahead during nondeterministic GLR): Rename
4392 print_look_ahead to print_lookahead.
4393 * tests/torture.at: Update English in comments.
4394 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
4395 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
4396 (Many lookahead tokens): Update uses.
4397 * data/glr.c: Update English in comments.
4398 * lalr1.cc: Likewise.
4399 * yacc.c: Likewise.
4400 * src/conflicts.h: Likewise.
4401 * src/lalr.h: Likewise.
4402 * src/main.c: Likewise.
4403 * src/output.c: Likewise.
4404 * src/parse-gram.c: Likewise.
4405 * src/tables.h: Likewise.
4406 * tests/calc.at: Likewise.
4407
4408 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
4409
4410 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
4411
4412 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
4413
4414 * TODO: Add request from Nelson H. F. Beebe to be able to install
4415 Bison without installing the yacc script.
4416
4417 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4418
4419 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
4420 and yytext if they're already #define'd.
4421 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
4422 * src/scan-code-c.c: ... here.
4423 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
4424 <config.h>.
4425
4426 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
4427
4428 Get Bison to build again when configured with --enable-gcc-warnings.
4429 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
4430 missing #include's.
4431 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
4432 loc argument as it shadows a global.
4433 * src/scan-gram.l: Remove stray comma that prevents boundary_set
4434 invocation.
4435
4436 * src/.cvsignore: Add scan-code.c.
4437
4438 2006-06-07 Akim Demaille <akim@epita.fr>
4439
4440 * src/scan-gram.l: Move the "add a trailing ; to actions" code
4441 to...
4442 * src/scan-code.l: here.
4443 * tests/input.at (Torturing the Scanner): Fix another location
4444 error.
4445
4446 2006-06-07 Akim Demaille <akim@epita.fr>
4447
4448 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
4449
4450 2006-06-06 Akim Demaille <akim@epita.fr>
4451
4452 Extract the parsing of user actions from the grammar scanner.
4453 As a consequence, the relation between the grammar scanner and
4454 parser is much simpler. We can also split "composite tokens" back
4455 into simple tokens.
4456 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
4457 * src/scan-gram.l (add_column_width, adjust_location): Move to and
4458 rename as...
4459 * src/location.h, src/location.c (add_column_width)
4460 (location_compute): these.
4461 Fix the column count: the initial column is 0.
4462 (location_print): Be robust to ending column being 0.
4463 * src/location.h (boundary_set): New.
4464 * src/main.c: Adjust to scanner_free being renamed as
4465 gram_scanner_free.
4466 * src/output.c: Include scan-code.h.
4467 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
4468 Use boundary_set.
4469 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
4470 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
4471 which is now, again, a separate token.
4472 Adjust all dependencies.
4473 Whereever actions with $ and @ are used, use translate_code.
4474 (action): Remove this nonterminal which is now useless.
4475 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
4476 (grammar_current_rule_action_append): Use translate_code.
4477 (packgram): Bound check ruleno, itemno, and rule_length.
4478 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
4479 (last_string, last_braced_code_loc, max_left_semantic_context)
4480 (scanner_initialize, scanner_free, scanner_last_string_free)
4481 (gram_out, gram_lineno, YY_DECL_): Move to...
4482 * src/scan-gram.h: this new file.
4483 (YY_DECL): Rename as...
4484 (GRAM_DECL): this.
4485 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
4486 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
4487 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
4488 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
4489 Move these declarations, and...
4490 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
4491 these to...
4492 * src/flex-scanner.h: this new file.
4493 * src/scan-gram.l (rule_length, rule_length_overflow)
4494 (increment_rule_length): Remove.
4495 (last_braced_code_loc): Rename as...
4496 (gram_last_braced_code_loc): this.
4497 Adjust to the changes of the parser.
4498 Move all the handling of $ and @ into...
4499 * src/scan-code.l: here.
4500 * src/scan-gram.l (handle_dollar, handle_at): Remove.
4501 (handle_action_dollar, handle_action_at): Move to...
4502 * src/scan-code.l: here.
4503 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
4504 scan-code.h, scan-code-c.c, scan-gram.h.
4505 (EXTRA_bison_SOURCES): Add scan-code.l.
4506 (BUILT_SOURCES): Add scan-code.c.
4507 (yacc): Be robust to white spaces.
4508
4509 * tests/conflicts.at, tests/input.at, tests/reduce.at,
4510 * tests/regression.at: Adjust the column numbers.
4511 * tests/regression.at: Adjust the error message.
4512
4513 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4514
4515 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4516 Use Akim's wording from
4517 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
4518
4519 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
4520
4521 Between Bison releases, manually append `+' to the previous Bison
4522 release number, and use that as a signal to automatically print the
4523 ChangeLog's CVS Id keyword from --version. Discussed starting at
4524 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
4525 * ChangeLog: Add Id header.
4526 * configure.ac (AC_INIT): Append `+' to `2.3'.
4527 * src/.cvsignore: Add revision.c.
4528 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
4529 (BUILT_SOURCES): Add revision.c.
4530 (revision.c): New target rule. This file defines a new global variable
4531 named revision. It initializes it with either the Id from ChangeLog
4532 or, if VERSION doesn't contain `+', with the empty string.
4533 * src/getargs.c (version): Print the value of revision.
4534 * src/revision.h: Extern revision.
4535
4536 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
4537
4538 * NEWS: Version 2.3.
4539 * configure.ac (AC_INIT): Likewise.
4540
4541 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
4542
4543 * data/glr.c (YYRECOVERING): Define to be a function-like macro
4544 with no arguments, not as an object-like macro. This is for
4545 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
4546 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
4547 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
4548 Document this.
4549
4550 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
4551
4552 * src/getargs.c (usage): Back out yesterday's modification of the
4553 --help output so that we don't have to wait for translation before
4554 releasing 2.3.
4555
4556 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
4557
4558 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
4559 Problem reported by Akim Demaille.
4560
4561 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
4562
4563 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
4564
4565 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
4566
4567 * data/yacc.c (yy_reduce_print): Omit trailing white space in
4568 generated source code. Problem reported by Frans Englich in
4569 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
4570
4571 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
4572
4573 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
4574 shell, not within 'make', so that 'make' by an ordinary builder
4575 (using GNU make) does not worry about configuring gzip. This also
4576 works around a bug reported independently by Keith Thompson and by
4577 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
4578 stderr rather than stdout, messing up the build logs.
4579
4580 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4581
4582 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
4583 to make sure that YYID will never be unused. This fixes a 'make
4584 maintainer-check' failure caused by the recent changes to the 'Trivial
4585 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
4586 not used.
4587 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
4588
4589 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
4590
4591 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
4592 state before an empty RHS is always resolved here. Only the location
4593 of that state is guaranteed to be resolved, and that's enough. This
4594 fixes the remaining bug reported by Derek M. Jones in
4595 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4596 * tests/glr-regression.at (Uninitialized location when reporting
4597 ambiguity): Test the above case.
4598 Also, the embedded comments in this test case claim it checks the case
4599 of an empty RHS that has inherited the initial location. However, the
4600 corresponding LHS was already resolved, so yyresolveLocations didn't
4601 actually have reason to modify it. Fix this by forcing
4602 nondeterministic operation at the beginning of the parse.
4603
4604 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
4605
4606 * data/c.m4 (b4_yy_symbol_print_generate):
4607 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
4608 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
4609 of the bugs reported today by Derek M Jones in
4610 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
4611 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
4612 defined to be a type name without parens or brackets.
4613 (Location Type): Similarly for YYLTYPE.
4614 * tests/regression.at (Trivial grammars): Put in a test for this
4615 bug that will be caught by 'make maintainer-check' (though not,
4616 alas, by 'make check' unless your compiler is picky).
4617
4618 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
4619
4620 * NEWS: Version 2.2.
4621 * configure.ac (AC_INIT): Likewise.
4622
4623 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
4624
4625 * data/glr.c (yyreportTree): Make room in yystates for the state
4626 preceding the RHS. This fixes the segmentation fault reported by Derek
4627 M. Jones in
4628 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
4629 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
4630 to the user. Reported for yyreportTree by Derek M. Jones later in the
4631 same thread.
4632 * THANKS: Add Derek M. Jones.
4633 Update my email address.
4634 Fix typo in Steve Murphy's name.
4635
4636 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
4637
4638 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
4639 checking against YYLAST that caused the parser to miss a potential
4640 alternative in its diagnostic.
4641 Problem reported by Maria Jose Moron Fernandez in
4642 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
4643 * data/lalr1.cc (yysyntax_error_): Likewise.
4644 * data/yacc.c (yysyntax_error): Likewise.
4645 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
4646 tokens, in case we run into an older C compiler.
4647 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
4648 Use them to check for the off-by-one error fixed above.
4649
4650 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
4651 YYSIZE_T, not size_t.
4652 * tests/regression.at (Trivial grammars): New test, to catch
4653 the error fixed by the above patch.
4654
4655 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4656
4657 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
4658 scheme.
4659 Reported by Steve Murphy.
4660
4661 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4662
4663 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
4664 * data/glr.cc: b4_location_flag is now b4_locations_flag.
4665
4666 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4667
4668 Implement --trace=m4.
4669 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
4670 * src/output.c (output_skeleton): When set, pass -dV to m4.
4671
4672 Factor the handling of flags in m4.
4673 * src/output.c (prepare): Rename the muscle names debug, defines,
4674 error_verbose to debug_flag, defines_flag, error_verbose_flag.
4675 * data/c.m4: Adjust.
4676 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
4677 Use b4_define_flag_if to define other b4_FLAG_if macros.
4678 (b4_location_if): As a consequence, rename as...
4679 (b4_locations_if): this, for consistency.
4680 Adjust all the skeletons.
4681
4682 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4683
4684 * etc/bench.pm: Shorten bench names.
4685
4686 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
4687
4688 * src/output.h, src/output.c (error_verbose): Move to...
4689 * src/getargs.h, src/getargs.c: here.
4690 Sort the flags.
4691 Adjust dependencies.
4692
4693 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
4694
4695 * data/c.m4 (b4_copyright): Put the special exception for Bison
4696 skeletons here, so we don't have to put it in each skeleton. All
4697 uses changed. Suggested by Akim Demaille. Also, wrap the
4698 copyright notice, in case it is longer than 80 columns. Replace
4699 comma by newline after title.
4700
4701 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
4702
4703 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
4704 incompatibility, not a bug. Mention that it wasn't fixed as of
4705 flex 2.5.33.
4706
4707 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4708
4709 * examples/extexi: Enforce the precedence of concatenation over
4710 >>.
4711 Reported by Tommy Nordgren.
4712
4713 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
4714
4715 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
4716 with the member "token".
4717 Reported by Martin Nylin.
4718
4719 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
4720
4721 * data/glr.c: Switch to Bison 2.2 special-exception language in
4722 the copyright notice. Use more-regular format for titles and
4723 copyright notices.
4724 * data/glr.cc: Likewise.
4725 * data/location.cc: Likewise.
4726 * data/yacc.cc: Likewise.
4727 * doc/bison.texinfo (Conditions): Document this.
4728 * NEWS: likewise. Upgrade version to 2.2.
4729
4730 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
4731
4732 * data/glr.cc: Remove dead code.
4733
4734 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
4735
4736 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
4737 that variable and the line breaks the bootstrap. Problem reported
4738 by Juan M. Guerrero.
4739
4740 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4741
4742 * doc/bison.texinfo (Multiple start-symbols): New.
4743
4744 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
4745
4746 * etc/README, etc/bench.pl: New.
4747
4748 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
4749
4750 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
4751 rule.
4752 Reported by Mickael Labau.
4753 * tests/input.at (Torturing the Scanner): Test it.
4754
4755 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
4756
4757 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
4758 Problem reported by Bob Rossi.
4759
4760 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
4761
4762 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
4763 and didn't really work.
4764 For the index, use @ifnotinfo, not @iftex.
4765 Minor cleanups of spacing and terminology.
4766
4767 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4768
4769 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
4770 of AT_NAME_PREFIX when %name-prefix is not used.
4771
4772 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
4773
4774 Apply --prefix to C++ skeletons too: they change the namespace.
4775 The test suite already exercize these cases.
4776 * data/c++.m4 (b4_namespace): New.
4777 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
4778 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
4779 * data/yacc.c, data/glr.c: Remove a useless `[]'.
4780 * doc/bison.texinfo: Document it.
4781 (Option Cross Key): Use @multitable in all formats. It looks
4782 nicer, even in TeX outputs.
4783 (Rules): Use the same code whatever the output type is.
4784 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
4785 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
4786 * tests/calc.at: Use it, instead of hard coding `yy'.
4787
4788 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4789
4790 * TODO: Remove dead items.
4791
4792 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4793
4794 * doc/FAQ: Remove, merged into...
4795 * doc/bison.texinfo (FAQ): this.
4796 * doc/Makefile.am (EXTRA_DIST): Adjust.
4797
4798 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
4799
4800 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
4801 even if empty.
4802 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
4803 * doc/bison.texinfo (Calc++ Scanner): Use it.
4804
4805 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
4806
4807 Fix two nits reported by twlevo, plus one more that I discovered.
4808
4809 * src/assoc.h (assoc_to_string): Give a name to the arg, as
4810 this is the usual Bison style.
4811 * src/location.h (location_print): Likewise.
4812
4813 * src/reader.h (token_name): Likewise.
4814
4815 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
4816
4817 Fix some nits reported by twlevo.
4818 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
4819 and "POSIX". Use more-modern syntax for URLs. Mention C++
4820 and ask for Java. Don't hardwire OS version numbers. Add
4821 copyright notice.
4822 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
4823 * src/conflicts.c (solved_conflicts_obstack): Now static.
4824
4825 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4826
4827 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
4828 page. Say "you can use it" not "you may use it" as on the web page;
4829 we're describing capabilities not granting permission.
4830
4831 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
4832
4833 * data/glr.c (yyresolveLocations): Rename local variables to avoid
4834 shadowing warnings. Use usual patter for iterating through RHS.
4835 * tests/glr-regression.at
4836 (Uninitialized location when reporting ambiguity):
4837 Modify yylex so that it uses its argument, rather than trying
4838 to rely on ARGSUSED (which doesn't work for gcc with warnings).
4839 const char -> char const.
4840
4841 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
4842 Don't use tabs inside commands; it messes up 'ps'.
4843 Problem reported by twlevo.
4844
4845 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
4846
4847 * tests/glr-regression.at (Uninitialized location when reporting
4848 ambiguity): New test case.
4849 * data/glr.c (yyresolveLocations): New function, which uses
4850 YYLLOC_DEFAULT.
4851 (yyresolveValue): Invoke yyresolveLocations before reporting an
4852 ambiguity.
4853 * doc/bison.texinfo (Default Action for Locations): Note
4854 YYLLOC_DEFAULT's usage for ambiguity locations.
4855 (GLR Semantic Actions): Cross-reference those notes.
4856
4857 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
4858
4859 * tests/glr-regression.at (Leaked semantic values when reporting
4860 ambiguity): Remove unnecessary union and type declarations.
4861 (Leaked lookahead after nondeterministic parse syntax error): New test
4862 case.
4863 * data/glr.c (yyparse): Check for zero stacks remaining before
4864 attempting to shift the lookahead so that you don't lose it.
4865
4866 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4867
4868 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
4869 * tests/glr-regression.at (Leaked semantic values when reporting
4870 ambiguity): New test case.
4871 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
4872 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
4873 now unnecessary yystackp parameter.
4874 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
4875 destructors can be called.
4876
4877 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
4878 in existing testcases.
4879
4880 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4881
4882 Don't leak semantic values for parent RHS when a user action cuts the
4883 parser, and clean up related code a bit.
4884 * tests/glr-regression.at (Leaked merged semantic value if user action
4885 cuts parse): Rename to...
4886 (Leaked semantic values if user action cuts parse): ... this. Add check
4887 for leaked parent RHS values.
4888 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
4889 between an unresolved state (non-empty chain of semantic options) and
4890 an incomplete one (signaled by an empty chain).
4891 (yyresolveStates): Document the interface. Move all manipulation of a
4892 successfully or unsuccessfully resolved yyGLRState to...
4893 (yyresolveValue): ... here so that yyresolveValue always leaves a
4894 yyGLRState with consistent data and thus is easier to understand.
4895 Remove the yyvalp and yylocp parameters since they are always just
4896 taken from the yys parameter. When reporting a discarded merged value
4897 in debugging output, note that it is incompletely merged. Document the
4898 interface.
4899 (yyresolveAction): If resolving any of the RHS states fails, destroy
4900 them all rather than leaking them. Thus, as long as user actions are
4901 written to clean up the RHS correctly, yyresolveAction always cleans up
4902 the RHS of a semantic option. Document the interface.
4903
4904 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
4905
4906 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
4907 led to a segmentation fault in GNU Pascal. Problem reported
4908 by Waldek Hebisch.
4909
4910 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
4911
4912 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
4913 mid-rule action inside a nonterminal symbol in order to declare a
4914 destructor for its semantic value.
4915
4916 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
4917
4918 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
4919 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
4920 __cplusplus && ! defined _STDLIB_H && !
4921 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
4922 defined free))]: Include <stdlib.h> rather than rolling our own
4923 declarations of malloc and free, to avoid problems with
4924 incompatible declarations (using 'throw') C++'s stdlib.h. This
4925 should fix Debian bug 340012
4926 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
4927 reported by Guillaume Melquiond.
4928
4929 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4930
4931 * NEWS: Clarify symbols versus types in unused-value warnings.
4932
4933 * configure.ac (AC_INIT): Bump version number.
4934
4935 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
4936
4937 * NEWS: Version 2.1a.
4938 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
4939 since C99 requires this.
4940
4941 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
4942
4943 * m4/c-working.m4: New file.
4944 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
4945
4946 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
4947
4948 * Makefile.maint: Merge from coreutils.
4949
4950 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
4951
4952 More portability fixes for problems summarized by Nelson H. F. Beebe.
4953
4954 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
4955 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
4956 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
4957 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
4958 messes up because C++ code is compiled in 32-bit mode but linked
4959 in 64-bit mode.
4960
4961 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
4962
4963 More portability fixes for problems summarized by Nelson H. F. Beebe.
4964
4965 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
4966 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
4967
4968 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
4969 nodist_PROGRAMS, since we don't need to actually compile the
4970 example if we're just doing a plain 'make'. This avoids bothering
4971 the installer unnecessarily about problems due to weird C++
4972 compilers.
4973
4974 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
4975
4976 More portability fixes for problems summarized by Nelson H. F. Beebe.
4977
4978 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
4979 than #include "...", and compile with -I'.'. The old method was
4980 not portable, according to Posix and the C standard, and it does
4981 not work with Sun C 5.7, where previous #line directives affect
4982 the working directory used in later #include "..." directives.
4983
4984 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4985
4986 Various DJGGP specific issues in /djgpp
4987
4988 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
4989
4990 More portability fixes for problems summarized by Nelson H. F. Beebe.
4991
4992 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
4993 '#include <map>' works and that you can apply ++ to iterators.
4994
4995 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
4996
4997 Work around portability problems summarized by Nelson H. F. Beebe in
4998 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
4999
5000 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5001 that '#include <string>' works.
5002
5003 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
5004 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
5005 "warning: sorry: semantics of inline function static data `const
5006 unsigned char translate_table[262]' are wrong (you'll wind up with
5007 multiple copies)".
5008
5009 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
5010 or, xor to not_, and_, or_, and xor_, respectively. This works
5011 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
5012 random system header somewhere that includes the equivalent of
5013 <iso646.h>.
5014
5015 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
5016 -E" works; it apparently doesn't work with PathScale EKO Compiler
5017 Suite Version 2.0.
5018
5019 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
5020
5021 During deterministic GLR operation, user actions should be able to
5022 influence the parse by changing yychar. To make this easier to fix and
5023 to make glr.c easier to evolve in general, don't maintain yytoken in
5024 parallel with yychar; just compute yytoken when needed.
5025 * tests/glr-regression.at (Incorrect lookahead during deterministic
5026 GLR): Check that setting yychar in a user action has the intended
5027 effect.
5028 * data/glr.c (yyGLRStack): Remove yytokenp member.
5029 (yyclearin): Don't set *yytokenp.
5030 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
5031 yychar rather than *yytokenp to determine the current lookahead.
5032 Compute yytoken locally when needed.
5033 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
5034 point to.
5035
5036 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
5037 after `--report' documentation.
5038
5039 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
5040
5041 * src/parse-gram.y (grammar_declaration): Location of printer
5042 symbol is @1, not list->location. Bug reported by twlevo.
5043 * tests/input.at (Incompatible Aliases): Adjust to above change.
5044
5045 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
5046
5047 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
5048 all the test at once. This makes the output easier to read in the
5049 normal case.
5050
5051 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
5052 got from <http://bro-ids.org/download.html>. The bug is that
5053 when two actions appeared in succession, the second one was
5054 scanned before the first one was added to the grammar rule
5055 as a midrule action. Bison then output the incorrect warning
5056 "parse.y:905.17-906.36: warning: unused value: $3".
5057 * src/parse-gram.y (BRACED_CODE, action): These are no longer
5058 associated with a value.
5059 (rhs): Don't invoke grammar_current_rule_action_append.
5060 (action): Invoke it here instead.
5061 * src/reader.c (grammar_midrule_action): Now extern.
5062 (grammar_current_rule_action_append): Don't invoke
5063 grammar_midrule_action; that is now the scanner's job.
5064 * src/reader.h (last_string, last_braced_code_loc):
5065 (grammar_midrule_action): New decls.
5066 * src/scan-gram.l (last_string): Now extern, sigh.
5067 (last_braced_code_loc): New extern variable.
5068 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
5069 rule already has an action.
5070 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
5071 * tests/input.at (AT_CHECK_UNUSED_VALUES):
5072 Add some tests to check that the above changes fixed the bug.
5073
5074 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
5075
5076 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
5077 All used changed. Check whether the symbol has a destructor,
5078 not whether it is typed.
5079 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
5080 that the values are still reported as unused. All line numbers
5081 adjusted.
5082
5083 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
5084
5085 Work around a bug in bro 0.8, which underparenthesizes its
5086 definition of YYLLOC_DEFAULT.
5087 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
5088 their arguments.
5089 * data/lalr1.cc: Likewise.
5090 * data/yacc.cc: Likewise.
5091
5092 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
5093
5094 Work around a bug in Pike 7.0, and give the Pike folks a
5095 better way to override the usual int widths.
5096 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
5097 user can override the types.
5098 (short): #undef, to work around a bug in Pike 7.0.
5099 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
5100 (union yyalloc.yyss): Use yytype_int16 rather than short.
5101 All uses changed.
5102 (yysigned_char): Remove.
5103 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
5104 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
5105 * tests/regression.at (Web2c Actions): Adjust to above changes.
5106
5107 * src/reader.c (check_and_convert_grammar): New function.
5108 (reader): Close the input file even if something went wrong during
5109 parsing. Minor file descriptor leak reported by twlevo.
5110
5111 * src/assoc.c (assoc_to_string): Use a default: abort (); case
5112 to pacify gcc -Wswitch-default.
5113 * src/scan-gram.l (adjust_location): Use a default: break; case
5114 to pacify gcc -Wswitch-default.
5115 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
5116 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5117 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5118 Move these decls to scan-skel.l, since they don't need to be
5119 visible elsewhere.
5120 * src/scan-skel.l: Accept the above decls.
5121 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
5122 is used.
5123
5124 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
5125
5126 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
5127 since we don't want to insist on a version number at the start
5128 of the changelog every time.
5129 * Makefile.maint: Sync from coreutils a bit better.
5130 (sc_trailing_blank): Renamed from sc_trailing_space.
5131 All uses changed.
5132 (sc_no_if_have_config_h, sc_require_config_h):
5133 (sc_prohibit_assert_without_use): New rules.
5134 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
5135 (sc_dd_max_sym_length): Fix leading spaces in rule.
5136 (sc_system_h_headers): Prefix with @.
5137 (sc_useless_cpp_parens, m4-check): Output line numbers.
5138 (changelog-check): Allow version only in head.
5139 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
5140 satisfy new Makefile.maint rule.
5141 * data/glr.c: Likewise.
5142 * data/glr.cc: Likewise.
5143 * data/lalr1.cc: Likewise.
5144 * data/yacc.c: Likewise.
5145 * lib/ebitsetv.c: Likewise.
5146 * lib/lbitset.c: Likewise.
5147 * lib/subpipe.c: Likewise.
5148 * lib/timevar.c: Likewise.
5149 * src/system.h: Likewise.
5150 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
5151 * djgpp/Makefile.maint: Add copyright notice.
5152 * djgpp/README.in: Likewise.
5153 * djgpp/config.bat: Likewise.
5154 * djgpp/config.site: Likewise.
5155 * djgpp/config_h.sed: Likewise.
5156 * djgpp/djunpack.bat: Likewise.
5157 * djgpp/config.sed: Fix copyright notice to match standard format.
5158 * djgpp/subpipe.h: Likewise.
5159 * lib/bitsetv-print.c: Likewise.
5160 * lib/bitsetv.c: Likewise.
5161 * lib/subpipe.h: Likewise.
5162 * lib/timevar.c: Likewise.
5163 * lib/timevar.h: Likewise.
5164 * djgpp/subpipe.c: Use standard recipe for config.h.
5165 * lib/abitset.c: Likewise.
5166 * lib/bitset.c: Likewise.
5167 * lib/bitset_stats.c: Likewise.
5168 * lib/bitsetv-print.c: Likewise.
5169 * lib/bitsetv.c: Likewise.
5170 * lib/ebitsetv.c: Likewise.
5171 * lib/get-errno.c: Likewise.
5172 * lib/lbitset.c: Likewise.
5173 * lib/subpipe.c: Likewise.
5174 * lib/timevar.c: Likewise.
5175 * lib/vbitset.c: Likewise.
5176 * tests/local.at: Likewise.
5177 * src/scan-gram.l: Don't include verify.h, since system.h does
5178 that for us.
5179 * .x-sc_require_config_h: New file.
5180 * .x-sc_unmarked_diagnostics: New file.
5181
5182 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
5183
5184 Be a bit more systematic about using 'abort'.
5185 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
5186 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
5187 Put 'default: abort ();' before some other case, to satisfy older
5188 pedantic compilers.
5189 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5190 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
5191 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
5192 * src/conflicts.c (resolve_sr_conflict): Likewise.
5193 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
5194 (get_decision_str, get_orientation_str, get_node_alignment_str):
5195 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
5196 (get_linestyle_str, get_arrowstyle_str): Likewise.
5197 * src/conflicts.c (resolve_sr_conflict):
5198 Use a default case rather than one for the one remaining enum
5199 value, to catch invalid enum values as well.
5200 * src/lalr.c (set_goto_map, map_goto):
5201 Prefer "assert (FOO);" to "if (!FOO) abort ();".
5202 * src/nullable.c (nullable_compute, token_definitions_output):
5203 Likewise.
5204 * src/reader.c (packgram, reader): Likewise.
5205 * src/state.c (transitions_to, state_new, state_reduction_find):
5206 Likewise.
5207 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
5208 (symbol_pack): Likewise.
5209 * src/tables.c (conflict_row, pack_vector): Likewise.
5210 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
5211 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
5212 * src/system.h: Don't include <assert.h>.
5213 (assert): New macro.
5214
5215 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
5216 (Destructor Decl, Parser Function, Pure Calling):
5217 Describe rules for braces inside C code more carefully.
5218
5219 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
5220
5221 Fix some porting glitches found by Nelson H. F. Beebe.
5222 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
5223 compilers that don't understand that abort () does not return.
5224 * src/state.c (transitions_to): Likewise.
5225 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
5226 that '#include <cstdlib>' works.
5227 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
5228 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
5229 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
5230 for the benefit of some pre-C99 compilers.
5231
5232 * bootstrap: Undo changes to gnulib files that autoreconf made.
5233
5234 Minor fixups to get 'make maintainer-check' to work.
5235 * configure.ac: Don't use -Wnested-externs, as it's incompatible
5236 with the new verify.h implementation.
5237 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
5238 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
5239 * data/yacc.c (YYUSE): Likewise.
5240 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
5241 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
5242 * src/parse-gram.y (declaration): Don't pass a string constant
5243 to a function that expects char *, since GCC might complain
5244 about the constant value.
5245 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
5246 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
5247 before #defining them.
5248 * tests/glr-regression.at
5249 (Incorrectly initialized location for empty right-hand side in GLR):
5250 In yyerror, use the msg arg.
5251 (Corrupted semantic options if user action cuts parse):
5252 (Incorrect lookahead during deterministic GLR):
5253 (Incorrect lookahead during nondeterministic GLR):
5254 Don't name a local var 'index'; it shadows string.h's 'index'.
5255
5256 2006-01-19 Akim Demaille <akim@epita.fr>
5257
5258 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
5259 location, not just parts of it.
5260
5261 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
5262
5263 * NEWS: Document the fact that multiple %unions are now allowed.
5264 * doc/bison.texinfo (Union Decl): Likewise.
5265 * TODO: This feature is now implemented, so remove it from
5266 the wishlist.
5267
5268 * Makefile.maint: Merge with coreutils Makefile.maint.
5269 (CVS_LIST): Use build-aux version if available.
5270 (VERSION_REGEXP): New macro.
5271 (syntax-check-rules): Add sc_no_if_have_config_h,
5272 sc_prohibit_assert_without_use, sc_require_config_h,
5273 sc_useless_cpp_parens.
5274 (sc_obsolete_symbols): Check for O_NDELAY.
5275 (sc_dd_max_sym_length): Track coreutils.
5276 (sc_unmarked_diagnostics): Look in all files, not just *.c.
5277 (sc_useless_cpp_parens): New rule.
5278 (news-date-check): Look for version or today's date.
5279 (changelog-check): Don't require version number near head.
5280 (copyright-check): Use current year instead of hardwiring 2005.
5281 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
5282 (announcement): Add --gpg-key-ID.
5283
5284 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
5285 with "file system".
5286
5287 Avoid undefined behavior that addressed just before the start of an
5288 array. Problem reported by twlevo.
5289 * src/reader.c (packgram): Prepend a new sentinel before ritem.
5290 * src/lalr.c (build_relations): Rely on new sentinel.
5291 * src/gram.c (gram_free): Adjust to new sentinel.
5292
5293 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
5294
5295 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
5296 yylookaheadNeeds. All uses updated.
5297 (yysplitStack): Rename local yynewLookaheadStatuses to
5298 yynewLookaheadNeeds.
5299 * data/glr-regression.at (Incorrect lookahead during nondeterministic
5300 GLR): In comments, change `lookahead status' to `lookahead need'.
5301
5302 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5303
5304 * data/glr.c (yysplitStack): A little stylistic rewrite.
5305
5306 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5307
5308 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
5309
5310 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
5311
5312 * doc/bison.texinfo: Fix some typos.
5313 (GLR Semantic Actions): New subsection discussing special
5314 considerations because GLR semantic actions might be deferred.
5315 (Actions): Mention look-ahead usage of yylval.
5316 (Actions and Locations): Mention look-ahead usage of yylloc.
5317 (Special Features for Use in Actions): Add YYEOF entry and mention it
5318 in the yychar entry.
5319 In the yychar entry, remove mention of the local yychar case (pure
5320 parser) since this is irrelevant information when writing semantic
5321 actions and since it's already discussed in `Table of Symbols' where
5322 yychar is otherwise described as an external variable.
5323 In the yychar entry, don't call it the `current' look-ahead since it
5324 isn't when semantic actions are deferred.
5325 In the yychar and yyclearin entries, add note about deferred semantic
5326 actions.
5327 Add yylloc and yylval entries discussing look-ahead usage.
5328 (Look-Ahead Tokens): When discussing yychar, don't call it the
5329 `current' look-ahead, and do mention yylval and yylloc.
5330 (Error Recovery): Cross-reference `Action Features' when mentioning
5331 yyclearin.
5332 (Table of Symbols): In the yychar entry, don't call it the `current'
5333 look-ahead.
5334 In the yylloc and yylval entries, mention look-ahead usage.
5335
5336 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
5337
5338 * tests/glr-regression.at: Update copyright year to 2006.
5339
5340 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5341
5342 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
5343 use during nondeterministic operation to track which stacks have
5344 actually needed the current lookahead.
5345 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
5346 Allocate, deallocate, resize, and otherwise shuffle space for
5347 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
5348 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
5349 appropriately during nondeterministic operation.
5350 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
5351 members to store the current lookahead to be used by the deferred
5352 user action.
5353 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
5354 from which the RHS is taken. Set the lookahead members of the new
5355 yySemanticOption according to the lookahead status for stack yyk.
5356 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
5357 yyaddDeferredAction.
5358 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
5359 members of yySemanticOption before invoking yyuserAction, and then set
5360 them back to their current values afterward.
5361 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
5362 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
5363 * tests/glr-regression.at: Remove `.' from the ends of recent test case
5364 titles for consistency.
5365 (Leaked merged semantic value if user action cuts parse): In order to
5366 suppress lint warnings, use arguments in merge function, and assign
5367 char value < 128 in main.
5368 (Incorrect lookahead during deterministic GLR): New test case.
5369 (Incorrect lookahead during nondeterministic GLR): New test case.
5370
5371 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5372
5373 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
5374 !yyvaluep as signal that no semantic value is available to print.
5375 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
5376 to print a semantic value.
5377
5378 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
5379
5380 * tests/glr-regression.at: For consistency with my newer test cases,
5381 don't thank myself.
5382
5383 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
5384
5385 * data/glr.c (yyresolveValue): When merging semantic options, if at
5386 least one user action succeeds but a later one cuts the parse, then
5387 destroy the semantic value before returning rather than leaking it.
5388 (yyresolveStates): If a user action cuts the parse and thus
5389 yyresolveValue fails, ignore the (unset) semantic value rather than
5390 corrupting the yyGLRState, and empty the semantic options list since
5391 the user actions should have called all necessary destructors.
5392 Simplify code with YYCHK.
5393 * tests/glr-regression.at (Corrupted semantic options if user action
5394 cuts parse): New test case.
5395 (Undesirable destructors if user action cuts parse): New test case.
5396 Before applying any of this patch, this test case never actually failed
5397 for me... but only because the corrupted semantic options usually
5398 masked this bug.
5399 (Leaked merged semantic value if user action cuts parse): New test
5400 case.
5401
5402 2006-01-05 Akim Demaille <akim@epita.fr>
5403
5404 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
5405
5406 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
5407
5408 * data/c.m4 (b4_c_modern): New macro, with a new provision for
5409 _MSC_VER. Problem reported by Cenzato Marco.
5410 (b4_c_function_def): Use it.
5411 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
5412 b4_c_modern.
5413 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
5414 than rolling our own.
5415
5416 2006-01-04 Akim Demaille <akim@epita.fr>
5417
5418 Also warn about non-used mid-rule values.
5419 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
5420 member.
5421 (symbol_list_new): Adjust.
5422 * src/reader.c (symbol_typed_p): New.
5423 (grammar_rule_check): Use it.
5424 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
5425 Check its rule.
5426 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
5427 Use it.
5428 * tests/actions.at (Exotic Dollars): Adjust.
5429
5430 2006-01-04 Akim Demaille <akim@epita.fr>
5431
5432 * src/reader.c (grammar_midrule_action): If $$ is set in a
5433 mid-rule, move the `used' bit to its lhs.
5434 * tests/input.at (Unused values): New.
5435 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
5436
5437 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
5438
5439 * doc/bison.texinfo (Bison Options): Say more accurately what
5440 --yacc does.
5441 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
5442 about declarations in the grammar when in Yacc mode, as POSIX does
5443 not require a diagnostic when the grammar uses extensions.
5444
5445 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
5446
5447 Warn about dubious constructions like "%token T T".
5448 Reported by twlevo.
5449 * src/symtab.h (struct symbol.declared): New member.
5450 * src/symtab.c (symbol_new): Initialize it to false.
5451 (symbol_class_set): New arg DECLARING, specifying whether
5452 this is a declaration that we want to warn about, if there
5453 is more than one of them. All uses changed.
5454
5455 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
5456 Allow multiple %union directives, whose contents concatenate.
5457 * src/parse-gram.y (grammar_declaration): Likewise.
5458 Use muscle_code_grow, so that we don't need stype_line any more.
5459 All uses changed.
5460
5461 * src/muscle_tab.c (muscle_grow): Fix comment.
5462
5463 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
5464 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
5465 Update copyright year to 2006.
5466
5467 2006-01-03 Akim Demaille <akim@epita.fr>
5468
5469 Have glr.cc pass (some of) the calc.at tests.
5470 * data/glr.cc (b4_parse_param_orig): New.
5471 (b4_parse_param): Improve its definition, and bound it more
5472 clearly in the skeleton.
5473 (b4_epilogue): Append, instead of prepending, in order to keep
5474 #line consistency.
5475 Simplify the generation of auxiliary functions: locations and
5476 purity are mandated.
5477 (b4_global_tokens_and_yystype): Honor it.
5478 * data/location.cc (c++.m4): Don't include it.
5479 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
5480 and AT_SKEL_CC_IF.
5481 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
5482 AT_LALR1_CC_IF.
5483 Be sure to initialize the first position's filename.
5484 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
5485 mandated anyway.
5486 (AT_CHECK_CALC_GLR_CC): New.
5487 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
5488
5489 2006-01-02 Akim Demaille <akim@epita.fr>
5490
5491 * src/output.c (output_skeleton): Don't hard wire the inclusion of
5492 c.m4.
5493 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
5494 * data/glr.cc: Do not include stack.hh.
5495
5496 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
5497
5498 * data/glr.c: Reformat whitespace with tabs.
5499 (b4_lpure_formals): Remove this unused m4 macro.
5500 * tests/cxx-type.at: Reformat whitespace with tabs.
5501 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
5502 since it's a member. Rename type to isNterm for clarity.
5503
5504 2005-12-29 Akim <akim@sulaco.local>
5505
5506 Let glr.cc catch up with symbol_value_print.
5507 * data/glr.cc (b4_yysymprint_generate): Replace by...
5508 (b4_yy_symbol_print_generate): this.
5509 (yy_symbol_print, yy_symbol_value_print): Declare them.
5510
5511 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
5512
5513 * src/location.h (boundary): Note that a line or column equal
5514 to INT_MAX indicates an overflow.
5515 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
5516 (rule_length_overflow, increment_rule_length, add_column_width):
5517 New functions.
5518 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
5519 (<SC_BRACED_CODE>"}"):
5520 Use increment_rule_length rather than incrementing it by hand.
5521 (adjust_location, handle_syncline): Diagnose overflow.
5522 (handle_action_dollar, handle_action_at):
5523 Fix bug with monstrosities like $-2147483648.
5524 Remove now-unnecessary checks.
5525 (scan_integer): Verify assumptions and remove now-unnecessary checks.
5526 (convert_ucn_to_byte): Verify assumptions.
5527 (handle_syncline): New arg LOC. All callers changed.
5528 Don't store through a value derived from char const * pointer.
5529
5530 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
5531 GCC warnings.
5532
5533 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
5534
5535 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
5536 Remove unnecessary forward static decls.
5537
5538 2005-12-27 Akim Demaille <akim@epita.fr>
5539
5540 * src/reader.c (grammar_current_rule_check): Also check that $$
5541 is used.
5542 Take the rule to check as argument, hence rename as...
5543 (grammar_rule_check): this.
5544 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
5545 Rename as...
5546 (grammar_rule_begin, grammar_rule_end): these, for consistency.
5547 (grammar_midrule_action, grammar_symbol_append): Now static.
5548 * tests/torture.at (input): Don't rely on the default action
5549 being always performed.
5550 * tests/calc.at: "Set" $$ even when the action is "cut" with
5551 YYERROR or other.
5552 * tests/actions.at (Exotic Dollars): Instead of using unused
5553 values, check that the warning is issued.
5554
5555 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
5556
5557 * NEWS: Improve wording for unused-value warnings.
5558
5559 2005-12-22 Akim Demaille <akim@epita.fr>
5560
5561 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
5562 (b4_yysymprint_generate): Rename as...
5563 (b4_yy_symbol_print_generate): this.
5564 Generate yy_symbol_print instead of yysymprint.
5565 Generate also yy_symbol_value_print, and use it.
5566
5567 2005-12-22 Akim Demaille <akim@epita.fr>
5568
5569 * NEWS: Warn about unused values.
5570 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
5571 a `used' member.
5572 (symbol_list_n_get, symbol_list_n_used_set): New.
5573 (symbol_list_n_type_name_get): Use symbol_list_n_get.
5574 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
5575 * src/reader.c (grammar_current_rule_check): Check that values are
5576 used.
5577 * src/symtab.c (symbol_print): Accept 0.
5578 * tests/existing.at: Remove the type information.
5579 Empty the actions.
5580 Remove useless actions (beware of mid-rule actions: perl -000
5581 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
5582 * tests/actions.at (Exotic Dollars): Use unused values.
5583 * tests/calc.at: Likewise.
5584 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5585 Likewise.
5586
5587 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
5588 rule_useful_p.
5589
5590 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
5591
5592 Undo 2005-12-01 tentative license wording change. The wording is
5593 still being reviewed by the lawyers, and we don't want to wait for
5594 them before publishing a test release. For now, revert to the
5595 previous wording.
5596 * NEWS: Undo 2005-12-01 change.
5597 * data/glr.c: Revert to previous license wording.
5598 * data/glr.cc: Likewise.
5599 * data/lalr1.cc: Likewise.
5600 * data/location.cc: Likewise.
5601 * data/yacc.c: Likewise.
5602
5603 * NEWS: Reword %destructor vs YYABORT etc.
5604 * data/glr.c: Use American spacing, for consistency.
5605 * data/glr.cc: Likewise.
5606 * data/lalr1.cc: Likewise.
5607 * data/yacc.c: Likewise.
5608 * data/yacc.c: Reformat comments slightly.
5609 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
5610 for consistency. Fix some spelling errors and reword recently-included
5611 text slightly.
5612 * tests/cxx-type.at: Cast results of malloc, for C++.
5613
5614 2005-12-21 Joel E. Denny <address@hidden>
5615
5616 * tests/cxx-type.at: Construct a tree, count the parents of shared
5617 nodes, and free each node once and only once. Previously, the memory
5618 for semantic values was leaked instead.
5619
5620 2005-12-21 Joel E. Denny <address@hidden>
5621
5622 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
5623 (yylval, yylloc): If pure, #define to yystackp->yyval and
5624 yystackp->yyloc similar to yychar and yynerrs.
5625 (yyparse): If pure, remove local yylval and yylloc. Add local
5626 yystackp to accommodate pure definitions of yylval and yylloc.
5627 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
5628 yylvalp and yyllocp to &yylval and &yylloc.
5629 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
5630 namespace. Previously, nerrs and char were missing, but lval and lloc
5631 weren't necessary.
5632 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
5633 yylvalp and yyllocp parameters since, if pure, these are now always
5634 accessible through yystackp. If not pure, they are still accessible
5635 globally.
5636 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
5637 `if (YYID (N))' to pacify lint.
5638
5639 2005-12-21 Akim Demaille <akim@epita.fr>
5640
5641 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
5642 destroy the RHS symbols of a rule.
5643 * data/yacc.c (yylen): Initialize to 0.
5644 Keep its value to the number of items to possibly shift.
5645 In particular, a regular successful parse that ends on YYFINAL by
5646 a (internal) YYACCEPT must not have yylen != 0.
5647 (yyerrorlab, yyreturn): Pop the RHS.
5648 Reorder a bit to emphasize the `shifting' bits of code.
5649 (YYPOPSTACK): Now accept a number of items to pop.
5650 * data/lalr1.cc: Likewise.
5651 * data/glr.c: Formatting changes.
5652 Use goto instead of fall through.
5653 * doc/bison.texinfo (Destructor Decl): Complete.
5654
5655 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5656
5657 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
5658 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
5659 * djgpp/config.bat: Replace every occurence of the file name
5660 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5661 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5662 * djgpp/config.sed: Replace every occurence of the file name
5663 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
5664 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
5665 * djgpp/djunpack.bat: DJGPP specific file.
5666 * djgpp/fnchange.lst: DJGPP specific file.
5667 * djgpp/README.in: Add new information about how to unpack the bison
5668 source on MSDOS and other systems which have 8.3 file name restrictions
5669 using djunpack.bat and fnchange.lst.
5670
5671 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
5672
5673 * bootstrap (build_cvs_prefix): Remove; unused.
5674 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
5675 when getting gnulib.
5676
5677 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
5678
5679 * data/glr.c: Reorder typedef declarations for structs to match order
5680 of struct declarations.
5681 Rename yystack everywhere to yystackp except in yyparse where it's not
5682 a pointer.
5683 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
5684 consistency.
5685 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
5686 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
5687 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
5688 lint.
5689
5690 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
5691
5692 * tests/sets.at (Accept): Fix typos in regular expression used to
5693 sed out the final state number.
5694
5695 Work around portability problem on Solaris 10: flex-generated
5696 files include <stdio.h> before <config.h>, which messes up
5697 because the latter defines __EXTENSIONS__. Address the problem
5698 by creating two new little files that include <config.h> first,
5699 then include the flex-generated files. Rewrite everyone else
5700 to include <config.h> first, as well.
5701 * lib/timevar.c: Always include "config.h".
5702 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
5703 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
5704 (EXTRA_bison_SOURCES): New macro.
5705 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
5706 * src/system.h: Don't include config.h.
5707 * src/LR0.c: Include <config.h> first.
5708 * src/assoc.c: Likewise.
5709 * src/closure.c: Likewise.
5710 * src/complain.c: Likewise.
5711 * src/conflicts.c: Likewise.
5712 * src/derives.c: Likewise.
5713 * src/files.c: Likewise.
5714 * src/getargs.c: Likewise.
5715 * src/gram.c: Likewise.
5716 * src/lalr.c: Likewise.
5717 * src/location.c: Likewise.
5718 * src/main.c: Likewise.
5719 * src/muscle_tab.c: Likewise.
5720 * src/nullable.c: Likewise.
5721 * src/output.c: Likewise.
5722 * src/parse-gram.y: Likewise.
5723 * src/print.c: Likewise.
5724 * src/print_graph.c: Likewise.
5725 * src/reader.c: Likewise.
5726 * src/reduce.c: Likewise.
5727 * src/relation.c: Likewise.
5728 * src/state.c: Likewise.
5729 * src/symlist.c: Likewise.
5730 * src/symtab.c: Likewise.
5731 * src/tables.c: Likewise.
5732 * src/uniqstr.c: Likewise.
5733 * src/vcg.c: Likewise.
5734
5735 * src/parse-gram.y: Fix minor problems uncovered by lint.
5736 (current_lhs, current_lhs_location): Now static.
5737 (current_assoc): Remove unused variable.
5738
5739 Cleanups so that Bison-generated parsers have less lint.
5740 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
5741 Prepend /*ARGSUSED*/, for lint's sake.
5742 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
5743 definition if 'lint' is defined.
5744 (YYID): New macro (or function, if lint).
5745 All uses of /*CONSTCOND*/0 replaced by YYID(0).
5746 * data/yacc.c: Likewise.
5747 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
5748 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
5749 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
5750 is C++ only.
5751 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
5752 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
5753 Use YYID(0) rather than 0, for lint.
5754 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
5755 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
5756
5757 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
5758
5759 * tests/glr-regression.at
5760 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5761 Close memory leak reported by twlevo.
5762
5763 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
5764
5765 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
5766 all stacks.
5767 (yyparse): Iterate another stack in order to call user destructors.
5768 * tests/glr-regression.at (No users destructors if stack 0 deleted):
5769 New test case.
5770 (Duplicated user destructor for lookahead): This test now is expected
5771 to succeed.
5772
5773 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
5774
5775 * NEWS: Document the following change.
5776 * data/yacc.c: Say "parser skeleton" rather than "file", since
5777 it's no longer just a file.
5778 * data/glr.c: Grant a special exception for C GLR parsers, that
5779 reads like the already-existing exception for C LALR(1) parsers.
5780 * data/glr.cc: Likewise.
5781 * data/lalr1.cc: Likewise.
5782 * data/location.cc: Likewise.
5783 * data/yacc.c: Reword the "written by" statement to clarify that
5784 it was the parser skeleton, not the entire output file.
5785 * data/glr.c: Written by Paul Hilfinger.
5786 * data/glr.cc: Written by Akim Demaille.
5787 * data/lalr1.cc: Likewise.
5788
5789 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
5790
5791 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
5792 Fix typos in previous change that broke 'make check'.
5793 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
5794 supported in C.
5795 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
5796 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
5797 We can revert this once things settle down.
5798
5799 * src/conflicts.c (conflicts_print): Don't print file name twice
5800 when %expect fails because there were no conflicts.
5801 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
5802 change.
5803 * tests/conflicts.at (%expect not enough, %expect too much):
5804 (%expect with reduce conflicts): Adjust to new behavior.
5805
5806 2005-11-18 Akim Demaille <akim@epita.fr>
5807
5808 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
5809 errors.
5810 * NEWS: Document this.
5811 * doc/bison.texinfo (Expect Decl): Likewise.
5812
5813 2005-11-16 Akim Demaille <akim@epita.fr>
5814
5815 Generalize the display of semantic values and locations in traces.
5816 * data/glr.c (yy_reduce_print): Fix indices (again).
5817 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
5818 literal integers.
5819 * data/lalr1.cc (yyreduce_print): Rename as...
5820 (yy_reduce_print): this.
5821 Display values and locations.
5822 * data/yacc.c (yy_reduce_print): Likewise.
5823 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
5824 (yysymprint): Move higher to be visible from yy_reduce_print).
5825 (yyparse): Adjust.
5826 * tests/calc.at: Adjust the expected length of the traces.
5827
5828 2005-11-14 Akim Demaille <akim@epita.fr>
5829
5830 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
5831 from 1 to N, while values and location start at 0.
5832 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
5833
5834 2005-11-14 Akim Demaille <akim@epita.fr>
5835
5836 * data/glr.c (yy_reduce_print): Fix the $ number.
5837
5838 2005-11-14 Akim Demaille <akim@epita.fr>
5839
5840 "Use" parse parameters.
5841 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
5842 * data/glr.c, data/glr.cc: Use them.
5843 * data/glr.c (YYUSE): Have a C++ definition that supports
5844 non-pointer types.
5845
5846 2005-11-14 Akim Demaille <akim@epita.fr>
5847
5848 * data/glr.c (yyexpandGLRStack): Declare only if defined.
5849
5850 2005-11-14 Akim Demaille <akim@epita.fr>
5851
5852 * data/glr.cc: New.
5853 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5854
5855 2005-11-12 Akim Demaille <akim@epita.fr>
5856
5857 Let position and location be PODs.
5858 * data/location.cc (position::initialize, location::initialize): New.
5859 (position::position, location::location): Define only if
5860 b4_location_constructors is defined.
5861 * data/lalr1.cc (b4_location_constructors): Define it for backward
5862 compatibility.
5863 * doc/bison.texinfo (Initial Action Decl): Use initialize.
5864
5865 2005-11-12 Akim Demaille <akim@epita.fr>
5866
5867 * data/lalr1.cc: Move the body of the ctor and dtor into the
5868 parser file (instead of the header).
5869 Wrap the implementations in a "namespace yy".
5870
5871 2005-11-12 Akim Demaille <akim@epita.fr>
5872
5873 Have glr.c include its header file when created.
5874 * data/glr.c (b4_shared_declarations): New.
5875 Output them verbatim in the parser if !%defines, otherwise
5876 output then in the header file, and include it instead.
5877
5878 2005-11-11 Akim Demaille <akim@epita.fr>
5879
5880 * data/glr.c: Comment changes.
5881
5882 2005-11-11 Akim Demaille <akim@epita.fr>
5883
5884 When yydebug, report semantic and location values for reductions.
5885 * data/glr.c (yy_reduce_print): Report the semantic values and the
5886 locations.
5887 (YY_REDUCE_PRINT): Adjust.
5888 (yyglrReduce): Use them.
5889 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
5890 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
5891 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
5892 traces.
5893
5894 2005-11-10 Akim Demaille <akim@epita.fr>
5895
5896 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
5897 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
5898 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
5899
5900 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
5901
5902 * m4/cxx.m4, examples/Makefile.am: Don't build
5903 examples/calc++ if no C++ compiler is available. (trivial change)
5904
5905 2005-11-09 Akim Demaille <akim@epita.fr>
5906
5907 * src/scan-skel.l: Use a couple of asserts.
5908
5909 2005-11-03 Akim Demaille <akim@epita.fr>
5910
5911 In some (weird) cases, the final state number is incorrect.
5912 Reported by Alexandre Duret-Lutz.
5913 * src/LR0.c (state_list_append): Remove the computation of
5914 final_state.
5915 (save_reductions): Do it here.
5916 (get_state): Alpha conversion.
5917 (generate_states): Use a for loop.
5918 * src/gram.h (item_number_is_rule_number)
5919 (item_number_is_symbol_number): New.
5920 * src/state.c: Use assert.
5921 * src/system.h: Include assert.h.
5922 * tests/sets.at (Accept): New.
5923
5924 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5925
5926 * data/glr.c (yyfill): Adjust comment.
5927 (yyresolveAction): Initialize default location properly
5928 for empty right-hand sides.
5929 (yydoAction): Ditto.
5930 Add comment explaining apparently dead code.
5931 * tests/glr-regression.at
5932 (Incorrectly initialized location for empty right-hand side in GLR):
5933 New test.
5934
5935 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
5936
5937 * bootstrap (cleanup_gnulib): New function. Use it to clean up
5938 gnulib when interrupted. This fixes some race conditions and
5939 works around some portability problems (one noted by Paul
5940 Hilfinger).
5941
5942 2005-10-22 Akim <akim@epita.fr>
5943
5944 * Makefile.cfg: Adjust to config -> build-aux.
5945 Reported by twledo.
5946
5947 2005-10-21 Akim Demaille <akim@epita.fr>
5948
5949 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
5950 the %parse-params.
5951 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
5952 * data/yacc.c (b4_Pure_if): Rename as...
5953 (b4_yacc_pure_if): this.
5954 (YY_SYMBOL_PRINT, yyparse): Adjust.
5955 * doc/bison.texinfo: Formatting changes.
5956
5957 2005-10-21 Akim Demaille <akim@epita.fr>
5958
5959 Finish the transition config -> build-aux.
5960 * configure.ac, Makefile.am: Use build-aux.
5961 * config/prev-version, config/announce-gen, config/Makefile.am:
5962 Move to...
5963 * build-aux/prev-version, build-aux/announce-gen,
5964 * build-aux/Makefile.am: here.
5965
5966 2005-10-14 Akim Demaille <akim@epita.fr>
5967
5968 * examples/calc++/test: Use set -x only when VERBOSE.
5969
5970 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
5971
5972 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
5973 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
5974
5975 2005-10-13 Akim Demaille <akim@epita.fr>
5976
5977 * src/scan-skel.l: Output the base name parts of the parser and
5978 header file names.
5979 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
5980 additional checks.
5981 Use this to exercise C++ outputs in subdirs.
5982 Reported by Oleg Smolsky.
5983
5984 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
5985
5986 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
5987 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
5988 Problem reported by John P. Hartmann.
5989 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
5990 already defined it.
5991
5992 2005-10-12 Akim Demaille <akim@epita.fr>
5993
5994 * src/parse-gram.y (version_check): Exit 63 to please missing
5995 (stands for "version mismatch).
5996 * tests/input.at, doc/bison.texinfo: Adjust.
5997
5998 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
5999
6000 Work around portability problems with Visual Age C compiler
6001 (xlc and xlC_r) reported by John P. Hartmann.
6002 * data/location.cc (initial_column, initial_line): Remove.
6003 All uses replaced by 0 and 1.
6004 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
6005 that xlc complains about.
6006 * src/scan-skel.l (skel_wrap): Likewise.
6007 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
6008 as __STDC__.
6009 * data/yacc.c (YYMODERN_C): New macro, which also looks at
6010 __STDC_VERSION__. Use it everywhere instead of looking at
6011 __STDC__ and __cplusplus.
6012
6013 2005-10-10 Akim Demaille <akim@epita.fr>
6014
6015 * examples/calc++/test: Be quiet unless VERBOSE.
6016
6017 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
6018
6019 * data/c.m4 (yydestruct, yysymprint):
6020 Use YYUSE instead of casting to void.
6021 * data/glr.c (YYUSE): New macro.
6022 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6023 Use it instead of rolling our own.
6024 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6025 (YYCHK1):
6026 Use /*CONSTCOND*/ to suppress lint warnings.
6027 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
6028 (YY_STACK_PRINT): Use 'false' not '0'.
6029 (YYUSE): New macro.
6030 (yysymprint_, yydestruct_): Use it instead of rolling our own.
6031 * data/yacc.c (YYUSE): New macro.
6032 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
6033 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
6034 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
6035
6036
6037 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
6038 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
6039
6040 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
6041
6042 Undo the parts of the unlocked-I/O change that substituted
6043 putc or puts for printf. This might hurt performance a bit,
6044 but some people prefer the printf style.
6045 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
6046 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
6047 All uses replaced by YYFPRINTF and YYDPRINTF.
6048 * data/yacc.c: Likewise.
6049 * lib/bitset.c (bitset_print): Likewise.
6050 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
6051 putc and puts.
6052 * lib/lbitset.c (debug_lbitset): Likewise.
6053 * src/closure.c (print_firsts, print_fderives): Likewise.
6054 * src/gram.c (grammar_dump): Likewise.
6055 * src/lalr.c (look_ahead_tokens_print): Likewise.
6056 * src/output.c (escaped_output): Likewise.
6057 (user_actions_output): Break apart two printfs.
6058 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
6059 * src/reduce.c (reduce_print): Likewise.
6060 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6061 * src/system.h: Include unlocked-io.h rathe than stdio.h.
6062
6063 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
6064 Use assignments rather than casts-to-void to suppress
6065 unused-variable warnings. This pacifies 'lint'.
6066 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
6067 unused-variable warnings.
6068
6069 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6070
6071 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
6072
6073 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
6074
6075 Use unlocked I/O for a minor performance improvement on hosts like
6076 GNU/Linux and Solaris that support unlocked I/O. The basic idea
6077 is to use the gnlib unlocked-io module, and to prefer putc and
6078 puts to printf when either will work (since the latter doesn't
6079 come in an unlocked flavor).
6080 * bootstrap (gnulib_modules): Add unlocked-io.
6081 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
6082 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
6083 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
6084 and similarly for puts and putc and printf.
6085 * data/yacc.c: Likewise.
6086 * lib/bitset.c (bitset_print): Likewise.
6087 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
6088 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
6089 to printf.
6090 * lib/lbitset.c (debug_lbitset): Likewise.
6091 * src/closure.c (print_firsts, print_fderives): Likewise.
6092 * src/gram.c (grammar_dump): Likewise.
6093 * src/lalr.c (look_ahead_tokens_print): Likewise.
6094 * src/output.c (escaped_output): Likewise.
6095 (user_actions_output): Coalesce two printfs.
6096 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
6097 * src/reduce.c (reduce_print): Likewise.
6098 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
6099 * src/system.h: Include unlocked-io.h rather than stdio.h.
6100
6101 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
6102 this confuses xgettext.
6103
6104 2005-10-02 Akim Demaille <akim@epita.fr>
6105
6106 * bootstrap (gnulib_modules): Add strverscmp.
6107 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
6108 * m4/.cvsignore: Add strverscmp.m4.
6109 * src/parse-gram.y (%require): New token, new rule.
6110 (version_check): New.
6111 * src/scan-gram.l (%require): Adjust.
6112 * tests/input.at (AT_REQUIRE): New.
6113 Use it.
6114 * doc/bison.texinfo (Require Decl): New.
6115 (Calc++ Parser): Use %require.
6116
6117 2005-10-02 Akim Demaille <akim@epita.fr>
6118
6119 * data/location.cc: New.
6120
6121 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
6122 Akim Demaille <akim@epita.fr>
6123
6124 Make sure -odir/foo.cc creates dir/location.hh etc.
6125 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
6126 (spec_file_prefix, spec_verbose_file, spec_graph_file)
6127 (spec_defines_file): Now const.
6128 (dir_prefix): New.
6129 (short_base_name): Remove.
6130 * src/files.c: Adjust.
6131 (dirname.h): Include.
6132 (base_name): Don't prototype it.
6133 (finput): Remove, duplicates gram_in.
6134 (full_base_name, short_base_name): Replace by...
6135 (all_but_ext, all_but_tab_ext): these.
6136 (compute_base_names): Rename as...
6137 (compute_file_name_parts): this.
6138 Update to compute the new variables, including dir_prefix.
6139 Adjust dependencies.
6140 * src/output.c (prepare): Output them.
6141 * src/reader.c: Adjust to use gram_in, not finput.
6142 * src/scan-skel.l (@dir_prefix@): New.
6143
6144 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6145
6146 * lib/subpipe.c: New function end_of_output_subpipe() added
6147 to allow support for non-posix systems. This is a no-op function
6148 for posix systems.
6149
6150 * lib/subpipe.h: New function end_of_output_subpipe() added
6151 to allow support for non-posix systems. This is a no-op function
6152 for posix systems.
6153
6154 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
6155 handle the lack of pipe/fork functionality on non-posix systems.
6156
6157 * djgpp/Makefile.maint: DJGPP specific file.
6158
6159 * djgpp/README.in: DJGPP specific file.
6160
6161 * djgpp/config.bat: DJGPP specific configuration file.
6162
6163 * djgpp/config.sed: DJGPP specific configuration file.
6164
6165 * djgpp/config.site: DJGPP specific configuration file.
6166
6167 * djgpp/config_h.sed: DJGPP specific configuration file.
6168
6169 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
6170
6171 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
6172
6173 2005-10-02 Akim Demaille <akim@epita.fr>
6174
6175 * data/location.cc: New, extract from...
6176 * data/lalr1.cc: here.
6177 (location.hh): Include it after the user prologue, in case the
6178 filename type is defined by the user.
6179 Forward declation location and position before the pre-prologue.
6180 (yyresult_): Rename as...
6181 (yyresult): this, it's a local variable, not an attribute.
6182 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
6183
6184 2005-10-01 Akim Demaille <akim@epita.fr>
6185
6186 * examples/extexi: Restore the #line generation.
6187
6188 2005-09-30 Akim Demaille <akim@epita.fr>,
6189 Alexandre Duret-Lutz <adl@gnu.org>
6190
6191 Move the token type and YYSTYPE in the parser class.
6192 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
6193 (parser::token): New, from the moved free definition of tokens.
6194 (parser::semantic_value): Now a full definition instead of an
6195 indirection to YYSTYPE.
6196 (b4_post_prologue): No longer included in the header file, but
6197 in the implementation file.
6198 * doc/bison.texi (C+ Language Interface): Update.
6199 * src/parse-gram.y: Support unary %define.
6200 * tests/actions.at: Define global_tokens_and_yystype for backward
6201 compatibility until we update the tests.
6202 * tests/calc.at: Idem.
6203 (first_line, first_column, last_line, last_column): Define for lalr1.cc
6204 to simplify the code.
6205
6206 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
6207
6208 Port to SunOS 4.1.4, which lacks strtoul and strerror.
6209 Ah, the good old days! Problem reported by Peter Klein.
6210 * bootstrap (gnulib_modules): Add strerror, strtoul.
6211 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
6212 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
6213
6214 2005-09-29 Akim Demaille <akim@epita.fr>
6215
6216 * data/c.m4 (b4_error_verbose_if): New.
6217 * data/lalr1.cc: Use it.
6218 (YYERROR_VERBOSE_IF): Remove.
6219 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
6220 parser members, replaced by...
6221 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
6222 local variables.
6223 (yysyntax_error_): Takes the state number as argument.
6224 (yyreduce_print_): Use the argument yyrule, not the former
6225 attribute yyn_.
6226
6227 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
6228
6229 * bootstrap (gnulib_modules): Add verify.
6230 * lib/.cvsignore: Add verify.h.
6231 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
6232 * src/system.h (verify): Remove.
6233 Include verify.h instead.
6234 * src/tables.c (tables_generate): Use new API for 'verify'.
6235
6236 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
6237
6238 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
6239 local variables whose names begin with 'yy'.
6240 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
6241 Trivial changes from Joel E. Denny.
6242
6243 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
6244 it itself.
6245 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
6246 don't use alloca any more.
6247
6248 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
6249 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
6250 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
6251 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
6252 to match yacc.c, to test more hosts.
6253
6254 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
6255
6256 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
6257 doesn't affect behavior.
6258 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
6259 Solaris, AIX, MSC.
6260 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
6261 This works a bit better with glibc, if user code has already included
6262 stdlib.h.
6263 * doc/bison.texinfo (Bison Parser): Document that users can't
6264 arbitrarily use malloc and free for other purposes. Document
6265 that <alloca.h> and <malloc.h> might be included.
6266 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
6267 user must declare alloca.
6268
6269 * HACKING (release): Forwarn the Translation Project about
6270 stable releses.
6271
6272 2005-09-20 Akim Demaille <akim@epita.fr>
6273
6274 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
6275
6276 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
6277
6278 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
6279 (YYSTACK_ALLOC_MAXIMUM): Use it.
6280 (yysyntax_error): New function.
6281 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
6282 multiple syntax errors are reported, and alloca is being used.
6283 Instead, reallocate buffers twice as big each time, so that
6284 we waste at most half the allocated memory. Start with a small
6285 (128-byte) buffer that will suffice in most cases anyway.
6286 Use yysyntax_error to do most of the work.
6287
6288 * doc/bison.texinfo (Error Reporting, Table of Symbols):
6289 yynerrs is the number of errors reported, not the number of
6290 errors encountered.
6291
6292 * tests/glr-regression.at (Duplicated user destructor for lookahead):
6293 Mark it as expected to fail.
6294 Cast result of malloc; problem reported by twlevo@xs4all.nl.
6295 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
6296 Don't start user-code symbols with "yy", to avoid name space problems.
6297
6298 2005-09-19 Akim Demaille <akim@epita.fr>
6299
6300 Remove the traits, failed experiment.
6301 It never proved useful, and anyway because of the current
6302 definition, it was not possible to have several specialization of
6303 this traits, making it useless.
6304 * data/lalr1.cc (yy:traits): Remove.
6305 Inline its definitions in the parser class.
6306
6307 2005-09-19 Akim Demaille <akim@epita.fr>
6308
6309 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
6310 least Mac OSX with a /usr/local install of gettext.
6311
6312 2005-09-19 Akim Demaille <akim@epita.fr>
6313
6314 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
6315 and yytoken for similarity with the other skeletons.
6316
6317 2005-09-19 Akim Demaille <akim@epita.fr>
6318
6319 * NEWS, configure.ac: update version number to 2.1a.
6320
6321 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
6322
6323 * NEWS: Version 2.1.
6324
6325 * NEWS: Remove notice of yytname change, since it was never in an
6326 official release.
6327 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
6328 diagnostic.
6329 * src/output.c (prepare): Likewise.
6330 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
6331 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
6332 is not defined. This is an awful hack, but it's enough for now.
6333 All callers changed.
6334 * tests/glr-regression-at (make_value): Args are const pointers now,
6335 to avoid GCC warning.
6336 (Duplicated user destructor for lookahead): New test. Currently
6337 skipped. It fails on my host but I'm not sure it'll always fail.
6338
6339 2005-09-16 Akim Demaille <akim@epita.fr>
6340
6341 * src/symtab.h (struct symbol): Declare the printer and destructor
6342 as const, to avoid accidental calls to free.
6343 (symbol_destructor_set, symbol_printer_set): Adjust.
6344 * src/symtab.c: Adjust.
6345
6346 2005-09-16 Akim Demaille <akim@epita.fr>
6347
6348 * data/c.m4 (b4_token_enums): New.
6349 (b4_token_defines): Rename as...
6350 (b4_token_enums_defines): this.
6351 (b4_token_defines): New, output only the #defines.
6352 * data/yacc.c, data/glr.c: Adjust.
6353 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
6354 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
6355 as default values.
6356
6357 2005-09-16 Akim Demaille <akim@epita.fr>
6358
6359 * data/lalr1.cc (yylex_): Remove, inline its code.
6360 (yyreport_syntax_error_): Remove, replaced by...
6361 (yysyntax_error_): this which returns a string and leaves to the
6362 caller the call to the users' error function.
6363 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
6364 Move from members of the parser object...
6365 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
6366 to local variables of the parse function.
6367
6368 2005-09-16 Akim Demaille <akim@epita.fr>
6369
6370 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
6371 since it's in Bison's name space.
6372
6373 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
6374
6375 * data/glr.c (yyresolveValue): Add default case to pacify
6376 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
6377
6378 * NEWS: Document when yyparse started to return 2.
6379 * doc/bison.texinfo (Parser Function): Document when yyparse
6380 returns 2.
6381
6382 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
6383 (b4_filename_type): Renamed back from b4_file_name_type. All uses
6384 changed.
6385 (class position): file_name -> filename (reverting). All uses changed.
6386
6387 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
6388
6389 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
6390 do anything if $@ exists. This reverts part of the 2005-07-07
6391 patch.
6392
6393 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
6394
6395 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
6396 contains obsolete information and isn't worth distributing as a
6397 separate file anyway.
6398 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
6399 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
6400 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
6401 (yyparse): Abort if user code uses longjmp to throw an unexpected
6402 value.
6403
6404 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
6405
6406 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
6407 Suggested by twlevo@xs4all.nl.
6408
6409 * data/glr.c (YYCHK1): Do not assume YYE is in range.
6410 This avoids a diagnostic from gcc -Wswitch-enum.
6411 Problem reported by twlevo@xs4all.nl.
6412
6413 * doc/bison.texinfo: Don't use "filename", as per GNU coding
6414 standards. Use "file name" or "file" or "name", depending on
6415 the context.
6416 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
6417 not to hack/foo.tab.c.
6418 (Calc++ Top Level): 2nd arg of main is not const.
6419 * data/glr.c: b4_filename -> b4_file_name.
6420 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
6421 All uses changed.
6422 (class position): filename -> file_name. All uses changed.
6423 * data/yacc.c: b4_filename -> b4_file_name.
6424 * lib/bitset.h: filename -> file_name in local vars.
6425 * lib/bitset_stats.c: Likewise.
6426 * src/files.c: Likewise.
6427 * src/scan-skel.l ("@output ".*\n): Likewise.
6428 * src/files.c (file_name_split): Renamed from filename_split.
6429 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
6430
6431 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
6432
6433 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
6434 to accommodate latest gnulib.
6435
6436 * tests/glr-regression.at (Duplicate representation of merged trees):
6437 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
6438
6439 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
6440 needed.
6441
6442 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
6443
6444 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
6445 All uses changed. Invoke user destructor after an error during a
6446 split parse (trivial change from Joel E. Denny).
6447
6448 * tests/glr-regression.at
6449 (User destructor after an error during a split parse): New test case.
6450 Problem reported by Joel E. Denny in:
6451 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
6452
6453 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
6454
6455 * README-cvs: Give URLs for recommended tools.
6456 Mention Gzip version problem, and bootstrapping issues.
6457 Remove troubleshooting section, as it's somewhat obsolete.
6458
6459 * bootstrap (no_cache): New var, to accommodate different wget
6460 variants. Use it instead of '-C off'. Problem reported by
6461 twlevo@xs4all.nl.
6462
6463 * data/glr.c (yydestroyStackItem): New function.
6464 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
6465 debugging information. Problem reported by Joel E. Denny.
6466
6467 2005-08-25 Akim Demaille <akim@epita.fr>
6468
6469 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
6470
6471 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
6472
6473 * data/glr.c (yyrecoverSyntaxError, yyreturn):
6474 Don't invoke destructor on unresolved entries.
6475 * tests/glr-regression.at
6476 (User destructor for unresolved GLR semantic value): New test case.
6477 Problem reported by Joel E. Denny in:
6478 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
6479
6480 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
6481
6482 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
6483 Add strnlen.c.
6484 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
6485 lib-prefix.m4, po.m4.
6486
6487 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
6488 in yydestruct diagnostic, since it might not be an error.
6489 Problem reported by Joel Denny near end of
6490 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6491 * data/lalr1.cc (yyerturn): Likewise.
6492 * data/yacc.c (yyreturn): Likewise.
6493 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
6494
6495 * src/files.c: Remove obsolete FIXME comment.
6496
6497 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
6498 with the other templates, and to fix bogus run-on messages such
6499 as the one reported at the end of
6500 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6501 All callers changed to avoid the newline.
6502 (yyprocessOneStack): Output two lines rather than one, to accommodate
6503 the above change. This changes the debug output format slightly.
6504
6505 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
6506 reported by Joel E. Denny in
6507 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
6508 (trivial change).
6509 * tests/glr-regression.at (Duplicate representation of merged trees):
6510 New test, from Joel E. Denny in:
6511 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
6512 * THANKS: Add Joel E. Denny.
6513
6514 * configure.ac (AC_INIT): Bump to 2.0c.
6515
6516 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
6517
6518 * NEWS: Version 2.0b.
6519
6520 * Makefile.am (SUBDIRS): Put examples before tests, so that
6521 "make check" doesn't finish with "All 1 tests passed".
6522
6523 * tests/regression.at (Token definitions): Don't rely on
6524 AT_PARSER_CHECK for data that contains backslashes. It currently
6525 uses 'echo', and 'echo' isn't portable if its argument contains
6526 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
6527 that the byte '\0xff' is not printable in the C locale; it is,
6528 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
6529 not printable, so use '\0x81' to test.
6530
6531 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
6532 version of GCC, since the macro is used with non-GCC compilers.
6533
6534 Fix core dump reported by Pablo De Napoli in
6535 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
6536 * tests/regression.at (Invalid inputs with {}): New test.
6537 * src/parse-gram.y (token_name): Translate type before using
6538 it as an index.
6539
6540 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
6541 the user's name space. All uses changed to __attribute__
6542 ((__unused__)).
6543 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
6544 Add __attribute__ ((__noreturn__)).
6545
6546 * etc/clcommit: Remove. We weren't using it, and it failed
6547 "make maintainer-distcheck".
6548 * Makefile.maint: Merge from coreutils.
6549 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
6550 (syntax-check-rules): Change list of rules as described below.
6551 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
6552 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
6553 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
6554 (sc_trailing_space): New rules.
6555 (sc_xalloc_h_in_src): Remove.
6556 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
6557 (sc_space_tab, sc_error_exit_success, sc_changelog):
6558 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
6559 (makefile-check, po-check, author_mark_check):
6560 (makefile_path_separator_check, copyright-check):
6561 Use grep -n, to make it easier to find violations.
6562 Use CVS_LIST and CVS_LIST_EXCEPT.
6563 (header_regexp, h_re): Remove.
6564 (dd_c): New macro.
6565 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
6566 (my-distcheck): Use more-modern GCC flags.
6567 (signatures, %.asc): Remove.
6568 (rel-files, announcement): Remove signatures.
6569 Restore old updating code, even though we don't use it, so
6570 that we're the same as coreutils.
6571 (alpha, beta, major): Depend on news-date-check.
6572 Make the upload commands.
6573
6574 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
6575 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
6576 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
6577 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
6578 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
6579 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
6580 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
6581 * tests/sets.at: Likewise.
6582
6583 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
6584 we comment out the Autoconf version number.
6585 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
6586 it's error-prone and "make maintainer-distcheck" rejects it.
6587
6588 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
6589 Indent calls to "error" to pacify "make maintainer-distcheck",
6590 when the calls are not intended to be translated.
6591 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
6592
6593 * src/Makefile.am (DEFS): Use +=, to pacify
6594 "make maintainer-distcheck".
6595 (bison_SOURCES): Add scan-skel.h.
6596 (sc_tight_scope): New rule, from coreutils.
6597
6598 * src/files.c (src_extension, header_extension):
6599 Now static, not extern.
6600 * src/getargs.c (short_options): Likewise.
6601 * src/muscle_tab.c (muscle_table): Likewise.
6602 * src/parse-gram.y (current_class, current_type, current_prec):
6603 Likewise.
6604 * src/reader.c (grammar_end, previous_rule_end): Likewise.
6605 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
6606 * src/main.c (main): Cast bindtextdomain and textdomain calls to
6607 void, to avoid warning when NLS is disabled.
6608 * src/output.c: Include scan-skel.h.
6609 (scan_skel): Remove decl, since scan-skel.h does this.
6610 (output_skeleton):
6611 Indent calls to "error" to pacify "make maintainer-distcheck".
6612 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
6613 * src/reader.h (gram_end, gram_lineno): New decls to pacify
6614 "make maintainer-distcheck".
6615 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
6616 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
6617 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
6618 (skel_lex_destroy, scan_skel): Move these decls to...
6619 * src/scan-skel.h: New file.
6620 * src/uniqstr.c (uniqstr_assert):
6621 Indent calls to "error" to pacify "make maintainer-distcheck".
6622
6623 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
6624 not @VAR@.
6625
6626 * tests/torture.at: Revamp to avoid misuse of atoi that
6627 "make maintainer-distcheck" complained about.
6628
6629 * examples/extexi (message): Don't print a message more than once,
6630 and omit line-number decoration that makes Emacs compile think
6631 that informative messages are worth worrying about.
6632
6633 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
6634
6635 * configure.ac: Update version number.
6636
6637 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
6638 accidentally.
6639 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
6640 autogenerated by the maintainer.
6641 * examples/calc++/.cvsignore: Add *.yy.
6642
6643 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
6644 * lib/bitset_stats.c (bitset_stats_init): Likewise.
6645 * lib/bitsetv.c (bitsetv_alloc): Likewise.
6646
6647 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
6648
6649 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
6650 from maintainer-distcheck about casting the argument of 'free'.
6651
6652 * NEWS: Mention recent yytname changes.
6653 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
6654
6655 * bootstrap: For translations that have not yet been upgraded to
6656 the new runtime-po domain, prime the pump by extracting the
6657 relevant strings from the obsolete translations. This code can be
6658 removed once the bison-runtime domain has been translated by each
6659 team.
6660
6661 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
6662 now that token names are already quoted.
6663
6664 Fix problem reported by Anthony Heading.
6665 * data/glr.c (YYTOKEN_TABLE): New macro.
6666 (yytname): Define if YYTOKEN_TABLE.
6667 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
6668 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
6669 (YYERROR_VERBOSE): Define the same way the other skeletons do.
6670 * src/output.c (prepare_symbols): Output token_table_flag.
6671
6672 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
6673
6674 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
6675 again if the first call fails.
6676
6677 * data/glr.c (yytnamerr): New function.
6678 (yyreportSyntaxError): Use it to dequote most string literals.
6679 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
6680 with other skeletons. All uses changed.
6681 (yytnameerr_): New function.
6682 (yyreport_syntax_error): Use it to dequote most string literals.
6683 * data/yacc.c (yytnamerr): New function.
6684 (yyerrlab): Use it to decode most string literals.
6685 * doc/bison.texinfo (Decl Summary, Calling Convention):
6686 Clarify quoting convention of yytname.
6687 * src/output.c (prepare_symbols): Quote all names. This undoes
6688 the 2005-04-17 change, which is now accomplished (mostly) via
6689 changes in the parsers as described above.
6690 * tests/regression.at (Token definitions, Web2c Actions):
6691 Undo most 2005-04-17 change here, too.
6692
6693 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
6694
6695 Fix more problems reported by twlevo@xs4all.nl.
6696 * tests/cxx-type.at: Don't pipe output of ./types through sed to
6697 remove trailing spaces. This loses the exit status of ./types,
6698 and isn't needed since ./types shouldn't be emitting trailing
6699 spaces.
6700 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
6701 as the stack isn't valid in that case.
6702
6703 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
6704 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
6705 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
6706 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
6707 is used.
6708 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
6709 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
6710 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
6711 Likewise.
6712
6713 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
6714 overly-picky compilers that reject 'char *foo = "bar";'.
6715
6716 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
6717 to FILE * parameter, not to stderr. This fixes a typo introduced
6718 in the 2005-07-12 change.
6719
6720 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
6721 warnings from GCC 4.
6722
6723 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
6724 (yyglrShiftDefer, yysplitStack):
6725 Remove unused parameters b4_pure_formals. All uses changed.
6726 (yyglrShift): Remove unused parameters b4_user_formals.
6727 All uses changed.
6728 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
6729
6730 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
6731
6732 Destructor cleanups and regularization among the three skeletons.
6733 * NEWS: Document the behavior changes.
6734 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
6735 stack before failing, as the cleanup code will do it for us now.
6736 * data/lalr1.cc (yyerrlab): Likewise.
6737 * data/glr.c (yyparse): Pop everything off the stack before
6738 freeing it, so that destructors get called properly.
6739 * data/lalr1.cc (yyreturn): Likewise.
6740 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
6741 This is more consistent.
6742 * doc/bison.texinfo (Destructor Decl): Mention more reasons
6743 why destructors might be called. 1.875 -> 2.1.
6744 (Destructor Decl, Decl Summary, Table of Symbols):
6745 Some English-language cleanups for %destructor.
6746 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6747 Add output line for destructor of start symbol.
6748 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
6749 because of that same extra output line.
6750
6751 * NEWS: Document minor wording changes in diagnostics of
6752 Bison-generated parsers.
6753 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6754 Remove unused formals. All uses changed.
6755 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
6756 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
6757 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
6758 Rename yyoverflowab to yyexhaustedlab.
6759 When memory exhaustion occurs during syntax-error reporting,
6760 report it separately rather than in a single diagnostic; this
6761 eases translation.
6762 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
6763 (Memory Exhausted): Renamed from Parser Stack Overflow.
6764 Revamp wording slightly to prefer "memory exhaustion".
6765 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
6766
6767 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
6768
6769 Add i18n support to the GLR skeleton. Partially fix the C++
6770 skeleton; a C++ expert needs to finish this. Remove debugging
6771 msgids; there's little point to having them translated, since they
6772 can be understood only by someone who can read the
6773 (English-language) source code.
6774
6775 Generate runtime-po/bison-runtime.pot automatically, so that we
6776 don't have to worry about garbage getting in that file. We'll
6777 make sure after the next official release that old msgids don't
6778 get lost. See
6779 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
6780
6781 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
6782 Now auto-generated.
6783 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
6784 Fix typos in explanations of the runtime file.
6785 * bootstrap: Change gettext keyword from YYI18N to YY_.
6786 Use standard Makefile.in.in in runtime-po, since we'll arrange
6787 for backward-compatible bison-runtime.po files in a different way.
6788 * data/glr.c (YY_): New macro, from yacc.c.
6789 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
6790 Translate messages intended for users.
6791 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
6792 the wording in the other skeletons. We don't know that the memory
6793 is virtual.
6794 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
6795 Use same method that yacc.c uses.
6796 Don't translate debugging messages.
6797 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
6798 it doesn't work (yet), and requires C++ expertise to fix.
6799 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
6800 Move defn to a more logical place, to be consistent with other
6801 skeletons.
6802 Don't translate debugging messages.
6803 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
6804 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
6805 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
6806 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
6807
6808 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
6809 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
6810 void, not int.
6811 * tests/glr-regression.at (Badly Collapsed GLR States):
6812 Likewise.
6813 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6814 yylex should return 0 at EOF rather than aborting.
6815
6816 Improve tests for stack overflow in GLR parser.
6817 Problem reported by twlevo@xs4all.nl.
6818 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
6819 All uses removed.
6820 (yyStackOverflow): Just longjmp, but with value 2 so that caller
6821 can handle the problem.
6822 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
6823 (yyparse): New local variable yyresult to record the result.
6824 Use result of setjmp to set it, rather than storing itinto
6825 struct.
6826 (yyDone): Remove label.
6827 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
6828 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
6829 if YYABORT is used).
6830 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
6831 yyparse status; put status > 1 into diagnostic.
6832 Check that status==2 works.
6833 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
6834 Use exit status 3 for failure to open (which shouldn't happen).
6835
6836 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
6837
6838 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
6839 1 on syntax error; just let yyparse do its thing.
6840 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
6841 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
6842 (Exploding the Stack Size with Alloca):
6843 (Exploding the Stack Size with Malloc):
6844 Expect exit status 2, not 1, since the parser is supposed to blow
6845 its stack. Problem reported by twlevo@xs4all.nl.
6846
6847 * data/glr.c (yyparse): Don't assume that the initial calls
6848 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
6849 Print a stack-overflow message and fail instead.
6850 Initialize the line-number information before creating the stack,
6851 so that the stack-overflow message can report line zero safely.
6852
6853 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
6854
6855 Fix problems reported by twlevo@xs4all.nl.
6856 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
6857 (yyuserMerge): Provide a default case if b4_mergers is empty.
6858 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
6859 * tests/glr-regression.at
6860 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
6861 Add casts to pacify C++ compilers.
6862 * tests/glr-regression.at (Improper merging of GLR delayed action
6863 sets): Declare yylex before using it.
6864 * tests/Makefile.am (maintainer-check-g++): Fix a stray
6865 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
6866 test for valgrind; valgrind is independent of g++.
6867 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
6868 for compatibility with POSIX 1003.1-2001 (if running coreutils).
6869 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
6870 Use a destructor, so that we can expand the stack. Change
6871 YYSTYPE to char * so that we can free it. Cast result of malloc.
6872
6873 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6874
6875 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
6876 a valgrind failure. Problem reported by twlevo@xs4all.nl.
6877
6878 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
6879
6880 * PACKAGING: New file, suggested by Bruno Haible and taken from
6881 similar wording in gettext's PACKAGING file.
6882 * NEWS: Mention PACKAGING.
6883 * Makefile.am (EXTRA_DIST): Add PACKAGING.
6884
6885 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
6886
6887 * NEWS: Document recent i18n improvements.
6888 * bootstrap: Get runtime translations into runtime-po.
6889 Create runtime-po files automatically, if possible.
6890 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
6891 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
6892 does not infringe on the user's name space.
6893 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
6894 * doc/bison.texinfo (Internationalization): Revamp the English
6895 and Texinfo syntax a bit, to try to make it clearer.
6896 (Bison Options, Option Cross Key): Mention --print-localedir.
6897 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
6898 YYENABLE_NLS. Quote a bit more.
6899 * runtime-po/.cvsignore: New file.
6900 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
6901 * runtime-po/Rules-quot: Remove; now created by bootstrap.
6902 * runtime-po/quot.sed: Likewise.
6903 * runtime-po/boldquot.sed: Likewise.
6904 * runtime-po/en@quot.header: Likewise.
6905 * runtime-po/en@boldquot.header: Likewise.
6906 * runtime-po/insert-header.sin: Likewise.
6907 * runtime-po/remove-potcdate.sin: Likewise.
6908 * runtime-po/Makevars: Likewise.
6909 * runtime-po/LINGUAS: Likewise.
6910 * runtime-po/de.po: Likewise; we will rely on the translation project
6911 to maintain this, so "bootstrap" should get it.
6912 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
6913 its value.
6914 * src/main.c (main): Bind the bison-runtime domain, too.
6915
6916 2005-07-12 Bruno Haible <bruno@clisp.org>
6917
6918 * data/yacc.c: Include <libintl.h> when NLS is enabled.
6919 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
6920 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
6921 * runtime-po: New directory.
6922 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
6923 $(DOMAIN).pot-update rule, so that old messages are never dropped.
6924 * runtime-po/Rules-quot: New file, copied from po/.
6925 * runtime-po/quot.sed: Likewise.
6926 * runtime-po/boldquot.sed: Likewise.
6927 * runtime-po/en@quot.header: Likewise.
6928 * runtime-po/en@boldquot.header: Likewise.
6929 * runtime-po/insert-header.sin: Likewise.
6930 * runtime-po/remove-potcdate.sin: Likewise.
6931 * runtime-po/Makevars: New file.
6932 * runtime-po/POTFILES.in: New file.
6933 * runtime-po/LINGUAS: New file.
6934 * runtime-po/bison-runtime.pot: New file.
6935 * runtime-po/de.po: New file.
6936 * m4/bison.m4: New file.
6937 * Makefile.am (SUBDIRS): Add runtime-po.
6938 (aclocaldir, aclocal_DATA): New variables.
6939 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
6940 Define aclocaldir.
6941 * src/getargs.c (usage): Document --print-localedir option.
6942 (PRINT_LOCALEDIR_OPTION): New enum item.
6943 (long_options): Add --print-localedir option.
6944 (getargs): Handle --print-localedir option.
6945 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
6946 (Internationalization): New section.
6947
6948 2005-07-12 Akim Demaille <akim@epita.fr>
6949
6950 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
6951 for consistency with the rest of the code.
6952 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
6953 Add separators.
6954
6955 2005-07-12 Akim Demaille <akim@epita.fr>
6956
6957 * src/parse-gram.y: Use %printer instead of YYPRINT.
6958
6959 2005-07-12 Akim Demaille <akim@epita.fr>
6960
6961 * src/symtab.h, src/symtab.c (symbol_print): New.
6962 * src/symlist.h, src/symlist.c (symbol_list_print): New.
6963 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
6964
6965 2005-07-12 Akim Demaille <akim@epita.fr>
6966
6967 * data/glr.c (b4_syncline): Fix (swap) the definitions of
6968 b4_at_dollar and b4_dollar_dollar.
6969
6970 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
6971
6972 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
6973 and Pennello's paper.
6974
6975 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
6976
6977 * data/yacc.c (yyparse): Undo previous patch. Instead,
6978 set yylsp[0] and yyvsp[0] only if the initial action
6979 sets yylloc and yylval, respectively.
6980
6981 * data/yacc.c (yyparse): In the initial action, set
6982 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
6983 This avoids the use of undefined variables if the initial
6984 action does not set yylloc and/or yylval.
6985
6986 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
6987
6988 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
6989 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
6990 Remove from CVS. These files are automatically generated.
6991 * examples/extexi: Clarify that this file is now part of Bison,
6992 not GNU M4, and that it works with any POSIX-compatible Awk.
6993 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
6994 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
6995 so that we also get calc++-parser.yy. Geneate it.
6996 Use $(AWK), not gawk, since any conforming Awk will do.
6997 Put comment before action, since older 'make' can't handle comment
6998 in action.
6999 $(BUILT_SOURCES): List all built sources, not just some of them.
7000 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
7001 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
7002 $($(calc_sources_generated)): Remove unnecessary test for existence
7003 of target. (This had a shell syntax error anyway; a stray "x".)
7004 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
7005 calc++-parser.yy.
7006 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
7007
7008 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
7009 implied by the other modules.
7010
7011 2005-07-06 Akim Demaille <akim@epita.fr>
7012
7013 Bind examples/calc++ to the package.
7014 * examples/calc++/Makefile: Remove, replaced by...
7015 * examples/calc++/Makefile.am: ... this new file.
7016 * examples/calc++/test: Remove input.
7017 * examples/calc++/compile: Remove.
7018 * examples/Makefile.am: New.
7019 * configure.ac, Makefile.am: Adjust.
7020 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
7021
7022 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
7023
7024 * data/glr.c (yyFail): Drastically simplify; since the format argument
7025 never had any % directives, we can simply pass it to yyerror.
7026 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
7027 be modified later, as that is the usual style in glr.c.
7028 Problems reported by Paul Hilfinger.
7029
7030 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
7031 and size overflow errors.
7032 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
7033 in case the user prolog sets feature-test macros like _GNU_SOURCE.
7034 (YYSIZEMAX): New macro.
7035 (yystpcpy): New function, taken from yacc.c.
7036 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
7037 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
7038 so that we don't have to maintain their signatures.
7039 (yyFail): Check for buffer overflow, by using vsnprintf rather
7040 than vsprintf. Allocate a bigger buffer if possible.
7041 Report an error if buffer allocation fails.
7042 (yyStackOverflow): New function.
7043 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
7044 the initialization was successful. It might fail if storage was
7045 exhausted.
7046 (yyexpandGLRStack): Add more checks for storage allocation failure.
7047 Use yyStackOverflow to report failures.
7048 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
7049 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
7050 Don't assume stack number fits in int.
7051 (yysplitStack): Check for storage allocation failure.
7052 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
7053 can print diagnostics on storage allocation failure. All callers
7054 changed.
7055 (yyresolveValue): Use yybool for boolean.
7056 (yyreportSyntaxError): Check for size-calculation overflow.
7057 This code is taken from yacc.c.
7058 (yyparse): Check for storage allocation errors when allocating
7059 the initial stack.
7060
7061 2005-07-05 Akim Demaille <akim@epita.fr>
7062
7063 Extract calc++ from the documentation.
7064 * doc/bison.texinfo (Calc++): Add the extraction marks.
7065 * examples/extexi: New, from the aborted GNU Programming 2E.
7066 Separate the different paragraph of a file with empty lines.
7067 * examples/Makefile: Use it to extract the whole calc++ example.
7068
7069 2005-06-24 Akim Demaille <akim@epita.fr>
7070
7071 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
7072 class typedefs.
7073
7074 2005-06-22 Akim Demaille <akim@epita.fr>
7075
7076 * doc/bison.texinfo (C++ Language Interface): First stab.
7077 (C++ Parsers): Remove.
7078
7079 2005-06-22 Akim Demaille <akim@epita.fr>
7080
7081 * data/lalr1.cc (yylex_): Honor %lex-param.
7082
7083 2005-06-22 Akim Demaille <akim@epita.fr>
7084
7085 Start a set of simple examples.
7086 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
7087 * examples/calc++/calc++-driver.hh,
7088 * examples/calc++/calc++-parser.yy,
7089 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
7090 * examples/calc++/compile, examples/calc++/test: New.
7091
7092 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
7093
7094 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
7095 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
7096 which stems from the 2005-05-27 patch.
7097
7098 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7099
7100 * data/glr.c: Modify treatment of unused parameters to permit use
7101 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
7102
7103 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
7104
7105 Fix infringement on user name space reported by Janos Zoltan Szabo.
7106 * data/yacc.c (yyparse): strlen -> yystrlen.
7107
7108 2005-05-30 Akim Demaille <akim@epita.fr>
7109
7110 * data/lalr1.cc (_): New.
7111 Translate the various messages.
7112
7113 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7114
7115 Fix infringement on user name space reported by Bruno Haible.
7116 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
7117 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
7118 the user's name space.
7119 (alloca): Include <stdlib.h> to get it, if it's not built in.
7120 (YYMALLOC, YYFREE): Define only if needed.
7121 (malloc, free): Declare, but only if needed, as this infringes on
7122 the user name space.
7123
7124 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
7125
7126 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
7127 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
7128 with %d format.
7129 * lib/ebitset.c (min, max): Undef before defining.
7130 * lib/vbitset.c (min, max): Likewise.
7131 * lib/subpipe.c (create_subpipe): Save local variables in case
7132 vfork clobbers them.
7133
7134 2005-05-24 Bruno Haible <bruno@clisp.org>
7135
7136 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
7137 error message syntax used by gcc-4.0.
7138
7139 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
7140
7141 * README: Mention m4 1.4.3. Remove obsolete advice about
7142 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
7143
7144 * bootstrap: Remove workaround for problem I encountered with
7145 gettext 0.14.1; it seems to be fixed now.
7146
7147 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
7148
7149 * NEWS: Version 2.0a.
7150
7151 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
7152 the previous change.
7153
7154 Various maintainer cleanups.
7155 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
7156 conftest*, for benefit of CVS commands run at the same time as
7157 "configure". Add build-aux, since "bootstrap" now creates it and
7158 its subfiles.
7159 * Makefile.cfg (move_if_change): Remove.
7160 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
7161 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
7162 (po_repo, do-po-update, po-update, wget_files, get-targets):
7163 (config.guess-url_prefix, config.sub-url_prefix):
7164 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
7165 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
7166 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
7167 Remove.
7168 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
7169 this is now the recommended name.
7170 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
7171 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
7172 ylwrap. These files now go into build-aux.
7173 * config/move-if-change: Remove.
7174 * config/prev-version.txt: Bump from 1.75 to 2.0.
7175
7176 * bootstrap: Add stdio-safer, unistd-safer modules.
7177 Remove m4/glibc2.m4 (introduced by latest gnulib, but
7178 we don't need it).
7179 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
7180 fopen-safer.c, stdio-safer.h, unistd-safer.h.
7181 * lib/subpipe.c: Include "unistd-safer.h".
7182 (create_subpipe): Make sure all the newly-created
7183 file descriptors are > 2, so that diagnostics don't
7184 get sent down them (which might cause Bison to hang, in theory).
7185 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
7186 * src/files.c (xfopen): Use fopen_safer, not fopen.
7187
7188 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
7189 yesterday's yacc.c fix.
7190
7191 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
7192
7193 * data/glr.c, data/lalr1.cc: Update copyright date.
7194
7195 Fix a destructor bug reported by Wolfgang Spraul in
7196 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
7197 * data/yacc.c (yyabortlab): Don't call destructor, and
7198 don't set yychar to EMPTY.
7199 (yyoverflowlab): Don't call destructor.
7200 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
7201 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
7202 since we no longer output the message "discarding lookahead token
7203 end of input ()".
7204
7205 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7206
7207 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
7208 fix a small glitch in debugging output.
7209 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
7210 after YY_SYMBOL_PRINT where needed.
7211
7212 (struct yyGLRState): Add some comments.
7213 (struct yySemanticOption): Add some comments.
7214 (union yyGLRStackItem): Add comment.
7215
7216 (yymergeOptionSets): Correct this to properly perform the union,
7217 avoiding infinite reported by Michael Rosien.
7218 Update comment.
7219
7220 * tests/glr-regression.at: Add test for GLR merging error reported
7221 by M. Rosien.
7222
7223 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
7224
7225 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
7226 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
7227 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
7228 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
7229 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
7230 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
7231 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
7232 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
7233 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
7234 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
7235 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
7236 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
7237 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
7238 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
7239 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
7240 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
7241 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
7242 src/derives.h, src/files.c, src/files.h, src/getargs.c,
7243 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
7244 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
7245 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
7246 src/output.h, src/parse-gram.c, src/parse-gram.h,
7247 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
7248 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
7249 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
7250 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
7251 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
7252 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
7253 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
7254 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
7255 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
7256 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
7257 tests/reduce.at, tests/regression.at, tests/sets.at,
7258 tests/synclines.at, tests/testsuite.at, tests/torture.at:
7259 Update FSF postal mail address.
7260
7261 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
7262
7263 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
7264 Problem reported by Ralf Menzel.
7265
7266 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
7267
7268 * tests/actions.at: Test that stack overflow invokes destructors.
7269 From Marcus Holland-Moritz.
7270 * data/yacc.c (yyerrlab): Move the code that destroys the stack
7271 from here....
7272 (yyreturn): to here. That way, destructors are called properly
7273 even if the stack overflows, or the user calls YYACCEPT or
7274 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
7275 (yyoverflowlab): Destroy the lookahead.
7276
7277 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
7278
7279 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
7280
7281 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
7282
7283 * NEWS: Bison-generated C parsers no longer quote literal strings
7284 associated with tokens.
7285 * src/output.c (prepare_symbols): Don't escape strings,
7286 since users don't want to see C escapes.
7287 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
7288 in diagnostics.
7289 * tests/input.at (Torturing the Scanner): Likewise.
7290 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
7291
7292 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
7293
7294 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
7295 the data size is known to be too small and we can't increase it.
7296 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
7297
7298 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
7299
7300 * src/parse-gram.y: Include quotearg.h.
7301 (string_as_id): Quote $1 before using it as a key, since the
7302 lexer no longer quotes it for us.
7303 (string_content): Don't strip quotes, since lexer no longer
7304 quotes it for us.
7305 * src/scan-gram.l: Include quotearg.h.
7306 ("\""): Omit quote.
7307 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
7308 a key, since the rest of the lexer doesn't quote it.
7309 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
7310 * tests/regression.at (Token definitions): Check for backslashes
7311 in token strings.
7312
7313 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
7314 (YYSIZE_T): Define to unsigned long int when using an older compiler.
7315 (yyparse): Revamp code to generate long syntax error message, to
7316 make it easier to translate, and to avoid problems with arithmetic
7317 overflow. Change "virtual memory" to "memory" in diagnostic, since
7318 we don't know whether the memory is virtual.
7319
7320 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
7321
7322 * NEWS: Bison-generated C parsers now use the _ macro to
7323 translate strings.
7324 * data/yacc.c (_) [!defined _]: New macro.
7325 All English strings wrapped inside this macro.
7326 * doc/bison.texinfo (Bison Parser): Document _.
7327 * po/POTFILES.in: Include src/parse-gram.c, since it now
7328 includes translateable strings that parse-gram.y doesn't.
7329
7330 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
7331
7332 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
7333 reverting the 2004-10-11 change to this function.
7334 (symbol_check_alias_consistency): Don't call symbol_type_set
7335 if the type name is already correct.
7336 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
7337
7338 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
7339
7340 * tests/regression.at (Token definitions): Don't use a token named
7341 c, as that generates a "#define c ..." that runs afoul of buggy
7342 stdlib.h that uses the identifier c as a member of struct
7343 drand48_data. Problem reported by Horst Wente.
7344
7345 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
7346
7347 * bootstrap: Change translation URL from
7348 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
7349 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
7350 redirection glitches. Problem reported by twlevo@xs4all.nl.
7351
7352 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
7353
7354 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
7355 after operands; POSIX says this isn't portable for the c99 command.
7356
7357 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
7358
7359 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
7360 immediately if a data overrun has occurred; this may help us track
7361 down what may be a spurious failure on MacOS.
7362
7363 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
7364
7365 Respond to problems reported by twlevo@xs4all.nl.
7366
7367 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
7368
7369 * src/vcg.h: Comment fix.
7370 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
7371 (G_CMAX): Change to -1 instead of INT_MAX.
7372
7373 * data/yacc.c (yyparse): Omit spaces before #line.
7374
7375 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
7376
7377 * src/tables.c (state_number_to_vector_number): Put it inside an
7378 "#if 0", since it's not currently used. Problem reported by
7379 Roland McGrath.
7380
7381 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
7382
7383 * src/output.c (escaped_output): Renamed from
7384 escaped_file_name_output, since we now use it for symbol tags as
7385 well. All uses changed.
7386 (symbol_destructors_output, symbol_printers_output):
7387 Escape symbol tags too.
7388 Problem reported by Matyas Forstner in
7389 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
7390
7391 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
7392 not needed.
7393 * src/output.c (user_actions_output, token_definitions_output,
7394 symbol_destructors_output, symbol_printers_output): Likewise.
7395 * src/reader.c (prologue_augment): Likewise.
7396 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
7397
7398 * src/vcg.c (output_edge): Don't quote linestyle arg.
7399 Problem reported by twlevo@xs4all.nl.
7400
7401 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
7402
7403 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
7404 example, reported by Derek M Jones. Also, make the example even
7405 more outrageous, to better illustrate how bad the problem is.
7406
7407 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
7408
7409 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
7410 putsym. Typo reported by Sebastian Piping.
7411
7412 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
7413
7414 * doc/bison.texinfo (Language and Grammar): some -> same
7415 (Epilogue): int he -> in the
7416 Typos reported by Sebastian Piping via Justin Pence.
7417
7418 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
7419
7420 * tests/glr-regression.at (Improper handling of embedded actions
7421 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
7422 embedded actions and $-N in GLR parsers", work around an Autoconf bug
7423 with dollar signs in test names.
7424 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
7425 for a similar reason.
7426
7427 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
7428
7429 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
7430 wants to redefine G_VIEW.
7431
7432 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
7433
7434 * src/vcg.c (get_view_str): Remove case for normal_view.
7435 Problem reported by twlevo@xs4all.nl.
7436
7437 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
7438
7439 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
7440 Problem reported by twlevo@xs4all.nl.
7441
7442 * doc/bison.texinfo: Change @dircategory from "GNU programming
7443 tools" to "Software development". Requested by Richard Stallman
7444 via Karl Berry.
7445
7446 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
7447
7448 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
7449 Problem reported by twlevo@xs4all.nl.
7450
7451 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
7452
7453 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
7454 keyword; it's not needed with modern compilers, and it doesn't
7455 affect correctness with older compilers. Suggested by
7456 twlevo@xs4all.nl.
7457
7458 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
7459
7460 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
7461 gcc -Wswitch-default.
7462 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
7463 * data/yacc.c (yyparse): Likewise.
7464
7465 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
7466
7467 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
7468 already. Let config.h define any nonstandard values.
7469
7470 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
7471
7472 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
7473 for the benefit of slower hosts. Problem reported by
7474 Nelson H. F. Beebe.
7475
7476 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
7477
7478 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
7479 being defined and not used.
7480 * data/lalr1.cc (yyparse): Likewise.
7481 Use "if (false)" rather than "if (0)".
7482
7483 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
7484
7485 * TODO: Mention that we should allow NUL bytes in tokens.
7486
7487 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
7488
7489 * src/scan-skel.l (<<EOF>>): Don't close standard output.
7490 Problem reported by Hans Aberg.
7491
7492 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
7493
7494 * src/getargs.c (version): Happy new year; update overall
7495 program copyright date from 2004 to 2005.
7496
7497 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
7498 Problem reported by Hans Aberg.
7499 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
7500 (Output file names.): Add a test for the case when standard output
7501 is closed.
7502
7503 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
7504
7505 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
7506 to fix an oversight in the Bison 2.0 manual.
7507
7508 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
7509
7510 * NEWS: Version 2.0. Reformat the existing news items since
7511 1.875, so that related items are grouped together.
7512 * configure.ac (AC_INIT): Bump version to 2.0.
7513 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
7514
7515 * tests/torture.at (Exploding the Stack Size with Alloca): Set
7516 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
7517 otherwise, we're not testing alloca. Unfortunately there's no
7518 simple way to consult HAVE_ALLOCA here.
7519
7520 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
7521 for yymsg, too.
7522
7523 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
7524 hand. This avoids a warning about comparing int to size_t when
7525 GCC warnings are enabled.
7526
7527 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
7528
7529 * NEWS: Bison-generated parsers no longer default to using the
7530 alloca function (when available) to extend the parser stack, due
7531 to widespread problems in unchecked stack-overflow detection.
7532 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
7533 responsibility to set it to a positive value. This lets the user
7534 specify a value that is not a preprocessor constant.
7535 * data/yacc.c (YYMAXDEPTH): Likewise.
7536 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
7537 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
7538 to be a compile-time constant. However, explain the constraints on it.
7539 Also, explain the constraints on YYINITDEPTH.
7540 (Table of Symbols): Explain that alloca is no longer the default.
7541 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
7542 to 1.
7543
7544 * doc/bison.texinfo (Location Default Action): Mention that n must
7545 be zero when k is zero. Suggested by Frank Heckenbach.
7546
7547 2004-12-22 Akim Demaille <akim@epita.fr>
7548
7549 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
7550 (parser::state_type, parser::semantic_type, parser::location_type):
7551 Private, not public.
7552 (parser::parse): Return ints, not bool.
7553 Returning a bool introduces a problem: 0 corresponds to false, and
7554 it seems weird to return false on success. Returning true changes
7555 the conventions for yyparse.
7556 Alternatively we could return void and send an exception.
7557 There is no clear consensus (yet?).
7558 (state_stack, semantic_stack, location_stack): Rename as...
7559 (state_stack_type, semantic_stack_type, location_stack_type): these.
7560 Private, not public.
7561 * tests/c++.at: New.
7562 * tests/testsuite.at, tests/Makefile.am: Adjust.
7563
7564 2004-12-21 Akim Demaille <akim@epita.fr>
7565
7566 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
7567
7568 2004-12-21 Akim Demaille <akim@epita.fr>
7569
7570 Don't impose std::string for filenames.
7571
7572 * data/lalr1.cc (b4_filename_type): New.
7573 (position::filename): Use it.
7574 (parser.hh): Move the inclusion of stack.hh and location.hh below
7575 the user code, so that needed headers for the filename type can be
7576 included first.
7577 Forward declare them before the user code.
7578 * tests/Makefile.am (check-local, installcheck-local): Pass
7579 TESTSUITEFLAGS to the TESTSUITE.
7580
7581 2004-12-20 Akim Demaille <akim@epita.fr>
7582
7583 Use more STL like names: my_class instead of MyClass.
7584
7585 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
7586 (SemanticStack, SemanticType, StateStack, StateType)
7587 (TokenNumberType, Stack, Slice, Traits, Parser::location)
7588 (Parser::value): Rename as...
7589 (location_stack, location_type, rhs_number_type, semantic_stack)
7590 (semantic_type, state_stack, state_type, token_number_type, stack)
7591 (slice, traits, parser::yylloc, parser::yylval): these.
7592
7593 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
7594
7595 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
7596
7597 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
7598 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7599
7600 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
7601
7602 Remove uses of 'short int' and 'unsigned short int'. This raises
7603 some arbitrary limits. It uses more memory but nowadays that's
7604 not much of an issue.
7605
7606 This change does not affect the generated parsers; that's a different
7607 task, as some users will want to conserve memory there.
7608
7609 Ideally we should use size_t to represent all object counts, and
7610 something like ptrdiff_t to represent signed differences of object
7611 counts; but that will require more code-cleanup than I have the
7612 time to do right now.
7613
7614 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
7615 Use size_t, not int or short int, to count objects.
7616 * src/closure.c (nritemset, closure): Likewise.
7617 * src/closure.h (nritemset, closure): Likewise.
7618 * src/nullable.c (nullable_compute): Likewise.
7619 * src/print.c (print_core): Likewise.
7620 * src/print_graph.c (print_core): Likewise.
7621 * src/state.c (state_compare, state_hash): Likewise.
7622 * src/state.h (struct state): Likewise.
7623 * src/tables.c (default_goto, goto_actions): Likewise.
7624
7625 * src/gram.h (rule_number, rule): Use int, not short int.
7626 * src/output.c (prepare_rules): Likewise.
7627 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
7628 errs, reductions): Likewise.
7629 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
7630 Likewise.
7631 * src/tables.c (vector_number, tally, action_number,
7632 ACTION_NUMBER_MINIMUM): Likewise.
7633 * src/output.c (muscle_insert_short_int_table): Remove.
7634
7635 2004-12-17 Akim Demaille <akim@epita.fr>
7636
7637 * data/lalr1.cc: Extensive Doxygenation.
7638 (error_): Rename as...
7639 (error): this, since it is visible to the user.
7640 Adjust callers.
7641 (Parser::message): Now an automatic variable from...
7642 (Parser::yyreport_syntax_error_): here.
7643 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
7644 Parser::error.
7645 * tests/input.at: Escape $.
7646
7647 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
7648
7649 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
7650 Parenthesize rhs to avoid obscure problems with mistakes like
7651 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
7652 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7653 b4_rhs_location): Likewise.
7654 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
7655 b4_rhs_location): Likewise.
7656
7657 2004-12-16 Akim Demaille <akim@epita.fr>
7658
7659 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
7660 yacc.c: be sure to stay within yycheck_.
7661 * tests/actions.at: Re-enable C++ tests.
7662
7663 2004-12-16 Akim Demaille <akim@epita.fr>
7664
7665 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
7666 real.
7667
7668 2004-12-16 Akim Demaille <akim@epita.fr>
7669
7670 Use #define to handle the %name-prefix.
7671
7672 * data/glr.c, data/yacc.c: Comment changes.
7673 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
7674 so that one can refer to yylex in the parser file, and have it
7675 renamed, as is the case with other skeletons.
7676
7677 2004-12-16 Akim Demaille <akim@epita.fr>
7678
7679 Move lalr1.cc internals into yy*.
7680
7681 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
7682 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
7683 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
7684 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
7685 (empty_, final_, terror_, errcode_, ntokens_)
7686 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
7687 (looka_, ilooka_, error_range_, nerrs_):
7688 Rename as...
7689 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
7690 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
7691 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
7692 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
7693 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
7694 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
7695 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
7696 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
7697 these.
7698
7699 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
7700
7701 Fix some problems reported by twlevo at xs4all.
7702 * src/symtab.c (symbol_new): Report an error if the input grammar
7703 contains too many symbols. This is better than calling abort() later.
7704 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
7705 (struct node, struct graph):
7706 Rename member expand to stretch. All uses changed.
7707 (struct graph): Remove member layoutalgorithm. All uses removed.
7708 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
7709 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
7710 All uses changed.
7711 (N_STRETCH): Rename from N_EXPAND. All uses changed.
7712
7713 2004-12-15 Akim Demaille <akim@epita.fr>
7714
7715 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
7716 Add more Doxygen comments.
7717 (symprint_, stack_print_, reduce_print_, destruct_, pop)
7718 (report_syntax_error_, translate_): Rename as...
7719 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
7720 (yypop_, yyreport_syntax_error_, yytranslate_): this.
7721
7722 2004-12-15 Akim Demaille <akim@epita.fr>
7723
7724 * data/lalr1.cc (lex_): Rename as...
7725 (yylex_): this.
7726 Move the trace here.
7727 Take the %name-prefix into account.
7728 Reported by Alexandre Duret-Lutz.
7729
7730 2004-12-15 Akim Demaille <akim@epita.fr>
7731
7732 Simplify the C++ parser constructor.
7733
7734 * data/lalr1.cc (debug_): Rename as...
7735 (yydebug_): so that the parser's internals are always in the yy*
7736 pseudo namespace.
7737 Adjust uses.
7738 (b4_parse_param_decl): Remove the leading comma as it is now only
7739 called as unique argument list.
7740 (Parser::Parser): Remove the constructor accepting a location and
7741 an initial debugging level.
7742 Remove from the other ctor the argument for the debugging level.
7743 (debug_level_type, debug_level, set_debug_level): New.
7744
7745 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
7746 constructor calls.
7747
7748 2004-12-15 Akim Demaille <akim@epita.fr>
7749
7750 Remove b4_root related material: failure experiment
7751 (which goal was to allow to derive from a class).
7752
7753 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
7754 definitions and uses.
7755
7756 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
7757
7758 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
7759 not 2, since it's not portable to subtract 1 from the start of an
7760 array. The new item 0 is never set or used. All uses changed.
7761
7762 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
7763 the default definition of YYLLOC_DEFAULT. Problem reported
7764 by Frank Heckenbach.
7765
7766 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
7767
7768 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
7769 the normal case and one for the error case. Just use the
7770 first one uniformly. Problem reported by Frank Heckenbach.
7771 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
7772 use exactly the same macro in both places.
7773 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
7774 so that the normal-case YYRHSLOC works for the error case too.
7775 All uses changed.
7776 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
7777 (YYLLOC_DEFAULT): Use the same macro as glr.c.
7778 * doc/bison.texinfo (Location Default Action): Don't claim that
7779 we have an array of locations. Use the same macro for both glr
7780 and lalr parsers. Mention YYRHSLOC. Mention what happens when
7781 the index is 0.
7782
7783 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7784
7785 * HACKING: Update email addresses to send announcements to.
7786
7787 * configure.ac (AC_INIT): Bump version to 1.875f.
7788
7789 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
7790
7791 * NEWS: Version 1.875e.
7792 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
7793
7794 * src/scan-skel.l: Include "complain.h", for "fatal".
7795
7796 * src/relation.h (relation_print, relation_digraph):
7797 Relation sizes are of type relation_node, not size_t (this is
7798 merely a doc fix, since the two types are equivalent).
7799 (relation_transpose): Relation sizes are of type relation_node,
7800 not int.
7801 * src/relation.c: Likewise.
7802 (top, infinity): Now of type relation_node, not int.
7803 (traverse, relation_transpose): Use relation_node, not int.
7804
7805 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
7806 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
7807 (yyparse): Remove unused local introduced in 2004-10-25 patch.
7808
7809 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
7810 specifying whether the test should be skipped. Use it tp
7811 specify that the [%defines %skeleton "lalr1.cc"] tests currently
7812 fail on some hosts, and should be skipped.
7813
7814 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
7815
7816 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
7817 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
7818 unless otherwise specified below.
7819
7820 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
7821 to allocate kernel_base, kernel_items, kernel_size, since
7822 they needn't be initialized to 0.
7823 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
7824 * src/closure.c (new_closure): Likewise, for itemset.
7825 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
7826 * src/lalr.c (set_goto_map): Likewise, for temp_map.
7827 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
7828 (build_relations): Likewise for edge, states1, includes.
7829 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
7830 * src/reader.c (packgram): Likewise, for ritem, rules.
7831 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
7832 * src/relation.c (relation_digraph): Likewise for VERTICES.
7833 (relation_transpose): Likewise for new_R, end_R.
7834 * src/symtab.c (symbols_token_translations_init): Likewise for
7835 token_translations.
7836 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
7837 (token_actions): Likewise for yydefact, actrow, conflrow,
7838 conflict_list.
7839 (save_column): Likewise for froms[symno], tos[symno].
7840 (goto_actions): Likewise for state_count.
7841 (pack_table): Likewise for base, pos, check.
7842 (tables_generate): Likewise for width.
7843
7844 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
7845 for initial core. Just have a separate core, so we needn't worry
7846 about whether kernel_size and kernel_base are initialized.
7847
7848 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
7849 kernel_size, kernel_items): Remove unnecessary initialization.
7850 * src/conflicts.c (conflicts): Likewise.
7851 * src/derives.c (derives): Likewise.
7852 * src/muscle_tablc (muscle_insert): Likewise.
7853 * src/relation.c (relation_digraph): Likewise.
7854 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
7855 conflrow, conflict_table, conflict_list, table, check):
7856 Likewise.
7857
7858 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
7859 This is because all callers pass unsigned int.
7860 * src/closure.h (new_closure): Likewise.
7861
7862 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
7863 (build_relations): Initialize includes[i] in all cases.
7864 * src/reader.c (packgram): Always initialize rules[ruleno].prec
7865 and rules[ruleno].precsym. Initialize members in order.
7866 * src/relation.c (relation_transpose): Always initialize new_R[i]
7867 and end_R[i].
7868 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
7869
7870 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
7871 conflict_list[0] was always 0, but now it isn't initialized.
7872
7873 * src/table.c (table_grow): When conflict_table grew, the grown
7874 area wasn't cleared. Fix this.
7875
7876 * lib/.cvsignore: Add strdup.c, strdup.h.
7877 * m4/.cvsignore: Add strdup.m4.
7878
7879 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
7880
7881 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
7882 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
7883 GOTO_NUMBER_MAXIMUM, since we occasionally compute
7884 ngotos + 1 without checking for overflow.
7885 (build_relations): Use END_NODE, not -1, to denote end of edges.
7886 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
7887 build_relations): Use goto_number, not int, for goto numbers.
7888 * src/tables.c (save_column, default_goto): Likewise.
7889
7890 2004-11-23 Akim Demaille <akim@epita.fr>
7891
7892 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
7893 of #defining from yystype.
7894 Don't typedef yystype, C++ does not need it.
7895 This lets it possible to forward declare it as union.
7896
7897 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
7898
7899 * bootstrap (gnulib_modules): Add extensions.
7900 Problem reported by Jim Meyering.
7901
7902 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
7903
7904 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
7905 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
7906 src/system.h, src/tables.c: XFREE -> free, to accommodate
7907 recent change to gnulib xalloc.h.
7908 Problem reported by Jim Meyering.
7909
7910 2004-11-17 Akim Demaille <akim@epita.fr>
7911
7912 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
7913
7914 2004-11-17 Akim Demaille <akim@epita.fr>,
7915 Alexandre Duret-Lutz <adl@gnu.org>
7916
7917 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
7918 changes.
7919 (YYCDEBUG): Adjust.
7920 Use it instead of cdebug_.
7921 (Parser::debug_stream, Parser::set_debug_stream): New.
7922 (Parser::symprint_): Define cdebug_ for temporary backward
7923 compatibility.
7924 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
7925 debug_stream ().
7926
7927 2004-11-17 Akim Demaille <akim@epita.fr>
7928
7929 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
7930 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
7931 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
7932 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
7933
7934 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
7935
7936 * data/glr.c (yyloc_default): Remove; not used.
7937 Problem reported by Frank Heckenbach.
7938
7939 2004-10-25 Akim Demaille <akim@epita.fr>
7940
7941 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
7942 Introduce another definition to address simple location arrays.
7943 (yyGLRStack): New member: yyerror_range.
7944 (yyrecoverSyntaxError, yyparse): Update it.
7945 (yyrecoverSyntaxError): Use it when shifting the error token to
7946 have an accurate range, equivalent to the one computed by both
7947 yacc.c and lalr1.cc.
7948 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
7949 that column numbers start at column 0, as per GNU Coding
7950 Standards, the others tests, and the doc.
7951 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
7952 Adjust to the above change (first column is 0).
7953 And adjust the location of the "<error>", now covering the whole
7954 line.
7955
7956 2004-10-22 Akim Demaille <akim@epita.fr>
7957 and Paul Eggert <eggert@cs.ucla.edu>
7958
7959 Remove some arbitrary limits on goto numbers and relations.
7960 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
7961 initial values, since they're never used.
7962 (set_goto_map): ngotos is now unsigned, so test for overflow
7963 by seeing whether it wraps around to zero.
7964 * src/lalr.h (goto_number): Now size_t, not short int.
7965 (GOTO_NUMBER_MAXIMUM): Remove.
7966 * src/relation.c (relation_print, traverse, relation_transpose):
7967 Check for END_NODE rather than looking at sign.
7968 * src/relation.h (END_NODE): New macro.
7969 (relation_node): Now size_t, not short int.
7970
7971 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
7972
7973 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
7974 keyword, not an identifier. Problem reported by Baron Schwartz in
7975 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
7976
7977 2004-10-11 Akim Demaille <akim@epita.fr>
7978
7979 * src/symtab.c (symbol_check_alias_consistency): Also check
7980 type names, destructors, and printers.
7981 Reported by Alexandre Duret-Lutz.
7982 Recode the handling of associativity and precedence in terms
7983 of symbol_precedence_set.
7984 Accept no redeclaration at all, not even equal to the previous
7985 value.
7986 (redeclaration): New.
7987 Use it to factor redeclaration complaints.
7988 (symbol_make_alias): Don't set the type of the alias, let
7989 symbol_check_alias_consistency do it as for other features.
7990 * src/symtab.h (symbol): Add new member prec_location, and
7991 type_location.
7992 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
7993 * tests/input.at (Incompatible Aliases): New.
7994
7995 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
7996
7997 .cvsignore fixes to accommodate gnulib changes,
7998 and the practice of naming build directories "_build".
7999 * .cvsignore: Add "_*". Sort.
8000 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
8001 * m4/.cvsignore: Add "*_gl.m4".
8002
8003 2004-10-06 Akim Demaille <akim@epita.fr>
8004
8005 * src/parse-gram.y (add_param): Fix the truncation of trailing
8006 spaces.
8007
8008 2004-10-05 Akim Demaille <akim@epita.fr>
8009
8010 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
8011 whether the reducion was empty or not. This leaves room to
8012 improve the use of YYLLOC_DEFAULT in such a case.
8013 lalr1.cc is still experimental, so changing this is acceptable.
8014 And finally, there are probably not many users who changed the
8015 handling of locations in GLR, so changing is admissible too.
8016
8017 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
8018 empty reduction, set @$ to an empty location ending the previously
8019 stacked symbol.
8020 Adjust uses to make sure the code is triggered on empty
8021 reductions.
8022 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
8023 expected output: empty reductions have empty locations.
8024
8025 2004-09-29 Akim Demaille <akim@epita.fr>
8026
8027 * data/lalr1.cc: Move towards a more standard C++ coding style
8028 for templates: Class < T > -> Class<T>.
8029
8030 2004-09-29 Akim Demaille <akim@epita.fr>
8031
8032 * data/lalr1.cc: Reinstall the former ctor, for sake of
8033 compatibility, but warn it will be removed.
8034 Move towards a more standard C++ coding style (i.e., type *var ->
8035 type* var).
8036
8037 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
8038
8039 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
8040 since it's less likely to work if NULs are involved in the future.
8041
8042 2004-09-27 Akim Demaille <akim@epita.fr>
8043
8044 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
8045
8046 2004-09-27 Akim Demaille <akim@epita.fr>
8047
8048 * data/lalr1.cc (b4_parse_param_decl_1): New.
8049 (b4_parse_param_decl): Use it to have different names between attribute
8050 and argument names.
8051 (b4_cc_constructor_call): Likewise.
8052
8053 2004-09-24 Akim Demaille <akim@epita.fr>
8054
8055 * src/parse-gram.y (add_param): Strip the leading and trailing
8056 blanks from a formal argument declaration.
8057 (YY_LOCATION_PRINT): New.
8058
8059 2004-09-24 Akim Demaille <akim@epita.fr>
8060
8061 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
8062 after the location.
8063
8064 2004-09-24 Akim Demaille <akim@epita.fr>
8065
8066 * doc/bison.texinfo (Table of Symbols): Sort.
8067
8068 2004-09-21 Akim Demaille <akim@epita.fr>
8069
8070 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
8071 the useless parentheses.
8072 Suggested by Paul Eggert.
8073
8074 2004-09-20 Akim Demaille <akim@epita.fr>
8075
8076 Let the initial-action act on the look-ahead, and use it for the
8077 "initial push" (corresponding to an hypothetical beginning-of-file).
8078 And let lalr1.cc honor %initial-action.
8079
8080 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
8081 example.
8082 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
8083 (Parser::Parser): Remove the ctor that used to initialize it.
8084 (Parser::parse): Like in the other skeletons, issue the "starting
8085 parse" message before any action.
8086 Honor %initial-action.
8087 Initialize the stacks with the lookahead.
8088 * data/yacc.c: Let $$ and @$ in %initial-action designate the
8089 look-ahead.
8090 Push them in the stacks.
8091 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
8092
8093 2004-09-20 Akim Demaille <akim@epita.fr>
8094
8095 * doc/bison.texinfo (Initial Action Decl): New.
8096
8097 2004-09-20 Akim Demaille <akim@epita.fr>
8098
8099 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
8100 clearer criterion to define it.
8101 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
8102 When reducing on an empty RHS, use the latest stacked location as
8103 location.
8104 yylloc is not always available.
8105 * data/glr.c: Likewise.
8106 Also, honor initial-actions.
8107
8108 2004-09-20 Akim Demaille <akim@epita.fr>
8109
8110 * data/yacc.c (YY_LOCATION_PRINT): New.
8111 Define when we know YYLTYPE's structure, i.e., when the default
8112 YYLLOC_DEFAULT is used.
8113 * data/c.m4 (b4_yysymprint_generate): Use it.
8114 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
8115 value of the result.
8116 (error_start_): Replace with...
8117 (error_range_): this location array.
8118 This allows to replace code relying on the implementation of
8119 locations by portable code.
8120 * data/yacc.c (yylerrsp): Replace with...
8121 (yyerror_range): this.
8122 Every time a token is popped, update yyerror_range[0], to have an
8123 accurate location for the error token.
8124 * data/glr.c (YY_LOCATION_PRINT): New.
8125 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
8126 deference a pointer.
8127 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
8128 report the location in %printers.
8129
8130 * src/scan-skel.l: Instead of abort, report error messages to ease
8131 understanding skeleton scanning failures.
8132
8133 2004-09-16 Akim Demaille <akim@epita.fr>
8134
8135 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
8136 (iterator, const_iterator): these, to be more in the C++ spirit.
8137 Also, return reverse iterators so that when displaying the stack
8138 we display its bottom first.
8139 (Parser::stack_print_, Parser::reduce_print_): Match the messages
8140 from yacc.c.
8141 We should probably use vector here though.
8142
8143 2004-09-16 Akim Demaille <akim@epita.fr>
8144
8145 Have more complete shift traces.
8146
8147 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
8148 to report Shifts instead of ad hoc YYDPRINTF invocations,
8149 including for the error token.
8150 * data/lalr1.cc (symprint_): Output the location.
8151 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
8152 output the location within the %printer.
8153 Activate GLR tests, at least to make sure they compile properly.
8154 They still don't pass though.
8155 * tests/calc.at: Adjust expect verbose output, since now "Entering
8156 state..." is on a different line than the "Shifting" message.
8157
8158 2004-09-08 Akim Demaille <akim@epita.fr>
8159
8160 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
8161 Bison directive from the Bison file to the invocation of this
8162 macro, so that these directives are passed to
8163 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
8164 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
8165 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
8166 the extra Bison directives instead of the whole series.
8167 Change the grammar so that there are recoverable errors, and
8168 unrecoverable errors. Now we can have the parser give up before
8169 consuming the whole input. As a result we now can observe that
8170 the lookahead is freed when needed.
8171 Change the parser source to parse argv[1] instead of a hard coded
8172 string.
8173 Simplify yylex, and give a value and location to EOF.
8174 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
8175 passed directives already coded in the file.
8176 Add some tests to check the location of "error".
8177 For some tests, the C++ parser is correct, and not yacc.c.
8178 For other tests, they provide different, but unsatisfying, values,
8179 so keep the C++ value so that at least one parser is "correct"
8180 according to the test suite.
8181 (Actions after errors): Remove, this is subsumed by the
8182 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
8183
8184 2004-09-06 Akim Demaille <akim@epita.fr>
8185
8186 * data/lalr1.cc: Adjust the indentation of the labels.
8187 (Parser::pop): New.
8188 Use it.
8189
8190 2004-09-06 Akim Demaille <akim@epita.fr>
8191
8192 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
8193 argument, an informative message.
8194 Call YY_SYMBOL_PRINT.
8195 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
8196 * data/lalr1.cc (destruct_): Likewise.
8197 In addition, no longer depend on b4_yysymprint_generate and
8198 b4_yydestruct_generate to generate these functions, do it "by
8199 hand".
8200
8201 2004-09-03 Akim Demaille <akim@epita.fr>
8202
8203 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
8204 invoked, yydestruct the lookahead.
8205 * tests/calc.at (Calculator $1): Update the expected lengths of
8206 traces: there is an added line for the discarded lookahead.
8207 * doc/bison.texinfo (Destructor Decl): Some rewording.
8208 Define "discarded" symbols.
8209
8210 2004-09-02 Akim Demaille <akim@epita.fr>
8211
8212 * data/lalr1.cc (translate_, destruct_): No reason to be static.
8213
8214 2004-09-02 Akim Demaille <akim@epita.fr>
8215
8216 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
8217 (YYDSYMPRINTF): Rename as...
8218 (YY_SYMBOL_PRINT): this.
8219 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
8220 two.
8221 Use it instead of direct symprint_ calls.
8222 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
8223 one.
8224
8225 2004-09-02 Akim Demaille <akim@epita.fr>
8226
8227 * data/lalr1.cc (b4_yysymprint_generate): New.
8228 (symprint_): New member function, defined when YYDEBUG.
8229 Use it consistently instead of token/nterm debugging output by
8230 hand.
8231 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
8232 %printer calls to use cdebug_ when using lalr1.cc.
8233
8234 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
8235
8236 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
8237 with #ifdef YYDEBUG.
8238
8239 2004-08-26 Akim Demaille <akim@epita.fr>
8240
8241 * doc/bison.texinfo (Implementing Loops): Rename as...
8242 (Implementing Gotos/Loops): this.
8243
8244 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
8245
8246 Adjust to latest gnulib.
8247 * bootstrap (gnulib_modules): Add xalloc-die.
8248 Set LC_ALL=C so that file names sort consistently.
8249 Prefer the gnulib copies of gettext.m4, glibc21.m4,
8250 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
8251 uintmax_t.m4, ulonglong.m4.
8252 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
8253 po.m4 since we are now using _gl.m4 instead.
8254
8255 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
8256
8257 * src/scan-action.l: Remove. Scanning of semantic actions is
8258 handled in scan-gram.l.
8259
8260 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
8261
8262 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
8263
8264 * src/location.h (struct): The file member is a uniqstr.
8265 (equal_boundaries): Use UNIQSTR_EQ for comparison.
8266
8267 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
8268
8269 Fix bug with non-%union parsers that have printers or destructors,
8270 which led to a Bison core dump. Reported by Peter Fales in
8271 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
8272
8273 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
8274 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
8275 not to our own type.
8276 * src/output.c (symbol_destructors_output, symbol_printers_output):
8277 Don't assume %union.
8278 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
8279 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
8280 UNION-FLAG. All callers changed.
8281 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
8282 Use type char, not unsigned int, when declaring an array of char;
8283 this lets us remove a cast.
8284 (Printers and Destructors): Add non-%union test cases.
8285
8286 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8287
8288 * doc/bison.texinfo: Minor editorial changes, mostly to the new
8289 GLR writeups. E.g., avoid frenchspacing and the future tense,
8290 change "lookahead" to "look-ahead", and change "wrt" to "with
8291 respect to".
8292
8293 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8294
8295 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
8296 New sections, split off from the GLR Parsers section. Put the new
8297 Simple GLR Parser near the start of the GLR section, for clarity.
8298 Rewrite connective text.
8299
8300 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
8301
8302 * doc/bison.texinfo (Simple GLR Parsers): New section.
8303
8304 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
8305
8306 * NEWS, TODO, doc/bison.texinfo:
8307 Use "look-ahead" instead of "lookahead", to be consistent.
8308 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
8309 while we're fixing "look-ahead".
8310 * src/conflicts.c (shift_set): Renamed from shiftset.
8311 (look_ahead_set): Renamed from lookaheadset.
8312 * src/print.c: Likewise.
8313 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
8314 name for "lookahead".
8315 (report_types, usage): Likewise.
8316 * src/getargs.h (report_look_ahead_tokens): Renamed from
8317 report_lookaheads.
8318 * src/lalr.c (compute_look_ahead_tokens): Renamed from
8319 compute_lookaheads.
8320 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
8321 (look_ahead_tokens_print): Renamed from lookaheads_print.
8322 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
8323 state_rule_lookaheads_print.
8324 * src/state.h: Likewise.
8325 (reductions.look_ahead_tokens): Renamed from lookaheads.
8326 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
8327 AT_DATA_LOOKAHEADS_GRAMMAR.
8328
8329 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
8330
8331 * README: Update location of patched M4 distribution.
8332
8333 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
8334
8335 Don't assume the C++ compiler takes the same arguments as the C compiler
8336 (trivial change).
8337 * configure.ac (O0CXXFLAGS): New var.
8338 * tests/atlocal.in (CXXFLAGS): Use it.
8339
8340 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
8341
8342 Fix some "make check" problems with C++ reported by
8343 Albert Chin-A-Young for Tru64 C++ in this thread:
8344 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
8345
8346 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
8347 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8348 Output to a .cc file for C++, not to a .c file.
8349 * tests/calc.at (AT_CHECK_CALC): Likewise.
8350 * tests/regression.at (AT_CHECK_DANCER): Likewise.
8351 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
8352
8353 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
8354
8355 * tests/calc.at, tests/actions.at: Workaround for SGI
8356 C++ compiler. (trivial change)
8357
8358 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
8359
8360 Spent a few hours checking out which prerequisite versions the
8361 current sources actually require. I went all the way back to
8362 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
8363 a seemingly endless set of combinations of versions more recent
8364 than that. The bottom line is that the current sources require
8365 fairly recent versions of the build tools, and it'll be some work
8366 to change this.
8367 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
8368 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
8369 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
8370 Add comments explaining why those particular versions are
8371 currently needed.
8372
8373 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
8374 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
8375 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
8376
8377 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
8378 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
8379
8380 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
8381
8382 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
8383 0.11.5. Suggested by Bruno Haible.
8384 * bootstrap: Remove gettext version checking.
8385
8386 * doc/bison.texinfo (Decl Summary): Also mention that %union
8387 can depend on prerequisite types. Problem reported by Tim
8388 Van Holder.
8389
8390 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
8391
8392 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
8393 * README-alpha: Don't tell people not to package this.
8394
8395 * bootstrap: Don't assume $(...) works; use `...` instead.
8396 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
8397 gettext better.
8398
8399 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
8400 put into the -d output file, and mention what to do if YYSTYPE is
8401 defined as a macro.
8402
8403 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
8404
8405 Undo change made earlier today: it caused autopoint to not bring
8406 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
8407 autopoint's.
8408
8409 * bootstrap: Check that gettext version matches what's in
8410 configure.ac. Warn users to ignore robots.txt ERROR 404.
8411 * bootstrap: Undo today's earlier change (logged below).
8412 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
8413
8414 The gettext version checking is causing more trouble than it's
8415 curing; remove it. Problem reported by Paul Hilfinger.
8416
8417 * bootstrap: Issue a warning that one can expect a message
8418 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
8419 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
8420
8421 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
8422
8423 Ensure that the C++ compiler used for testing actually works on a
8424 simple test program; if not, skip the C++-related tests. Problem
8425 reported by Vin Shelton in:
8426 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
8427
8428 * m4/cxx.m4: New file.
8429 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
8430 * tests/atlocal.in (BISON_CXX_WORKS): Add.
8431 * tests/local.at (AT_COMPILE_CXX): Use it.
8432
8433 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8434
8435 * data/glr.c (yylloc): Output this macro even if locations are not
8436 being generated, as the GLR parser needs it even in that case.
8437 Problem reported by Troy A. Johnson
8438 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
8439
8440 * configure.ac (AC_INIT): Update to 1.875e.
8441
8442 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
8443
8444 * NEWS: Version 1.875d.
8445 * configure.ac (AC_INIT): Likewise.
8446 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
8447
8448 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
8449 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
8450 lalr1.cc runs afoul of the first, and the last two are no longer
8451 supported by GCC 3.4.0.
8452 * README: Mention GNU m4 1.4 or later; mention m4 patches.
8453 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
8454
8455 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
8456
8457 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
8458 unsigned int, for compatibility with latest gnulib hash module.
8459 * src/state.c (state_hash, state_hasher): Likewise.
8460 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
8461 * src/uniqstr.c (hash_uniqstr): Likewise.
8462
8463 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
8464
8465 * NEWS: Unescaped newlines are no longer allowed in char & strings.
8466
8467 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
8468 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
8469 character and string literals.
8470 (unexpected_end): New function.
8471 (unexpected_eof): Use it.
8472 (unexpected_newline): New function.
8473 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
8474 actions.
8475
8476 * NEWS: Document %expect-rr.
8477
8478 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
8479 Fix typo by replacing $1 with $option.
8480 Remove more 'intl'-related files.
8481 Don't DEFUN AM_INTL_SUBDIR twice.
8482
8483 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
8484 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
8485 strtoul.c.
8486 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
8487 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
8488 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
8489 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
8490 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
8491 * src/.cvsignore: Add *.output.
8492
8493 * src/parse-gram.y: Put copyright notice inside %{ %} so it
8494 gets copied to the output file.
8495
8496 2004-04-28 Paul Eggert <eggert@twinsun.com>
8497
8498 Get files from the gnulib and po repositories, instead of relying
8499 on them being in our CVS. Upgrade to latest versions of gnulib
8500 and Automake.
8501
8502 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
8503 * bootstrap: Bootstrap from gnulib and po repositories.
8504 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
8505 * README-cvs: Document these changes. Remove version numbers from
8506 mentions of build tools, since they change so often. Mention Flex.
8507
8508 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
8509 (gl_USE_SYSTEM_EXTENSIONS): Add.
8510 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
8511 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
8512 does this for us.
8513 (AC_ISC_POSIX): Remove; we no longer support this
8514 ancient OS, as it gets in the way of latest Autoconf & gnulib.
8515 (AC_HEADER_STDC): Remove: we now assume C89 or better.
8516 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
8517 Do not check for C89 headers, except for locale.h which is used
8518 by the Yacc library and must port to K&R hosts.
8519 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
8520 Do not check for C89 functions, except for setlocale which is
8521 used by the Yacc library.
8522 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
8523 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
8524 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
8525 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
8526 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
8527 AM_GNU_GETTEXT): Remove; now done by:
8528 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
8529 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
8530 for us.
8531
8532 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
8533 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
8534 Define to empty, as gnulib.mk will do the rest for us.
8535 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
8536 for us.
8537 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
8538 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
8539
8540 * src/files.c: Include gnulib's xstrndup.h.
8541
8542 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
8543 (REALLOC): Use xnrealloc, for likewise.
8544 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
8545 (strnlen, memrchr): Remove decls; functions no longer used.
8546 Include <stpcpy.h>.
8547
8548 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
8549 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
8550 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
8551 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
8552 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
8553 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
8554 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
8555 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
8556 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
8557 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
8558 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
8559 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8560 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
8561 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
8562 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
8563 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
8564 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
8565 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
8566 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
8567 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
8568 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
8569 Remove, as these files are now generated automatically
8570 by bootstrap or automake.
8571
8572 * po/ChangeLog: Remove: all but one entry was a duplicate
8573 of this file, and I moved that 2000-11-02 entry here.
8574
8575 * config/.cvsignore: Add Makefile, depcomp, install-sh.
8576 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
8577 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
8578 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
8579 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
8580 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
8581 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
8582 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
8583 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
8584 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
8585 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
8586 xstrndup.h.
8587 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
8588 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
8589 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
8590 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
8591 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
8592 * src/.cvsignore: Remove *_.c.
8593
8594
8595 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
8596 support it. (The latest stable gzip doesn't.)
8597
8598 2004-04-27 Paul Eggert <eggert@twinsun.com>
8599
8600 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
8601 case, as stos_ is now used by destructors due to the 2004-02-09
8602 change.
8603
8604 Remove more K&R C support.
8605 * lib/libiberty.y (PARAMS): Remove. All uses removed.
8606 * lib/subpipe.c (errno): Remove decl.
8607 Include <stdlib.h> unconditionally.
8608 (EXIT_FAILURE): Remove macro.
8609 * src/complain.c (vfprintf, strerror): Remove.
8610 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
8611 unconditionally.
8612 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
8613 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
8614 (strchr, strspn, memchr): Remove decls.
8615 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
8616 unconditionally. Do not declare perror.
8617 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
8618 unconditionally.
8619
8620 * src/complain.c (_): Remove useless defn, as system.h defines this.
8621
8622 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
8623 with latest obstack.h.
8624 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
8625 to procedure types, as obstack.h now does that for us.
8626 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
8627
8628 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
8629 so that this include file can stand alone.
8630 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
8631 does this now. Include subpipe.h first after config.h, to
8632 test whether it can stand alone.
8633
8634 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
8635 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
8636 unused declaration.
8637
8638 * tests/synclines.at (%union synch line): Put a dummy member in
8639 the union, because empty unions aren't allowed in C. Caught
8640 by GCC 3.4.0.
8641
8642 2004-04-13 Jim Meyering <jim@meyering.net>
8643
8644 * src/conflicts.c (conflicts_print): Correct format string typo:
8645 use `%%' to produce literal `%'. (trivial change)
8646
8647 2004-03-30 Paul Eggert <eggert@twinsun.com>
8648
8649 * src/getargs.c (version): Update copyright year to 2004.
8650
8651 * data/c.m4 (b4_int_type): Use 'short int' rather than
8652 'short', and similarly for 'long', 'unsigned', etc.
8653 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
8654 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
8655 yy_yypstack, yydumpstack): Likewise.
8656 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
8657 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
8658 Likewise.
8659 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
8660 yy_stack_print, yyparse): Likewise.
8661 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
8662 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
8663 * lib/bitset.c (bitset_print): Likewise.
8664 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
8665 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
8666 * lib/bitsetv.c (bitsetv_dump): Likewise.
8667 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
8668 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
8669 Likewise.
8670 * src/LR0.c (allocate_itemsets): Likewise.
8671 * src/gram.h (rule_number, rule): Likewise.
8672 * src/lalr.h (goto_number): Likewise.
8673 * src/nullable.c (nullable_compute): Likewise.
8674 * src/output.c (prepare_rules): Likewise.
8675 * src/relation.c (relation_print, relation_digraph): Likewise.
8676 * src/relation.h (relation_node): Likewise.
8677 * src/state.h (state_number, transitions, errs, reductions,
8678 struct state): Likewise.
8679 * src/symtab.h (symbol_number, struct symbol): Likewise.
8680 * src/tables.c (vector_number, tally, action_number,
8681 default_goto, goto_actions): Likewise.
8682 * tests/existing.at (GNU Cim Grammar): Likewise.
8683 * tests/regression.at (Web2c Actions): Likewise.
8684
8685 * src/output.c (muscle_insert_short_int_table): Renamed from
8686 muscle_insert_short_table. All uses changed.
8687
8688 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8689
8690 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
8691 (declaration): Replace expected_conflicts with expected_sr_conflicts.
8692 Add %expect-rr rule.
8693
8694 * src/scan-gram.l: Recognize %expect-rr.
8695
8696 * src/conflicts.h (expected_sr_conflicts): Rename from
8697 expected_conflicts.
8698 (expected_rr_conflicts): Declare.
8699
8700 * src/conflicts.c (expected_sr_conflicts): Rename from
8701 expected_conflicts.
8702 (expected_rr_conflicts): Define.
8703 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
8704 for GLR parsers.
8705 Use expected_sr_conflicts in place of expected_conflicts.
8706 Warn if expected_rr_conflicts used in non-GLR parser.
8707
8708 * doc/bison.texinfo: Add documentation for %expect-rr.
8709
8710 2004-03-08 Paul Eggert <eggert@gnu.org>
8711
8712 Add support for hex token numbers. Suggested by Odd Arild Olsen in
8713 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
8714
8715 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
8716 in lalr1.cc.
8717 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
8718 * src/scan-gram.l (scan_integer): New function.
8719 ({int}): Use it.
8720 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
8721 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
8722 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
8723 Say "long int", not "long", for uniformity with GNU style.
8724
8725 2004-02-25 Paul Eggert <eggert@twinsun.com>
8726
8727 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
8728 compilers. This fixes a problem with Intel's C++ compiler being
8729 chatty, reported by Guido Trentalancia in
8730 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
8731
8732 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
8733
8734 Support %destructor and merge error locations in lalr1.cc.
8735
8736 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
8737 (Parser::stos_): Define unconditionally.
8738 (Parser::destruct_): New method. Generate its body with
8739 b4_yydestruct_generate.
8740 (Parser::error_start_): New attribute.
8741 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
8742 token which are discarded.
8743 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
8744 error_start_ when erroneous token are discarded.
8745 (Parser::parse) <yyerrlab1>: Compute the location of the error
8746 token so that it covers all the discarded tokens.
8747 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
8748 it can be called with `%skeleton "lalr1.cc"', and do that.
8749
8750 2004-02-02 Paul Eggert <eggert@twinsun.com>
8751
8752 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
8753 $(top_srcdir)/lib and ../lib. This fixes a bug reported
8754 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
8755 There's no need to mention top_builddir since Automake does that
8756 for us.
8757 (INCLUDES): Remove, as Automake says it's obsolescent.
8758 Contents migrated into AM_CPPFLAGS as described above.
8759 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
8760
8761 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
8762
8763 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
8764 (yyreportSyntaxError): Handle case where lookahead token is
8765 YYEMPTY.
8766
8767 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8768
8769 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
8770 resulting parsers are compilable with C++.
8771
8772 2003-12-23 Paul Eggert <eggert@twinsun.com>
8773
8774 * config/depcomp, config/install-sh: Sync with Automake 1.8.
8775 * src/output.c (output_skeleton): Rename local var.
8776 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
8777 Bison tokens, as this runs afoul of the 2003-10-07 change that
8778 disallowed NUL bytes in character constants or string literals.
8779
8780 * tests/local.at: Require Autoconf 2.59's Autotest.
8781 * tests/testsuite.at: Don't include local.at, since we now assume
8782 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
8783 including it.
8784 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
8785 multiple inclusion warnings.
8786
8787 2003-12-02 Akim Demaille <akim@epita.fr>
8788
8789 * doc/bison.texinfo (How Can I Reset the Parser): More about start
8790 conditions.
8791 From Bruno Haible.
8792
8793 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
8794
8795 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
8796
8797 2003-10-07 Paul Eggert <eggert@twinsun.com>
8798
8799 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
8800 if testsuite doesn't exist.
8801
8802 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
8803 literals, unfortunately.
8804 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
8805 Complain about NUL bytes in character constants or string literals.
8806
8807 2003-10-05 Paul Eggert <eggert@twinsun.com>
8808
8809 * NEWS: Don't document %no-default-prec, as it's still
8810 too experimental.
8811 * doc/bison.texinfo: Document %no-default-prec only if
8812 the defaultprec flag is set. Normally it's not.
8813
8814 2003-10-04 Paul Eggert <eggert@twinsun.com>
8815
8816 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
8817 non-modifiable lvalue, instead of a modifiable one.
8818 * doc/bison.texinfo (Actions): Document that $$ can
8819 be assigned to. Do not claim that $$ and $N are
8820 array element references: user code should not rely on this.
8821
8822 2003-10-01 Paul Eggert <eggert@twinsun.com>
8823
8824 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
8825 (grammar_declaration): Use it.
8826 * src/scan-gram.l: New token %no-default-prec.
8827 * tests/conflicts.at: Revamp tests to use %no-default-prec.
8828 * NEWS, doc/bison.texinfo: Document the above.
8829
8830 2003-10-01 Akim Demaille <akim@epita.fr>
8831
8832 VCG no longer supports long_straight_phase.
8833
8834 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
8835 * src/print_graph.c (print_graph): Adjust.
8836
8837 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
8838 and Paul Eggert <eggert@twinsun.com>
8839
8840 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
8841 Table of Symbols): Document %default-prec.
8842 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
8843 (grammar_declaration): Set default_prec on %default-prec.
8844 * src/scan-gram.l (%default-prec): New token.
8845 * src/reader.h (default_prec): New flag.
8846 * src/reader.c: Likewise.
8847 (packgram): Handle it.
8848 * tests/conflicts.at (%default-prec without %prec,
8849 %default-prec with %prec, %default-prec 1): New tests.
8850
8851 2003-09-30 Paul Eggert <eggert@twinsun.com>
8852
8853 * tests/testsuite.at: Include local.at, not input.at, fixing
8854 a typo in the 2003-08-25 patch.
8855
8856 2003-08-27 Akim Demaille <akim@epita.fr>
8857
8858 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
8859 GCC warnings.
8860
8861 2003-08-26 Akim Demaille <akim@epita.fr>
8862
8863 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
8864 "<\#" to avoid magic from Gnus when posting parts of this script.
8865
8866 2003-08-26 Akim Demaille <akim@epita.fr>
8867
8868 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
8869 (Parser::parse): here.
8870 Adjust: nerrs and errstatus is now replaced by...
8871 (Parser::nerrs_, Parser::errstatus_): New.
8872
8873 2003-08-25 Akim Demaille <akim@epita.fr>
8874
8875 * config/announce-gen, Makefile.cfg: New.
8876 * Makefile.am: Adjust.
8877 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
8878 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
8879
8880 2003-08-25 Akim Demaille <akim@epita.fr>
8881
8882 When reducing initial empty rules, Bison parser read an initial
8883 location that is not defined. This results in garbage, and that
8884 affects Bison's own parser. Therefore we need (i) to extend Bison
8885 to support a means to initialize this location, and (ii) to use
8886 this CVS Bison to fix CVS Bison's parser.
8887
8888 * src/reader.h, reader.c (epilogue_augment): Remove, replace
8889 with...
8890 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
8891 * src/parse-gram.y: Adjust.
8892 (%initial-action): New.
8893 (%error-verbose): Since we require CVS Bison, there is no reason
8894 not to use it.
8895 * src/scan-gram.l: Adjust.
8896 * src/Makefile.am (YACC): New, to make sure we use our own parser.
8897 * data/yacc.c (yyparse): Use b4_initial_action.
8898
8899 2003-08-25 Akim Demaille <akim@epita.fr>
8900
8901 * doc/bison.texinfo: Don't promote stdout for error messages.
8902
8903 2003-08-25 Akim Demaille <akim@epita.fr>
8904
8905 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
8906 From Alexandre Duret-Lutz.
8907
8908 2003-08-25 Akim Demaille <akim@epita.fr>
8909
8910 Version 1.875c.
8911
8912 2003-08-25 Akim Demaille <akim@epita.fr>
8913
8914 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
8915 Use them.
8916
8917 2003-08-25 Akim Demaille <akim@epita.fr>
8918
8919 * data/lalr1.cc (Parser::reduce_print_): New.
8920 Use it.
8921
8922 2003-08-25 Akim Demaille <akim@epita.fr>
8923
8924 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
8925 error recovery loops. This patch is based on
8926 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
8927 Also, augment the similarity between lalr1.cc and yacc.c.
8928 Note: the locations of error recovery rules are not correct yet.
8929
8930 * data/lalr1.cc: Comment changes to augment the similarity between
8931 lalr1.cc and yacc.c.
8932 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
8933 (yyerrlab1): Remove, but where it used to be (now the bottom part of
8934 yyerrlab), when hitting EOF, pop the whole stack here instead of
8935 merely falling thru the default error handling mechanism.
8936 (yyerrorlab): New label, with the old contents of YYERROR,
8937 plus the following change: pop the stack of rhs corresponding
8938 to the production that invoked YYERROR. That is how Yacc
8939 behaves (required by POSIX).
8940 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
8941 fail.
8942
8943 2003-08-25 Akim Demaille <akim@epita.fr>
8944
8945 Tune local.at so that people can "autom4te -l autotest calc.at -o
8946 calc" for instance, to extract a sub test suite.
8947
8948 * tests/testsuite.at: Move the initialization, Autotest version
8949 requirement, and AT_TESTED invocation into...
8950 * tests/local.at: here.
8951 * tests/testsuite.at: Include it for compatibility with Autoconf
8952 2.57.
8953 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
8954 be ignore.
8955
8956 2003-08-04 Paul Eggert <eggert@twinsun.com>
8957
8958 Rework code slightly to avoid gcc -Wtraditional warnings.
8959 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
8960 The returned value is now stored in *YY0. All callers changed.
8961 * src/output.c (merge_output): Adjust to the above change.
8962
8963 2003-07-26 Paul Eggert <eggert@twinsun.com>
8964
8965 * data/glr.c (YYASSERT): New macro.
8966 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
8967 yyresolveStates, yyprocessOneStack):
8968 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
8969 Derived from a suggestion by Frank Heckenbach.
8970
8971 2003-07-25 Paul Eggert <eggert@twinsun.com>
8972
8973 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
8974 for portability to K&R C (after ansi2knr, presumably). See
8975 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
8976 by Frank Heckenbach, though I have omitted the structure-initialization
8977 part of his glr-knr.diff patch since I recall that the Portable
8978 C Compiler didn't require that change.
8979
8980 Let the user specify how to allocate and free memory.
8981 Derived from a suggestion by Frank Heckenbach in
8982 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
8983 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
8984 All uses of free, malloc, realloc changed to use these macros,
8985 and unnecessary casts removed.
8986 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
8987
8988 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
8989
8990 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
8991 use s.empty() rather than s == "" to test for empty string; see
8992 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
8993 (trivial change)
8994
8995 2003-06-25 Akim Demaille <akim@epita.fr>
8996
8997 * config/depcomp, config/install-sh: Update from masters.
8998
8999 2003-06-20 Paul Eggert <eggert@twinsun.com>
9000
9001 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
9002 and return properly parenthesized result.
9003 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
9004 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
9005 Remove unnecessary parentheses from uses.
9006 * doc/bison.texinfo (Location Default Action): Describe the
9007 conventions for parentheses.
9008
9009 2003-06-19 Paul Eggert <eggert@twinsun.com>
9010
9011 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
9012 yyreportTree): Do not assume that size_t is the same width as int,
9013 when printing sizes. Print sizes using an unsigned format.
9014 Problem reported by Frank Heckenbach in
9015 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
9016
9017 Port to Forte Developer 7 C compiler.
9018 * data/glr.c (struct YYLTYPE): If locations are not being used,
9019 declare a single dummy member, as empty structs do not conform
9020 to the C standard.
9021 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
9022 the Forte Developer 7 C compiler complains that end-of-loop
9023 code is not reached.
9024
9025 2003-06-17 Paul Eggert <eggert@twinsun.com>
9026
9027 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
9028 avoid warnings from picky compilers about redefinition of PARAMS.
9029
9030 2003-06-17 Paul Eggert <eggert@twinsun.com>
9031
9032 Version 1.875b.
9033
9034 * NEWS: Document 1.875b.
9035
9036 * lib/bbitset.h: Do not include config.h; that's the includer's job.
9037 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
9038 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
9039 Don't use 'index' in comments, as it's a builtin fn on some hosts.
9040 * lib/bitset_stats.c: Include gettext.h unconditionally, as
9041 per recent gettext manual's suggestion.
9042 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
9043 Use prototypes, not old-style definitions.
9044 * lib/lbitset.c (lbitset_unused_clear): Likewise.
9045 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
9046 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
9047 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
9048 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
9049 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
9050 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
9051 vbitset_or_and_cmp, vbitset_copy): Likewise.
9052
9053 * lib/libiberty.h: Do not include config.h; that's the includer's job.
9054 Do not include <stdlib.h>.
9055 (PARAMS): Define unconditionally for C89.
9056 (ATTRIBUTE_NORETURN): Remove.
9057 (ATTRIBUTE_UNUSED): Define unconditionally.
9058
9059 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
9060 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
9061 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
9062 * lib/vbitset.c, lib/vbitset.h: New files.
9063 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
9064 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
9065 from libbitset.
9066
9067 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
9068 `How Can I Reset @code{yyparse}', since texinfo does not allow
9069 arbitrary @ in node names.
9070
9071 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
9072 shouldn't be needed according to the gettext 0.12.1 documentation
9073 but which seem to be needed anyway: codeset.m4 glibc21.m4
9074 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
9075 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
9076 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
9077
9078 * lib/.cvsignore: Add stdbool.h.
9079 * m4/.cvsignore: Add nls.m4, po.m4.
9080
9081 Upgrade to CVS gnulib.
9082 * stdbool_.h: File renamed from stdbool.h.in.
9083 * configure.ac (AM_STDBOOL_H): Invoke this instead of
9084 AC_HEADER_STDBOOL.
9085 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
9086 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
9087 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
9088 (MOSTLYCLEANFILES): New var.
9089 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
9090 (stdbool.h): New rule.
9091 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
9092 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
9093 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
9094 m4/quote.m4: Upgrade to today's gnulib.
9095
9096 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
9097 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
9098 the tests right now.
9099 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
9100 yyerror are declared before use; C99 requires this.
9101
9102 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9103
9104 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
9105 first.
9106 (yyrecoverSyntaxError): Correct the logic for setting and testing
9107 yyerrState.
9108 Correct comment on handling EOF.
9109 Allow states with only a default reduction, rather than failing
9110 (I can't quite reconstruct why these were not allowed before).
9111
9112 Fixes to avoid problem that $-N rules in GLR parsers can cause
9113 buffer overruns, corrupting state.
9114
9115 * src/output.c (prepare_rules): Output max_left_semantic_context
9116 definition.
9117 * src/reader.h (max_left_semantic_context): New variable declaration.
9118 * src/scan-gram.l (max_left_semantic_context): Define.
9119 (handle_action_dollar): Update max_left_semantic_context.
9120 * data/glr.c (YYMAXLEFT): New definition.
9121 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
9122 (yyresolveAction): Ditto.
9123
9124 Fixes to problems with location handling in GLR parsers reported by
9125 Frank Heckenbach (2003/06/05).
9126
9127 * data/glr.c (YYLTYPE): Make trivial if locations not used.
9128 (YYRHSLOC): Add parentheses, and define only if locations used.
9129 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
9130 locations not used.
9131 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
9132 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
9133
9134 * tests/cxx-type.at: Exercise location information; update tests
9135 to differentiate output with and without locations.
9136 Remove forward declarations of yylex and yyerror---caused errors
9137 because default YYLTYPE not yet defined.
9138 Change semantic actions to compute strings, rather than printing
9139 them directly (to test proper passing of semantics values). Change
9140 output to prefix notation and update test data and expected results.
9141 (yylex): Track locations.
9142 (stmtMerge): Return value rather than printing, and include arguments
9143 in value.
9144
9145 2003-06-03 Paul Eggert <eggert@twinsun.com>
9146
9147 Avoid warnings generated by GCC 2.95.4 when Bison is
9148 configured with --enable-gcc-warnings.
9149 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
9150 yy::]b4_parser_class_name[::translate_,
9151 yy::Stack::operator[] (unsigned),
9152 yy::Stack::operator[] (unsigned) const,
9153 yy::Slice::operator[] (unsigned),
9154 yy::Slice::operator[] (unsigned) const):
9155 Rename local vars to avoid warnings.
9156 * tests/glr-regression.at (Improper handling of embedded actions
9157 and $-N in GLR parsers): Remove unused local variable from yylex.
9158 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
9159 (void) as arg when not pure, since we now assume C89 when building
9160 Bison. Pacify GCC by using parameter.
9161
9162 2003-06-02 Paul Eggert <eggert@twinsun.com>
9163
9164 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
9165 yy::Location::lines, yy::Location::columns): Rename arguments
9166 to avoid shadowing; this removes a warning generated by GCC 3.3.
9167
9168 2003-06-01 Paul Eggert <eggert@twinsun.com>
9169
9170 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
9171 to g++, as GCC 3.3 complains if you do it.
9172 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
9173 everything that WARNING_CFLAGS has, except omit warnings
9174 not suitable for C++.
9175 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
9176 * tests/atlocal.in (CXXFLAGS): New var.
9177 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
9178
9179 Fix a GLR parser bug I reported in February; see
9180 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
9181 The problem was that GLR parsers did not conform to the C standard,
9182 because actions like { $1 = $2 + $3; } expanded to expressions
9183 that invoked YYFILL in separate subexpressions, and YYFILL assigned
9184 to a local variable. The C standard says that expressions
9185 like (var = f ()) + (var = f ()) have undefined behavior.
9186 Another problem was that GCC sometimes issues warnings that
9187 yyfill and its parameters are unused.
9188
9189 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
9190 as possibly unused.
9191 (yyfill): New function.
9192 (YYFILL): Use it.
9193 (yyuserAction): Change type of yynormal to bool, so that it matches
9194 the new yyfill signature. Mark it as possibly unused.
9195
9196
9197 Follow up on a bug I reported in February, where a Bison-generated
9198 parser can loop. Provide a test case and a fix for yacc.c. I
9199 don't have a fix for lalr1.cc or for glr.c, unfortunately.
9200 The original bug report is in:
9201 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
9202
9203 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
9204 macro's size was becoming unwieldy.
9205 (yyerrlab): Do not discard an empty lookahead symbol, as this
9206 might destroy garbage.
9207 (yyerrorlab): New label, with the old contents of YYERROR,
9208 plus the following change: pop the stack of rhs corresponding
9209 to the production that invoked YYERROR. That is how Yacc
9210 behaves, and POSIX requires this behavior.
9211 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
9212 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
9213 Define 'alarm' to do nothing if unistd.h is not available.
9214 Add a new rule "exp: '-' error;" to test the above change to
9215 data/yacc.c. Use 'alarm' to abort any test taking longer than
9216 10 seconds, as it's probably looping.
9217 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
9218 Also, the new yacc.c generates two fewer diagnostics for an
9219 existing test.
9220
9221 2003-05-24 Paul Eggert <eggert@twinsun.com>
9222
9223 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
9224 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
9225 This fixes a problem reported by John Bowman when the Compaq/HP
9226 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
9227 -ansi -Wall -gall).
9228 * data/yacc.c (union yyalloc): Likewise.
9229 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
9230
9231 Switch from 'int' to 'bool' where that makes sense.
9232
9233 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
9234 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
9235 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
9236 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
9237 Return or accept bool, not int. All callers changed.
9238 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
9239 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
9240 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
9241 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
9242 bitset_or_and_cmp_): Likewise.
9243 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
9244 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
9245 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
9246 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
9247 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
9248 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
9249 bitset_stats_or_and_cmp): Likewise.
9250 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
9251 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
9252 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
9253 ebitset_xor_cmp): Likewise.
9254 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
9255 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
9256 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
9257 lbitset_xor_cmp): Likewise.
9258 * lib/bbitset.h: Include <stdbool.h>.
9259 (struct bitset_vtable): The following members now return bool, not
9260 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
9261 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
9262 or_and_cmp).
9263 * src/conflicts.c (count_rr_conflicts): Likewise.
9264 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
9265 All uses changed.
9266 * lib/ebitset.c (ebitset_obstack_init): Likewise.
9267 * lib/lbitset.c (lbitset_obstack_init): Likewise.
9268 * src/getargs.c (debug_flag, defines_flag, locations_flag,
9269 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9270 graph_flag): Likewise.
9271 * src/getargs.h (debug_flag, defines_flag, locations_flag,
9272 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
9273 graph_flag): Likewise.
9274 * src/output.c (error_verbose): Likewise.
9275 * src/output.h (error_verbose): Likewise.
9276 * src/reader.c (start_flag, typed): Likewise.
9277 * src/reader.h (typed): Likewise.
9278 * src/getargs.c (LOCATIONS_OPTION): New constant.
9279 (long_options, getargs): Use it.
9280 * src/lalr.c (build_relations): Use bool, not int.
9281 * src/nullable.c (nullable_compute): Likewise.
9282 * src/print.c (print_reductions): Likewise.
9283 * src/tables.c (action_row, pack_vector): Likewise.
9284 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
9285 * src/output.c (prepare): Use it.
9286 * src/output.c (token_definitions_output,
9287 symbol_destructors_output, symbol_destructors_output): Use string,
9288 not boolean integer, to keep track of whether to output separator.
9289 * src/print_graph.c (print_core): Likewise.
9290 * src/state.c (state_rule_lookaheads_print): Likewise.
9291
9292 * config/install-sh: Sync from automake 1.7.5.
9293
9294 2003-05-14 Paul Eggert <eggert@twinsun.com>
9295
9296 * src/parse-gram.y (rules_or_grammar_declaration): Require a
9297 semicolon after a grammar declaration, in the interest of possible
9298 future changes to the Bison input language.
9299 Do not allow a stray semicolon at the start of the grammar.
9300 (rhses.1): Allow one or more semicolons after any rule, including
9301 just before "|" as required by POSIX.
9302 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
9303 grammar.
9304
9305 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
9306
9307 %parse-param support for lalr1.cc.
9308
9309 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
9310 b4_cc_constructor_calls, b4_cc_constructor_call,
9311 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
9312 definitions.
9313 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
9314 parse-param arguments.
9315 (yy::b4_parser_class_name): Declare instance variables to
9316 hold parse-param arguments.
9317 * tests/calc.at: s/value/semantic_value/ because value clashes
9318 with a member of yy::b4_parser_class_name. Adjust C++ code
9319 to handle %parse-param. Enable %parse-param test in C++.
9320
9321 2003-05-12 Paul Eggert <eggert@twinsun.com>
9322
9323 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
9324 English a bit. Fix fclose typo. Change "const char" to "char
9325 const", and use ANSI C rather than K&R for "main". Suggest
9326 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
9327 and suggest yy_switch_to_buffer.
9328
9329 2003-05-05 Paul Eggert <eggert@twinsun.com>
9330
9331 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
9332 C89. This avoids a diagnostic on compilers that define __STDC__
9333 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
9334 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9335
9336 2003-05-03 Paul Eggert <eggert@twinsun.com>
9337
9338 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
9339 Do not overrun array bounds.
9340 This should fix a bug reported today by Olatunji Oluwabukunmi in
9341 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
9342
9343 2003-04-29 Akim Demaille <akim@epita.fr>
9344
9345 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
9346 * src/getargs.c, src/getargs.h: here, as bool, not int.
9347 (nondeterministic_parser): New.
9348 * src/parse-gram.y, src/scan-gram.l: Support
9349 %nondeterministic-parser.
9350 * src/output.c (prepare): Use nondeterministic_parser instead
9351 of glr_parser where appropriate.
9352 * src/tables.c (conflict_row, action_row, save_row)
9353 (token_actions, token_actions, pack_vector): Ditto.
9354
9355 2003-04-29 Akim Demaille <akim@epita.fr>
9356
9357 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
9358
9359 2003-04-29 Akim Demaille <akim@epita.fr>
9360
9361 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
9362 with %pure-parser and %locations to exercise the patch from Yakov
9363 Markovitch below.
9364
9365 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
9366
9367 * data/yacc.c: (b4_lex_param): Corrected for the case where
9368 %lex-param is provided and %pure-parser isn't.
9369
9370 2003-04-27 Paul Eggert <eggert@twinsun.com>
9371
9372 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
9373 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
9374 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
9375 if it is not defined.
9376 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
9377
9378 2003-04-26 Paul Eggert <eggert@twinsun.com>
9379
9380 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
9381 Declare to be of type suitable for the ninf value itself, not of
9382 type suitable for the corresponding table, since the latter might
9383 be unsigned but the ninf value might be negative. This fixes a
9384 bug reported by Alexandre Duret-Lutz in
9385 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
9386
9387 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
9388 invokes it. We shouldn't invoke it twice because it will attempt
9389 to put error.o in the archive twice. This fixes a glitch reported
9390 by Martin Mokrejs in
9391 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
9392
9393 2003-04-21 Paul Eggert <eggert@twinsun.com>
9394
9395 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
9396 to gnulib.
9397
9398 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
9399
9400 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
9401 Fix obvious typo that results in uncompilable GLR parsers
9402 when both %pure-parser and %locations are used. (trivial change)
9403
9404 2003-04-17 Paul Eggert <eggert@twinsun.com>
9405
9406 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
9407 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
9408 Do not insert the expected token via unput, as this runs afoul
9409 of a POSIX-compatibility bug in flex 2.5.31.
9410 All uses changed to BEGIN the parent state,
9411 since we no longer insert the expected token via unput.
9412 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
9413 that is no longer emitted after the above change.
9414
9415 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
9416 the first one. This change is from Paul Hilfinger, and it fixes
9417 regression reported by Werner Lemberg in
9418 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
9419
9420 (resolve_sr_conflict): Don't invoke state_errs_set
9421 unless one or more tokens have been explicitly made errors.
9422 Otherwise, the above change causes Bison to abort.
9423
9424 * tests/existing.at (GNU pic Grammar): New test case, taken from
9425 Lemberg's email.
9426
9427 2003-03-31 Akim Demaille <akim@epita.fr>
9428
9429 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
9430
9431 2003-03-31 Akim Demaille <akim@epita.fr>
9432
9433 * src/output.c (prepare_symbols): Avoid trailing spaces in the
9434 output.
9435
9436 2003-03-31 Akim Demaille <akim@epita.fr>
9437
9438 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
9439 From Paul Hilfinger.
9440
9441 2003-03-29 Akim Demaille <akim@epita.fr>
9442
9443 * m4/error.m4: Do not put under dynamic conditions some code which
9444 expansion is under static control.
9445
9446 2003-03-29 Akim Demaille <akim@epita.fr>
9447
9448 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
9449
9450 2003-03-29 Akim Demaille <akim@epita.fr>
9451
9452 * doc/bison.texinfo (Strings are Destroyed): New.
9453
9454 2003-03-13 Paul Eggert <eggert@twinsun.com>
9455
9456 * .cvsignore: Add configure.lineno.
9457 * src/.cvsignore: Add yacc.
9458 * tests/.cvsignore: Add testsuite.log.
9459 * doc/fdl.texi: Sync with latest FSF version.
9460
9461 2003-03-12 Paul Eggert <eggert@twinsun.com>
9462
9463 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
9464 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
9465 cursor, instead of leaving it undefined. This fixes a bug
9466 reported by Tim Van Holder in
9467 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
9468 * tests/input.at (Torturing the Scanner): Test the scanner on
9469 an empty input file, which was Tim Van Holder's test case.
9470
9471 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
9472 <sys/resource.h> can be included, include sys/time.h and
9473 sys/times.h first, if available. This works around the SunOS
9474 4.1.4 porting bug reported by Bruce Becker in
9475 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
9476
9477 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
9478 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
9479 AC_HEADER_SYS_WAIT.
9480
9481 Merge changes from gnulib. This was prompted because the CVS
9482 snapshot didn't build on Solaris 7 due to strnlen problems.
9483
9484 These changes need to be merged back into gnulib:
9485 * lib/hash.c: Include <stdbool.h> unconditionally.
9486 * m4/onceonly.m4 (m4_quote): New macro.
9487 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
9488 Quote AC_FOREACH variable-expansions properly.
9489 The 2003-01-03 obstack.h change also needs merging.
9490 {end of changes requiring merging}
9491
9492 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
9493 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
9494 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
9495 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
9496 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
9497 New files, imported from gnulib.
9498 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
9499 above.
9500
9501 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
9502 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
9503 gnulib sources.
9504
9505 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
9506 Add.
9507 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
9508 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
9509 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
9510 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
9511 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
9512 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
9513 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
9514 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
9515 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
9516 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
9517 (jm_PREREQ_ARGMATCH): Remove.
9518 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
9519 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
9520
9521 * src/system.h: Include <stdbool.h> unconditionally.
9522
9523 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
9524 assuming at least C89 in the bitset code for some time now.
9525
9526 2003-03-03 Akim Demaille <akim@epita.fr>
9527
9528 * ro.po: New.
9529
9530 2003-03-02 Akim Demaille <akim@epita.fr>
9531
9532 * doc/bison.texinfo (Table of Symbols): Reactivate the
9533 documentation for %lex-param, and %parse-param.
9534
9535 2003-03-02 Akim Demaille <akim@epita.fr>
9536
9537 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
9538 generate verbose error messages.
9539 Use the number of tokens as an upper bound in yytname, as it
9540 cannot be a non terminal.
9541
9542 2003-03-02 Akim Demaille <akim@epita.fr>
9543
9544 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
9545 message.
9546
9547 2003-03-02 Akim Demaille <akim@epita.fr>
9548
9549 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
9550 Use them to exercise yycheck overrun.
9551 Based on Andrew Suffield's grammar.
9552
9553 2003-03-02 Akim Demaille <akim@epita.fr>
9554
9555 Create tests/local.at for Bison generic testing macros.
9556
9557 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
9558 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
9559 This new file.
9560 * tests/calc.at (AT_CHECK_CALC): Adjust.
9561 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
9562 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
9563 * tests/local.at: here.
9564 (AT_COMPILE_CXX): Tags the tests using it as c++.
9565 Ignore the test if CXX is not functional.
9566
9567 2003-03-01 Paul Eggert <eggert@twinsun.com>
9568
9569 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
9570 not loc->end, since loc->end might contain garbage and this leads
9571 to undefined behavior on some platforms.
9572 (id_loc, token_start): Use (IF_LINTed) initial values that do not
9573 depend on *loc, so that the reader doesn't give the the false
9574 impression that *loc is initialized.
9575 (<INITIAL>"%%"): Do not bother setting code_start, since its value
9576 does not survive the return.
9577
9578 2003-03-01 Akim Demaille <akim@epita.fr>
9579
9580 * src/scan-gram.l (code_start): Always initialize it when entering
9581 into yylex, as SC_EPILOGUE is activated *before* the corresponding
9582 yylex invocation. An alternative would be making it static, but
9583 then it starts with the second %%'s beginning, instead of its end.
9584
9585 2003-02-28 Paul Eggert <eggert@twinsun.com>
9586
9587 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
9588 around a UnixWare 7.1.1 porting bug reported by John Hughes in
9589 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
9590
9591 2003-02-26 Paul Eggert <eggert@twinsun.com>
9592
9593 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
9594 Remove Sequent/Pyramid discussion (nobody uses them any more).
9595 Merge VMS and MS-DOS discussion; these ports may well be dead
9596 but let's keep mentioning them for now. Put <> around email
9597 addresses. Add copyright notice.
9598
9599 2003-02-24 Paul Eggert <eggert@twinsun.com>
9600
9601 * data/glr.c (yy_reduce_print): yylineno -> yylno,
9602 to avoid collision with flex use of yylineno.
9603 Problem reported by Bruce Lilly in
9604 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
9605 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
9606 * data/yacc.c (yy_reduce_print): Likewise.
9607
9608 * config/depcomp: Sync with Automake 1.7.3.
9609
9610 2003-02-21 Akim Demaille <akim@epita.fr>
9611
9612 * data/lalr1.cc: Use temporary variables instead of casts to
9613 change integer types.
9614 Suggested by Paul Eggert.
9615
9616 2003-02-21 Akim Demaille <akim@epita.fr>
9617
9618 * doc/bison.texinfo: Use "location" consistently to refer to @n,
9619 to avoid confusions with lalr1.cc's notion of Position.
9620 Suggested by Paul Eggert.
9621
9622 2003-02-20 Akim Demaille <akim@epita.fr>
9623
9624 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
9625 before initial_columns.
9626 (location.hh): Use consistent variable names when defining the
9627 operator<<.
9628 Use "last" so that we subtract from Positions, not from unsigned.
9629
9630 2003-02-20 Akim Demaille <akim@epita.fr>
9631
9632 * data/lalr1.cc (position.hh): New subfile, including the extended
9633 and Doxygen'ed documentation of class Position.
9634 (location.hh): Use it.
9635 Document a` la Doxygen.
9636 With the help of Benoit Perrot.
9637
9638 2003-02-20 Akim Demaille <akim@epita.fr>
9639
9640 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
9641 AT_YACC_IF.
9642 Redefine AT_YYERROR_SEES_LOC_IF using it.
9643 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
9644 not defined.
9645 Don't use the location in yy::Parser::error_ and
9646 yy::Parser::print_ when not %locations.
9647 Activate more lalr1.cc tests.
9648
9649 2003-02-19 Akim Demaille <akim@epita.fr>
9650
9651 * data/lalr1.cc: When displaying a line number, be sure to make it
9652 an int.
9653
9654 2003-02-19 Akim Demaille <akim@epita.fr>
9655
9656 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
9657 Remove, useless.
9658 (YYABORT, YYACCEPT, YYERROR): New.
9659 * tests/calc.at: Renable the lalr1.cc test.
9660
9661 2003-02-19 Akim Demaille <akim@epita.fr>
9662
9663 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
9664 error recovery, mixing with/without pops and discarding of the
9665 lookahead.
9666 Exercise YYERROR.
9667 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
9668
9669 2003-02-17 Paul Eggert <eggert@twinsun.com>
9670
9671 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
9672 * tests/testsuite.at (AT_COMPILE): Use them.
9673 This fixes the testsuite problem reported by Robert Lentz in
9674 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
9675
9676 2003-02-12 Paul Eggert <eggert@twinsun.com>
9677
9678 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
9679 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
9680 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
9681 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
9682 Check for malloc failure, for consistency with yacc.c.
9683 (yytname_size): Remove, for consistency with yacc.c.
9684
9685 The bug still remains in data/lalr1.cc, as I didn't have time
9686 to fix it there.
9687
9688 2003-02-06 Akim Demaille <akim@epita.fr>
9689
9690 * configure.ac (GXX): Rename as...
9691 (CXX): this, to keep the original Autoconf semantics.
9692 Require 2.57.
9693 * data/lalr1.cc: Fix b4_copyright invocations.
9694 If YYDEBUG is not defined, don't depend upon name_ being defined.
9695 (location.hh): Include string and iostream.
9696 (Position::filename): New member.
9697 (Position::Position ()): New.
9698 (operator<< (Position)): New.
9699 (operator- (Position, int)): New.
9700 (Location::first, Location::last): Rename as...
9701 (Location::begin, Location::end): these, to mock the conventional
9702 iterator names.
9703 (operator<< (Location)): New.
9704 * tests/atlocal.in (CXX): New.
9705 * tests/testsuite.at (AT_COMPILE_CXX): New.
9706 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
9707 locations in a more synthetic way.
9708 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
9709 lalr1.cc is used.
9710 Adjust the C locations to match those from Emacs: first column is
9711 column 0.
9712 Change all the expected results.
9713 Conform to the GCS: simplify the locations when applicable.
9714 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
9715 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
9716 these CPP macros with the m4 macros new defined by...
9717 (AT_CHECK_PUSHDEFS): this, i.e.:
9718 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
9719 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
9720 New macros.
9721 (AT_CHECK_POPDEFS): Undefine them.
9722 (AT_CHECK_CALC_LALR1_CC): New.
9723 Use it for the first lalr1.cc test.
9724
9725 2003-02-04 Akim Demaille <akim@epita.fr>
9726
9727 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
9728 Location as is defined.
9729
9730 2003-02-04 Akim Demaille <akim@epita.fr>
9731
9732 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
9733 name_ being defined.
9734
9735 2003-02-03 Paul Eggert <eggert@twinsun.com>
9736
9737 * src/gram.h (start_symbol): Remove unused decl.
9738
9739 Use more-consistent naming conventions for local vars.
9740
9741 * src/derives.c (derives_compute): Change type of local var from
9742 int to rule_number.
9743 * src/gram.c (grammar_rules_partial_print): Likewise.
9744 * src/print.c (print_core): Likewise.
9745 * src/reduce.c (reduce_grammar_tables): Likewise.
9746
9747 * src/gram.c (grammar_dump): Change name of item_number *
9748 local var from r to rp.
9749 * src/nullable.c (nullable_compute): Likewise.
9750
9751 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
9752
9753 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
9754 for symbol or symbol_number var.
9755 * src/reader.c (grammar_start_symbol_set): Likewise.
9756 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
9757 Likewise.
9758 * src/state.c (transitions_to): Likewise.
9759 * src/state.h: Likewise.
9760 * src/tables.c (symbol_number_to_vector_number): Likewise.
9761
9762 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
9763 char * var.
9764
9765 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
9766 var.
9767
9768 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
9769 var.
9770
9771 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
9772 Use str, not s, for char * var. Use ch, not c, for character var.
9773 Use size for size var.
9774
9775 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
9776 char * var.
9777 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
9778 uniqstr var.
9779 * src/uniqstr.h: Likewise.
9780
9781 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9782 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9783 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
9784 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
9785 param to have same name as that of enum, so that we don't use
9786 "s" to stand for a non-state.
9787
9788 2003-02-02 Akim Demaille <akim@epita.fr>
9789
9790 * src/scan-skel.l: Scan more than one inert character per yylex
9791 invocation.
9792
9793 2003-02-01 Paul Eggert <eggert@twinsun.com>
9794
9795 Version 1.875a.
9796
9797 * po/LINGUAS: Add ms.
9798
9799 2003-01-30 Akim Demaille <akim@epita.fr>
9800
9801 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
9802
9803 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9804
9805 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
9806 of $1.
9807
9808 Changes in response to error report by S. Eken: GLR mode does not
9809 handle negative $ indices or $ indices in embedded rules correctly.
9810 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
9811
9812 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
9813 (b4_rhs_location): Ditto.
9814 (yyfill): New function to copy from stack tree into array
9815 incrementally.
9816 (yyuserAction): Modify to allow incremental move of semantic values
9817 to rhs array when in GLR mode.
9818 Define YYFILL to use in user-defined actions to fill semantic array
9819 as needed.
9820 Remove dummy use of yystack, as there is now a guaranteed use.
9821 (yydoAction): Modify to allow incremental move of semantic values
9822 to rhs array when in GLR mode.
9823 (yyresolveAction): Ditto.
9824 (yyglrShiftDefer): Update comment.
9825 (yyresolveStates): Use X == NULL for pointers, not !X.
9826 (yyglrReduce): Ditto.
9827 (yydoAction): Ditto
9828
9829 * tests/glr-regr1.at: Rename to ...
9830 * tests/glr-regression.at: Add new regression test for the problems
9831 described above (adapted from S. Eken).
9832 Update copyright notice.
9833 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
9834 * tests/Makefile.am: Ditto.
9835
9836 2003-01-28 Paul Eggert <eggert@twinsun.com>
9837
9838 * data/lalr1.cc: Do not use @output_header_name@ unless
9839 b4_defines_flag is set. This fixes two bugs reported by
9840 Tim Van Holder in
9841 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
9842 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
9843
9844 2003-01-21 Paul Eggert <eggert@twinsun.com>
9845
9846 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
9847 we don't need to worry about yyerrlab1 being reported as an
9848 "unused label" by non-GCC C compilers. The downside is that if
9849 locations are used then a couple of statements are duplicated each
9850 time YYERROR is invoked, but the upside is that the warnings
9851 should vanish.
9852 (yyerrlab1): Move code to YERROR.
9853 (yyerrlab2): Remove. Change uses back to yyerrlab1.
9854 This reverts some of the 2002-12-27 change.
9855
9856 2003-01-17 Paul Eggert <eggert@twinsun.com>
9857
9858 * src/output.c (symbol_printers_output): Fix typo that led
9859 to core dump. Problem reported by Antonio Rus in
9860 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
9861
9862 2003-01-13 Akim Demaille <akim@epita.fr>,
9863 Quoc Peyrot <chojin@lrde.epita.fr>,
9864 Robert Anisko <anisko_r@lrde.epita.fr>
9865
9866 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
9867 when the stacks contain one element, as the loop would otherwise
9868 free the last state, and then use the top state (the one we just
9869 popped). This means that the initial elements will not be freed
9870 explicitly, as is the case in yacc.c; it is not a problem, as
9871 these elements have fake values.
9872
9873 2003-01-11 Paul Eggert <eggert@twinsun.com>
9874
9875 * NEWS: %expect-violations are now just warnings, reverting
9876 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
9877 bootstrapping problem reported by Matthias Klose; see
9878 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
9879 * src/conflicts.c (conflicts_print): Likewise.
9880 * tests/conflicts.at (%expect not enough, %expect too much,
9881 %expect with reduce conflicts): Likewise.
9882 * doc/bison.texinfo (Expect Decl): Document this. Also mention
9883 that the warning is enabled if the number of conflicts changes
9884 (not necessarily increases).
9885
9886 * src/getargs.c (version): Update copyright year.
9887
9888 2003-01-09 Akim Demaille <akim@epita.fr>
9889
9890 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
9891
9892 2003-01-08 Paul Eggert <eggert@twinsun.com>
9893
9894 * Makefile.maint (WGETFLAGS):
9895 New macro, containing "-C off" to disable proxy caches.
9896 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
9897 (rel-check): Use $(WGET) instead of wget.
9898
9899 2003-01-06 Paul Eggert <eggert@twinsun.com>
9900
9901 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
9902 the GLR paper of Scott, Johnstone and Hussain.
9903
9904 2003-01-04 Paul Eggert <eggert@twinsun.com>
9905
9906 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
9907 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
9908 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
9909 (EXTRA_LIBRARIES): New var, for liby.a.
9910 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
9911 (EXTRA_SCRIPTS): New var, for yacc.
9912
9913 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
9914 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
9915 Problem reported by Nelson H. F. Beebe.
9916
9917 2003-01-03 Paul Eggert <eggert@twinsun.com>
9918
9919 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
9920 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
9921 when compiling Bison 1.875's `bitset bset = obstack_alloc
9922 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
9923
9924 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
9925 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
9926 grow to a huge size with typical invocation.
9927
9928 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
9929 Use the pattern recommended by Autoconf 2.57, except also protect
9930 against double-definition.
9931 * src/system.h: Likewise.
9932 Portability issues reported by Nelson H. F. Beebe.
9933
9934 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
9935 All uses changed. Provide a definition in both C and C++.
9936 (yytrue, yyfalse): Define even if defined (__cplusplus).
9937
9938 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
9939 Reported by Nelson H. F. Beebe.
9940
9941 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
9942
9943 2003-01-02 Paul Eggert <eggert@twinsun.com>
9944
9945 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
9946 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
9947 Bug reported by Nelson H. F. Beebe.
9948
9949 2003-01-01 Paul Eggert <eggert@twinsun.com>
9950
9951 * Version 1.875.
9952
9953 2002-12-30 Paul Eggert <eggert@twinsun.com>
9954
9955 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
9956 Moved here from...
9957 (<INITIAL>","): Here. This causes stray "," to be treated
9958 more uniformly.
9959
9960 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
9961 last brace in braced code when not in Yacc mode, for compatibility
9962 with Bison 1.35. This resurrects the 2001-12-15 patch to
9963 src/reader.c.
9964
9965 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
9966 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
9967
9968 2002-12-28 Paul Eggert <eggert@twinsun.com>
9969
9970 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
9971 that of SYM's type. This fixes Debian bug 168069, reported by
9972 Thomas Olsson.
9973
9974 2002-12-28 Paul Eggert <eggert@twinsun.com>
9975
9976 Version 1.75f.
9977
9978 Switch back to the Yacc style of conflict reports, undoing some
9979 of the 2002-07-30 change.
9980 * doc/bison.texinfo (Understanding): Use Yacc style for
9981 conflict reports. Also, use new way of locating rules.
9982 * src/conflicts.c (conflict_report):
9983 Renamed from conflict_report_yacc, removing the old
9984 'conflict_report'. Translate the entire conflict report at once,
9985 so that we don't assume that "," has the same interpretation in
9986 all languages.
9987 (conflicts_output): Use Yacc-style conflict report for each state,
9988 instead of our more-complicated style.
9989 (conflicts_print): Use Yacc-style conflict report, except print
9990 the input file name when not emulating Yacc.
9991 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
9992 Conflicted Reduction, %expect not enough, %expect too much,
9993 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
9994 * tests/existing.at (GNU Cim Grammar): Likewise.
9995 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
9996
9997 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
9998 fatal): Don't invoke fflush; it's not needed and it might even be
9999 harmful for stdout, as stdout might not be open.
10000 * src/reduce.c (reduce_print): Likewise.
10001
10002 2002-12-27 Paul Eggert <eggert@twinsun.com>
10003
10004 Fix a bug where error locations were not being recorded correctly.
10005 This problem was originally reported by Paul Hilfinger in
10006 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
10007
10008 * data/yacc.c (yyparse): New local var yylerrsp, to record the
10009 top of the location stack's error locations.
10010 (yyerrlab): Set it. When discarding a token, push its location
10011 onto yylerrsp so that we don't lose track of the error's end.
10012 (yyerrlab1): Now is only the target of YYERROR, so that we can
10013 properly record the location of the action that failed. For GCC
10014 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
10015 GCC warning about yyerrlab1 being unused if YYERROR is unused.
10016 (yyerrlab2): New label, which yyerrlab now falls through to.
10017 Compute the error's location by applying YYLLOC_DEFAULT to
10018 the locations of all the symbols that went into the error.
10019 * doc/bison.texinfo (Location Default Action): Mention that
10020 YYLLOC_DEFAULT is also invoked for syntax errors.
10021 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10022 Error locations include the locations of all the tokens that were
10023 discarded, not just the last token.
10024
10025 2002-12-26 Paul Eggert <eggert@twinsun.com>
10026
10027 * src/files.c: Include quote.h.
10028 (compute_output_file_names): Warn if we detect conflicting
10029 outputs to the same file. This should catch the misunderstanding
10030 exemplified by Debian Bug 165349, reported by Bruce Stephens..
10031
10032 * src/conflicts.c (conflicts_print): If the user specifies
10033 "%expect N", report an error if there are any reduce/reduce
10034 conflicts. This is what the manual says should happen.
10035 This fixes Debian bug 130890, reported by Anthony DeRobertis.
10036 * tests/conflicts.at (%expect with reduce conflicts): New test.
10037
10038 Don't use m4_include on relative file names, as it doesn't work as
10039 desired if there happens to be a file with that name under ".".
10040
10041 * m4sugar/version.m4: Remove; it was included but it wasn't used.
10042 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
10043 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
10044 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
10045 * src/output.c (output_skeleton): Use full path names when
10046 specifying a file to include; don't rely on include path, as
10047 it's unreliable when the working file contains a file with
10048 that name.
10049
10050 2002-12-25 Paul Eggert <eggert@twinsun.com>
10051
10052 Remove obsolete references to bison.simple and bison.hairy.
10053 Problem mentioned by Aubin Mahe in
10054 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
10055 * data/glr.c: Comment fix.
10056 * doc/bison.1: Remove references. Also, mention "yacc".
10057
10058 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
10059 with -g option.
10060
10061 * src/parse-gram.y (declaration): Use enum "report_states" rather
10062 than its numeric value 1.
10063
10064 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
10065 opening a new one. This fixes Debian bug 165349, reported by
10066 Bruce Stephens.
10067
10068 2002-12-24 Paul Eggert <eggert@twinsun.com>
10069
10070 Version 1.75e.
10071
10072 * Makefile.maint (cvs-update): Don't assume that the shell
10073 supports $(...), as Solaris sh doesn't.
10074
10075 * src/parse-gram.y (lloc_default): Remove test for empty
10076 nonterminals at the end, since it didn't change the result.
10077
10078 2002-12-24 Paul Eggert <eggert@twinsun.com>
10079
10080 If the user does not define YYSTYPE as a macro, Bison now declares it
10081 using typedef instead of defining it as a macro. POSIX requires this.
10082 For consistency, YYLTYPE is also declared instead of defined.
10083
10084 %union directives can now have a tag before the `{', e.g., the
10085 directive `%union foo {...}' now generates the C code
10086 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
10087 The default union tag is `YYSTYPE', for compatibility with Solaris 9
10088 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
10089 instead of `yyltype'.
10090
10091 `yystype' and `yyltype' are now obsolescent macros instead of being
10092 typedefs or tags; they are no longer documented and will be
10093 withdrawn in a future release.
10094
10095 * data/glr.c (b4_location_type): Remove.
10096 (YYSTYPE): Renamed from yystype.
10097 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
10098 (struct YYLTYPE): Renamed from struct yyltype.
10099 (YYLTYPE): Renamed from yyltype.
10100 (yyltype, yystype): New (and obsolescent) macros,
10101 for backward compatibility.
10102 * data/yacc.c: Likewise.
10103
10104 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
10105 does not specify a union tag. This is for compatibility with
10106 Solaris 9 yacc.
10107
10108 * src/parse-gram.y (add_param): 2nd arg is now char * not char
10109 const *, since it is now modified by stripping surrounding { }.
10110 (current_braced_code): Remove.
10111 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
10112 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
10113 trailing " {...}". Now of type <chars>.
10114 (grammar_declaration): Adjust to bundled tokens.
10115 (code_content): Remove; stripping is now done by add_param.
10116 (print_token_value): Print contents of bundled tokens.
10117 (token_name): New function.
10118
10119 * src/reader.h (braced_code, current_braced_code): Remove.
10120 (token_name): New decl.
10121
10122 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
10123 token_type, not braced_code code_kind. All uses changed.
10124 (SC_PRE_CODE): New state, for scanning after a keyword that
10125 has (or usually has) an immediately-following braced code.
10126 (token_type): New local var, to keep track of which token type
10127 to return when scanning braced code.
10128 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
10129 <INITIAL>"%parse-param", <INITIAL>"%printer",
10130 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
10131 instead of returning a token type immediately.
10132 (<INITIAL>"{"): Set token type.
10133 (<SC_BRACED_CODE>"}"): Use it.
10134 (handle_action_dollar, handle_action_at): Now returns bool
10135 indicating success. Fail if ! current_rule; this prevents a core dump.
10136 (handle_symbol_code_dollar, handle_symbol_code_at):
10137 Remove; merge body into caller.
10138 (handle_dollar, handle_at): Complain in invalid contexts.
10139
10140 * NEWS, doc/bison.texinfo: Document the above.
10141 * NEWS: Fix years and program names in copyright notice.
10142
10143 2002-12-17 Paul Eggert <eggert@twinsun.com>
10144
10145 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
10146 Reporting, Table of Symbols): Omit mentions of %lex-param and
10147 %parse-param from the documentation for now.
10148
10149 2002-12-15 Paul Eggert <eggert@twinsun.com>
10150
10151 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
10152 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
10153 lookahead symbol, and which sets yychar in parser actions) and it
10154 disagreed with the Bison documentation. Bug
10155 reported by Andrew Walrond.
10156
10157 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
10158 as the caller now does that.
10159 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
10160 (YYEMPTY): Parenthesize right hand side, since others use it.
10161 (yyparse): Don't assume that our generated code is the only code
10162 that sets yychar.
10163
10164 2002-12-13 Paul Eggert <eggert@twinsun.com>
10165
10166 Version 1.75d.
10167
10168 POSIX requires a "yacc" command.
10169 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
10170 (MOSTLYCLEANFILES): Add yacc.
10171 (yacc): New rule.
10172 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
10173 as an alias for bison y.
10174
10175 * po/LINGUAS: Add da.
10176
10177 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
10178 problem with latest <getopt.h>.
10179 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
10180
10181 * doc/fdl.texi: Upgrade to 1.2.
10182 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
10183 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
10184 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
10185 gnulib.
10186 * config/install-sh: Sync with autotools.
10187
10188 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
10189 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10190 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
10191 locations are requested.
10192 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
10193 locations are requested.
10194
10195 2002-12-12 Paul Eggert <eggert@twinsun.com>
10196
10197 Remove unportable casts and storage allocation tricks.
10198 While we're at it, remove almost all casts, since they
10199 usually aren't needed and are a sign of trouble.
10200
10201 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
10202
10203 * src/derives.c (derives_compute): Do not subtract NTOKENS from
10204 the pointer DSET returned by malloc; this isn't portable.
10205 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
10206 Similarly for DERIVES.
10207 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
10208 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
10209 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
10210
10211 * src/derives.c (derives_compute): Do not bother invoking
10212 int_of_rule_number, since rule numbers are integers.
10213
10214 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
10215 rather than XMALLOC (char, N).
10216
10217 * src/files.c (filename_split): Rewrite to avoid cast.
10218
10219 * src/gram.h (symbol_number_as_item_number,
10220 item_number_as_symbol_number, rule_number_as_item_number,
10221 item_number_as_rule_number):
10222 Now inline functions rather than macros, to avoid casts.
10223 * src/state.h (state_number_as_int): Likewise.
10224 * src/tables.c (state_number_to_vector_number,
10225 symbol_number_to_vector_number): Likewise.
10226
10227 * src/gram.h (int_of_rule_number): Remove; no longer used.
10228
10229 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
10230 since the resulting storage is always stored into.
10231
10232 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
10233 where it's needed.
10234
10235 * src/muscle_tab.c (muscle_m4_output):
10236 Now inline. Return bool, not int.
10237 * src/state.c (state_compare): Likewise.
10238 * src/symtab.c (symbol_check_defined,
10239 symbol_check_alias_consistency, symbol_pack, symbol_translation,
10240 hash_compare_symbol, hash_symbol):
10241 Likewise.
10242 * src/uniqstr.c (uniqstr_print): Likewise.
10243 * src/muscle_tab.c (muscle_m4_output_processor):
10244 New function, to avoid casts.
10245 * src/state.c (state_comparator, stage_hasher): Likewise.
10246 * src/symtab.c (symbol_check_defined_processor,
10247 symbol_check_alias_consistency_processor, symbol_pack_processor,
10248 symbol_translation_processor, hash_symbol_comparator,
10249 hash_symbol_hasher): Likewise.
10250 * src/uniqstr.c (uniqstr_print_processor): Likewise.
10251 * src/muscle_tab.c (muscles_m4_output):
10252 Use new functions instead of casting old functions unportably.
10253 * src/state.c (state_hash_new): Likewise.
10254 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
10255 symbols_token_translations_init):
10256 Likewise.
10257 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
10258
10259 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
10260 var instead of casting to long, to avoid casts.
10261 (prepare_states): Use MALLOC rather than alloca, so that we don't
10262 have to worry about alloca.
10263 * src/state.c (state_hash_lookup): Likewise.
10264
10265 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
10266 local var instead of casting to unsigned char, to avoid casts.
10267
10268 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
10269 STATE_ALLOC): Remove.
10270 (transitions_new, errs_new, reductions_new, state_new): Use malloc
10271 rather than calloc, and use offsetof to avoid allocating slightly
10272 too much storage.
10273 (state_new): Initialize all members.
10274
10275 * src/state.c (state_hash): Use unsigned accumulator, not signed.
10276
10277 * src/symtab.c (symbol_free): Remove; unused.
10278 (symbol_get): Remove cast in lhs of assignment.
10279 (symbols_do): Now static. Accept generic arguments, not
10280 hashing-related ones.
10281
10282 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
10283 (symbol_processor): Remove.
10284 (symbols_do): Remove decl; now static.
10285
10286 * src/system.h (alloca): Remove; decl no longer needed.
10287 (<stddef.h>): Include, for offsetof.
10288 (<inttypes.>, <stdint.h>): Include if available.
10289 (uintptr_t): New type, if system lacks it.
10290 (CALLOC, MALLOC, REALLOC): New macros.
10291 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
10292 new macros.
10293
10294 * src/tables.c (table_size): Now int, to pacify GCC.
10295 (table_grow, table_ninf_remap): Use signed table size.
10296 (save_row): Don't bother initializing locals when not needed.
10297 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
10298 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
10299
10300 * src/vcg.h: Correct misspellings.
10301
10302 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
10303
10304
10305 * src/getargs.c (getargs): Don't assume EOF == -1.
10306
10307 2002-12-09 Paul Eggert <eggert@twinsun.com>
10308
10309 Change identifier spellings to avoid collisions with names
10310 that are reserved by POSIX.
10311
10312 Don't use names ending in _t, since POSIX reserves them.
10313 For consistency, remove _e and _s endings -- they're weren't
10314 needed to remove ambiguity. All uses changed.
10315 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
10316 turn was just renamed from struniq_t.
10317 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
10318 which in turn was just renamed from struniq_processor_t.
10319 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
10320 in turn was renamed from hash_compare_struniq_t.
10321 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
10322 (state_list): Renamed from state_list_t.
10323 * src/assoc.h (assoc): Renamed from assoc_t.
10324 * src/conflicts.c (enum conflict_resolution): Renamed from
10325 enum conflict_resolution_e.
10326 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
10327 (rule_list): Renamed from rule_list_t.
10328 * src/getargs.h (enum trace): Renamed from enum trace_e.
10329 (enum report): Renamed from enum report_e.
10330 * src/gram.h (item_number): Renamed from item_number_t.
10331 (rule_number): Renamed from rule_number_t.
10332 (struct rule_s): Remove the "rule_s" part; not used.
10333 (rule): Renamed from rule_t.
10334 (rule_filter): Renamed from rule_filter_t.
10335 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
10336 (goto_list): Renamed from goto_list_t.
10337 * src/lalr.h (goto_number): Renamed from goto_number_t.
10338 * src/location.h (location): Renamed from location_t.
10339 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
10340 and moved here from:
10341 * src/muscle_tab.h (muscle_entry_t): here.
10342 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
10343 (rule_list): Renamed from rule_list_t.
10344 * src/print_graph.c (static_graph): Renamed from graph.
10345 * src/reader.h (braced_code): Renamed from braced_code_t.
10346 Remove brace_code_e tag.
10347 * src/relation.h (relation_node): Renamed from relation_node_t.
10348 (relation_nodes): Renamed from relation_nodes_t.
10349 (relation): Renamed from relation_t.
10350 * src/state.h (state_number): Renamed from state_number_t.
10351 (struct state): Renamed from struct state_s.
10352 (state): Renamed from state_t.
10353 (transitions): Renamed from transitions_t. Unused (and
10354 misspelled) transtion_s tag removed.
10355 (errs): Renamed from errs_t. Unused errs_s tag removed.
10356 (reductions): Renamed from reductions_t. Unused tag
10357 reductions_s removed.
10358 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
10359 (struct symbol_list): Renamed from struct symbol_list_s.
10360 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
10361 (struct symbol): Renamed from struct symbol_s.
10362 (symbol): Renamed from symbol_t.
10363 * src/tables.c (vector_number): Renamed from vector_number_t.
10364 (action_number): Renamed from action_t.
10365 * src/tables.h (base_number): Renamed from base_t.
10366 * src/vcg.h (enum color): Renamed from enum color_e.
10367 (enum textmode): Renamed from enum textmode_e.
10368 (enum shape): Renamed from enum shape_e.
10369 (struct colorentry): Renamed from struct colorentry_s.
10370 (struct classname): Renamed from struct classname_s.
10371 (struct infoname): Renamed from struct infoname_s.
10372 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
10373 (enum decision): Renamed from enum decision_e.
10374 (enum orientation): Renamed from enum orientation_e.
10375 (enum alignment): Renamed from enum alignment_e.
10376 (enum arrow_mode): Renamed from enum arrow_mode_e.
10377 (enum crossing_type): Renamed from enum crossing_type_e.
10378 (enum view): Renamed from enum view_e.
10379 (struct node): Renamed from struct node_s.
10380 (node): Renamed from node_t.
10381 (enum linestyle): Renamed from enum linestyle_e.
10382 (enum arrowstyle): Renamed from enum arrowstyle_e.
10383 (struct edge): Renamed from struct edge.
10384 (edge): Renamed from edge_t.
10385 (struct graph): Renamed from struct graph_s.
10386 (graph): Renamed from graph_t.
10387 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
10388 Rename value_t -> value.
10389 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
10390 value_t_as_yystype -> value_as_yystype.
10391
10392 Don't include <errno.h> in the mainstream code, since it
10393 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
10394 * lib/get-errno.c, lib/get-errno.h: New files.
10395 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
10396 get-errno.c.
10397 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
10398 * src/output.c (output_skeleton): Likewise.
10399 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
10400 instead of errno.
10401 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
10402 Likewise.
10403 (handle_action_dollar, handle_action_at): Likewise.
10404 * src/system.h: Do not include <errno.h>.
10405 (TAB_EXT): Renamed from EXT_TAB.
10406 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
10407
10408 Avoid str[a-z]*, since <string.h> reserves that name space.
10409 Change all instances of "struniq" in names to "uniqstr", and
10410 likewise for "STRUNIQ" and "UNIQSTR".
10411 * src/uniqstr.c: Renamed from src/struniq.c.
10412 * src/uniqstr.h: Renamed from src/struniq.h.
10413 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
10414 * src/files.c (strsuffix): Remove; unused.
10415 (concat2): Renamed from stringappend. Now static.
10416 * src/files.h (strsuffix, stringappend): Remove; unused.
10417 * src/parse-gram.y (<chars>): Renamed from <string>.
10418 (<uniqstr>): Renamed from <struniq>.
10419 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
10420 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
10421 (struct graph_s.expand): Renamed from struct graph_s.stretch.
10422 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
10423 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
10424 (N_EXPAND): Renamed from N_STRETCH.
10425
10426 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
10427 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
10428 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
10429 Remove; unused.
10430 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
10431 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
10432 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
10433 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
10434 (BASE_MAXIMUM): Renamed from BASE_MAX.
10435 (BASE_MINIMUM): Renamed from BASE_MIN.
10436 (ACTION_MAX): Remove; unused.
10437 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
10438 Unnecessary casts removed from above defines.
10439
10440
10441 Fix misspelling in names.
10442 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
10443 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
10444 G_NODE_ALIGNEMENT.
10445
10446
10447 * lib/timevar.c (timevar_report): Renamed from time_report,
10448 for consistency with other names.
10449 * lib/timevar.h (timevar_report): New decl.
10450 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
10451
10452
10453 Sort include-file uses.
10454
10455 Reorder all include files under src to be in the order "system.h".
10456 then the ../lib include files in angle brackets (alphabetized),
10457 then the . include files in double-quotes (alphabetized). Fix
10458 dependency breakages encountered in this process, as follows:
10459 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
10460 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
10461 * src/state.h: Include "symtab.h".
10462
10463 2002-12-08 Paul Eggert <eggert@twinsun.com>
10464
10465 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
10466 since this causes problems when __file__ contains character
10467 sequences like "@" that are treated specially by src/scan-skel.l.
10468 Instead, just use the file's basename. This fixes the bug
10469 reported by Martin Mokrejs in
10470 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
10471
10472 2002-12-06 Paul Eggert <eggert@twinsun.com>
10473
10474 Add support for rules that do not have trailing semicolons, as
10475 POSIX requires. Improve the quality of locations in Bison
10476 diagnostics.
10477
10478 * src/location.c: Include <quotearg.h>.
10479 (empty_location): Now const.
10480 (location_print): New function. Follow the recommendation of the
10481 GNU Coding Standards for locations that span file boundaries.
10482 * src/location.h: Do not include <quotearg.h>; no longer needed.
10483 (boundary): New type.
10484 (location_t): Use it. This allows locations to span file boundaries.
10485 All member uses changed: file -> start.file or end.file (as needed),
10486 first_line -> start.line, first_column -> start.column,
10487 last_line -> end.line, last_column -> end.column.
10488 (equal_boundaries): New function.
10489 (LOCATION_RESET, LOCATION_STEP): Remove.
10490 (LOCATION_PRINT): Remove. All callers changed to use location_print.
10491 (empty_location): Now const.
10492 (location_print): New decl.
10493 * src/parse-gram.y (lloc_default): New function, which handles
10494 empty locations more accurately.
10495 (YYLLOC_DEFAULT): Use it.
10496 (%token COLON): Remove.
10497 (%token ID_COLON): New token.
10498 (rules): Use it.
10499 (declarations, rules): Remove trailing semicolon.
10500 (declaration, rules_or_grammar_declaration):
10501 Allow empty (";") declaration.
10502 (symbol_def): Remove empty actions; no longer needed.
10503 (rules_or_grammar_declaration): Remove trailing semicolon.
10504 (semi_colon.opt): Remove.
10505 * src/reader.h: Include location.h.
10506 (scanner_cursor): New decl.
10507 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
10508 rolling our own.
10509 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
10510 of *loc.
10511 (STEP): Remove. No longer needed, now that adjust_location does
10512 the work. All uses removed.
10513 (scanner_cursor): New var.
10514 (adjust_location): Renamed from extend_location. It now sets
10515 *loc and adjusts the scanner cursor. All uses changed.
10516 Don't bother testing for CR.
10517 (handle_syncline): Remove location arg; now updates scanner cursor.
10518 All callers changed.
10519 (unexpected_end_of_file): Now accepts start boundary of token or
10520 comment, not location. All callers changed. Update scanner cursor,
10521 not the location.
10522 (SC_AFTER_IDENTIFIER): New state.
10523 (context_state): Renamed from c_context. All uses changed.
10524 (id_loc, code_start, token_start): New local vars.
10525 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
10526 processing of Yacc white space and equivalents here.
10527 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
10528 instead of returning ID immediately, since we need to search for
10529 a subsequent colon.
10530 (<INITIAL>"'", "\""): Save token_start.
10531 (<INITIAL>"%{", "{", "%%"): Save code_start.
10532 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
10533 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
10534 BEGIN context_state at end, not INITIAL.
10535 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
10536 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
10537 Return correct token start.
10538 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
10539 the start of a character, string or multiline comment is found.
10540 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
10541 Reduction): Adjust reported locations to match the more-precise
10542 results now expected.
10543 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
10544 * tests/reduce.at (Useless Rules, Reduced Automaton,
10545 Underivable Rules): Likewise.
10546 * tests/regression.at (Invalid inputs): No longer `expecting ";"
10547 or "|"' now that so many other tokens are allowed by the new grammar.
10548
10549 * src/complain.h (current_file): Remove duplicate decl;
10550 current_file is now owned by files.h.
10551 * src/complain.c, src/scan-gram.l: Include files.h.
10552
10553 2002-12-06 Paul Eggert <eggert@twinsun.com>
10554
10555 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
10556 promotes to int; it might be unsigned int.
10557 * data/yacc.c (yy_reduce_print): Likewise.
10558
10559 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
10560 be #defined in the prologue, not in the Bison declarations.
10561 This fixes Debian Bug 102878, reported by Shaul Karl.
10562
10563 2002-12-02 Paul Eggert <eggert@twinsun.com>
10564
10565 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
10566 * lib/strtoul.c: New file, from gnulib.
10567 This fixes a porting bug reported by Peter Klein in
10568 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
10569
10570 2002-11-30 Paul Eggert <eggert@twinsun.com>
10571
10572 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
10573 and put only a forward declaration in the prologue. This is for
10574 consistency with the other scanner helper functions.
10575
10576 Type clashes now generate warnings, not errors, since it
10577 appears that POSIX may allow some grammars with type clashes.
10578 * src/reader.c (grammar_current_rule_check): Warn about
10579 type clashes instead of complaining.
10580 * tests/input.at (Type Clashes): Expect warnings, not complaints.
10581
10582 Add Yacc library, since POSIX requires it.
10583 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
10584 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
10585 * lib/main.c, lib/yyerror.c: New files.
10586
10587 gram_error can be static; it need not be extern.
10588 * src/reader.h (gram_error): Remove decl.
10589 * src/parse-gram.y (gram_error): Now static. Add static decl.
10590 (print_token_value): Omit parameter names from forward decl,
10591 for consistency.
10592
10593 2002-11-29 Paul Eggert <eggert@twinsun.com>
10594
10595 * doc/bison.texinfo: Emphasize that yylex and yyerror must
10596 be declared before being used. E.g., one should typically
10597 declare them in the prologue. Use GNU coding style in examples.
10598 Put "const" consistently after the type it modifies. Mention
10599 that C99 supports "inline". Mention that yyerror traditionally
10600 returns "int".
10601
10602 %parse-param and %lex-param now take just one argument, the
10603 declaration; the argument name is deduced from the declaration.
10604
10605 * doc/bison.texinfo (Parser Function, Pure Calling, Error
10606 Reporting, Table of Symbols): Document this.
10607 * src/parse-gram.y (add_param): New function.
10608 (COMMA): Remove.
10609 (declaration): Implement new rule for %parse-param and %lex-param.
10610 * src/scan-gram.l: "," now elicits a warning, rather than being
10611 a token; this is more compatible with byacc.
10612 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
10613
10614 2002-11-27 Paul Eggert <eggert@twinsun.com>
10615
10616 Rename identifiers to avoid real and potential collisions.
10617
10618 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
10619 to avoid collision with lex macro described by Bruce Lilly in
10620 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
10621 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10622 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10623 * src/parse-gram.y (print_token_value): Renamed from yyprint.
10624 All uses changed.
10625 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
10626 The name "yycontrol" violates the name space rules, and this stuff
10627 wasn't being used anyway.
10628 (input): Remove action; this stuff wasn't being used.
10629 (gram_error): Rename local variable yylloc -> loc.
10630 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
10631 (YY_DECL): Don't use "yy" at start of local variables.
10632 All uses changed, e.g., yylloc -> loc.
10633 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
10634 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
10635 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
10636 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
10637
10638 * src/parse-gram.y (gram_error): loc is now const *.
10639 * src/reader.h (gram_error): Likewise.
10640
10641 2002-11-24 Paul Eggert <eggert@twinsun.com>
10642
10643 Version 1.75c.
10644
10645 * tests/actions.at (Actions after errors): Use an output format
10646 more similar to that of the Printers and Destructors test.
10647 Test the position of the ';' token too.
10648 (Printers and Destructors): Likewise.
10649 (Printers and Destructors: %glr-parser): Remove for now, to avoid
10650 unnecessarily alarming people when the test fails.
10651
10652 * data/yacc.c (yyerrlab1): Move this label down, so that the
10653 parser does not discard the lookahead token if the user code
10654 invokes YYERROR. This change is required for POSIX conformance.
10655
10656 * lib/error.c: Sync with gnulib.
10657
10658 2002-11-22 Paul Eggert <eggert@twinsun.com>
10659
10660 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
10661 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
10662 * lib/xmalloc.c: Likewise.
10663
10664 2002-11-20 Paul Eggert <eggert@twinsun.com>
10665
10666 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
10667
10668 2002-11-20 Paul Eggert <eggert@twinsun.com>
10669
10670 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
10671 should use `if (! x) abort ();' rather than `assert (x);', and
10672 anyway it's one less thing to worry about configuring.
10673
10674 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
10675 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
10676 and replace all instances of assert with abort.
10677 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10678 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
10679
10680 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
10681 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
10682 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
10683 hash_find_entry, hash_rehash, hash_insert): Likewise.
10684 * src/conflicts.c (resolve_sr_conflict): Likewise.
10685 * src/lalr.c (set_goto_map, map_goto): Likewise.
10686 * src/nullable.c (nullable_compute): Likewise.
10687 * src/output.c (prepare_rules, token_definitions_output): Likewise.
10688 * src/reader.c (packgram, reader): Likewise.
10689 * src/state.c (state_new, state_free, state_transitions_set,
10690 state_reduction_find): Likewise.
10691 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
10692 symbol_pack): Likewise.
10693 * src/tables.c (conflict_row, pack_vector): Likewise.
10694 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
10695 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
10696 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
10697 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
10698
10699 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
10700 (ARGMATCH_CONSTRAINT): New macro.
10701 (ARGMATCH_ASSERT): Use it.
10702
10703 * src/system.h (verify): New macro.
10704 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
10705 rather than assert.
10706 * src/tables.c (tables_generate): Likewise.
10707
10708 * src/struniq.c (struniq_assert): Now returns void, and aborts
10709 if the assertion is false.
10710 (struniq_assert_p): Remove.
10711 * src/struniq.h: Likewise.
10712
10713 2002-11-18 Paul Eggert <eggert@twinsun.com>
10714
10715 * data/glr.c (yygetLRActions): Replace `yyindex' with
10716 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
10717 This fixes the regression with Sun ONE Studio 7 cc that I reported in
10718 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
10719
10720 2002-11-18 Akim Demaille <akim@epita.fr>
10721
10722 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
10723 space.
10724 From Tim Van Holder.
10725
10726 2002-11-17 Paul Eggert <eggert@twinsun.com>
10727
10728 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
10729 to "SyntaxError" for consistency with my 2002-11-15 change.
10730
10731 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
10732 not define to {}, since this breaks the common use of `YYDPRINTF
10733 ((...));' if a single statement is desired (e.g. before `else').
10734 Work around GCC warnings by surrounding corresponding calls with
10735 {} if needed.
10736 (yyhasResolvedValue): Remove unused function.
10737 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
10738 loop body.
10739 (yyreportSyntaxError): Renamed from yyreportParseError.
10740 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
10741 All uses changed.
10742 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
10743 extern when possible. Remove unused initializations.
10744
10745 2002-11-16 Akim Demaille <akim@epita.fr>
10746
10747 Augment the similarity between GLR and LALR traces.
10748
10749 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
10750 (YY_REDUCE_PRINT): New.
10751 (yyparse): Use them.
10752 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
10753 YYDPRINT here.
10754 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
10755 state reached after the reduction/recovery, since...
10756 (yyparse, yyprocessOneStack): Report the state we are entering in.
10757
10758 2002-11-16 Akim Demaille <akim@epita.fr>
10759
10760 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
10761 Add support for --trace=skeleton.
10762 * src/scan-skel.l: %option debug.
10763 Scan strings of non-@ or \n instead of character by character.
10764 (scan_skel): Handle trace_skeleton.
10765 (QPUTS): New.
10766 (@output_parser_name@, @output_header_name@): ``Restore'' their
10767 support (used to be M4 macros).
10768 * data/yacc.c: Quote larger chunks, a la glr.c.
10769 * data/lalr1.cc: Likewise.
10770 The header guards are no longer available, so use some other
10771 string than `YYLSP_NEEDED'.
10772
10773 2002-11-16 Akim Demaille <akim@epita.fr>
10774
10775 Make the ``Printers and Destructors'' test more verbose, taking
10776 `yacc.c''s behavior as (possibly wrong) reference.
10777
10778 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
10779 instead of fprint on stdout.
10780 Set and report the last_line of the symbols.
10781 Consistently display values and locations.
10782
10783 2002-11-16 Paul Eggert <eggert@twinsun.com>
10784
10785 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
10786
10787 2002-11-15 Paul Eggert <eggert@twinsun.com>
10788
10789 * tests/actions.at (Actions after errors): New test case.
10790
10791 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
10792 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
10793 tests/action.at, tests/calc.at, tests/conflicts.at,
10794 tests/cxx-type.at, tests/regression.at:
10795 "parse error" -> "syntax error" for POSIX compatibility.
10796 "parsing stack overflow..." -> "parser stack overflow" so
10797 that code matches Bison documentation.
10798
10799 2002-11-15 Akim Demaille <akim@epita.fr>
10800
10801 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
10802 take two BRACED_CODE, not two string_content.
10803 Free the scanner's obstack when we are done.
10804 (code_content): New.
10805 * tests/calc.at: Adjust.
10806 * doc/bison.texinfo: Adjust.
10807 Also, make sure to include the `,' for these declarations.
10808
10809 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
10810
10811 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
10812 definition; avoids potential autoreconf problems.
10813
10814 2002-11-15 Akim Demaille <akim@epita.fr>
10815
10816 Always check the value returned by yyparse.
10817
10818 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
10819 returned by yyparse.
10820 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
10821 Adjust calls.
10822 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
10823 returned by yyparse.
10824
10825 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
10826
10827 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
10828 on input.at test.
10829
10830 2002-11-14 Paul Eggert <eggert@twinsun.com>
10831
10832 * src/output.c (output_skeleton): Call xfopen instead of
10833 duplicating xfopen's body.
10834
10835 Fix bugs reported by Nelson H. F. Beebe in
10836 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
10837
10838 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
10839 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
10840 Group compiler. Instead, use "$CC -E bar.c". Include the .h
10841 file twice in the grammar, as an extra check.
10842
10843 * tests/input.at (Torturing the Scanner): Surround the
10844 backslash-newline tests with "#if 0", to make it less likely that
10845 we'll run into compiler bugs. Bring back solitary \ inside
10846 comment, but add a closing comment to work around HP C bug. Don't
10847 test backslash-newline in C character constant.
10848
10849 2002-11-14 Akim Demaille <akim@epita.fr>
10850
10851 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
10852 status of the compiler.
10853 Calling `exit 1' is no longer needed.
10854 Reported by Nelson H. F. Beebe.
10855
10856 2002-11-14 Akim Demaille <akim@epita.fr>
10857
10858 * tests/atlocal.in (CPPFLAGS): We have config.h.
10859 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
10860 New.
10861 * tests/actions.at, tests/calc.at, tests/conflicts.at,
10862 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
10863 * tests/regression.at, tests/torture.at: Use them for all the
10864 grammars that are to be compiled.
10865 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
10866 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
10867 * doc/bison.texinfo (GLR Parsers): Document `inline'.
10868
10869 2002-11-14 Akim Demaille <akim@epita.fr>
10870
10871 * doc/bison.texinfo: Various formatting changes (alignments in
10872 samples, additional @group/@end group, GCS in samples.
10873 Use @deffn instead of simple @table to define the directives,
10874 macros, variables etc.
10875
10876 2002-11-13 Paul Eggert <eggert@twinsun.com>
10877
10878 Fix some bugs reported by Albert Chin-A-Young in
10879 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
10880
10881 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
10882 -o c"; the HP C compiler chatters during compilation.
10883 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
10884 * tests/headers.at (export YYLTYPE): Likewise.
10885
10886 * tests/input.at (Torturing the Scanner): Remove lines containing
10887 solitary backslashes, as they tickle a bug in the HP C compiler.
10888
10889 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
10890 comments, since they're not portable. Use GNU coding style.
10891
10892 2002-11-13 Akim Demaille <akim@epita.fr>
10893
10894 * data/yacc.c: Leave bigger chunks of quoted text.
10895 (YYDSYMPRINTF): New.
10896 Use it to report symbol activities.
10897 * data/glr.c (YYDSYMPRINTF): New.
10898 Use it.
10899
10900 2002-11-12 Paul Eggert <eggert@twinsun.com>
10901
10902 Version 1.75b.
10903
10904 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
10905 (yyglrReduce): Return yyok, not 0.
10906 This should avoid the enumerated-type warnings reported
10907 by Nelson H. F. Beebe in
10908 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
10909
10910 * lib/bbitset.h (BITSET_INLINE): Remove.
10911 * lib/bitset.h [! BITSET_INLINE]: Remove.
10912 (bitset_set, bitset_reset, bitset_test): Rename local vars
10913 to avoid shadowing warnings by GCC.
10914
10915 * data/glr.c (inline): Remove #define. It's the user's
10916 responsibility to #define it away, just like 'const'.
10917 This fixes one of the bugs reported by Nelson H. F. Beebe in
10918 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
10919
10920 * Makefile.maint (po-check): Scan .l and .y files instead of the
10921 .c and the .h files that they generate. This fixes the bug
10922 reported by Tim Van Holder in:
10923 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
10924 Look for N_ as well as for _. Try to avoid matching #define for
10925 N_ and _.
10926 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
10927 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
10928 * src/scan-gram.l: Revamp regular expressions so that " and '
10929 do not confuse xgettext.
10930
10931 * src/struniq.h (struniq_new): Do not declare the return type
10932 to be 'const'; this violates the C standard.
10933 * src/struniq.c (struniq_new): Likewise.
10934
10935 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
10936
10937 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
10938 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
10939 linker.
10940
10941 2002-11-12 Akim Demaille <akim@epita.fr>
10942
10943 * Makefile.maint: Sync with Autoconf:
10944 (local_updates): New.
10945
10946 2002-11-12 Akim Demaille <akim@epita.fr>
10947
10948 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
10949
10950 2002-11-12 Akim Demaille <akim@epita.fr>
10951
10952 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
10953 locations.
10954
10955 2002-11-12 Akim Demaille <akim@epita.fr>
10956
10957 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
10958 not yyvalue.
10959
10960 2002-11-12 Akim Demaille <akim@epita.fr>
10961
10962 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
10963 Use it to test the GLR parser.
10964
10965 2002-11-12 Akim Demaille <akim@epita.fr>
10966
10967 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
10968 defines it.
10969 * data/glr.c (yystos): New.
10970 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
10971 (YYDSYMPRINT): New.
10972 (yyval): Don't define it, it is handled via M4.
10973 (yyrecoverParseError): Free verbosely the discarded symbols.
10974 * data/yacc.c (yysymprint): Remove, rather...
10975 (b4_yysymprint_generate): invoke.
10976 * data/c.m4 (b4_yysymprint_generate): New.
10977 Accept pointers as arguments, as opposed to the version from
10978 yacc.c.
10979 (b4_yydestruct_generate): Likewise.
10980 * tests/cations.at (Printers and Destructors): Use Bison directives
10981 instead of CPP macros.
10982 Don't rely on internal details.
10983
10984 2002-11-12 Akim Demaille <akim@epita.fr>
10985
10986 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
10987 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
10988 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
10989 it against YYEMPTY and so forth), work on yytoken (i.e., set
10990 it to YYEMPTY etc.).
10991 (yydestruct): Replace with a b4_yydestruct_generate invocation.
10992 (b4_symbol_actions): Remove.
10993 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
10994 for 0, end-of-input.
10995
10996 2002-11-12 Akim Demaille <akim@epita.fr>
10997
10998 * doc/bison.texinfo (Destructor Decl): New.
10999
11000 2002-11-12 Akim Demaille <akim@epita.fr>
11001
11002 * src/tables.c (tables_generate): Use free for pointers that
11003 cannot be NULL, not XFREE.
11004 (pack_vector): Use assert, not fatal, for bound violations.
11005 * src/state.c (state_new): Likewise.
11006 * src/reader.c (reader): Likewise.
11007 * src/lalr.c (set_goto_map): Likewise.
11008 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
11009 the file name.
11010
11011 2002-11-12 Akim Demaille <akim@epita.fr>
11012
11013 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
11014 Restore.
11015 * src/scan-gram.l (last_string): Is global to the file, not to
11016 yylex.
11017 * src/parse-gram.y (input): Don't append the epilogue here,
11018 (epilogue.opt): do it here, and free the scanner's obstack.
11019 * src/reader.c (epilogue_set): Rename as...
11020 (epilogue_augment): this.
11021 * data/c.m4 (b4_epilogue): Defaults to empty.
11022
11023 2002-11-12 Akim Demaille <akim@epita.fr>
11024
11025 * src/getargs.c (long_options): Remove duplicates.
11026 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
11027 Remove.
11028 * doc/bison.rnh: Remove.
11029 * doc/bison.texinfo (VMS Invocation): Remove.
11030
11031 2002-11-12 Akim Demaille <akim@epita.fr>
11032
11033 * src/struniq.h, src/struniq.c (struniq_t): Is const.
11034 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
11035
11036 Use struniq for symbols.
11037
11038 * src/symtab.h (symbol_t): The tag member is a struniq.
11039 (symbol_type_set): Adjust.
11040 * src/symtab.c (symbol_new): Takes a struniq.
11041 (symbol_free): Don't free the tag member.
11042 (hash_compare_symbol_t, hash_symbol_t): Rename as...
11043 (hash_compare_symbol, hash_symbol): these.
11044 Use the fact that tags as struniqs.
11045 (symbol_get): Use struniq_new.
11046 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
11047 Returns a strniq.
11048 * src/reader.h (merger_list, grammar_currentmerge_set): The name
11049 and type members are struniqs.
11050 * src/reader.c (get_merge_function)
11051 (grammar_current_rule_merge_set): Adjust.
11052 (TYPE, current_type): Are struniq.
11053
11054 Use struniq for file names.
11055
11056 * src/files.h, src/files.c (infile): Split into...
11057 (grammar_file, current_file): these.
11058 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
11059 * src/reduce.c (reduce_print): Likewise.
11060 * src/getargs.c (getargs): Likewise.
11061 * src/complain.h, src/complain.c: Likewise.
11062 * src/main.c (main): Call struniqs_new early enough to use it for
11063 file names.
11064 Don't free the input file name.
11065
11066 2002-11-12 Akim Demaille <akim@epita.fr>
11067
11068 * src/symtab.c (symbol_free): Remove dead deactivated code:
11069 type_name are properly removed.
11070 Don't use XFREE to free items that cannot be NULL.
11071 * src/struniq.h, src/struniq.c: New.
11072 * src/main.c (main): Initialize/free struniqs.
11073 * src/parse-gram.y (%union): Add astruniq member.
11074 (yyprint): Adjust.
11075 * src/scan-gram.l (<{tag}>): Return a struniq.
11076 Free the obstack bit that used to store it.
11077 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
11078
11079 2002-11-11 Paul Eggert <eggert@twinsun.com>
11080
11081 Revamp to fix many (but not all) of the C- and M4-related quoting
11082 problems. Among other things, this fixes the Bison bug reported
11083 by Jan Hubicka when processing the Bash grammar; see:
11084 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
11085
11086 Use new @ escapes consistently. Represent brackets with @{ and @}
11087 rather than @<:@ and @:>@, since this works a bit better with dumb
11088 editors like vi. Represent @ with @@, since @ is now consistently
11089 an escape. Use @oline@ and @ofile@ rather than __oline__ and
11090 __ofile__, to avoid unexpected expansions. Similarly, use @output
11091 rather than #output.
11092
11093 * data/c.m4 (b4_copyright): Omit file name from comment, since
11094 the file name could contain "*/".
11095 (b4_synclines_flag): Don't quote the 2nd argument; it should already
11096 be quoted. All uses changed.
11097
11098 * data/glr.c: Use new @ escapes consistently.
11099 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
11100 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
11101 Remove, since they couldn't handle arbitrary characters in file
11102 names.
11103 * data/lalr1.cc: Likewise.
11104 * data/yacc.c: Likewise.
11105
11106 * src/files.c (output_infix): Remove; all uses removed.
11107 * src/files.h: Likewise.
11108
11109 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
11110 mishandled funny characters in file names, and anyway it isn't
11111 needed any more.
11112 * data/yacc.c: Likewise.
11113 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
11114
11115 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
11116 * data/yacc.c: Likewise.
11117
11118 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
11119 strings now.
11120 (muscle_init): Quote filename as a C string.
11121 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
11122 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
11123 * src/output.c (escaped_file_name_output): New function.
11124 (prepare_symbols): Quote tokens for M4.
11125 (prepare): Don't insert output_infix, output_prefix,
11126 output_parser_name, output_header_name; this is now down by scan-skel.
11127 Insert skeleton as a C string.
11128
11129 * src/output.c (user_actions_output, symbol_destructors_output,
11130 symbol_printers_output): Quote filenames for C and M4.
11131 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11132
11133 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
11134 escapes other than \\ and \'; this simplifies the code.
11135 (<SC_STRING>): Likewise, for \\ and \".
11136 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
11137 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
11138 Use new escapes @{ and @} for [ and ].
11139
11140 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
11141 them with auto vars.
11142 Switch to new escape scheme, where @ is the escape character uniformly.
11143 Abort if a stray escape character is found. Avoid unbounded input
11144 buffer when parsing non-escaped text.
11145
11146 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
11147 __oline__, #output, $@, and @{ do not have unintended meanings.
11148
11149 2002-11-09 Paul Eggert <eggert@twinsun.com>
11150
11151 Fix the test failure due to GCC warnings described in
11152 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
11153 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
11154 evaluate to 0 if it's impossible for NINF to be in the respective
11155 table.
11156 (yygetLRActions, yyrecoverParseError): Use them.
11157
11158 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
11159 counted in the token inserted at end of file. Now takes
11160 location_t *, not location_t, so that the location can be
11161 adjusted. All uses changed.
11162
11163 * tests/regression.at (Invalid inputs): Adjust wording in
11164 diagnostic to match the new behavior.
11165
11166 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
11167 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
11168 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
11169 abort ();'. This reduces the runtime of the "Many lookaheads"
11170 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
11171 GCC 3.2.
11172
11173 2002-11-07 Paul Eggert <eggert@twinsun.com>
11174
11175 * src/parse-gram.y (CHARACTER): Remove unused token.
11176 All uses removed.
11177
11178 * src/scan-gram.l: Remove stack option. We no longer use the
11179 stack, since the stack was never deeper than 1; instead, use the
11180 new auto var c_context to record the stacked value.
11181
11182 Remove nounput option. At an unexpected end of file, we now unput
11183 the minimal input necessary to end cleanly; this simplifies the
11184 code.
11185
11186 Avoid unbounded token sizes where this is easy.
11187
11188 (unexpected_end_of_file): New function.
11189 Use it to systematize the error message on unexpected EOF.
11190 (last-string): Now auto, not static.
11191 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
11192 (scanner_last_string_free): Remove; not used.
11193 (percent_percent_count): Move decl to just before use.
11194 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
11195 not the (never otherwised-used) CHARACTER.
11196
11197 2002-11-07 Akim Demaille <akim@epita.fr>
11198
11199 Let yyerror always receive the msg as last argument, so that
11200 yyerror can be variadic.
11201
11202 * data/yacc.c (b4_yyerror_args): New.
11203 Use it when calling yyerror.
11204 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
11205 Use it when calling yyerror.
11206 * doc/bison.texinfo (Error Reporting): Adjust.
11207 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
11208 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
11209
11210 2002-11-06 Akim Demaille <akim@epita.fr>
11211
11212 #line should have quoted strings.
11213 Ideally, this should be done by m4_quotearg.
11214
11215 * src/scan-skel.l: Include quotearg.h.
11216 Quote __ofile__.
11217 * src/output.c (symbol_printers_output)
11218 (symbol_destructors_output): Quote the file name.
11219
11220 2002-11-06 Akim Demaille <akim@epita.fr>
11221
11222 * tests/regression.at (Invalid inputs): Adjust to the recent
11223 messages.
11224
11225 2002-11-06 Akim Demaille <akim@epita.fr>
11226
11227 Restore --no-lines.
11228 Reported by Jim Kent.
11229
11230 * data/c.m4 (b4_syncline): New.
11231 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
11232 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
11233 * src/output.c (user_actions_output): Likewise.
11234 (prepare): Define 'b4_synclines_flag'.
11235 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
11236
11237 2002-11-06 Akim Demaille <akim@epita.fr>
11238
11239 * src/main.c (main): Free `infile'.
11240 * src/scan-gram.l (handle_syncline): New.
11241 Recognize `#line'.
11242 * src/output.c (user_actions_output, symbol_destructors_output)
11243 (symbol_printers_output): Use the location's file name, not
11244 infile.
11245 * src/reader.c (prologue_augment, epilogue_set): Likewise.
11246
11247 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11248
11249 * src/tables.c (matching_state): Don't allow states to match if
11250 either has GLR conflict entries.
11251
11252 2002-11-05 Paul Eggert <eggert@twinsun.com>
11253
11254 * src/scan-gram.l: Use more accurate diagnostics, e.g.
11255 "integer out of range" rather than "invalid value".
11256 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
11257 accordingly.
11258
11259 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
11260 Also, remove one static variable in the scanner.
11261
11262 * src/scan-gram.l (braces_level): Now auto, not static.
11263 Initialize to zero if the compiler is being picky.
11264 (INITIAL): Clear braces_level instead of incrementing it.
11265 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
11266 as POSIX 1003.1-2001 requires.
11267 * src/system.h (IF_LINT): New macro, taken from coreutils.
11268 * configure.ac: Define "lint" if --enable-gcc-warnings.
11269
11270 2002-11-05 Akim Demaille <akim@epita.fr>
11271
11272 * src/scan-gram.l: When it starts with `%', complain about the
11273 whole directive, not just that `invalid character: %'.
11274
11275 2002-11-04 Akim Demaille <akim@epita.fr>
11276
11277 * Makefile.maint: Update from Autoconf.
11278 (update, cvs-update, po-update, do-po-update): New.
11279
11280 2002-11-04 Akim Demaille <akim@epita.fr>
11281
11282 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
11283 and yyerror.
11284 Have yyerror `use' its arguments.
11285 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
11286 returns true when location & yacc & pure & parse-param.
11287 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
11288
11289 2002-11-04 Akim Demaille <akim@epita.fr>
11290
11291 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
11292 clashes.
11293 * src/scan-gram.l: Use [\'] instead of ['] to pacify
11294 font-lock-mode.
11295 Use complain_at.
11296 Use quote, not quote_n since LOCATION_PRINT no longer uses the
11297 slot 0.
11298
11299 2002-11-03 Paul Eggert <eggert@twinsun.com>
11300
11301 * src/reader.c (get_merge_function, grammar_current_rule_check):
11302 Use consistent diagnostics for reporting type name clashes.
11303 Quote the types with <>, for consistency with Yacc.
11304 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
11305
11306 2002-11-03 Akim Demaille <akim@epita.fr>
11307
11308 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
11309 New.
11310 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
11311 (b4_parse_param): Remove.
11312 Use b4_identification.
11313 Propagate b4_pure_args where needed to pass them to yyerror.
11314 * data/glr.m4 (b4_parse_param): Remove.
11315 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
11316 (b4_lpure_formals): New.
11317 Use b4_identification.
11318 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
11319 b4_user_formals and b4_user_args.
11320 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
11321 (yyreportAmbiguity): When using a pure parser, also need
11322 the location, and the parse-params.
11323 Adjust callers.
11324 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
11325 When using a pure parser, also need the parse-params.
11326 Adjust callers.
11327 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
11328 (%pure-parser + %parse-param) LALR and GLR parsers.
11329 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
11330 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
11331 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
11332 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
11333 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
11334 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
11335 * doc/bison.texinfo: Untabify the whole file.
11336 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
11337 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
11338 (Error Reporting): Adjust to these new directives.
11339 Document %error-verbose, deprecate YYERROR_VERBOSE.
11340
11341 2002-11-03 Akim Demaille <akim@epita.fr>
11342
11343 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
11344 AT_CHECK_CALC_GLR invocations to use % directives, instead of
11345 command line options.
11346 * tests/cxx-type.at: Formatting changes.
11347
11348 2002-11-03 Paul Eggert <eggert@twinsun.com>
11349
11350 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
11351 to count columns correctly, and to check for invalid inputs.
11352
11353 Use mbsnwidth to count columns correctly. Account for tabs, too.
11354 Include mbswidth.h.
11355 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
11356 (extend_location): New function.
11357 (YY_LINES): Remove.
11358
11359 Handle CRLF in C code rather than in Lex code.
11360 (YY_INPUT): New macro.
11361 (no_cr_read): New function.
11362
11363 Scan UCNs, even though we don't fully handle them yet.
11364 (convert_ucn_to_byte): New function.
11365
11366 Handle backslash-newline correctly in C code.
11367 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
11368 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
11369 all uses changed.
11370 (tag, splice): New EREs. Do not allow NUL or newline in tags.
11371 Use {splice} wherever C allows backslash-newline.
11372 YY_STEP after space, newline, vertical-tab.
11373 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
11374
11375 (letter, id): Don't assume ASCII; e.g., spell out a-z.
11376
11377 ({int}, handle_action_dollar, handle_action_at): Check for integer
11378 overflow.
11379
11380 (YY_STEP): Omit trailing semicolon, so that it's more like C.
11381
11382 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
11383 as well as \000. Check for UCHAR_MAX, not 255.
11384 Allow \x with an arbitrary positive number of digits, as in C.
11385 Check for overflow here.
11386 Allow \? and UCNs, for compatibility with C.
11387
11388 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
11389 with quote slot used by complain_at.
11390
11391 * tests/input.at: Add tests for backslash-newline, m4 quotes
11392 in symbols, long literals, and funny escapes in strings.
11393
11394 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
11395 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
11396 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
11397 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
11398 * m4/mbswidth.m4: New file, from GNU coreutils.
11399
11400 * doc/bison.texinfo (Grammar Outline): Document // comments.
11401 (Symbols): Document that trigraphs have no special meaning in Bison,
11402 nor is backslash-newline allowed.
11403 (Actions): Document that trigraphs have no special meaning.
11404
11405 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
11406 no longer used.
11407
11408 2002-11-02 Paul Eggert <eggert@twinsun.com>
11409
11410 * src/reader.c: Don't include quote.h; not needed.
11411 (get_merge_function): Reword warning to be consistent with
11412 type clash diagnostic in grammar_current_rule_check.
11413
11414 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
11415 bug in trigraph handling.
11416
11417 * src/output.c (prepare_symbols): When printing token names,
11418 escape "[" as "@<:@" and likewise for "]".
11419
11420 * src/system.h (errno): Remove declaration, as we are now
11421 assuming C89 or better, and C89 guarantees errno.
11422
11423 2002-10-30 Paul Eggert <eggert@twinsun.com>
11424
11425 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
11426 Check for close failures.
11427 * src/files.h (xfclose): Return void, not int, since it always
11428 returned zero.
11429 * src/files.c (xfclose): Likewise. Report I/O error if ferror
11430 indicates one.
11431 * src/output.c (output_skeleton): Use xfclose rather than fclose
11432 and ferror. xfclose now checks ferror.
11433
11434 * data/glr.c (YYLEFTMOST_STATE): Remove.
11435 (yyreportTree): Use a stack-based leftmost state. This avoids
11436 our continuing battles with bogus warnings about initializers.
11437
11438 2002-10-30 Akim Demaille <akim@epita.fr>
11439
11440 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
11441 #if.
11442
11443 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11444
11445 * tests/glr-regr1.at: New test for reported regressions.
11446 * tests/testsuite.at: Add glr-regr1.at test.
11447 * tests/Makefile.am: Add glr-regr1.at test.
11448
11449 2002-10-24 Paul Eggert <eggert@twinsun.com>
11450
11451 Version 1.75a.
11452
11453 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
11454 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
11455 we use malloc. Don't assume 'A' through 'Z' are contiguous.
11456 Don't assume strdup exists; POSIX says its an XSI extension.
11457 Check for buffer overflow on input.
11458
11459 2002-10-24 Akim Demaille <akim@epita.fr>
11460
11461 * src/output.c (output_skeleton): Don't disable M4sugar comments
11462 too soon: it results in comments being expanded.
11463 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
11464 first output.
11465
11466 2002-10-24 Akim Demaille <akim@epita.fr>
11467
11468 * data/yacc.c (m4_int_type): New.
11469 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
11470 char' as only yacc.c wants K&R portability.
11471 * data/glr.c (yysigned_char): Remove.
11472 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
11473 Reported by Quoc Peyrot.
11474
11475 2002-10-23 Paul Eggert <eggert@twinsun.com>
11476
11477 * src/main.c (main): With --trace=time, report times even if a
11478 non-fatal error occurs. Formerly, the times were reported in some
11479 such cases but not in others.
11480 * src/reader.c (reader): Just return if a complaint has been issued,
11481 instead of exiting, so that 'main' can report times.
11482
11483 2002-10-22 Akim Demaille <akim@epita.fr>
11484
11485 * src/system.h: Include sys/types.
11486 Reported by Bert Deknuydt.
11487
11488 2002-10-23 Paul Eggert <eggert@twinsun.com>
11489
11490 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
11491 Suggested by Art Haas.
11492
11493 2002-10-22 Paul Eggert <eggert@twinsun.com>
11494
11495 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
11496 decl; not needed any more.
11497 * src/main.c (main): Use return to exit, undoing yesterday's change.
11498 The last OS that we could find where this wouldn't work is
11499 SunOS 3.5, and that's too old to worry about now.
11500
11501 * data/glr.c (struct yyltype): Define members even when not
11502 doing locations. This is more consistent with yacc.c, and it
11503 works around the following bug reports:
11504 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
11505 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
11506
11507 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
11508 @acronym consistently. Standardize on "Yacc" instead of "YACC",
11509 "Algol" instead of "ALGOL". Give a bit more history about BNF.
11510
11511 2002-10-22 Akim Demaille <akim@epita.fr>
11512
11513 * data/README: New.
11514
11515 2002-10-21 Paul Eggert <eggert@twinsun.com>
11516
11517 Be consistent about 'bool'; the old code used an enum in one
11518 module and an int in another, and this violates the C standard.
11519 * m4/stdbool.m4: New file, from coreutils 4.5.3.
11520 * configure.ac (AC_HEADER_STDBOOL): Add.
11521 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
11522 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
11523 * src/symtab.c (hash_compare_symbol_t): Likewise.
11524 * src/system.h (bool, false, true): Use a definition consistent
11525 with ../lib/hash.c. All uses changed.
11526
11527 * src/complain.c (warning_issued): Renamed from warn_message_count,
11528 so that we needn't worry about integer overflow (!).
11529 Now of type bool. All uses changed.
11530 (complaint_issued): Renamed from complain_message_count; likewise.
11531
11532 * src/main.c (main): Use exit to exit with failure.
11533
11534 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
11535 rather than 1 and 0.
11536 * src/main.c (main): Likewise.
11537 * src/getargs.c (getargs): Likewise.
11538 * src/reader.c (reader): Likewise.
11539
11540 * src/getarg.c (getargs): Remove duplicate code for
11541 "Try `bison --help'".
11542
11543 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
11544 What was that "2" for?
11545
11546 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
11547 * src/getargs.c (usage): Likewise.
11548
11549 * src/getargs.c (getargs): When there are too few operands, report
11550 the last one. When there are too many, report the first extra
11551 one. This is how diffutils does it.
11552
11553 2002-10-20 Paul Eggert <eggert@twinsun.com>
11554
11555 Remove K&R vestiges.
11556 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
11557 * src/complain.c (VA_START): Remove. Assume prototypes.
11558 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
11559 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
11560 fatal): Assume prototypes.
11561 * src/complain.h: Assume prototypes.
11562 * src/system.h (PARAMS): Remove.
11563 Include <limits.h> unconditionally, since it's guaranteeed even
11564 for a freestanding C89 compiler.
11565 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
11566 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
11567
11568 2002-10-20 Akim Demaille <akim@epita.fr>
11569
11570 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
11571 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
11572 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
11573 (yyresolveStates, yyresolveAction, yyresolveStack)
11574 (yyprocessOneStack): Use them.
11575 (yy_reduce_print): New.
11576 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
11577
11578 2002-10-20 Akim Demaille <akim@epita.fr>
11579
11580 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
11581 arguments and output `void'.
11582 (b4_c_function): Rename as...
11583 (b4_c_function_def): this.
11584 (b4_c_function_decl, b4_c_ansi_function_def)
11585 (b4_c_ansi_function_decl): New.
11586 Change the interpretation of the arguments: before `int, foo', now
11587 `int foo, foo'.
11588 * data/yacc.c (yyparse): Prototype and define thanks to these.
11589 Adjust b4_c_function_def uses.
11590 * data/glr.c (yyparse): Likewise, but ANSI only.
11591
11592 2002-10-20 Akim Demaille <akim@epita.fr>
11593
11594 * src/output.c (prepare): Move the definition of `tokens_number',
11595 `nterms_number', `undef_token_number', `user_token_number_max'
11596 to...
11597 (prepare_tokens): Here.
11598 (prepare_tokens): Rename as...
11599 (prepare_symbols): this.
11600 (prepare): Move the definition of `rules_number' to...
11601 (prepare_rules): here.
11602 (prepare): Move the definition of `last', `final_state_number',
11603 `states_number' to...
11604 (prepare_states): here.
11605 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
11606
11607 2002-10-20 Akim Demaille <akim@epita.fr>
11608
11609 * src/tables.h, src/tables.c, src/output.c: Comment changes.
11610
11611 2002-10-20 Akim Demaille <akim@epita.fr>
11612
11613 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
11614 * data/c.m4: here.
11615
11616 2002-10-20 Akim Demaille <akim@epita.fr>
11617
11618 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
11619 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
11620 `pair'.
11621 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
11622 `name' to...
11623 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
11624 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
11625 These.
11626
11627 2002-10-19 Paul Eggert <eggert@twinsun.com>
11628
11629 Do not create a temporary file, as that involves security and
11630 cleanup headaches. Instead, use a pair of pipes.
11631 Derived from a suggestion by Florian Krohm.
11632 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
11633 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
11634 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
11635 (BISON_PREREQ_SUBPIPE): Add.
11636 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
11637 Add subpipe.h, subpipe.c.
11638 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
11639 * po/POTFILES.in: Add lib/subpipe.c.
11640 * src/output.c: Include "subpipe.h".
11641 (m4_invoke): Remove decl.
11642 (scan_skel): New decl.
11643 (output_skeleton): Use pipe rather than temporary file for m4 input.
11644 Check that m4sugar.m4 is readable, to avoid deadlock.
11645 Check for pipe I/O error.
11646 * src/scan-skel.l (readpipe): Remove decl.
11647 (scan_skel): New function, to be used in place of m4_invoke.
11648 Read from stream rather than file.
11649
11650 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
11651 float, as this generates a warning on Solaris 8 + GCC 3.2 with
11652 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
11653 this generates a more-accurate value anyway.
11654
11655 * lib/timevar.c (timervar_accumulate): Rename locals to
11656 avoid confusion with similarly-named more-global.
11657 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
11658
11659 * src/output.c (prepare): Use xstrdup to convert char const *
11660 to char *, to avoid GCC warning.
11661
11662 2002-10-19 Akim Demaille <akim@epita.fr>
11663
11664 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
11665 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
11666 Use them to have `calc.y' ready for %pure-parser.
11667 * data/yacc.c (YYLEX): Pass a yylex return type to
11668 b4_c_function_call.
11669
11670 2002-10-19 Akim Demaille <akim@epita.fr>
11671
11672 Prototype support of %lex-param and %parse-param.
11673
11674 * src/parse-gram.y: Add the definition of the %lex-param and
11675 %parse-param tokens, plus their rules.
11676 Drop the `_' version of %glr-parser.
11677 Add the "," token.
11678 * src/scan-gram.l (INITIAL): Scan them.
11679 * src/muscle_tab.c: Comment changes.
11680 (muscle_insert, muscle_find): Rename `pair' as `probe'.
11681 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
11682 (muscle_entry_s): The `value' member is no longer const.
11683 Adjust all dependencies.
11684 * src/muscle_tab.c (muscle_init): Adjust: use
11685 MUSCLE_INSERT_STRING.
11686 Initialize the obstack earlier.
11687 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
11688 (muscle_pair_list_grow): New.
11689 * data/c.m4 (b4_c_function_call, b4_c_args): New.
11690 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
11691 * tests/calc.at: Use %locations, not --locations.
11692 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
11693
11694 2002-10-19 Akim Demaille <akim@epita.fr>
11695
11696 * src/getargs.c (usage): Take status as argument and exit
11697 accordingly.
11698 Report the traditional `Try ... --help' message when status != 0.
11699 (usage, version): Don't take a FILE * as arg, it is pointless.
11700 (getargs): When there is an incorrect number of arguments, make it
11701 an error, and report it GNUlically thanks to `usage ()'.
11702
11703 2002-10-18 Paul Eggert <eggert@twinsun.com>
11704
11705 * data/glr.c (yyreportParseError): Don't assume that sprintf
11706 yields the length of the printed string, as this is not true
11707 on SunOS 4.1.4. Reported by Peter Klein.
11708
11709 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
11710 * tests/conflicts.at (%nonassoc and eof): Likewise.
11711 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
11712
11713 2002-10-17 Akim Demaille <akim@epita.fr>
11714
11715 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
11716 * src/getargs.c (trace_types, trace_args): Adjust.
11717 * src/reader.c (grammar_current_rule_prec_set)
11718 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
11719 Standardize error messages.
11720 And s/@prec/%prec/!
11721 (reader): Use trace_flag to enable scanner/parser debugging,
11722 instead of an adhoc scheme.
11723 * src/scan-gram.l: Remove trailing debugging code.
11724
11725 2002-10-16 Paul Eggert <eggert@twinsun.com>
11726
11727 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
11728 MUSCLE_TAB_H.
11729
11730 * NEWS: Officially drop support for building Bison with K&R C,
11731 since it didn't work anyway and it's not worth worrying about.
11732 * Makefile.maint (wget_files): Remove ansi2knr.c.
11733 (ansi2knr.c-url_prefix): Remove.
11734 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
11735 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11736 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
11737
11738 2002-10-15 Paul Eggert <eggert@twinsun.com>
11739
11740 Stop using the "enum_" trick for K&R-style function definitions;
11741 it confused me, and I was the author! Instead, assume that people
11742 who want to use K&R C compilers (when using these modules in GCC,
11743 perhaps?) will run ansi2knr.
11744
11745 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
11746 All uses of "enum_" changed to "enum ".
11747 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
11748 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
11749
11750 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
11751 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
11752 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
11753 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
11754 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
11755 abitset_not, abitset_ones, abitset_or, abitset_or_and,
11756 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
11757 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
11758 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
11759 Use function prototypes; this removes the need for declaring
11760 static functions simply to provide their prototypes.
11761 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
11762 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
11763 bitset_count_, bitset_create, bitset_dump, bitset_first,
11764 bitset_free, bitset_init, bitset_last, bitset_next,
11765 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
11766 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
11767 bitset_print, bitset_release_memory, bitset_toggle_,
11768 bitset_type_choose, bitset_type_get, bitset_type_name_get,
11769 debug_bitset): Likewise.
11770 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
11771 * lib/bitset_stats.c (bitset_log_histogram_print,
11772 bitset_percent_histogram_print, bitset_stats_and,
11773 bitset_stats_and_cmp, bitset_stats_and_or,
11774 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
11775 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
11776 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
11777 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
11778 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
11779 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
11780 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
11781 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
11782 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
11783 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
11784 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
11785 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
11786 bitset_stats_zero): Likewise.
11787 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
11788 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
11789 bitsetv_dump, debug_bitsetv): Likewise.
11790 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
11791 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
11792 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
11793 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
11794 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
11795 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
11796 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
11797 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
11798 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
11799 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
11800 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
11801 Likewise.
11802 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
11803 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
11804 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
11805 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
11806 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
11807 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
11808 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
11809 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
11810 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
11811 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
11812 lbitset_xor_cmp, lbitset_zero): Likewise.
11813
11814 2002-10-14 Akim Demaille <akim@epita.fr>
11815
11816 Version 1.75.
11817
11818 2002-10-14 Akim Demaille <akim@epita.fr>
11819
11820 * tests/Makefile.am (maintainer-check-posix): New.
11821
11822 2002-10-14 Akim Demaille <akim@epita.fr>
11823
11824 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
11825 member.
11826
11827 2002-10-14 Akim Demaille <akim@epita.fr>
11828
11829 * src/tables.c (table_ninf_remap): base -> tab.
11830 Reported by Matt Rosing.
11831
11832 2002-10-14 Paul Eggert <eggert@twinsun.com>
11833
11834 * tests/action.at, tests/calc.at, tests/conflicts.at,
11835 tests/cxx-type.at, tests/headers.at, tests/input.at,
11836 tests/regression.at, tests/synclines.at, tests/torture.at:
11837 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
11838 so that the tests still work even if POSIXLY_CORRECT is set.
11839 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
11840
11841 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
11842 for portability to K&R hosts. Fix typo: signed char is guaranteed
11843 only to 127, not to 128.
11844 * data/glr.c (yysigned_char): New type.
11845 * data/yacc.c (yysigned_char): Likewise.
11846 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
11847
11848 2002-10-13 Paul Eggert <eggert@twinsun.com>
11849
11850 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
11851 true due to limited range of data type" warning from GCC.
11852
11853 * data/c.m4 (b4_token_defines): Protect against double-inclusion
11854 by wrapping enum yytokentype's definition inside #ifndef
11855 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
11856
11857 2002-10-13 Akim Demaille <akim@epita.fr>
11858
11859 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
11860 Un yy- yyrhs to avoid the name clash with the global YYRHS.
11861
11862 2002-10-13 Akim Demaille <akim@epita.fr>
11863
11864 * Makefile.maint: Update from Autoconf 2.54.
11865 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
11866
11867 2002-10-13 Akim Demaille <akim@epita.fr>
11868
11869 * src/print.c (print_state): Separate the list of solved conflicts
11870 from the other items.
11871 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
11872
11873 2002-10-13 Akim Demaille <akim@epita.fr>
11874
11875 Let nondeterministic skeletons be usable with deterministic
11876 tables.
11877
11878 With the patch, GAWK compiled by GCC without -O2 passes its test
11879 suite using a GLR parser driven by LALR tables. It fails with -O2
11880 because `struct stat' gives two different answers on my machine:
11881 88 (definition of an auto var) and later 96 (memset on this var).
11882 Hence the stack is badly corrumpted. The headers inclusion is to
11883 blame: if I move the awk.h inclusion before GLR's system header
11884 inclusion, the two struct stat have the same size.
11885
11886 * src/tables.c (pack_table): Always create conflict_table.
11887 (token_actions): Always create conflict_list.
11888 * data/glr.c (YYFLAG): Remove, unused.
11889
11890 2002-10-13 Akim Demaille <akim@epita.fr>
11891
11892 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
11893 (O0FLAGS): New.
11894 (VALGRIND, GXX): New.
11895 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
11896 * tests/bison.in: Run $PREBISON a pre-command.
11897 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
11898 (maintainer-check-g++): New.
11899 * Makefile.am (maintainer-check): New.
11900
11901 2002-10-13 Akim Demaille <akim@epita.fr>
11902
11903 * data/glr.c: Formatting changes.
11904 Tweak some trace messages to match yacc.c's.
11905
11906 2002-10-13 Akim Demaille <akim@epita.fr>
11907
11908 GLR parsers sometimes raise parse errors instead of performing the
11909 default reduction.
11910 Reported by Charles-Henry de Boysson.
11911
11912 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
11913 check the length of the traces when %glr.
11914 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
11915 GLR's traces.
11916 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
11917 Test GLR parsers.
11918 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
11919 (yyltype): Remove the yy prefix from the member names.
11920 (yytable): Complete its comment.
11921 (yygetLRActions): Map error action number from YYTABLE from
11922 YYTABLE_NINF to 0.
11923 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
11924 (which was a bug: it should have been YYTABEL_NINF, and yet it was
11925 not satisfying as we could compare an YYACTION computed from
11926 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
11927 only value for error actions.
11928 (yyreportParseError): In verbose parse error messages, don't issue
11929 `error' in the list of expected tokens.
11930 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
11931 next action to perform to match glr.c's decoding.
11932 (yytable): Complete its comment.
11933
11934 2002-10-13 Paul Eggert <eggert@twinsun.com>
11935
11936 Fix problem reported by Henrik Grubbstroem in
11937 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
11938 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
11939 because the Bison parser reads the second action before reducing
11940 the first one.
11941 * src/scan-gram.l (rule_length): New static var.
11942 Use it to keep track of the rule length in the scanner, since
11943 we can't expect the parser to be in lock-step sync with the scanner.
11944 (handle_action_dollar, handle_action_at): Use this var.
11945 * tests/actions.at (Exotic Dollars): Test for the problem.
11946
11947 2002-10-12 Paul Eggert <eggert@twinsun.com>
11948
11949 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
11950 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
11951 Include <sys/time.h> when checking for clock_t and struct tms.
11952 Use same include order as source.
11953 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
11954 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
11955
11956 * lib/timevar.c: Update copyright date and clarify comments.
11957 (get_time) [IN_GCC]: Keep the GCC version for reference.
11958
11959 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
11960 GCC version as of today, then merge Bison's changes.
11961 Change "GCC" to "Bison" in copyright notice. timevar.def's
11962 author is Akim, so change that too.
11963
11964 * src/reader.c (grammar_current_rule_check):
11965 Don't worry about the default action if $$ is untyped.
11966 Prevents bogus warnings reported by Jim Gifford in
11967 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
11968
11969 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
11970 * data/glr.c, data/lalr1.cc, data/yacc.c:
11971 Output token definitions before the first part of user declarations.
11972 Fixes compatibility problem reported by Jim Gifford for kbd in
11973 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
11974
11975 2002-10-11 Paul Eggert <eggert@twinsun.com>
11976
11977 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
11978 (yyparse): here. This undoes some of the 2002-07-25 change.
11979 Compatibility problem reported by Ralf S. Engelschall with
11980 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
11981
11982 2002-10-11 Akim Demaille <akim@epita.fr>
11983
11984 * tests/regression.at Characters Escapes): New.
11985 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
11986 characters.
11987 Reported by Jan Nieuwenhuizen.
11988
11989 2002-10-11 Akim Demaille <akim@epita.fr>
11990
11991 * po/id.po: New.
11992
11993 2002-10-10 Paul Eggert <eggert@twinsun.com>
11994
11995 Portability fixes for bitsets; this also avoids several GCC
11996 warnings.
11997
11998 * lib/abitset.c: Include <stddef.h>, for offsetof.
11999 * lib/lbitset.c: Likewise.
12000
12001 * lib/abitset.c (abitset_bytes): Return a size that is aligned
12002 properly for vectors of objects. Do not assume that adding a
12003 header size to a multiple of a word size yields a value that is
12004 properly aligned for the whole union.
12005 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12006
12007 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
12008 unique names for structures.
12009 * lib/ebitset.c (ebitset_bytes): Likewise.
12010 * lib/lbitset.c (lbitset_bytes): Likewise.
12011
12012 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
12013 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
12014 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
12015 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
12016 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
12017 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
12018 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
12019 to improve the type-checking that GCC can do.
12020 * lib/bitset.c (bitset_op4_cmp): Likewise.
12021 * lib/bitset_stats.c (bitset_stats_count,
12022 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
12023 bitset_stats_copy, bitset_stats_disjoint_p,
12024 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
12025 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
12026 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
12027 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
12028 bitset_stats_and_or_cmp, bitset_stats_andn_or,
12029 bitset_stats_andn_or_cmp, bitset_stats_or_and,
12030 bitset_stats_or_and_cmp): Likewise.
12031 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
12032 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
12033 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
12034 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
12035
12036 * lib/abitset.h: Include bitset.h, not bbitset.h.
12037 * lib/ebitset.h: Likewise.
12038 * lib/lbitset.h: Likewise.
12039
12040 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
12041 All instances of parameters of type enum bitset_opts are now of
12042 type enum_bitset_opts, to conform to the C Standard, and similarly
12043 for enum_bitset_type.
12044 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
12045 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
12046
12047 Do not use "struct bitset_struct" to mean different things in
12048 different modules. Not only is this confusing, it violates
12049 the C Standard, which requires that structure types in different
12050 modules must be compatible if one is to be passed to the other.
12051 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
12052 All instances of "struct bitset_struct *" replaced with "bitset".
12053 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
12054 (union bitset_union, struct abitset_struct, struct ebitset_struct,
12055 struct lbitset_struct, struct bitset_stats_struct): New types.
12056 All uses of struct bitset_struct changed to union bitset_union,
12057 etc.
12058 * lib/abitset.c (struct abitset_struct, abitset,
12059 struct bitset_struct): Remove.
12060 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
12061 struct bitset_struct): Remove.
12062 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
12063 bitset_struct): Remove.
12064 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
12065 Likewise.
12066
12067 Do not call a function of type T using a call that assumes the
12068 function is of a different type U. Standard C requires that a
12069 function must be called with a type that is compatible with its
12070 definition.
12071 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12072 New decls.
12073 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
12074 New functions.
12075 * lib/ebitset.c (PFV): Remove.
12076 * lib/lbitset.c (PFV): Likewise.
12077 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
12078 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
12079 decls.
12080 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
12081 (ebitset_vtable): Use them.
12082 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
12083 lbitset_xor): New functions.
12084 (lbitset_vtable): Use them.
12085
12086 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
12087 Declare.
12088
12089 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
12090 GCC warning.
12091 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
12092 Use offsetof, for simplicity.
12093
12094 2002-10-06 Paul Eggert <eggert@twinsun.com>
12095
12096 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
12097 the same width as int. This reapplies a hunk of the 2002-08-12 patch
12098 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
12099 which was inadvertently undone by the 2002-09-30 patch.
12100 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
12101 the same width as int.
12102
12103 2002-10-04 Paul Eggert <eggert@twinsun.com>
12104
12105 Version 1.50.
12106
12107 * configure.ac (AC_INIT), NEWS: Increment version number.
12108
12109 * doc/bison.texinfo: Minor spelling, grammar, and white space
12110 fixes.
12111 (Symbols): Mention that any negative value returned from yylex
12112 signifies end-of-input. Warn about negative chars. Mention
12113 the portable Standard C character set.
12114
12115 The GNU coding standard says CFLAGS and YFLAGS are reserved
12116 for the installer to set.
12117 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
12118 * src/Makefile.am (AM_CFLAGS): Likewise.
12119 (AM_YFLAGS): Renamed from YFLAGS.
12120
12121 Fix some MAX and MIN problems.
12122 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
12123 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
12124 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
12125 * src/reader.c (reader): Use it.
12126
12127 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
12128 POSIX 1003.1-2001 has removed fgrep.
12129
12130 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
12131
12132 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
12133 interpreted as signed.
12134 * lib/ebitset.c (ebitset_list): Fix bug.
12135
12136 2002-10-01 Paul Eggert <eggert@twinsun.com>
12137
12138 More fixes for 64-bit hosts and large bitsets.
12139
12140 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
12141 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
12142 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
12143 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
12144 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
12145 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
12146 bitset_count_): Likewise.
12147 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
12148 bitset_first, bitset_last): Likewise.
12149 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
12150 bitset_stats_list_reverse, bitset_stats_size,
12151 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
12152 Likewise.
12153 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12154 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
12155 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
12156 bitsetv_reflexive_transitive_closure): Likewise.
12157 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
12158 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
12159 Likewise.
12160 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
12161 Likewise.
12162
12163 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
12164 Use size_t, not unsigned int, to count bytes.
12165 * lib/abitset.h (abitset_bytes): Likewise.
12166 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
12167 Likewise.
12168 * lib/bitset.h (bitset_bytes): Likewise.
12169 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
12170 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
12171 * lib/bitsetv.c (bitsetv_alloc): Likewise.
12172 * lib/ebitset.c (ebitset_bytes): Likewise.
12173 * lib/ebitset.h (ebitset_bytes): Likewise.
12174 * lib/lbitset.c (lbitset_bytes): Likewise.
12175 * lib/lbitset.h (lbitset_bytes): Likewise.
12176
12177 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
12178 abitset_subset_p, abitset_disjoint_p, abitset_and,
12179 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
12180 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
12181 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
12182 abitset_or_and, abitset_or_and_cmp):
12183 Use bitset_windex instead of unsigned int.
12184 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12185 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
12186 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
12187 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
12188 Likewise.
12189 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
12190
12191 * lib/bitset.c (bitset_print):
12192 Use proper printf formats for widths of integer types.
12193 * lib/bitset_stats.c (bitset_percent_histogram_print,
12194 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
12195 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12196 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
12197 * lib/lbitset.c (lbitset_bytes): Likewise.
12198
12199 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
12200 BITSET_SIZE_MAX): New macros.
12201 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
12202 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
12203 to BITSET_WINDEX_MAX.
12204
12205 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
12206 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
12207 since we now return the bitset_bindex type (not int).
12208
12209 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
12210 when computing sizes.
12211 * lib/ebitset.c (ebitset_elts_grow): Likewise.
12212
12213 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
12214 and avoid cast to unsigned.
12215
12216 2002-09-30 Akim Demaille <akim@epita.fr>
12217
12218 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
12219 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
12220 Updates from Michael Hayes.
12221
12222 2002-09-30 Art Haas <ahaas@neosoft.com>
12223
12224 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
12225 invocations.
12226 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
12227 defined.
12228
12229 2002-09-27 Akim Demaille <akim@epita.fr>
12230
12231 Version 1.49c.
12232
12233 2002-09-27 Akim Demaille <akim@epita.fr>
12234
12235 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
12236 (Because of AC_LIBSOURCE).
12237
12238 2002-09-27 Akim Demaille <akim@epita.fr>
12239
12240 Playing with Autoscan.
12241
12242 * configure.ac: Remove the old LIBOBJ tweaks.
12243 (AC_REPLACE_FUNCS): Add strrchr and strtol.
12244 * lib/strrchr.c: New.
12245 * lib/strtol.c: New, from the Coreutils 4.5.1.
12246
12247 2002-09-27 Akim Demaille <akim@epita.fr>
12248
12249 Playing with Autoscan.
12250
12251 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
12252 * lib/Makefile.am (libbison_a_SOURCES): No longer include
12253 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
12254 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
12255 Coreutils 4.5.1.
12256
12257 2002-09-24 Akim Demaille <akim@epita.fr>
12258
12259 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
12260 (Frequently Asked Questions, Parser Stack Overflow): New.
12261
12262 2002-09-13 Akim Demaille <akim@epita.fr>
12263
12264 Playing with autoscan.
12265
12266 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
12267 * src/files.c (skeleton_find): Remove, unused.
12268 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
12269 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
12270
12271 2002-09-13 Akim Demaille <akim@epita.fr>
12272
12273 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
12274 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
12275
12276 2002-09-13 Akim Demaille <akim@epita.fr>
12277
12278 * configure.ac: Require 2.54.
12279 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
12280 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
12281 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
12282 Remove, provided by Autoconf macros.
12283
12284 2002-09-12 Akim Demaille <akim@epita.fr>
12285
12286 * m4/prereq.m4: Update, from Coreutils 4.5.1.
12287
12288 2002-09-12 Akim Demaille <akim@epita.fr>
12289
12290 * m4/prereq.m4: Update, from Fileutils 4.1.5.
12291 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
12292 Reported by Martin Mokrejs.
12293
12294 2002-09-10 Akim Demaille <akim@epita.fr>
12295
12296 * src/parse-gram.y: Associate a human readable string to each
12297 token type.
12298 * tests/regression.at (Invalid inputs): Adjust.
12299
12300 2002-09-10 Gary V. Vaughan <gary@gnu.org>
12301
12302 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
12303 with an Autoconf-2.5x style configure.ac.
12304
12305 2002-09-06 Paul Eggert <eggert@twinsun.com>
12306
12307 * doc/bison.texinfo (Conditions): Make explicit that the GPL
12308 exception applies only to yacc.c. This is a modification of a
12309 patch originally suggested by Akim Demaille.
12310
12311 2002-09-06 Akim Demaille <akim@epita.fr>
12312
12313 * data/c.m4 (b4_copyright): Move the GPL exception comment from
12314 here to...
12315 * data/yacc.c: here.
12316
12317 * data/lalr1.cc (struct yyltype): Don't define it, since we use
12318 LocationType.
12319 (b4_ltype): Default to yy::Location from location.hh.
12320
12321 2002-09-04 Jim Meyering <jim@meyering.net>
12322
12323 * data/yacc.c: Guard the declaration of yytoknum also with
12324 `#ifdef YYPRINT', so it is declared only when used.
12325
12326 2002-09-04 Akim Demaille <akim@epita.fr>
12327
12328 * configure.in: Rename as...
12329 * configure.ac: this.
12330 Bump to 1.49c.
12331
12332 2002-09-04 Akim Demaille <akim@epita.fr>
12333
12334 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
12335 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
12336 translate maintainer only messages.
12337
12338 2002-08-12 Paul Eggert <eggert@twinsun.com>
12339
12340 Version 1.49b.
12341
12342 * Makefile.am (SUBDIRS): Remove intl.
12343 (DISTCLEANFILES): Remove.
12344 * NEWS: Mention that GNU M4 is now required. Clarify what is
12345 meant by "larger grammars". Mention the pt_BR translation.
12346 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
12347 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
12348 Bump version from 0.11.2 to 0.11.5.
12349 (BISON_PREREQ_STAGE): Remove.
12350 (AM_GNU_GETTEXT): Use external gettext.
12351 (AC_OUTPUT): Remove intl/Makefile.
12352
12353 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
12354
12355 * data/glr.c: Include string.h, for strlen.
12356 (yyreportParseError): Use size_t for yysize.
12357 (yy_yypstack): No longer nested inside yypstates, as nested
12358 functions are not portable. Do not assume size_t is the
12359 same width as int.
12360 (yypstates): Do not assume that ptrdiff_t is the same width
12361 as int, and similarly for yyposn and YYINDEX.
12362
12363 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
12364
12365 * lib/Makefile.am (INCLUDES): Do not include from the intl
12366 directory, which has been removed.
12367 * src/Makefile.am (INCLUDES): Likewise.
12368
12369 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
12370 (bitsets_sources, additional_bitsets_sources, timevars_sources):
12371 New vars.
12372
12373 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
12374 * tests/Makefile.am (EXTRA_DIST): Likewise.
12375
12376 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
12377 Do not assume that bitset_windex is the same width as unsigned.
12378
12379 * lib/abitset.c (abitset_unused_clear): Do not assume that
12380 bitset_word is the same width as int.
12381 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
12382 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
12383 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
12384 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
12385 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
12386
12387 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
12388 portability to one's complement hosts!).
12389 * lib/ebitset.c (ebitset_op1): Likewise.
12390 * lib/lbitset.c (lbitset_op1): Likewise.
12391
12392 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
12393 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12394 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
12395 Sync with fileutils.
12396 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
12397 lib/gettext.h: Sync with diffutils.
12398
12399 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
12400 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
12401
12402 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
12403 PROTOTYPES to check for prototypes, and "defined __STDC__" to
12404 check for void *.
12405
12406 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
12407 size_t; the old version tried to do this but casted improperly.
12408 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
12409 (bitset_test): Now returns int, not unsigned long.
12410
12411 * lib/bitset_stats.c: Include "gettext.h".
12412 (_): New macro.
12413 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
12414 name locals "index", as it generates unnecessary warnings on some
12415 hosts that have an "index" function.
12416
12417 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
12418 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
12419 they need translation.
12420 * src/LR0.c (state_list_append, new_itemsets, get_state,
12421 append_states, generate_states): Likewise.
12422 * src/assoc.c (assoc_to_string): Likewise.
12423 * src/closure.c (print_closure, set_firsts, closure): Likewise.
12424 * src/gram.c (grammar_dump): Likewise.
12425 * src/injections.c (injections_compute): Likewise.
12426 * src/lalr.c (lookaheads_print): Likewise.
12427 * src/relation.c (relation_transpose): Likewise.
12428 * src/scan-gram.l: Likewise.
12429 * src/tables.c (table_grow, pack_vector): Likewise.
12430
12431 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
12432 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
12433 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
12434 * m4/mbstate_t.m4: Sync with fileutils.
12435 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
12436
12437 * po/LINGUAS: Add pt_BR.
12438 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
12439 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
12440 lib/timevar.c.
12441 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
12442 manual recommends.
12443 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
12444
12445 * src/complain.c (strerror_r): Remove decl; not needed.
12446 (strerror): Use same pattern as ../lib/error.c.
12447
12448 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
12449
12450 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
12451
12452 * src/main.c (main): Cast result of bindtextdomain and textdomain
12453 to void, to avoid a GCC warning when --disable-nls is in effect.
12454
12455 * src/scan-gram.l: Use strings rather than escapes when possible,
12456 to minimize the number of warnings from xgettext.
12457 (handle_action_dollar, handle_action_at): Don't use isdigit,
12458 as it mishandles negative chars and it may not work as expected
12459 outside the C locale.
12460
12461 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
12462 this is a GCC extension and is not portable to other compilers.
12463
12464 * src/system.h (alloca): Use same pattern as ../lib/error.c.
12465 Do not include <ctype.h>; no longer needed.
12466 Do not include <malloc.h>; no longer needed (and generates
12467 warnings on OpenBSD 3.0).
12468
12469 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
12470 it's not portable.
12471
12472 * tests/regression.at: Do not use 'cc -c input.c -o input';
12473 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
12474
12475 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
12476 exit status as failure, not just exit status 1. Sun C exits
12477 with status 2 sometimes.
12478
12479 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
12480 Use it for the two large tests.
12481
12482 2002-08-02 Akim Demaille <akim@epita.fr>
12483
12484 * src/conflicts.c (conflicts_output): Don't output rules never
12485 reduced here, since anyway that computation doesn't work.
12486 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
12487 (rule_useless_p, rule_never_reduced_p): New.
12488 (grammar_rules_partial_print): Use a filter instead of a range.
12489 Display the title only if needed.
12490 (grammar_rules_print): Adjust.
12491 (grammar_rules_never_reduced_report): New.
12492 * src/tables.c (action_row): Move the computation of rules never
12493 reduced to...
12494 (token_actions): here.
12495 * src/main.c (main): Make the parser before making the report, so
12496 that rules never reduced are computed.
12497 Call grammar_rules_never_reduced_report.
12498 * src/print.c (print_results): Report rules never reduced.
12499 * tests/conflicts.at, tests/reduce.at: Adjust.
12500
12501 2002-08-01 Akim Demaille <akim@epita.fr>
12502
12503 Instead of attaching lookaheads and duplicating the rules being
12504 reduced by a state, attach the lookaheads to the reductions.
12505
12506 * src/state.h (state_t): Remove the `lookaheads',
12507 `lookaheads_rule' member.
12508 (reductions_t): Add a `lookaheads' member.
12509 Use a regular array for the `rules'.
12510 * src/state.c (reductions_new): Initialize the lookaheads member
12511 to 0.
12512 (state_rule_lookaheads_print): Adjust.
12513 * src/state.h, src/state.c (state_reductions_find): New.
12514 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
12515 (count_rr_conflicts): Adjust.
12516 * src/lalr.c (LArule): Remove.
12517 (add_lookback_edge): Adjust.
12518 (state_lookaheads_count): New.
12519 (states_lookaheads_initialize): Merge into...
12520 (initialize_LA): this.
12521 (lalr_free): Adjust.
12522 * src/main.c (main): Don't free nullable and derives too early: it
12523 is used by --verbose.
12524 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
12525
12526 2002-08-01 Akim Demaille <akim@epita.fr>
12527
12528 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
12529 `rule_number_t**'.
12530 (set_derives, free_derives): Rename as...
12531 (derives_compute, derives_free): this.
12532 Adjust all dependencies.
12533 * src/nullable.c (set_nullable, free_nullable): Rename as...
12534 (nullable_compute, nullable_free): these.
12535 (rule_list_t): Store rule_t *, not rule_number_t.
12536 * src/state.c (state_rule_lookaheads_print): Directly compare rule
12537 pointers, instead of their numbers.
12538 * src/main.c (main): Call nullable_free, and derives_free earlier,
12539 as they were lo longer used.
12540
12541 2002-08-01 Akim Demaille <akim@epita.fr>
12542
12543 * lib/timevar.c (get_time): Include children time.
12544 * src/lalr.h (LA, LArule): Don't export them: used with the
12545 state_t.
12546 * src/lalr.c (LA, LArule): Static.
12547 * src/lalr.h, src/lalr.c (lalr_free): New.
12548 * src/main.c (main): Call it.
12549 * src/tables.c (pack_vector): Check whether loc is >= to the
12550 table_size, not >.
12551 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
12552 (tables_generate): do it, since that's also it which allocates
12553 them.
12554 Don't free LA and LArule, main does.
12555
12556 2002-07-31 Akim Demaille <akim@epita.fr>
12557
12558 Separate parser tables computation and output.
12559
12560 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
12561 (conflict_list, conflict_list_cnt, table, check, table_ninf)
12562 (yydefgoto, yydefact, high): Move to...
12563 * src/tables.h, src/tables.c: here.
12564 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12565 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12566 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
12567 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
12568 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
12569 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
12570 (action_row, save_row, token_actions, save_column, default_goto)
12571 (goto_actions, sort_actions, matching_state, pack_vector)
12572 (table_ninf_remap, pack_table, prepare_actions): Move to...
12573 * src/tables.c: here.
12574 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
12575 * src/output.c (token_actions, output_base, output_conflicts)
12576 (output_check): Merge into...
12577 (prepare_actions): this.
12578 (actions_output): Rename as...
12579 (user_actions_output): this.
12580 * src/main.c (main): Call tables_generate and tables_free.
12581
12582 2002-07-31 Akim Demaille <akim@epita.fr>
12583
12584 Steal GCC's --time-report support.
12585
12586 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
12587 stolen/adjusted from GCC.
12588 * m4/stage.m4: Remove time related checks.
12589 * m4/timevar.m4: New.
12590 * configure.in: Adjust.
12591 * src/system.h: Adjust to using timevar.h.
12592 * src/getargs.h, src/getargs.c: Support trace_time for
12593 --trace=time.
12594 * src/main.c (stage): Remove.
12595 (main): Replace `stage' invocations with timevar calls.
12596 * src/output.c: Insert pertinent timevar calls.
12597
12598 2002-07-31 Akim Demaille <akim@epita.fr>
12599
12600 Let --trace have arguments.
12601
12602 * src/getargs.h (enum trace_e): New.
12603 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
12604 (long_options, short_options): --trace/-T takes an optional
12605 argument.
12606 Change all the uses of trace_flag to reflect the new flags.
12607 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
12608
12609 Strengthen `stage' portability.
12610
12611 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
12612 * configure.in: Use it.
12613 Don't check for malloc.h and sys/times.h.
12614 * src/system.h: Include them when appropriate.
12615 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
12616 times and struct tms are available.
12617
12618 2002-07-30 Akim Demaille <akim@epita.fr>
12619
12620 In verbose parse error message, don't report `error' as an
12621 expected token.
12622 * tests/actions.at (Printers and Destructors): Adjust.
12623 * tests/calc.at (Calculator $1): Adjust.
12624 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
12625 error message, do not report the parser accepts the error token in
12626 that state.
12627
12628 2002-07-30 Akim Demaille <akim@epita.fr>
12629
12630 Normalize conflict related messages.
12631
12632 * src/complain.h, src/complain.c (warn, complain): New.
12633 * src/conflicts.c (conflicts_print): Use them.
12634 (conflict_report_yacc): New, extracted from...
12635 (conflicts_print): here.
12636 * tests/conflicts.at, tests/existing.at: Adjust.
12637
12638 2002-07-30 Akim Demaille <akim@epita.fr>
12639
12640 Report rules which are never reduced by the parser: those hidden
12641 by conflicts.
12642
12643 * src/LR0.c (save_reductions): Don't make the final state too
12644 different: save its reduction (accept) instead of having a state
12645 without any action (no shift or goto, no reduce).
12646 Note: the final state is now a ``regular'' state, i.e., the
12647 parsers now contain `reduce 0' as default reduction.
12648 Nevertheless, since they decide to `accept' when yystate =
12649 final_state, they still will not reduce rule 0.
12650 * src/print.c (print_actions, print_reduction): Adjust.
12651 * src/output.c (action_row): Track reduced rules.
12652 (token_actions): Report rules never reduced.
12653 * tests/conflicts.at, tests/regression.at: Adjust.
12654
12655 2002-07-30 Akim Demaille <akim@epita.fr>
12656
12657 `stage' was accidently included in a previous patch.
12658 Initiate its autoconfiscation.
12659
12660 * configure.in: Look for malloc.h and sys/times.h.
12661 * src/main.c (stage): Adjust.
12662 Report only when trace_flag.
12663
12664 2002-07-29 Akim Demaille <akim@epita.fr>
12665
12666 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
12667 state_number_t.
12668 (errs_t): symbol_t*, not symbol_number_t.
12669 (reductions_t): rule_t*, not rule_number_t.
12670 (FOR_EACH_SHIFT): New.
12671 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
12672 * src/print.c, src/print_graph.c: Adjust.
12673
12674 2002-07-29 Akim Demaille <akim@epita.fr>
12675
12676 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
12677
12678 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
12679 (endtoken, accept): these.
12680 * src/reader.c (reader): Set endtoken's default tag to "$end".
12681 Set undeftoken's tag to "$undefined" instead of "$undefined.".
12682 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
12683 Adjust.
12684
12685 2002-07-29 Akim Demaille <akim@epita.fr>
12686
12687 * src/reduce.c (reduce_grammar): When the language is empty,
12688 complain about the start symbol, not the axiom.
12689 Use its location.
12690 * tests/reduce.at (Empty Language): New.
12691
12692 2002-07-26 Akim Demaille <akim@epita.fr>
12693
12694 * src/reader.h, src/reader.c (gram_error): ... can't get
12695 yycontrol without making too strong assumptions on the parser
12696 itself.
12697 * src/output.c (prepare_tokens): Use the real 0th value of
12698 token_translations instead of `0'.
12699 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
12700 visible here.
12701 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
12702 for the time being: %locations ought to provide it to yyerror.
12703
12704 2002-07-25 Akim Demaille <akim@epita.fr>
12705
12706 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
12707 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
12708 * tests/regression.at (Web2c Actions): Adjust.
12709
12710 2002-07-25 Akim Demaille <akim@epita.fr>
12711
12712 Stop storing rules from 1 to nrules + 1.
12713
12714 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
12715 * src/nullable.c, src/output.c, src/print.c, src/reader.c
12716 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
12717 Iterate from 0 to nrules.
12718 Use rule_number_as_item_number and item_number_as_rule_number.
12719 Adjust to `derive' now containing possibly 0.
12720 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
12721 Handle the `- 1' part in rule numbers from/to item numbers.
12722 * src/conflicts.c (log_resolution): Fix the message which reversed
12723 shift and reduce.
12724 * src/output.c (action_row): Initialize default_rule to -1.
12725 (token_actions): Adjust.
12726 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
12727 expected output.
12728 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
12729
12730 2002-07-25 Akim Demaille <akim@epita.fr>
12731
12732 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
12733 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
12734 (b4_c_knr_arg_decl): New.
12735 * data/yacc.c: Use it to define yysymprint, yydestruct, and
12736 yyreport_parse_error.
12737
12738 2002-07-25 Akim Demaille <akim@epita.fr>
12739
12740 * data/yacc.c (yyreport_parse_error): New, extracted from...
12741 (yyparse): here.
12742 (yydestruct, yysymprint): Move above yyparse.
12743 Be K&R compliant.
12744
12745 2002-07-25 Akim Demaille <akim@epita.fr>
12746
12747 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
12748 replace...
12749 (b4_sint_type, b4_uint_type): these.
12750 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
12751 * tests/regression.at (Web2c Actions): Adjust.
12752
12753 2002-07-25 Akim Demaille <akim@epita.fr>
12754
12755 * src/gram.h (TIEM_NUMBER_MAX): New.
12756 (item_number_of_rule_number, rule_number_of_item_number): Rename
12757 as...
12758 (rule_number_as_item_number, item_number_as_rule_number): these.
12759 Adjust dependencies.
12760 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
12761 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
12762 (symbol_number_to_vector_number): New.
12763 (order): Of vector_number_t* type.
12764 (base_t, BASE_MAX, BASE_MIN): New.
12765 (froms, tos, width, pos, check): Of base_t type.
12766 (action_number_t, ACTION_MIN, ACTION_MAX): New.
12767 (actrow): Of action_number_t type.
12768 (conflrow): Of unsigned int type.
12769 (table_ninf, base_ninf): New.
12770 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
12771 (muscle_insert_int_table, muscle_insert_base_table)
12772 (muscle_insert_rule_number_table): New.
12773 (prepare_tokens): Output `toknum' as int_table.
12774 (action_row): Returns a rule_number_t.
12775 Use ACTION_MIN, not SHRT_MIN.
12776 (token_actions): yydefact is rule_number_t*.
12777 (table_ninf_remap): New.
12778 (pack_table): Use it for `base' and `table'.
12779 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
12780 replaced with...
12781 (YYPACT_NINF, YYTABLE_NINF): these.
12782 (yypact, yytable): Compute their types instead of hard-coded
12783 `short'.
12784 * tests/regression.at (Web2c Actions): Adjust.
12785
12786 2002-07-19 Akim Demaille <akim@epita.fr>
12787
12788 * src/scan-gram.l (id): Can start with an underscore.
12789
12790 2002-07-16 Akim Demaille <akim@epita.fr>
12791
12792 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
12793 Adjust all former `associativity' dependencies.
12794 * src/symtab.c (symbol_new): Default associativity is `undef', not
12795 `right'.
12796 (symbol_check_alias_consistence): Adjust.
12797
12798 2002-07-09 Akim Demaille <akim@epita.fr>
12799
12800 * doc/bison.texinfo: Properly set the ``header'' part.
12801 Use @dircategory ``GNU programming tools'' as per Texinfo's
12802 documentation.
12803 Use @copying.
12804
12805 2002-07-09 Akim Demaille <akim@epita.fr>
12806
12807 * lib/quotearg.h: Protect against multiple inclusions.
12808 * src/location.h (location_t): Add a `file' member.
12809 (LOCATION_RESET, LOCATION_PRINT): Adjust.
12810 * src/complain.c (warn_at, complain_at, fatal_at): Drop
12811 `error_one_per_line' support.
12812
12813 2002-07-09 Akim Demaille <akim@epita.fr>
12814
12815 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
12816 * src/reader.c (lineno): Remove.
12817 Adjust all dependencies.
12818 (get_merge_function): Take a location and use complain_at.
12819 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
12820 * tests/regression.at (Invalid inputs, Mixing %token styles):
12821 Adjust.
12822
12823 2002-07-09 Akim Demaille <akim@epita.fr>
12824
12825 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
12826 recovery rule, and forbid extensions when --yacc.
12827 (gram_error): Use complain_at.
12828 * src/reader.c (reader): Exit if there were parse errors.
12829
12830 2002-07-09 Akim Demaille <akim@epita.fr>
12831
12832 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
12833 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
12834 Reported by R Blake <blakers@mac.com>.
12835
12836 2002-07-09 Akim Demaille <akim@epita.fr>
12837
12838 * data/yacc.c: Output the copyright notive in the header.
12839
12840 2002-07-03 Akim Demaille <akim@epita.fr>
12841
12842 * src/output.c (froms, tos): Are state_number_t.
12843 (save_column): sp, sp1, and sp2 are state_number_t.
12844 (prepare): Rename `final' as `final_state_number', `nnts' as
12845 `nterms_number', `nrules' as `rules_number', `nstates' as
12846 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
12847 unused.
12848 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
12849 * data/lalr1.cc (nsym_): Remove, unused.
12850
12851 2002-07-03 Akim Demaille <akim@epita.fr>
12852
12853 * src/lalr.h, src/lalr.c (goto_number_t): New.
12854 * src/lalr.c (goto_list_t): New.
12855 Propagate them.
12856 * src/nullable.c (rule_list_t): New.
12857 Propagate.
12858 * src/types.h: Remove.
12859
12860 2002-07-03 Akim Demaille <akim@epita.fr>
12861
12862 * src/closure.c (print_fderives): Use rule_rhs_print.
12863 * src/derives.c (print_derives): Use rule_rhs_print.
12864 (rule_list_t): New, replaces `shorts'.
12865 (set_derives): Add comments.
12866 * tests/sets.at (Nullable, Firsts): Adjust.
12867
12868 2002-07-03 Akim Demaille <akim@epita.fr>
12869
12870 * src/output.c (prepare_actions): Free `tally' and `width'.
12871 (prepare_actions): Allocate and free `order'.
12872 * src/symtab.c (symbols_free): Free `symbols'.
12873 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
12874 * src/output.c (m4_invoke): Move to...
12875 * src/scan-skel.l: here.
12876 (<<EOF>>): Close yyout, and free its name.
12877
12878 2002-07-03 Akim Demaille <akim@epita.fr>
12879
12880 Fix some memory leaks, and fix a bug: state 0 was examined twice.
12881
12882 * src/LR0.c (new_state): Merge into...
12883 (state_list_append): this.
12884 (new_states): Merge into...
12885 (generate_states): here.
12886 (set_states): Don't ensure a proper `errs' state member here, do it...
12887 * src/conflicts.c (conflicts_solve): here.
12888 * src/state.h, src/state.c: Comment changes.
12889 (state_t): Rename member `shifts' as `transitions'.
12890 Adjust all dependencies.
12891 (errs_new): For consistency, also take the values as argument.
12892 (errs_dup): Remove.
12893 (state_errs_set): New.
12894 (state_reductions_set, state_transitions_set): Assert that no
12895 previous value was assigned.
12896 (state_free): New.
12897 (states_free): Use it.
12898 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
12899 temporary storage: use `errs' and `nerrs' as elsewhere.
12900 (set_conflicts): Allocate and free this `errs'.
12901
12902 2002-07-02 Akim Demaille <akim@epita.fr>
12903
12904 * lib/libiberty.h: New.
12905 * lib: Update the bitset implementation from upstream.
12906 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
12907 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
12908 * src/main.c: Adjust bitset stats calls.
12909
12910 2002-07-01 Paul Eggert <eggert@twinsun.com>
12911
12912 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
12913 char, so that negative chars don't collide with $.
12914
12915 2002-06-30 Akim Demaille <akim@epita.fr>
12916
12917 Have the GLR tests be `warning' checked, and fix the warnings.
12918
12919 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
12920 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
12921 (yyremoveDeletes): `yyi' and `yyj' are size_t.
12922 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
12923 (yyaddDeferredAction): static.
12924 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
12925 (yyreportParseError): yyprefix is const.
12926 yytokenp is used only when verbose.
12927 (yy__GNUC__): Replace with __GNUC__.
12928 (yypdumpstack): yyi is size_t.
12929 (yypreference): Un-yy local variables and arguments, to avoid
12930 clashes with `yyr1'. Anyway, we are not in the user name space.
12931 (yytname_size): be an int, as is compared with ints.
12932 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
12933 Use them.
12934 * tests/cxx-gram.at: Use quotation to protect $1.
12935 Use AT_COMPILE to enable warnings hunts.
12936 Prototype yylex and yyerror.
12937 `Use' argc.
12938 Include `string.h', not `strings.h'.
12939 Produce and prototype stmtMerge only when used.
12940 yylex takes a location.
12941
12942 2002-06-30 Akim Demaille <akim@epita.fr>
12943
12944 We spend a lot of time in quotearg, in particular when --verbose.
12945
12946 * src/symtab.c (symbol_get): Store a quoted version of the key.
12947 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
12948 Adjust all callers.
12949
12950 2002-06-30 Akim Demaille <akim@epita.fr>
12951
12952 * src/state.h (reductions_t): Rename member `nreds' as num.
12953 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
12954 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
12955
12956 2002-06-30 Akim Demaille <akim@epita.fr>
12957
12958 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
12959 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
12960 (shifts_to): Rename as...
12961 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
12962 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
12963 (TRANSITION_IS_DISABLED, transitions_to): these.
12964
12965 2002-06-30 Akim Demaille <akim@epita.fr>
12966
12967 * src/print.c (print_shifts, print_gotos): Merge into...
12968 (print_transitions): this.
12969 (print_transitions, print_errs, print_reductions): Align the
12970 lookaheads columns.
12971 (print_core, print_transitions, print_errs, print_state,
12972 print_grammar): Output empty lines separator before, not after.
12973 (state_default_rule_compute): Rename as...
12974 (state_default_rule): this.
12975 * tests/conflicts.at (Defaulted Conflicted Reduction),
12976 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
12977 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
12978
12979 2002-06-30 Akim Demaille <akim@epita.fr>
12980
12981 Display items as we display rules.
12982
12983 * src/gram.h, src/gram.c (rule_lhs_print): New.
12984 * src/gram.c (grammar_rules_partial_print): Use it.
12985 * src/print.c (print_core): Likewise.
12986 * tests/conflicts.at (Defaulted Conflicted Reduction),
12987 (Unresolved SR Conflicts): Adjust.
12988 (Unresolved SR Conflicts): Adjust and rename as...
12989 (Resolved SR Conflicts): this, as was meant.
12990 * tests/regression.at (Web2c Report): Adjust.
12991
12992 2002-06-30 Akim Demaille <akim@epita.fr>
12993
12994 * src/print.c (state_default_rule_compute): New, extracted from...
12995 (print_reductions): here.
12996 Pessimize, but clarify the code.
12997 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
12998
12999 2002-06-30 Akim Demaille <akim@epita.fr>
13000
13001 * src/output.c (action_row): Let default_rule be always a rule
13002 number.
13003
13004 2002-06-30 Akim Demaille <akim@epita.fr>
13005
13006 * src/closure.c (print_firsts, print_fderives, closure):
13007 Use BITSET_EXECUTE.
13008 * src/lalr.c (lookaheads_print): Likewise.
13009 * src/state.c (state_rule_lookaheads_print): Likewise.
13010 * src/print_graph.c (print_core): Likewise.
13011 * src/print.c (print_reductions): Likewise.
13012 * src/output.c (action_row): Likewise.
13013 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
13014
13015 2002-06-30 Akim Demaille <akim@epita.fr>
13016
13017 * src/print_graph.c: Use report_flag.
13018
13019 2002-06-30 Akim Demaille <akim@epita.fr>
13020
13021 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
13022 to...
13023 * src/relation.h, src/relation.c (traverse, relation_digraph)
13024 (relation_print, relation_transpose): New.
13025
13026 2002-06-30 Akim Demaille <akim@epita.fr>
13027
13028 * src/state.h, src/state.c (shifts_to): New.
13029 * src/lalr.c (build_relations): Use it.
13030
13031 2002-06-30 Akim Demaille <akim@epita.fr>
13032
13033 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
13034 (item_number_of_rule_number, rule_number_of_item_number): New.
13035 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
13036 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
13037 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
13038 Propagate their use.
13039 Much remains to be done, in particular wrt `shorts' from types.h.
13040
13041 2002-06-30 Akim Demaille <akim@epita.fr>
13042
13043 * src/symtab.c (symbol_new): Initialize the `printer' member.
13044
13045 2002-06-30 Akim Demaille <akim@epita.fr>
13046
13047 * src/LR0.c (save_reductions): Remove, replaced by...
13048 * src/state.h, src/state.c (state_reductions_set): New.
13049 (reductions, errs): Rename as...
13050 (reductions_t, errs_t): these.
13051 Adjust all dependencies.
13052
13053 2002-06-30 Akim Demaille <akim@epita.fr>
13054
13055 * src/LR0.c (state_list_t, state_list_append): New.
13056 (first_state, last_state): Now symbol_list_t.
13057 (this_state): Remove.
13058 (new_itemsets, append_states, save_reductions): Take a state_t as
13059 argument.
13060 (set_states, generate_states): Adjust.
13061 (save_shifts): Remove, replaced by...
13062 * src/state.h, src/state.c (state_shifts_set): New.
13063 (shifts): Rename as...
13064 (shifts_t): this.
13065 Adjust all dependencies.
13066 * src/state.h (state_t): Remove the `next' member.
13067
13068 2002-06-30 Akim Demaille <akim@epita.fr>
13069
13070 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
13071 escaped in slot 0.
13072
13073 2002-06-30 Akim Demaille <akim@epita.fr>
13074
13075 Use hash.h for the state hash table.
13076
13077 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
13078 (allocate_storage): Use state_hash_new.
13079 (free_storage): Use state_hash_free.
13080 (new_state, get_state): Adjust.
13081 * src/lalr.h, src/lalr.c (states): Move to...
13082 * src/states.h (state_t): Remove the `link' member, no longer
13083 used.
13084 * src/states.h, src/states.c: here.
13085 (state_hash_new, state_hash_free, state_hash_lookup)
13086 (state_hash_insert, states_free): New.
13087 * src/states.c (state_table, state_compare, state_hash): New.
13088 * src/output.c (output_actions): Do not free states now, since we
13089 still need to know the final_state number in `prepare', called
13090 afterwards. Do it...
13091 * src/main.c (main): here: call states_free after `output'.
13092
13093 2002-06-30 Akim Demaille <akim@epita.fr>
13094
13095 * src/state.h, src/state.c (state_new): New, extracted from...
13096 * src/LR0.c (new_state): here.
13097 * src/state.h (STATE_ALLOC): Move to...
13098 * src/state.c: here.
13099 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
13100 * src/state.h, src/state.c: here.
13101
13102 2002-06-30 Akim Demaille <akim@epita.fr>
13103
13104 * src/reader.c (gensym): Rename as...
13105 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
13106 (getsym): Rename as...
13107 (symbol_get): this.
13108
13109 2002-06-30 Akim Demaille <akim@epita.fr>
13110
13111 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
13112 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
13113 * src/output.c, src/print.c, src/print_graph.c: Propagate.
13114 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
13115
13116 2002-06-30 Akim Demaille <akim@epita.fr>
13117
13118 Make the test suite pass with warnings checked.
13119
13120 * tests/actions.at (Printers and Destructors): Improve.
13121 Avoid unsigned vs. signed issues.
13122 * tests/calc.at: Don't exercise the scanner here, do it...
13123 * tests/input.at (Torturing the Scanner): here.
13124
13125 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13126
13127 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
13128 reorganize first lines parallel to yacc.c.
13129
13130 2002-06-28 Akim Demaille <akim@epita.fr>
13131
13132 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
13133 (b4_token_enum, b4_token_defines): New, factored from...
13134 * data/lalr1.cc, data/yacc.c, glr.c: here.
13135
13136 2002-06-28 Akim Demaille <akim@epita.fr>
13137
13138 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
13139 unused variables.
13140 * src/output.c (merger_output): static.
13141
13142 2002-06-28 Akim Demaille <akim@epita.fr>
13143
13144 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
13145 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
13146 pacify GCC.
13147 * src/output.c (save_row): Initialize all the variables to pacify GCC.
13148
13149 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13150
13151 Accumulated changelog for new GLR parsing features.
13152
13153 * src/conflicts.c (count_total_conflicts): Change name to
13154 conflicts_total_count.
13155 * src/conflicts.h: Ditto.
13156 * src/output.c (token_actions): Use the new name.
13157 (output_conflicts): Change conflp => conflict_list_heads, and
13158 confl => conflict_list for better readability.
13159 * data/glr.c: Use the new names.
13160 * NEWS: Add self to GLR announcement.
13161
13162 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
13163
13164 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
13165 Akim Demaille.
13166
13167 * data/bison.glr: Change name to glr.c
13168 * data/glr.c: Renamed from bison.glr.
13169 * data/Makefile.am: Add glr.c
13170
13171 * src/getargs.c:
13172
13173 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
13174 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
13175
13176 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13177
13178 * data/bison.glr: Be sure to restore the
13179 current #line when returning to the skeleton contents after having
13180 exposed the input file's #line.
13181
13182 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13183
13184 * data/bison.glr: Bring up to date with changes to bison.simple.
13185
13186 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13187
13188 * data/bison.glr: Correct definitions that use b4_prefix.
13189 Various reformatting.
13190 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
13191 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
13192 yytokenp argument; now part of stack.
13193 (yychar): Define to behave as documented.
13194 (yyclearin): Ditto.
13195
13196 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13197
13198 * src/reader.h: Add declaration for free_merger_functions.
13199
13200 * src/reader.c (merge_functions): New variable.
13201 (get_merge_function): New function.
13202 (free_merger_functions): New function.
13203 (readgram): Check for %prec that is not followed by a symbol.
13204 Handle %dprec and %merge declarations.
13205 (packgram): Initialize dprec and merger fields in rules array.
13206
13207 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
13208 conflict_list_cnt, conflict_list_free): New variables.
13209 (table_grow): Also grow conflict_table.
13210 (prepare_rules): Output dprec and merger tables.
13211 (conflict_row): New function.
13212 (action_row): Output conflict lists for GLR parser. Don't use
13213 default reduction in conflicted states for GLR parser so that there
13214 are spaces for the conflict lists.
13215 (save_row): Also save conflict information.
13216 (token_actions): Allocate conflict list.
13217 (merger_output): New function.
13218 (pack_vector): Pack conflict table, too.
13219 (output_conflicts): New function to output yyconflp and yyconfl.
13220 (output_check): Allocate conflict_tos.
13221 (output_actions): Output conflict tables, also.
13222 (output_skeleton): Output b4_mergers definition.
13223 (prepare): Output b4_max_rhs_length definition.
13224 Use 'bison.glr' as default skeleton for GLR parsers.
13225
13226 * src/gram.c (glr_parser): New flag.
13227 (grammar_free): Call free_merger_functions.
13228
13229 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
13230 all pairs of conflicting reductions, rather than just all tokens
13231 causing conflicts. Needed to size conflict tables.
13232 (conflicts_output): Modify call to count_rr_conflicts for new
13233 interface.
13234 (conflicts_print): Ditto.
13235 (count_total_conflicts): New function.
13236
13237 * src/reader.h (merger_list): New type.
13238 (merge_functions): New variable.
13239
13240 * src/lex.h (tok_dprec, tok_merge): New token types.
13241
13242 * src/gram.h (rule_s): Add dprec and merger fields.
13243 (glr_parser): New flag.
13244
13245 * src/conflicts.h (count_total_conflicts): New function.
13246
13247 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
13248
13249 * doc/bison.texinfo (Generalized LR Parsing): New section.
13250 (GLR Parsers): New section.
13251 (Language and Grammar): Mention GLR parsing.
13252 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
13253 Correct typo ("tge" -> "the").
13254
13255 * data/bison.glr: New skeleton for GLR parsing.
13256
13257 * tests/cxx-gram.at: New tests for GLR parsing.
13258
13259 * tests/testsuite.at: Include cxx-gram.at.
13260
13261 * tests/Makefile.am: Add cxx-gram.at.
13262
13263 * src/parse-gram.y:
13264
13265 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
13266
13267 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
13268
13269 2002-06-27 Akim Demaille <akim@epita.fr>
13270
13271 * src/options.h, src/options.c: Remove.
13272 * src/getargs.c (short_options, long_options): New.
13273
13274 2002-06-27 Akim Demaille <akim@epita.fr>
13275
13276 * data/bison.simple, data/bison.c++: Rename as...
13277 * data/yacc.c, data/lalr1.cc: these.
13278 * doc/bison.texinfo (Environment Variables): Remove.
13279
13280 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
13281
13282 * src/getargs.c (report_argmatch): Initialize strtok().
13283
13284 2002-06-20 Akim Demaille <akim@epita.fr>
13285
13286 * data/bison.simple (b4_symbol_actions): New, replaces...
13287 (b4_symbol_destructor, b4_symbol_printer): these.
13288 (yysymprint): Be sure to call YYPRINT only for tokens, and using
13289 user token numbers.
13290
13291 2002-06-20 Akim Demaille <akim@epita.fr>
13292
13293 * data/bison.simple (yydestructor): Rename as...
13294 (yydestruct): this.
13295
13296 2002-06-20 Akim Demaille <akim@epita.fr>
13297
13298 * src/symtab.h, src/symtab.c (symbol_type_set)
13299 (symbol_destructor_set, symbol_precedence_set): The location is
13300 the last argument.
13301 Adjust all callers.
13302
13303 2002-06-20 Akim Demaille <akim@epita.fr>
13304
13305 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
13306 internals.
13307 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
13308 Takes a location.
13309 * src/symtab.h, src/symtab.c (symbol_class_set)
13310 (symbol_user_token_number_set): Likewise.
13311 Adjust all callers.
13312 Promote complain_at.
13313 * tests/input.at (Type Clashes): Adjust.
13314
13315 2002-06-20 Akim Demaille <akim@epita.fr>
13316
13317 * data/bison.simple (YYLEX): Fix the declaration when
13318 %pure-parser.
13319
13320 2002-06-20 Akim Demaille <akim@epita.fr>
13321
13322 * data/bison.simple (yysymprint): Don't print the token number,
13323 just its name.
13324 * tests/actions.at (Destructors): Rename as...
13325 (Printers and Destructors): this.
13326 Also exercise %printer.
13327
13328 2002-06-20 Akim Demaille <akim@epita.fr>
13329
13330 * data/bison.simple (YYDSYMPRINT): New.
13331 Use it to remove many of the #if YYDEBUG/if (yydebug).
13332
13333 2002-06-20 Akim Demaille <akim@epita.fr>
13334
13335 * src/symtab.h, src/symtab.c (symbol_t): printer and
13336 printer_location are new members.
13337 (symbol_printer_set): New.
13338 * src/parse-gram.y (PERCENT_PRINTER): New token.
13339 Handle its associated rule.
13340 * src/scan-gram.l: Adjust.
13341 (handle_destructor_at, handle_destructor_dollar): Rename as...
13342 (handle_symbol_code_at, handle_symbol_code_dollar): these.
13343 * src/output.c (symbol_printers_output): New.
13344 (output_skeleton): Call it.
13345 * data/bison.simple (yysymprint): New. Cannot be named yyprint
13346 since there are already many grammar files with a user `yyprint'.
13347 Replace the calls to YYPRINT to calls to yysymprint.
13348 * tests/calc.at: Adjust.
13349 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
13350 taking advantage of parser very internal details (stack size!).
13351
13352 2002-06-20 Akim Demaille <akim@epita.fr>
13353
13354 * src/scan-gram.l: Complete the scanner with the missing patterns
13355 to pacify Flex.
13356 Use `quote' and `symbol_tag_get' where appropriate.
13357
13358 2002-06-19 Akim Demaille <akim@epita.fr>
13359
13360 * tests/actions.at (Destructors): Augment to test locations.
13361 * data/bison.simple (yydestructor): Pass it the current location
13362 if locations are enabled.
13363 Prototype only when __STDC__ or C++.
13364 Change the argument names to move into the yy name space: there is
13365 user code here.
13366
13367 2002-06-19 Akim Demaille <akim@epita.fr>
13368
13369 * data/bison.simple (b4_pure_if): New.
13370 Use it instead of #ifdef YYPURE.
13371
13372 2002-06-19 Akim Demaille <akim@epita.fr>
13373
13374 * data/bison.simple (b4_location_if): New.
13375 Use it instead of #ifdef YYLSP_NEEDED.
13376
13377 2002-06-19 Akim Demaille <akim@epita.fr>
13378
13379 Prepare @$ in %destructor, but currently don't bind it in the
13380 skeleton, as %location use is not cleaned up yet.
13381
13382 * src/scan-gram.l (handle_dollar, handle_destructor_at)
13383 (handle_action_at): New.
13384 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
13385 a braced_code_t and a location as additional arguments.
13386 (handle_destructor_dollar): Instead of requiring `b4_eval', just
13387 unquote one when outputting `b4_dollar_dollar'.
13388 Adjust callers.
13389 * data/bison.simple (b4_eval): Remove.
13390 (b4_symbol_destructor): Adjust.
13391 * tests/input.at (Invalid @n): Adjust.
13392
13393 2002-06-19 Zack Weinberg <zack@codesourcery.com>
13394
13395 * doc/bison.texinfo: Document ability to have multiple
13396 prologue sections.
13397
13398 2002-06-18 Akim Demaille <akim@epita.fr>
13399
13400 * src/files.c (compute_base_names): When computing the output file
13401 names from the input file name, strip the directory part.
13402
13403 2002-06-18 Akim Demaille <akim@epita.fr>
13404
13405 * data/bison.simple.new: Comment changes.
13406 Reported by Andreas Schwab.
13407
13408 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
13409
13410 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
13411 there are no `label `yyoverflowlab' defined but not used' warnings
13412 when yyoverflow is defined.
13413
13414 2002-06-18 Akim Demaille <akim@epita.fr>
13415
13416 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
13417 new member.
13418 (symbol_destructor_set): Adjust.
13419 * src/output.c (symbol_destructors_output): Output the destructor
13420 locations.
13421 Output the symbol name.
13422 * data/bison.simple (b4_symbol_destructor): Adjust.
13423
13424 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
13425 and Akim Demaille <akim@epita.fr>
13426
13427 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
13428 what's left on the stack when the error recovery hits EOF.
13429 * tests/actions.at (Destructors): Complete to exercise this case.
13430
13431 2002-06-17 Akim Demaille <akim@epita.fr>
13432
13433 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
13434 arguments is really empty, not only equal to `[]'.
13435 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
13436 member.
13437 (symbol_destructor_set): New.
13438 * src/output.c (symbol_destructors_output): New.
13439 * src/reader.h (brace_code_t, current_braced_code): New.
13440 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
13441 (handle_dollar): Rename as...
13442 (handle_action_dollar): this.
13443 (handle_destructor_dollar): New.
13444 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
13445 (grammar_declaration): Use it.
13446 * data/bison.simple (yystos): Is always defined.
13447 (yydestructor): New.
13448 * tests/actions.at (Destructors): New.
13449 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
13450
13451 2002-06-17 Akim Demaille <akim@epita.fr>
13452
13453 * src/symlist.h, src/symlist.c (symbol_list_length): New.
13454 * src/scan-gram.l (handle_dollar, handle_at): Compute the
13455 rule_length only when needed.
13456 * src/output.c (actions_output, token_definitions_output): Output
13457 the full M4 block.
13458 * src/symtab.c: Don't access directly to the symbol tag, use
13459 symbol_tag_get.
13460 * src/parse-gram.y: Use symbol_list_free.
13461
13462 2002-06-17 Akim Demaille <akim@epita.fr>
13463
13464 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
13465 (symbol_list_prepend, get_type_name): Move to...
13466 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
13467 (symbol_list_prepend, symbol_list_n_type_name_get): here.
13468 Adjust all callers.
13469 (symbol_list_free): New.
13470 * src/scan-gram.l (handle_dollar): Takes a location.
13471 * tests/input.at (Invalid $n): Adjust.
13472
13473 2002-06-17 Akim Demaille <akim@epita.fr>
13474
13475 * src/reader.h, src/reader.c (symbol_list_new): Export it.
13476 (symbol_list_prepend): New.
13477 * src/parse-gram.y (%union): `list' is a new member.
13478 (symbols.1): New, replaces...
13479 (terms_to_prec.1, nterms_to_type.1): these.
13480 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
13481 Take a location as additional argument.
13482 Adjust all callers.
13483
13484 2002-06-15 Akim Demaille <akim@epita.fr>
13485
13486 * src/parse-gram.y: Move %token in the declaration section so that
13487 we don't depend upon CVS Bison.
13488
13489 2002-06-15 Akim Demaille <akim@epita.fr>
13490
13491 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
13492 * src/print.c (print_core): Use it.
13493
13494 2002-06-15 Akim Demaille <akim@epita.fr>
13495
13496 * src/conflicts.c (log_resolution): Accept the rule involved in
13497 the sr conflicts instead of the lookahead number that points to
13498 that rule.
13499 (flush_reduce): Accept the current lookahead vector as argument,
13500 instead of the index in LA.
13501 (resolve_sr_conflict): Accept the current number of lookahead
13502 bitset to consider for the STATE, instead of the index in LA.
13503 (set_conflicts): Adjust.
13504 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
13505
13506 2002-06-15 Akim Demaille <akim@epita.fr>
13507
13508 * src/state.h (state_t): Replace the `lookaheadsp' member, a
13509 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
13510 Adjust all dependencies.
13511 * src/lalr.c (initialize_lookaheads): Split into...
13512 (states_lookaheads_count, states_lookaheads_initialize): these.
13513 (lalr): Adjust.
13514
13515 2002-06-15 Akim Demaille <akim@epita.fr>
13516
13517 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
13518 out of...
13519 (grammar_rules_print): here.
13520 * src/reduce.c (reduce_output): Use it.
13521 * tests/reduce.at (Useless Rules, Reduced Automaton)
13522 (Underivable Rules): Adjust.
13523
13524 2002-06-15 Akim Demaille <akim@epita.fr>
13525
13526 Copy BYacc's nice way to report the grammar.
13527
13528 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
13529 New.
13530 Don't print the rules' location, it is confusing and useless.
13531 (rule_print): Use grammar_rhs_print.
13532 * src/print.c (print_grammar): Use grammar_rules_print.
13533
13534 2002-06-15 Akim Demaille <akim@epita.fr>
13535
13536 Complete and rationalize `useless thing' warnings.
13537
13538 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
13539 (symbol_tag_print): New.
13540 Use them everywhere in place of accessing directly the tag member.
13541 * src/gram.h, src/gram.c (rule_print): New.
13542 Use it where a rule used to be printed `by hand'.
13543 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
13544 (reduce_grammar_tables): Report the useless rules.
13545 (reduce_print): Useless things are a warning, not an error.
13546 Report it as such.
13547 * tests/reduce.at (Useless Nonterminals, Useless Rules):
13548 (Reduced Automaton, Underivable Rules): Adjust.
13549 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
13550 * tests/conflicts.at (Unresolved SR Conflicts)
13551 (Solved SR Conflicts): Adjust.
13552
13553 2002-06-15 Akim Demaille <akim@epita.fr>
13554
13555 Let symbols have a location.
13556
13557 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
13558 (getsym): Adjust.
13559 Adjust all callers.
13560 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
13561 Use location_t, not int.
13562 * src/symtab.c (symbol_check_defined): Take advantage of the
13563 location.
13564 * tests/regression.at (Invalid inputs): Adjust.
13565
13566 2002-06-15 Akim Demaille <akim@epita.fr>
13567
13568 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
13569 (input): Don't try to initialize yylloc here, do it in the
13570 scanner.
13571 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
13572 * src/gram.h (rule_t): Change line and action_line into location
13573 and action_location, of location_t type.
13574 Adjust all dependencies.
13575 * src/location.h, src/location.c (empty_location): New.
13576 * src/reader.h, src/reader.c (grammar_start_symbol_set)
13577 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
13578 (grammar_current_rule_symbol_append)
13579 (grammar_current_rule_action_append): Expect a location as argument.
13580 * src/reader.c (grammar_midrule_action): Adjust to attach an
13581 action's location as dummy symbol location.
13582 * src/symtab.h, src/symtab.c (startsymbol_location): New.
13583 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
13584 the line numbers.
13585
13586 2002-06-14 Akim Demaille <akim@epita.fr>
13587
13588 Grammar declarations may be found in the grammar section.
13589
13590 * src/parse-gram.y (rules_or_grammar_declaration): New.
13591 (declarations): Each declaration may end with a semicolon, not
13592 just...
13593 (grammar_declaration): `"%union"'.
13594 (grammar): Branch to rules_or_grammar_declaration.
13595
13596 2002-06-14 Akim Demaille <akim@epita.fr>
13597
13598 * src/main.c (main): Invoke scanner_free.
13599
13600 2002-06-14 Akim Demaille <akim@epita.fr>
13601
13602 * src/output.c (m4_invoke): Extracted from...
13603 (output_skeleton): here.
13604 Free tempfile.
13605
13606 2002-06-14 Akim Demaille <akim@epita.fr>
13607
13608 * src/parse-gram.y (directives, directive, gram)
13609 (grammar_directives, precedence_directives, precedence_directive):
13610 Rename as...
13611 (declarations, declaration, grammar, grammar_declaration)
13612 (precedence_declaration, precedence_declarator): these.
13613 (symbol_declaration): New.
13614
13615 2002-06-14 Akim Demaille <akim@epita.fr>
13616
13617 * src/files.c (action_obstack): Remove, unused.
13618 (output_obstack): Remove it, and all its dependencies, as it is no
13619 longer needed.
13620 * src/reader.c (epilogue_set): Build the epilogue in the
13621 muscle_obstack.
13622 * src/output.h, src/output.c (muscle_obstack): Move to...
13623 * src/muscle_tab.h, src/muscle_tab.h: here.
13624 (muscle_init): Initialize muscle_obstack.
13625 (muscle_free): New.
13626 * src/main.c (main): Call it.
13627
13628 2002-06-14 Akim Demaille <akim@epita.fr>
13629
13630 * src/location.h: New, extracted from...
13631 * src/reader.h: here.
13632 * src/Makefile.am (noinst_HEADERS): Merge into
13633 (bison_SOURCES): this.
13634 Add location.h.
13635 * src/parse-gram.y: Use location_t instead of Bison's.
13636 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
13637 Use location_t instead of ints.
13638
13639 2002-06-14 Akim Demaille <akim@epita.fr>
13640
13641 * data/bison.simple, data/bison.c++: Be sure to restore the
13642 current #line when returning to the skeleton contents after having
13643 exposed the input file's #line.
13644
13645 2002-06-12 Akim Demaille <akim@epita.fr>
13646
13647 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
13648 eager.
13649 * tests/actions.at (Exotic Dollars): New.
13650
13651 2002-06-12 Akim Demaille <akim@epita.fr>
13652
13653 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
13654 ['"/] too eagerly.
13655 * tests/input.at (Torturing the Scanner): New.
13656
13657 2002-06-11 Akim Demaille <akim@epita.fr>
13658
13659 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
13660 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
13661 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
13662 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
13663 * src/reader.c (reader): Use it.
13664
13665 2002-06-11 Akim Demaille <akim@epita.fr>
13666
13667 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
13668 Adjust all callers.
13669 (scanner_last_string_free): New.
13670
13671 2002-06-11 Akim Demaille <akim@epita.fr>
13672
13673 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
13674 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
13675 (last_string, YY_OBS_FREE): New.
13676 Use them when returning an ID.
13677
13678 2002-06-11 Akim Demaille <akim@epita.fr>
13679
13680 Have Bison grammars parsed by a Bison grammar.
13681
13682 * src/reader.c, src/reader.h (prologue_augment): New.
13683 * src/reader.c (copy_definition): Remove.
13684
13685 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
13686 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
13687 (grammar_current_rule_prec_set, grammar_current_rule_check)
13688 (grammar_current_rule_symbol_append)
13689 (grammar_current_rule_action_append): Export.
13690 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
13691 (symbol_list_action_append): Remove.
13692 Hook the routines from reader.
13693 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
13694 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
13695
13696 * src/reader.c (read_declarations): Remove, unused.
13697
13698 * src/parse-gram.y: Handle the epilogue.
13699 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
13700 (grammar_start_symbol_set): this.
13701 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
13702 * src/reader.c (readgram): Remove, unused.
13703 (reader): Adjust to insert eoftoken and axiom where appropriate.
13704
13705 * src/reader.c (copy_dollar): Replace with...
13706 * src/scan-gram.h (handle_dollar): this.
13707 * src/parse-gram.y: Remove `%thong'.
13708
13709 * src/reader.c (copy_at): Replace with...
13710 * src/scan-gram.h (handle_at): this.
13711
13712 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
13713 New.
13714
13715 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
13716 time being.
13717
13718 * src/reader.h, src/reader.c (grammar_rule_end): New.
13719
13720 * src/parse.y (current_type, current_class): New.
13721 Implement `%nterm', `%token' support.
13722 Merge `%term' into `%token'.
13723 (string_as_id): New.
13724 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
13725 type name.
13726
13727 * src/parse-gram.y: Be sure to handle properly the beginning of
13728 rules.
13729
13730 * src/parse-gram.y: Handle %type.
13731 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
13732
13733 * src/parse-gram.y: More directives support.
13734 * src/options.c: No longer handle source directives.
13735
13736 * src/parse-gram.y: Fix %output.
13737
13738 * src/parse-gram.y: Handle %union.
13739 Use the prologue locations.
13740 * src/reader.c (parse_union_decl): Remove.
13741
13742 * src/reader.h, src/reader.c (epilogue_set): New.
13743 * src/parse-gram.y: Use it.
13744
13745 * data/bison.simple, data/bison.c++: b4_stype is now either not
13746 defined, then default to int, or to the contents of %union,
13747 without `union' itself.
13748 Adjust.
13749 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
13750
13751 * src/output.c (actions_output): Don't output braces, as they are
13752 already handled by the scanner.
13753
13754 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
13755 characters to themselves.
13756
13757 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
13758 that the epilogue has a proper #line.
13759
13760 * src/parse-gram.y: Handle precedence/associativity.
13761
13762 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
13763 a terminal.
13764 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
13765 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
13766 at all to define terminals that cannot be emitted.
13767
13768 * src/scan-gram.l: Escape M4 characters.
13769
13770 * src/scan-gram.l: Working properly with escapes in user
13771 strings/characters.
13772
13773 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
13774 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
13775 grammar.
13776 Use more modest sizes, as for the time being the parser does not
13777 release memory, and therefore the process swallows a huge amount
13778 of memory.
13779
13780 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
13781 stricter %token grammar.
13782
13783 * src/symtab.h (associativity): Add `undef_assoc'.
13784 (symbol_precedence_set): Do nothing when passed an undef_assoc.
13785 * src/symtab.c (symbol_check_alias_consistence): Adjust.
13786
13787 * tests/regression.at (Invalid %directive): Remove, as it is now
13788 meaningless.
13789 (Invalid inputs): Adjust to the new error messages.
13790 (Token definitions): The new grammar doesn't allow too many
13791 eccentricities.
13792
13793 * src/lex.h, src/lex.c: Remove.
13794 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
13795 (copy_character, copy_string2, copy_string, copy_identifier)
13796 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
13797 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
13798 (parse_action): Remove.
13799 * po/POTFILES.in: Adjust.
13800
13801 2002-06-11 Akim Demaille <akim@epita.fr>
13802
13803 * src/reader.c (parse_action): Don't store directly into the
13804 rule's action member: return the action as a string.
13805 Don't require `rule_length' as an argument: compute it.
13806 (grammar_current_rule_symbol_append)
13807 (grammar_current_rule_action_append): New, eved out from
13808 (readgram): here.
13809 Remove `action_flag', `rulelength', unused now.
13810
13811 2002-06-11 Akim Demaille <akim@epita.fr>
13812
13813 * src/reader.c (grammar_current_rule_prec_set).
13814 (grammar_current_rule_check): New, eved out from...
13815 (readgram): here.
13816 Remove `xaction', `first_rhs': useless.
13817 * tests/input.at (Type clashes): New.
13818 * tests/existing.at (GNU Cim Grammar): Adjust.
13819
13820 2002-06-11 Akim Demaille <akim@epita.fr>
13821
13822 * src/reader.c (grammar_midrule_action): New, Eved out from
13823 (readgram): here.
13824
13825 2002-06-11 Akim Demaille <akim@epita.fr>
13826
13827 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
13828 New.
13829 (readgram): Use them as replacement of inlined code, crule and
13830 crule1.
13831
13832 2002-06-11 Akim Demaille <akim@epita.fr>
13833
13834 * src/reader.c (grammar_end, grammar_symbol_append): New.
13835 (readgram): Use them.
13836 Make the use of `p' as local as possible.
13837
13838 2002-06-10 Akim Demaille <akim@epita.fr>
13839
13840 GCJ's parser requires the tokens to be defined before the prologue.
13841
13842 * data/bison.simple: Output the token definition before the user's
13843 prologue.
13844 * tests/regression.at (Braces parsing, Duplicate string)
13845 (Mixing %token styles): Check the output from bison.
13846 (Early token definitions): New.
13847
13848 2002-06-10 Akim Demaille <akim@epita.fr>
13849
13850 * src/symtab.c (symbol_user_token_number_set): Don't complain when
13851 assigning twice the same user number to a token, so that we can
13852 use it in...
13853 * src/lex.c (lex): here.
13854 Also use `symbol_class_set' instead of hand written code.
13855 * src/reader.c (parse_assoc_decl): Likewise.
13856
13857 2002-06-10 Akim Demaille <akim@epita.fr>
13858
13859 * src/symtab.c, src/symtab.c (symbol_class_set)
13860 (symbol_user_token_number_set): New.
13861 * src/reader.c (parse_token_decl): Use them.
13862 Use a switch instead of ifs.
13863 Use a single argument.
13864
13865 2002-06-10 Akim Demaille <akim@epita.fr>
13866
13867 Remove `%thong' support as it is undocumented, unused, duplicates
13868 `%token's job, and creates useless e-mail traffic with people who
13869 want to know what it is, why it is undocumented, unused, and
13870 duplicates `%token's job.
13871
13872 * src/reader.c (parse_thong_decl): Remove.
13873 * src/options.c (option_table): Remove "thong".
13874 * src/lex.h (tok_thong): Remove.
13875
13876 2002-06-10 Akim Demaille <akim@epita.fr>
13877
13878 * src/symtab.c, src/symtab.c (symbol_type_set)
13879 (symbol_precedence_set): New.
13880 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
13881 (value_components_used): Remove, unused.
13882
13883 2002-06-09 Akim Demaille <akim@epita.fr>
13884
13885 Move symbols handling code out of the reader.
13886
13887 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
13888 (axiom): Move to...
13889 * src/symtab.h, src/symtab.c: here.
13890
13891 * src/gram.c (start_symbol): Remove: use startsymbol->number.
13892 * src/reader.c (startval): Rename as...
13893 * src/symtab.h, src/symtab.c (startsymbol): this.
13894 * src/reader.c: Adjust.
13895
13896 * src/reader.c (symbol_check_defined, symbol_make_alias)
13897 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13898 (token_translations_init)
13899 Move to...
13900 * src/symtab.c: here.
13901 * src/reader.c (packsymbols): Move to...
13902 * src/symtab.h, src/symtab.c (symbols_pack): here.
13903 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
13904 argument.
13905
13906 2002-06-03 Akim Demaille <akim@epita.fr>
13907
13908 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
13909 then statements.
13910
13911 2002-06-03 Akim Demaille <akim@epita.fr>
13912
13913 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
13914 structs with non literals.
13915 * src/scan-skel.l: never-interactive.
13916 * src/conflicts.c (enum conflict_resolution_e): No trailing
13917 comma.
13918 * src/getargs.c (usage): Split long literal strings.
13919 Reported by Hans Aberg.
13920
13921 2002-05-28 Akim Demaille <akim@epita.fr>
13922
13923 * data/bison.c++: Use C++ ostreams.
13924 (cdebug_): New member.
13925
13926 2002-05-28 Akim Demaille <akim@epita.fr>
13927
13928 * src/output.c (output_skeleton): Be sure to allocate enough room
13929 for `/' _and_ for `\0' in full_skeleton.
13930
13931 2002-05-28 Akim Demaille <akim@epita.fr>
13932
13933 * data/bison.c++: Catch up with bison.simple:
13934 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13935 and Paul Eggert <eggert@twinsun.com>: `error' handing.
13936 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
13937 and popping traces.
13938
13939 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13940
13941 * src/output.c (output_skeleton): Put an explicit path in front of
13942 the skeleton file name, rather than relying on the -I directory,
13943 to partially alleviate effects of having a skeleton file lying around
13944 in the current directory.
13945
13946 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13947
13948 * src/conflicts.c (log_resolution): Correct typo:
13949 obstack_printf should be obstack_fgrow1.
13950
13951 2002-05-26 Akim Demaille <akim@epita.fr>
13952
13953 * src/state.h (state_t): `solved_conflicts' is a new member.
13954 * src/LR0.c (new_state): Set it to 0.
13955 * src/conflicts.h, src/conflicts.c (print_conflicts)
13956 (free_conflicts, solve_conflicts): Rename as...
13957 (conflicts_print, conflicts_free, conflicts_solve): these.
13958 Adjust callers.
13959 * src/conflicts.c (enum conflict_resolution_e)
13960 (solved_conflicts_obstack): New, used by...
13961 (log_resolution): this.
13962 Adjust to attach the conflict resolution to each state.
13963 Complete the description with the precedence/associativity
13964 information.
13965 (resolve_sr_conflict): Adjust.
13966 * src/print.c (print_state): Output its solved_conflicts.
13967 * tests/conflicts.at (Unresolved SR Conflicts)
13968 (Solved SR Conflicts): Exercise --report=all.
13969
13970 2002-05-26 Akim Demaille <akim@epita.fr>
13971
13972 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
13973 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13974 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
13975 (token_number_t, item_number_as_token_number)
13976 (token_number_as_item_number, muscle_insert_token_number_table):
13977 Rename as...
13978 (symbol_number_t, item_number_as_symbol_number)
13979 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
13980 these, since it is more appropriate.
13981
13982 2002-05-26 Akim Demaille <akim@epita.fr>
13983
13984 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
13985 `Error:' lines.
13986 * data/bison.simple (yystos) [YYDEBUG]: New.
13987 (yyparse) [YYDEBUG]: Display the symbols which are popped during
13988 error recovery.
13989 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
13990
13991 2002-05-25 Akim Demaille <akim@epita.fr>
13992
13993 * doc/bison.texinfo (Debugging): Split into...
13994 (Tracing): this new section, its former contents, and...
13995 (Understanding): this new section.
13996 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
13997 by...
13998 (report_flag): this.
13999 Adjust all dependencies.
14000 (report_args, report_types, report_argmatch): New.
14001 (usage, getargs): Report/support -r, --report.
14002 * src/options.h
14003 (struct option_table_struct): Rename as..,
14004 (struct option_table_s): this.
14005 Rename the `set_flag' member to `flag' to match with getopt_long's
14006 struct.
14007 * src/options.c (option_table): Split verbose into an entry for
14008 %verbose, and another for --verbose.
14009 Support --report/-r, so remove -r from the obsolete --raw.
14010 * src/print.c: Attach full item sets and lookaheads reports to
14011 report_flag instead of trace_flag.
14012 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
14013
14014 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14015 and Paul Eggert <eggert@twinsun.com>
14016
14017 * data/bison.simple (yyparse): Correct error handling to conform to
14018 POSIX and yacc. Specifically, after syntax error is discovered,
14019 do not reduce further before shifting the error token.
14020 Clean up the code a bit by removing the labels yyerrdefault,
14021 yyerrhandle, yyerrpop.
14022 * NEWS: Document the above.
14023
14024 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14025
14026 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
14027 type; it isn't always big enough, since it doesn't necessarily
14028 include non-terminals.
14029 (yytranslate): Expand definition of yy_token_number_type, so that
14030 the latter can be removed.
14031 (yy_token_number_type): Remove, only one use.
14032 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
14033 don't use TokenNumberType as element type.
14034
14035 * tests/regression.at: Modify expected output to agree with change
14036 to yyr1 and yytranslate.
14037
14038 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
14039
14040 * src/reader.c (parse_action): Use copy_character instead of
14041 obstack_1grow.
14042
14043 2002-05-13 Akim Demaille <akim@epita.fr>
14044
14045 * tests/regression.at (Token definitions): Prototype yylex and
14046 yyerror.
14047
14048 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14049
14050 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
14051 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
14052 32-bit arithmetic.
14053 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
14054
14055 2002-05-07 Akim Demaille <akim@epita.fr>
14056
14057 * tests/synclines.at: Be sure to prototype yylex and yyerror to
14058 avoid GCC warnings.
14059
14060 2002-05-07 Akim Demaille <akim@epita.fr>
14061
14062 Kill GCC warnings.
14063
14064 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
14065 over the RHS of each rule.
14066 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
14067 * src/state.h (state_t): Member `nitems' is unsigned short.
14068 * src/LR0.c (get_state): Adjust.
14069 * src/reader.c (packgram): Likewise.
14070 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
14071 `Type'.
14072 (muscle_insert_int_table): Remove, unused.
14073 (prepare_rules): Remove `max'.
14074
14075 2002-05-06 Akim Demaille <akim@epita.fr>
14076
14077 * src/closure.c (print_firsts): Display of the symbol tags.
14078 (bitmatrix_print): Move to...
14079 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
14080 here.
14081 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
14082
14083 2002-05-06 Akim Demaille <akim@epita.fr>
14084
14085 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
14086 hash_do_for_each.
14087
14088 2002-05-06 Akim Demaille <akim@epita.fr>
14089
14090 * src/LR0.c (new_state, get_state): Instead of using the global
14091 `kernel_size' and `kernel_base', have two new arguments:
14092 `core_size' and `core'.
14093 Adjust callers.
14094
14095 2002-05-06 Akim Demaille <akim@epita.fr>
14096
14097 * src/reader.c (packgram): No longer end `ritem' with a 0
14098 sentinel: it is not used.
14099
14100 2002-05-05 Akim Demaille <akim@epita.fr>
14101
14102 New experimental feature: display the lookaheads in the report and
14103 graph.
14104
14105 * src/print (print_core): When --trace-flag, display the rules
14106 lookaheads.
14107 * src/print_graph.c (print_core): Likewise.
14108 Swap the arguments.
14109 Adjust caller.
14110
14111 2002-05-05 Akim Demaille <akim@epita.fr>
14112
14113 * tests/torture.at (Many lookaheads): New test.
14114
14115 2002-05-05 Akim Demaille <akim@epita.fr>
14116
14117 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
14118 (GENERATE_MUSCLE_INSERT_TABLE): this.
14119 (output_int_table, output_unsigned_int_table, output_short_table)
14120 (output_token_number_table, output_item_number_table): Replace with...
14121 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
14122 (muscle_insert_short_table, muscle_insert_token_number_table)
14123 (muscle_insert_item_number_table): these.
14124 Adjust all callers.
14125 (prepare_tokens): Don't free `translations', since...
14126 * src/reader.h, src/reader.c (grammar_free): do it.
14127 Move to...
14128 * src/gram.h, src/gram.c (grammar_free): here.
14129 * data/bison.simple, data/bison.c++: b4_token_number_max is now
14130 b4_translate_max.
14131
14132 2002-05-05 Akim Demaille <akim@epita.fr>
14133
14134 * src/output.c (output_unsigned_int_table): New.
14135 (prepare_rules): `i' is unsigned.
14136 `prhs', `rline', `r2' are unsigned int.
14137 Rename muscle `rhs_number_max' as `rhs_max'.
14138 Output muscles `prhs_max', `rline_max', and `r2_max'.
14139 Free rline and r1.
14140 * data/bison.simple, data/bison.c++: Adjust to use these muscles
14141 to compute types instead of constant types.
14142 * tests/regression.at (Web2c Actions): Adjust.
14143
14144 2002-05-04 Akim Demaille <akim@epita.fr>
14145
14146 * src/symtab.h (SALIAS, SUNDEF): Rename as...
14147 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
14148 Adjust dependencies.
14149 * src/output.c (token_definitions_output): Be sure not to output a
14150 `#define 'a'' when fed with `%token 'a' "a"'.
14151 * tests/regression.at (Token definitions): New.
14152
14153 2002-05-03 Paul Eggert <eggert@twinsun.com>
14154
14155 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
14156 for K&R C.
14157
14158 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
14159
14160 * Makefile.am (SUBDIRS): Remove intl.
14161 (EXTRA_DIST): Add config/config.rpath.
14162
14163 2002-05-03 Akim Demaille <akim@epita.fr>
14164
14165 * data/bison.simple (m4_if): Don't output empty enums.
14166 And actually, output valid enum definitions :(.
14167
14168 2002-05-03 Akim Demaille <akim@epita.fr>
14169
14170 * configure.bat: Remove, completely obsolete.
14171 * Makefile.am (EXTRA_DIST): Adjust.
14172 Don't distribute config.rpath...
14173 * config/Makefile.am (EXTRA_DIST): Do it.
14174
14175 2002-05-03 Akim Demaille <akim@epita.fr>
14176
14177 * configure.in (GETTEXT_VERSION): New.
14178 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
14179
14180 2002-05-03 Akim Demaille <akim@epita.fr>
14181
14182 * data/bison.simple (b4_token_enum): New.
14183 (b4_token_defines): Use it to output tokens both as #define and
14184 enums.
14185 Suggested by Paul Eggert.
14186 * src/output.c (token_definitions_output): Don't output spurious
14187 white spaces.
14188
14189 2002-05-03 Akim Demaille <akim@epita.fr>
14190
14191 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14192
14193 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
14194
14195 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
14196 Update the stack class, give a try to deque as the default container.
14197
14198 2002-05-02 Akim Demaille <akim@epita.fr>
14199
14200 * data/bison.simple (yyparse): Do not implement @$ = @1.
14201 (YYLLOC_DEFAULT): Adjust to do it.
14202 * doc/bison.texinfo (Location Default Action): Fix.
14203
14204 2002-05-02 Akim Demaille <akim@epita.fr>
14205
14206 * src/reader.c (parse_braces): Merge into...
14207 (parse_action): this.
14208
14209 2002-05-02 Akim Demaille <akim@epita.fr>
14210
14211 * configure.in (ALL_LINGUAS): Remove.
14212 * po/LINGUAS, hr.po: New.
14213
14214 2002-05-02 Akim Demaille <akim@epita.fr>
14215
14216 Remove the so called hairy (semantic) parsers.
14217
14218 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
14219 * src/gram.h, src/gram.c (semantic_parser): Remove.
14220 (rule_t): Remove the guard and guard_line members.
14221 * src/lex.h (token_t): remove tok_guard.
14222 * src/options.c (option_table): Remove %guard and %semantic_parser
14223 support.
14224 * src/output.c, src/output.h (guards_output): Remove.
14225 (prepare): Adjust.
14226 (token_definitions_output): Don't output the `T'
14227 tokens (???).
14228 (output_skeleton): Don't output the guards.
14229 * src/files.c, src/files.c (attrsfile): Remove.
14230 * src/reader.c (symbol_list): Remove the guard and guard_line
14231 members.
14232 Adjust dependencies.
14233 (parse_guard): Remove.
14234 * data/bison.hairy: Remove.
14235 * doc/bison.texinfo (Environment Variables): Remove occurrences of
14236 BISON_HAIRY.
14237
14238 2002-05-02 Akim Demaille <akim@epita.fr>
14239
14240 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
14241 (parse_guard): Rename the formal argument `stack_offset' as
14242 `rule_length', which is more readable.
14243 Adjust callers.
14244 (copy_at, copy_dollar): Instead of outputting the hard coded
14245 values of $$, $n and so forth, output invocation to b4_lhs_value,
14246 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
14247 Note: this patch partially drops `semantic-parser' support: it
14248 always does `rule_length - n', where semantic parsers ought to
14249 always use `-n'.
14250 * data/bison.simple, data/bison.c++ (b4_lhs_value)
14251 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
14252
14253 2002-05-02 Akim Demaille <akim@epita.fr>
14254
14255 * configure.in (AC_INIT): Bump to 1.49b.
14256 (AM_INIT_AUTOMAKE): Short invocation.
14257
14258 2002-05-02 Akim Demaille <akim@epita.fr>
14259
14260 Version 1.49a.
14261
14262 2002-05-01 Akim Demaille <akim@epita.fr>
14263
14264 * src/skeleton.h: Remove.
14265
14266 2002-05-01 Akim Demaille <akim@epita.fr>
14267
14268 * src/skeleton.h: Fix the #endif.
14269 Reported by Magnus Fromreide.
14270
14271 2002-04-26 Paul Eggert <eggert@twinsun.com>
14272
14273 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
14274 Define if we define YYSTYPE and YYLTYPE, respectively.
14275 (YYCOPY): Fix [] quoting problem in the non-GCC case.
14276
14277 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
14278
14279 * src/scan-skel.l: Postprocess quadrigraphs.
14280
14281 * src/reader.c (copy_character): New function, used to output
14282 single characters while replacing `[' and `]' with quadrigraphs, to
14283 avoid troubles with M4 quotes.
14284 (copy_comment): Output characters with copy_character.
14285 (read_additionnal_code): Likewise.
14286 (copy_string2): Likewise.
14287 (copy_definition): Likewise.
14288
14289 * tests/calc.at: Exercise M4 quoting.
14290
14291 2002-04-25 Akim Demaille <akim@epita.fr>
14292
14293 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
14294 between `!' and the command.
14295 Reported by Paul Eggert.
14296
14297 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
14298
14299 * tests/calc.at: Exercise prologue splitting.
14300
14301 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
14302 `b4_post_prologue' instead of `b4_prologue'.
14303
14304 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
14305 muscles.
14306 (output): Free pre_prologue_obstack and post_prologue_obstack.
14307 * src/files.h, src/files.c (attrs_obstack): Remove.
14308 (pre_prologue_obstack, post_prologue_obstack): New.
14309 * src/reader.c (copy_definition): Add a parameter to specify the
14310 obstack to fill, instead of using attrs_obstack unconditionally.
14311 (read_declarations): Pass pre_prologue_obstack to copy_definition if
14312 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
14313
14314 2002-04-23 Paul Eggert <eggert@twinsun.com>
14315
14316 * data/bison.simple: Remove unnecessary commentary and white
14317 space differences from 1_29-branch.
14318 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
14319
14320 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
14321 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
14322 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
14323 constructors or destructors.
14324
14325 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
14326
14327 2002-04-23 Akim Demaille <akim@epita.fr>
14328
14329 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
14330 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
14331 location with columns.
14332 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
14333 All reported by Paul Eggert.
14334
14335 2002-04-22 Akim Demaille <akim@epita.fr>
14336
14337 * src/reduce.c (dump_grammar): Move to...
14338 * src/gram.h, src/gram.c (grammar_dump): here.
14339 Be sure to separate long item numbers.
14340 Don't read the members of a rule's prec if its nil.
14341
14342 2002-04-22 Akim Demaille <akim@epita.fr>
14343
14344 * src/output.c (table_size, table_grow): New.
14345 (MAXTABLE): Remove, replace uses with table_size.
14346 (pack_vector): Instead of dying when the table is too big, grow it.
14347
14348 2002-04-22 Akim Demaille <akim@epita.fr>
14349
14350 * data/bison.simple (yyr1): Its type is that of a token number.
14351 * data/bison.c++ (r1_): Likewise.
14352 * tests/regression.at (Web2c Actions): Adjust.
14353
14354 2002-04-22 Akim Demaille <akim@epita.fr>
14355
14356 * src/reader.c (token_translations_init): 256 is now the default
14357 value for the error token, i.e., it will be assigned another
14358 number if the user assigned 256 to one of her tokens.
14359 (reader): Don't force 256 to error.
14360 * doc/bison.texinfo (Symbols): Adjust.
14361 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
14362 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
14363 etc. instead of 10, 20, 30 (which was used to `jump' over error
14364 (256) and undefined (2)).
14365
14366 2002-04-22 Akim Demaille <akim@epita.fr>
14367
14368 Propagate more token_number_t.
14369
14370 * src/gram.h (token_number_as_item_number)
14371 (item_number_as_token_number): New.
14372 * src/output.c (GENERATE_OUTPUT_TABLE): New.
14373 Use it to create output_item_number_table and
14374 output_token_number_table.
14375 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
14376 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
14377 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
14378 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
14379
14380 2002-04-22 Akim Demaille <akim@epita.fr>
14381
14382 * src/output.h, src/output.c (get_lines_number): Remove.
14383
14384 2002-04-19 Akim Demaille <akim@epita.fr>
14385
14386 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
14387 as Lex/Flex'.
14388 (Debugging): More details about enabling the debugging features.
14389 (Table of Symbols): Describe $$, $n, @$, and @n.
14390 Suggested by Tim Josling.
14391
14392 2002-04-19 Akim Demaille <akim@epita.fr>
14393
14394 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
14395
14396 2002-04-10 Akim Demaille <akim@epita.fr>
14397
14398 * src/system.h: Rely on HAVE_LIMITS_H.
14399 Suggested by Paul Eggert.
14400
14401 2002-04-09 Akim Demaille <akim@epita.fr>
14402
14403 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
14404 full stderr, and strip it according to the bison options, instead
14405 of composing the error message from different bits.
14406 This makes it easier to check for several error messages.
14407 Adjust all the invocations.
14408 Add an invocation exercising the error token.
14409 Add an invocation demonstrating a stupid error message.
14410 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
14411 Adjust the tests.
14412 Error message are for stderr, not stdout.
14413
14414 2002-04-09 Akim Demaille <akim@epita.fr>
14415
14416 * src/gram.h, src/gram.c (error_token_number): Remove, use
14417 errtoken->number.
14418 * src/reader.c (reader): Don't specify the user token number (2)
14419 for $undefined, as it uselessly prevents using it.
14420 * src/gram.h (token_number_t): Move to...
14421 * src/symtab.h: here.
14422 (state_t.number): Is a token_number_t.
14423 * src/print.c, src/reader.c: Use undeftoken->number instead of
14424 hard coded 2.
14425 (Even though this 2 is not the same as above: the number of the
14426 undeftoken remains being 2, it is its user token number which
14427 might not be 2).
14428 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
14429 `user_token_number_max'.
14430 Output `undef_token_number'.
14431 * data/bison.simple, data/bison.c++: Use them.
14432 Be sure to map invalid yylex return values to
14433 `undef_token_number'. This saves us from gratuitous SEGV.
14434
14435 * tests/conflicts.at (Solved SR Conflicts)
14436 (Unresolved SR Conflicts): Adjust.
14437 * tests/regression.at (Web2c Actions): Adjust.
14438
14439 2002-04-08 Akim Demaille <akim@epita.fr>
14440
14441 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
14442 Adding #line.
14443 Remove the duplicate `typedefs'.
14444 (RhsNumberType): Fix the declaration and various other typos.
14445 Use __ofile__.
14446 * data/bison.simple: Use __ofile__.
14447 * src/scan-skel.l: Handle __ofile__.
14448
14449 2002-04-08 Akim Demaille <akim@epita.fr>
14450
14451 * src/gram.h (item_number_t): New, the type of item numbers in
14452 RITEM. Note that it must be able to code symbol numbers as
14453 positive number, and the negation of rule numbers as negative
14454 numbers.
14455 Adjust all dependencies (pretty many).
14456 * src/reduce.c (rule): Remove this `short *' pointer: use
14457 item_number_t.
14458 * src/system.h (MINSHORT, MAXSHORT): Remove.
14459 Include `limits.h'.
14460 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
14461 (shortcpy): Remove.
14462 (MAXTABLE): Move to...
14463 * src/output.c (MAXTABLE): here.
14464 (prepare_rules): Use output_int_table to output rhs.
14465 * data/bison.simple, data/bison.c++: Adjust.
14466 * tests/torture.at (Big triangle): Move the limit from 254 to
14467 500.
14468 * tests/regression.at (Web2c Actions): Ajust.
14469
14470 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
14471 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
14472 passes, but produces negative #line number, once fixed, GCC is
14473 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
14474 C), it passes.
14475 * src/state.h (state_h): Code input lines on ints, not shorts.
14476
14477 2002-04-08 Akim Demaille <akim@epita.fr>
14478
14479 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
14480 and then the grammar.
14481
14482 2002-04-08 Akim Demaille <akim@epita.fr>
14483
14484 * src/system.h: No longer using strndup.
14485
14486 2002-04-07 Akim Demaille <akim@epita.fr>
14487
14488 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
14489 * src/output.c (output_table_data): Return the longest number.
14490 (prepare_tokens): Output `token_number_max').
14491 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
14492 New.
14493 Use them to define yy_token_number_type/TokenNumberType.
14494 Use this type for yytranslate.
14495 * tests/torture.at (Big triangle): Push the limit from 124 to
14496 253.
14497 * tests/regression.at (Web2c Actions): Adjust.
14498
14499 2002-04-07 Akim Demaille <akim@epita.fr>
14500
14501 * tests/torture.at (Big triangle): New.
14502 (GNU AWK Grammar, GNU Cim Grammar): Move to...
14503 * tests/existing.at: here.
14504
14505 2002-04-07 Akim Demaille <akim@epita.fr>
14506
14507 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
14508 nritems.
14509 Adjust dependencies.
14510
14511 2002-04-07 Akim Demaille <akim@epita.fr>
14512
14513 * src/reader.c: Normalize increments to prefix form.
14514
14515 2002-04-07 Akim Demaille <akim@epita.fr>
14516
14517 * src/reader.c, symtab.c: Remove debugging code.
14518
14519 2002-04-07 Akim Demaille <akim@epita.fr>
14520
14521 Rename all the `bucket's as `symbol_t'.
14522
14523 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
14524 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
14525 * src/symtab.c, src/symtab.h (bucket): Rename as...
14526 (symbol_t): this.
14527 (symbol_list_new, bucket_check_defined, bucket_make_alias)
14528 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
14529 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14530 (buckets_new, buckets_free, buckets_do): Rename as...
14531 (symbol_list_new, symbol_check_defined, symbol_make_alias)
14532 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
14533 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
14534 (symbols_new, symbols_free, symbols_do): these.
14535
14536 2002-04-07 Akim Demaille <akim@epita.fr>
14537
14538 Use lib/hash for the symbol table.
14539
14540 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
14541 EOF.
14542 * src/lex.c (lex): Set the `number' member of new terminals.
14543 * src/reader.c (bucket_check_defined, bucket_make_alias)
14544 (bucket_check_alias_consistence, bucket_translation): New.
14545 (reader, grammar_free, readgram, token_translations_init)
14546 (packsymbols): Adjust.
14547 (reader): Number the predefined tokens.
14548 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
14549 for predefined tokens.
14550 * src/symtab.h (bucket): Remove all the hash table related
14551 members.
14552 * src/symtab.c (symtab): Replace by...
14553 (bucket_table): this.
14554 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
14555 (buckets_new, buckets_do): New.
14556
14557 2002-04-07 Akim Demaille <akim@epita.fr>
14558
14559 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
14560 (start_symbol, max_user_token_number, semantic_parser)
14561 (error_token_number): Initialize.
14562 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
14563 Initialize.
14564 (reader): Don't.
14565 (errtoken, eoftoken, undeftoken, axiom): Extern.
14566
14567 2002-04-07 Akim Demaille <akim@epita.fr>
14568
14569 * src/gram.h (rule_s): prec and precsym are now pointers
14570 to the bucket giving the priority/associativity.
14571 Member `associativity' removed: useless.
14572 * src/reduce.c, src/conflicts.c: Adjust.
14573
14574 2002-04-07 Akim Demaille <akim@epita.fr>
14575
14576 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
14577 Properly escape the symbols' TAG when outputting them.
14578
14579 2002-04-07 Akim Demaille <akim@epita.fr>
14580
14581 * src/lalr.h (LA): Is a bitsetv, not bitset*.
14582
14583 2002-04-07 Akim Demaille <akim@epita.fr>
14584
14585 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
14586 (LArule): this, which is an array to rule_t*.
14587 * src/print.c, src/conflicts.c: Adjust.
14588
14589 2002-04-07 Akim Demaille <akim@epita.fr>
14590
14591 * src/gram.h (rule_t): Rename `number' as `user_number'.
14592 `number' is a new member.
14593 Adjust dependencies.
14594 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
14595
14596 2002-04-07 Akim Demaille <akim@epita.fr>
14597
14598 As a result of the previous patch, it is no longer needed
14599 to reorder ritem itself.
14600
14601 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
14602
14603 2002-04-07 Akim Demaille <akim@epita.fr>
14604
14605 Be sure never to walk through RITEMS, but use only data related to
14606 the rules themselves. RITEMS should be banished.
14607
14608 * src/output.c (output_token_translations): Rename as...
14609 (prepare_tokens): this.
14610 In addition to `translate', prepare the muscles `tname' and
14611 `toknum', which were handled by...
14612 (output_rule_data): this.
14613 Remove, and move the remainder of its outputs into...
14614 (prepare_rules): this new routines, which also merges content from
14615 (output_gram): this.
14616 (prepare_rules): Be sure never to walk through RITEMS.
14617 (output_stos): Rename as...
14618 (prepare_stos): this.
14619 (output): Always invoke prepare_states, after all, just don't use it
14620 in the output if you don't need it.
14621
14622 2002-04-07 Akim Demaille <akim@epita.fr>
14623
14624 * src/LR0.c (new_state): Display `nstates' as the name of the
14625 newly created state.
14626 Adjust to initialize first_state and last_state if needed.
14627 Be sure to distinguish the initial from the final state.
14628 (new_states): Create the itemset of the initial state, and use
14629 new_state.
14630 * src/closure.c (closure): Now that the initial state has its
14631 items properly set, there is no need for a special case when
14632 creating `ruleset'.
14633
14634 As a result, now the rule 0, reducing to $axiom, is visible in the
14635 outputs. Adjust the test suite.
14636
14637 * tests/conflicts.at (Solved SR Conflicts)
14638 (Unresolved SR Conflicts): Adjust.
14639 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
14640 * tests/conflicts.at (S/R in initial): New.
14641
14642 2002-04-07 Akim Demaille <akim@epita.fr>
14643
14644 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
14645 the RHS of the rules.
14646 * src/output.c (output_gram): Likewise.
14647
14648 2002-04-07 Akim Demaille <akim@epita.fr>
14649
14650 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
14651 bucket.
14652 Adjust all dependencies.
14653 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
14654 `number' of the buckets too.
14655 * src/gram.h: Include `symtab.h'.
14656 (associativity): Move to...
14657 * src/symtab.h: here.
14658 No longer include `gram.h'.
14659
14660 2002-04-07 Akim Demaille <akim@epita.fr>
14661
14662 * src/gram.h, src/gram.c (rules_rhs_length): New.
14663 (ritem_longest_rhs): Use it.
14664 * src/gram.h (rule_t): `number' is a new member.
14665 * src/reader.c (packgram): Set it.
14666 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
14667 the end of `rules', and count them out of `nrules'.
14668 (reduce_output, dump_grammar): Adjust.
14669 * src/print.c (print_grammar): It is no longer needed to check for
14670 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
14671 * tests/reduce.at (Reduced Automaton): New test.
14672
14673 2002-04-07 Akim Demaille <akim@epita.fr>
14674
14675 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
14676 lacking `+ 1' to nrules, Bison reported as useless a token if it
14677 was used solely to set the precedence of the last rule...
14678
14679 2002-04-07 Akim Demaille <akim@epita.fr>
14680
14681 * data/bison.c++, data/bison.simple: Don't output the current file
14682 name in #line, to avoid useless diffs between two identical
14683 outputs under different names.
14684
14685 2002-04-07 Akim Demaille <akim@epita.fr>
14686
14687 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
14688 Normalize loops to using `< nrules + 1', not `<= nrules'.
14689
14690 2002-04-07 Akim Demaille <akim@epita.fr>
14691
14692 * TODO: Update.
14693
14694 2002-04-07 Akim Demaille <akim@epita.fr>
14695
14696 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
14697 bucket.value as bucket.number.
14698
14699 2002-04-07 Akim Demaille <akim@epita.fr>
14700
14701 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
14702 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
14703 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
14704 RHS, instead of being an index in RITEMS.
14705
14706 2002-04-04 Paul Eggert <eggert@twinsun.com>
14707
14708 * doc/bison.texinfo: Update copyright date.
14709 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
14710 (Symbols): Warn about running Bison in one character set,
14711 but compiling and/or running in an incompatible one.
14712 Warn about character code 256, too.
14713
14714 2002-04-03 Paul Eggert <eggert@twinsun.com>
14715
14716 * src/bison.data (YYSTACK_ALLOC): Depend on whether
14717 YYERROR_VERBOSE is nonzero, not whether it is defined.
14718
14719 Merge changes from bison-1_29-branch.
14720
14721 2002-03-20 Paul Eggert <eggert@twinsun.com>
14722
14723 Merge fixes from Debian bison_1.34-1.diff.
14724
14725 * configure.in (AC_PREREQ): 2.53.
14726
14727 2002-03-20 Akim Demaille <akim@epita.fr>
14728
14729 * src/conflicts.c (log_resolution): Argument `resolution' is const.
14730
14731 2002-03-19 Paul Eggert <eggert@twinsun.com>
14732
14733 * src/bison.simple (YYCOPY): New macro.
14734 (YYSTACK_RELOCATE): Use it.
14735 Remove Type arg; no longer needed. All callers changed.
14736 (yymemcpy): Remove; no longer needed.
14737
14738 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
14739 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14740
14741 2002-03-19 Akim Demaille <akim@epita.fr>
14742
14743 Test and fix the #line outputs.
14744
14745 * tests/atlocal.at (GCC): New.
14746 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
14747 (Prologue synch line, %union synch line, Postprologue synch line)
14748 (Action synch line, Epilogue synch line): New tests.
14749 * src/reader.c (parse_union_decl): Define the muscle stype_line.
14750 * data/bison.simple, data/bison.c++: Use it.
14751
14752 2002-03-19 Akim Demaille <akim@epita.fr>
14753
14754 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
14755 (Solved SR Conflicts, %expect not enough, %expect right)
14756 (%expect too much): Move to...
14757 * tests/conflicts.at: this new file.
14758
14759 2002-03-19 Akim Demaille <akim@epita.fr>
14760
14761 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
14762 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
14763 that we can move to enums for instance.
14764 * src/output.c (token_definitions_output): Output a list of
14765 `token-name, token-number' instead of the #define.
14766 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
14767
14768 2002-03-14 Akim Demaille <akim@epita.fr>
14769
14770 Use Gettext 0.11.1.
14771
14772 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
14773
14774 * data/bison.c++: Make the user able to add members to the generated
14775 parser by subclassing.
14776
14777 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
14778
14779 * src/reader.c (read_additionnal_code): `c' should be an integer, not
14780 a character.
14781 Reported by Nicolas Tisserand and Nicolas Burrus.
14782
14783 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14784
14785 * src/reader.c: Warn about lacking semi-colons, do not complain.
14786
14787 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14788
14789 * data/bison.c++: Remove a debug line.
14790
14791 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
14792
14793 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
14794 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
14795 provide a default implementation.
14796
14797 2002-03-04 Akim Demaille <akim@epita.fr>
14798
14799 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
14800 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
14801 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
14802 * tests/semantic.at (Parsing Guards): Similarly.
14803 * src/reader.at (readgram): Complain if the last rule is not ended
14804 with a semi-colon.
14805
14806 2002-03-04 Akim Demaille <akim@epita.fr>
14807
14808 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
14809 * src/closure.c: here.
14810 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
14811 RTC.
14812 * src/warshall.h, src/warshall.c: Remove.
14813 * tests/sets.at (Broken Closure): Adjust.
14814
14815 2002-03-04 Akim Demaille <akim@epita.fr>
14816
14817 * src/output.c (output_skeleton): tempdir is const.
14818 bytes_read is unused.
14819
14820 2002-03-04 Akim Demaille <akim@epita.fr>
14821
14822 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14823 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
14824 Update.
14825 From Michael Hayes.
14826
14827 2002-03-04 Akim Demaille <akim@epita.fr>
14828
14829 * src/closure.c (closure): `r' is unused.
14830
14831 2002-03-04 Akim Demaille <akim@epita.fr>
14832
14833 * tests/sets.at (Broken Closure): Add the ending `;'.
14834 * src/reader.at (readgram): Complain if a rule is not ended with a
14835 semi-colon.
14836
14837 2002-03-04 Akim Demaille <akim@epita.fr>
14838
14839 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
14840 (count_sr_conflicts): Use bitset_count.
14841 * src/reduce.c (inaccessable_symbols): Ditto.
14842 (bits_size): Remove.
14843 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14844
14845 2002-03-04 Akim Demaille <akim@epita.fr>
14846
14847 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
14848 * src/reduce.c: Remove the `bitset_zero's following the
14849 `bitset_create's, as now it is performed by the latter.
14850
14851 2002-03-04 Akim Demaille <akim@epita.fr>
14852
14853 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
14854 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
14855 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
14856 latest sources from Michael.
14857
14858 2002-03-04 Akim Demaille <akim@epita.fr>
14859
14860 * src/output.c (output): Don't free the grammar.
14861 * src/reader.c (grammar_free): New.
14862 * src/main.c (main): Call it and don't free symtab here.
14863
14864 2002-03-04 Akim Demaille <akim@epita.fr>
14865
14866 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
14867 before returning.
14868 Reported by Benoit Perrot.
14869
14870 2002-03-04 Akim Demaille <akim@epita.fr>
14871
14872 Use bitset operations when possible, not loops over bits.
14873
14874 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
14875 bitset_or.
14876 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
14877 * src/reduce.c (useless_nonterminals): Formatting changes.
14878 * src/warshall.c (TC): Use bitset_or.
14879
14880 2002-03-04 Akim Demaille <akim@epita.fr>
14881
14882 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
14883 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
14884 Ditto.
14885
14886 2002-03-04 Akim Demaille <akim@epita.fr>
14887
14888 * src/lalr.c (F): Now a bitset*.
14889 Adjust all dependencies.
14890
14891 2002-03-04 Akim Demaille <akim@epita.fr>
14892
14893 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
14894 Adjust all dependencies.
14895
14896 2002-03-04 Akim Demaille <akim@epita.fr>
14897
14898 * src/L0.c, src/LR0.h (nstates): Be size_t.
14899 Adjust comparisons (signed vs unsigned).
14900 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
14901 bitset*.
14902 Adjust all dependencies.
14903
14904 2002-03-04 Akim Demaille <akim@epita.fr>
14905
14906 * src/closure.c (firsts): Now, also a bitset.
14907 Adjust all dependencies.
14908 (varsetsize): Remove, now unused.
14909 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
14910
14911 2002-03-04 Akim Demaille <akim@epita.fr>
14912
14913 * src/print.c: Convert to use bitset.h, not hand coded iterations
14914 over ints.
14915
14916 2002-03-04 Akim Demaille <akim@epita.fr>
14917
14918 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
14919
14920 2002-03-04 Akim Demaille <akim@epita.fr>
14921
14922 * src/closure.c (ruleset): Be a bitset.
14923 (rulesetsize): Remove.
14924
14925 2002-03-04 Akim Demaille <akim@epita.fr>
14926
14927 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
14928 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
14929 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
14930 * src/closure.c (fderives): Be an array of bitsets.
14931
14932 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
14933
14934 * data/bison.c++: Merge the two generated headers. Insert a copyright
14935 notice in each output file.
14936
14937 2002-02-28 Akim Demaille <akim@epita.fr>
14938
14939 * data/bison.c++: Copy the prologue of bison.simple to fetch
14940 useful M4 definitions, such as b4_header_guard.
14941
14942 2002-02-25 Akim Demaille <akim@epita.fr>
14943
14944 * src/getargs.c (version): Give the name of the authors, and use a
14945 translator friendly scheme for the bgr
14946 copyright notice.
14947
14948 2002-02-25 Akim Demaille <akim@epita.fr>
14949
14950 * src/output.c (header_output): Remove, now handled completely via
14951 M4.
14952
14953 2002-02-25 Akim Demaille <akim@epita.fr>
14954
14955 * m4/m4.m4: New, from CVS Autoconf.
14956 * configure.in: Invoke it.
14957 * src/output.c (output_skeleton): Use its result instead of the
14958 hard coded name.
14959
14960 2002-02-25 Akim Demaille <akim@epita.fr>
14961
14962 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
14963 Fileutils 4.1.5.
14964 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
14965 * src/output.c (output_skeleton): Use mkstemp to create a real
14966 temporary file.
14967 Move the filling of `skeleton' and its muscle to...
14968 (prepare): here.
14969 (output): Move the definition of the prologue muscle to...
14970 (prepare): here.
14971 * src/system.h (DEFAULT_TMPDIR): New.
14972
14973 2002-02-14 Paul Eggert <eggert@twinsun.com>
14974
14975 Remove the support for C++ namespace cleanliness; it was
14976 causing more problems than it was curing, since it didn't work
14977 properly on some nonstandard C++ compilers. This can wait
14978 for a proper C++ parser.
14979
14980 * NEWS: Document this.
14981 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
14982 of C++, as it's treated like C now.
14983 * src/bison.simple (YYSTD): Remove.
14984 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
14985 Treat C++ just like Standard C instead of trying to support
14986 namespace cleanliness.
14987
14988 2002-02-14 Akim Demaille <akim@epita.fr>
14989
14990 * tests/regression.at (else): Adjust to Andreas' change.
14991
14992 2002-02-14 Akim Demaille <akim@epita.fr>
14993
14994 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
14995
14996 2002-02-13 Andreas Schwab <schwab@suse.de>
14997
14998 * src/output.c (output_rule_data): Don't output NULL, it might
14999 not be defined yet.
15000
15001 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
15002
15003 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
15004 (Copyright notice): Update.
15005
15006 2002-02-11 Akim Demaille <akim@epita.fr>
15007
15008 * tests/regression.at (%nonassoc and eof): Don't include
15009 nonportable headers.
15010
15011 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
15012
15013 * data/bison.c++: Correct error recovery. Make the user able to
15014 initialize the starting location.
15015
15016 2002-02-07 Akim Demaille <akim@epita.fr>
15017
15018 * tests/input.at: New.
15019
15020 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15021
15022 * data/bison.c++: Replace some direct m4 expansions by constants. Be
15023 more consistent when naming methods and variables. Put preprocessor
15024 directives around tables only needed for debugging.
15025
15026 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15027
15028 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
15029 C++ parsers.
15030 (yy::b4_name::parse): Use print_.
15031
15032 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15033
15034 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
15035
15036 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
15037
15038 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
15039 C++ parsers.
15040 (yy::b4_name::parse): Build verbose error messages, and use error_.
15041
15042 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15043
15044 * data/bison.c++: Fix m4 quoting in comments.
15045
15046 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
15047
15048 * data/bison.c++: Adjust the parser code. Fix some muscles that were
15049 not expanded by m4.
15050
15051 2002-02-05 Akim Demaille <akim@epita.fr>
15052
15053 * data/bison.c++: Adjust to the M4 back end.
15054 More is certainly needed.
15055
15056 2002-02-05 Akim Demaille <akim@epita.fr>
15057
15058 Give a try to M4 as a back end.
15059
15060 * lib/readpipe.c: New, from wdiff.
15061 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
15062 BISON_HAIRY.
15063 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
15064 specific values. Now it is m4 that performs the lookup.
15065 * src/parse-skel.y: Remove.
15066 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
15067 * src/output.c (actions_output, guards_output)
15068 (token_definitions_output): No longer keeps track of the output
15069 line number, hence remove the second argument.
15070 (guards_output): Check against the guard member of a rule, not the
15071 action member.
15072 Adjust callers.
15073 (output_skeleton): Don't look for the skeleton location, let m4 do
15074 that.
15075 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
15076 file will be used.
15077 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
15078 (prepare): Given that for the time being changesyntax is not
15079 usable in M4, rename the muscles using `-' to `_'.
15080 Define `defines_flag', `output_parser_name' and `output_header_name'.
15081 * src/output.h (actions_output, guards_output)
15082 (token_definitions_output): Adjust prototypes.
15083 * src/scan-skel.l: Instead of scanning the skeletons, it now
15084 processes the output of m4: `__oline__' and `#output'.
15085 * data/bison.simple: Adjust to be used by M4(sugar).
15086 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
15087 to date.
15088 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
15089 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
15090 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
15091 shamelessly stolen from CVS Autoconf.
15092
15093 2002-02-05 Akim Demaille <akim@epita.fr>
15094
15095 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
15096 * configure.in: Check for the declarations of free and malloc.
15097 * src/muscle_tab.c: Adjust.
15098
15099 2002-02-05 Akim Demaille <akim@epita.fr>
15100
15101 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
15102 which have no values.
15103
15104 2002-02-05 Akim Demaille <akim@epita.fr>
15105
15106 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
15107 * data/: here.
15108
15109 2002-01-29 Paul Eggert <eggert@twinsun.com>
15110
15111 * src/bison.simple (YYSIZE_T): Do not define merely because
15112 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
15113 On some platforms, <alloca.h> does not declare YYSTD (size_t).
15114
15115 2002-01-27 Akim Demaille <akim@epita.fr>
15116
15117 Fix `%nonassoc and eof'.
15118
15119 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
15120 which were not properly copied! Replace
15121 memcpy (res->errs, src->errs, src->nerrs);
15122 with
15123 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
15124 !!!
15125 * tests/regression.at (%nonassoc and eof): Adjust to newest
15126 Autotest: `.' is not in the PATH.
15127
15128 2002-01-27 Akim Demaille <akim@epita.fr>
15129
15130 * tests/sets.at (AT_EXTRACT_SETS): New.
15131 (Nullable): Use it.
15132 (Firsts): New.
15133
15134 2002-01-26 Akim Demaille <akim@epita.fr>
15135
15136 * tests/actions.at, tests/calc.at, tests/headers.at,
15137 * tests/torture.at: Adjust to the newest Autotest which no longer
15138 forces `.' in the PATH.
15139
15140 2002-01-25 Akim Demaille <akim@epita.fr>
15141
15142 * tests/regression.at (%nonassoc and eof): New.
15143 Suggested by Robert Anisko.
15144
15145 2002-01-24 Akim Demaille <akim@epita.fr>
15146
15147 Bison dumps core when trying to complain about broken input files.
15148 Reported by Cris van Pelt.
15149
15150 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
15151 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
15152 into...
15153 (Invalid inputs): Strengthen: exercise parse_percent_token.
15154
15155 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
15156
15157 * src/Makefile.am: Add bison.c++.
15158 * src/bison.c++: New skeleton.
15159
15160 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
15161
15162 * po/it.po: New.
15163
15164 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
15165
15166 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
15167
15168 2002-01-20 Marc Autret <marc@gnu.org>
15169
15170 * src/files.c (compute_output_file_names): Fix
15171
15172 2002-01-20 Marc Autret <marc@gnu.org>
15173
15174 * tests/output.at: New test.
15175 * src/files.c (compute_base_names): Don't map extensions when
15176 the YACC flag is set, use defaults.
15177 Reported by Evgeny Stambulchik.
15178
15179 2002-01-20 Marc Autret <marc@gnu.org>
15180
15181 * src/system.h: Need to define __attribute__ away for non-GCC
15182 compilers as well (i.e., the vendor C compiler).
15183 Suggested by Albert Chin-A-Young.
15184
15185 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
15186
15187 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
15188 canonical definition.
15189 * src/system.h: Use the canonical definition for PARAMS (avoids
15190 a conflict with the macro from lib/hash.h).
15191
15192 2002-01-11 Akim Demaille <akim@epita.fr>
15193
15194 * configure.in: Use AC_FUNC_STRNLEN.
15195 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
15196
15197 2002-01-09 Akim Demaille <akim@epita.fr>
15198
15199 * src/files.c, src/files.h (output_infix): New.
15200 (tab_extension): Remove.
15201 (compute_base_names): Compute the former, drop the latter.
15202 * src/output.c (prepare): Insert the muscles `output-infix', and
15203 `output-suffix'.
15204 * src/parse-skel.y (string, string.1): New.
15205 (section.header): Use it.
15206 (section.yacc): Remove.
15207 (prefix): Remove too.
15208 * src/scan-skel.l: Adjust.
15209 * src/bison.simple, src/bison.hairy: Adjust.
15210
15211 2002-01-09 Akim Demaille <akim@epita.fr>
15212
15213 * configure.in (WERROR_CFLAGS): Compute it.
15214 * src/Makefile.am (CFLAGS): Pass it.
15215 * tests/atlocal.in (CFLAGS): Idem.
15216 * src/files.c: Fix a few warnings.
15217 (get_extension_index): Remove, unused.
15218
15219 2002-01-08 Akim Demaille <akim@epita.fr>
15220
15221 * src/getargs.c (AS_FILE_NAME): New.
15222 (getargs): Use it to convert DOSish file names.
15223 * src/files.c (base_name): Rename as full_base_name to avoid
15224 clashes with `base_name ()'.
15225 (filename_split): New.
15226 (compute_base_names): N-th rewrite, using filename_split.
15227
15228 2002-01-08 Akim Demaille <akim@epita.fr>
15229
15230 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
15231 New, stolen from the Fileutils 4.1.
15232 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15233 * configure.in: Check for the presence of memrchr, and of its
15234 prototype.
15235
15236 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
15237
15238 * lib/hash.h (__P): Added definition for this macro.
15239 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
15240 BUILT_SOURCES, to ensure they are generated first.
15241 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
15242 %error-verbose to allow bootstrapping with bison 1.30x.
15243
15244 2002-01-06 Akim Demaille <akim@epita.fr>
15245
15246 * src/reader.c (parse_braces): Don't fetch the next char, the
15247 convention is to fetch on entry.
15248 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
15249 'switch' without a following semicolon.
15250 * tests/regression.at (braces parsing): New.
15251
15252 2002-01-06 Akim Demaille <akim@epita.fr>
15253
15254 Bison is dead wrong in its RR conflict reports.
15255
15256 * tests/torture.at (GNU Cim Grammar): New.
15257 * src/conflicts.c (count_rr_conflicts): Fix.
15258
15259 2002-01-06 Akim Demaille <akim@epita.fr>
15260
15261 Creating package.m4 from configure.ac causes too many problems.
15262
15263 * tests/Makefile.am (package.m4): Create it by hand,
15264 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
15265
15266 2002-01-06 Akim Demaille <akim@epita.fr>
15267
15268 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
15269 skeleton.h.
15270
15271 2002-01-04 Paul Eggert <eggert@twinsun.com>
15272
15273 * doc/bison.texinfo (Debugging):
15274 Remove YYSTDERR; it's no longer defined or used.
15275 Also, s/cstdio.h/cstdio/.
15276
15277 2002-01-03 Akim Demaille <akim@epita.fr>
15278
15279 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
15280
15281 2002-01-03 Akim Demaille <akim@epita.fr>
15282
15283 * src/parse-skel.y (process_skeleton): Don't bind the parser's
15284 tracing code to --trace, wait for a better --trace option, with
15285 args.
15286
15287 2002-01-03 Akim Demaille <akim@epita.fr>
15288
15289 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
15290 The ISO C++ standard is extremely clear about it: stderr is
15291 considered a macro, not a regular symbol (see table 94 `Header
15292 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
15293 Therefore std:: does not apply to it. It still does with fprintf.
15294 Also, s/cstdio.h/cstdio/.
15295
15296 2002-01-03 Akim Demaille <akim@epita.fr>
15297
15298 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
15299 for non system headers.
15300
15301 2002-01-02 Akim Demaille <akim@epita.fr>
15302
15303 Equip the skeleton chain with location tracking, runtime trace,
15304 pure parser and scanner.
15305
15306 * src/parse-skel.y: Request a pure parser, locations, and prefix
15307 renaming.
15308 (%union): Having several members with the same type does not help
15309 type mismatches, simplify.
15310 (YYPRINT, yyprint): New.
15311 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
15312 (skel_error): this.
15313 Handle locations.
15314 * src/scan-skel.l: Adjust to these changes.
15315 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
15316 (LOCATION_PRINT, skel_control_t): New.
15317
15318 2001-12-30 Akim Demaille <akim@epita.fr>
15319
15320 * src/parse-skel.y: Get rid of the shift/reduce conflict:
15321 replace `gb' with BLANKS.
15322 * src/scan-skel.l: Adjust.
15323
15324 2001-12-30 Akim Demaille <akim@epita.fr>
15325
15326 * src/system.h: We don't need nor want bcopy.
15327 Throw away MS-DOS crap: we don't need getpid.
15328 * configure.in: We don't need strndup. It was even causing
15329 problems: because Flex includes the headers *before* us,
15330 _GNU_SOURCE is not defined by config.h, and therefore strndup was
15331 not visible.
15332 * lib/xstrndup.c: New.
15333 * src/scan-skel.l: Use it.
15334 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
15335 * src/parse-skel.y: Use %directives instead of #defines.
15336
15337 2001-12-30 Akim Demaille <akim@epita.fr>
15338
15339 * src/skeleton.h: New.
15340 * src/output.c (output_parser, output_master_parser): Remove, dead
15341 code.
15342 * src/output.h (get_lines_number, actions_output, guards_output)
15343 (token_definitions_output): Prototype them.
15344 * src/parse-skel.y: Add the license notice.
15345 Include output.h and skeleton.h.
15346 (process_skeleton): Returns void, and takes a single parameter.
15347 * src/scan-skel.l: Add the license notice.
15348 Include skeleton.h.
15349 Don't use %option yylineno: it seems that then Flex imagines
15350 REJECT has been used, and therefore it won't reallocate its
15351 buffers (which makes no other sense to me than a bug). It results
15352 in warnings for `unused: yy_flex_realloc'.
15353
15354 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
15355
15356 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15357 (MUSCLE_INSERT_PREFIX): ...to there.
15358 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
15359 (MUSCLE_INSERT_PREFIX): Move from here...
15360
15361 * src/bison.hairy: Add a section directive. Put braces around muscle
15362 names. This parser skeleton is still broken, but Bison should not
15363 choke on a bad muscle 'syntax'.
15364 * src/bison.simple: Add a section directive. Put braces around muscle
15365 names.
15366
15367 * src/files.h (strsuffix, stringappend): Add declarations.
15368 (tab_extension): Add declaration.
15369 (short_base_name): Add declaration.
15370
15371 * src/files.c (strsuffix, stringappend): No longer static. These
15372 functions are used in the skeleton parser.
15373 (tab_extension): New.
15374 (compute_base_names): Use the computations done in this function
15375 to guess if the generated parsers should have '.tab' in their
15376 names.
15377 (short_base_name): No longer static.
15378
15379 * src/output.c (output_skeleton): New.
15380 (output): Disable call to output_master_parser, and give a try to
15381 a new skeleton handling system.
15382 (guards_output, actions_output): No longer static.
15383 (token_definitions_output, get_lines_number): No longer static.
15384
15385 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
15386
15387 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
15388 parse-skel.y.
15389
15390 * src/parse-skel.y: New file.
15391 * src/scan-skel.l: New file.
15392
15393 2001-12-29 Akim Demaille <akim@epita.fr>
15394
15395 %name-prefix is broken.
15396
15397 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
15398 Adjust all dependencies.
15399 * tests/headers.at (export YYLTYPE): Strengthen this test: use
15400 %name-prefix.
15401
15402 Renaming yylval but not yylloc is not consistent. Now we do.
15403
15404 * src/bison.simple: Prefix yylloc if used.
15405 * doc/bison.texinfo (Decl Summary): Document that.
15406
15407 2001-12-29 Akim Demaille <akim@epita.fr>
15408
15409 * doc/bison.texinfo: Promote `%long-directive' over
15410 `%long_directive'.
15411 Remove all references to fixed-output-files, yacc is enough.
15412
15413 2001-12-29 Akim Demaille <akim@epita.fr>
15414
15415 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
15416 user prologue. These are defaults.
15417 * tests/actions.at (Mid-rule actions): Make sure the user can
15418 define YYDEBUG and YYERROR_VERBOSE.
15419
15420 2001-12-29 Akim Demaille <akim@epita.fr>
15421
15422 * src/output.c (header_output): Don't forget to export YYLTYPE and
15423 yylloc.
15424 * tests/headers.at (export YYLTYPE): New, make sure it does.
15425 * tests/regression.at (%union and --defines, Invalid CPP headers):
15426 Move to...
15427 * tests/headers.at: here.
15428
15429 2001-12-29 Akim Demaille <akim@epita.fr>
15430
15431 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
15432
15433 2001-12-29 Akim Demaille <akim@epita.fr>
15434
15435 * tests/actions.at (Mid-rule actions): Output on a single line
15436 instead of several.
15437
15438 2001-12-29 Akim Demaille <akim@epita.fr>
15439
15440 * doc/bison.texinfo: Formatting changes.
15441
15442 2001-12-29 Akim Demaille <akim@epita.fr>
15443
15444 Don't store the token defs in a muscle, just be ready to output it
15445 on command. Now possible via `symbols'. Fixes a memory leak.
15446
15447 * src/output.c (token_definitions_output): New.
15448 (output_parser, header_output): Use it.
15449 * src/reader.c (symbols_save): Remove.
15450
15451 2001-12-29 Akim Demaille <akim@epita.fr>
15452
15453 * src/bison.simple: Do not provide a default for YYSTYPE and
15454 YYLTYPE before the user's prologue. Otherwise it's hardly... a
15455 default.
15456
15457 2001-12-29 Akim Demaille <akim@epita.fr>
15458
15459 Mid-rule actions are simply... ignored!
15460
15461 * src/reader.c (readgram): Be sure to attach mid-rule actions to
15462 the empty-rule associated to the dummy symbol, not to the host
15463 rule.
15464 * tests/actions.at (Mid-rule actions): New.
15465
15466 2001-12-29 Akim Demaille <akim@epita.fr>
15467
15468 Memory leak.
15469
15470 * src/reader.c (reader): Free grammar.
15471
15472 2001-12-29 Akim Demaille <akim@epita.fr>
15473
15474 Memory leak.
15475
15476 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
15477 since it allocates it for each state, although only one is needed.
15478 (allocate_storage): Do it here.
15479
15480 2001-12-29 Akim Demaille <akim@epita.fr>
15481
15482 * src/options.h, src/options.c (create_long_option_table): Rename
15483 as...
15484 (long_option_table_new): this, with a clearer prototype.
15485 (percent_table): Remove, unused,
15486 * src/getargs.c (getargs): Adjust.
15487
15488 2001-12-29 Akim Demaille <akim@epita.fr>
15489
15490 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
15491 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
15492 as states.
15493
15494 2001-12-29 Akim Demaille <akim@epita.fr>
15495
15496 * src/lalr.c (build_relations): Rename `states' as `states1'.
15497 Sorry, I don't understand exactly what it is, no better name...
15498
15499 2001-12-29 Akim Demaille <akim@epita.fr>
15500
15501 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
15502 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
15503 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
15504 as rules.
15505
15506 2001-12-29 Akim Demaille <akim@epita.fr>
15507
15508 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
15509 ago.
15510
15511 2001-12-29 Akim Demaille <akim@epita.fr>
15512
15513 * src/reader.c, src/reader.h (user_toknums): Remove.
15514 Adjust all users to use symbols[i]->user_token_number.
15515
15516 2001-12-29 Akim Demaille <akim@epita.fr>
15517
15518 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
15519 Adjust all users to use symbols[i]->prec or ->assoc.
15520
15521 2001-12-29 Akim Demaille <akim@epita.fr>
15522
15523 * src/reader.c, src/reader.h (tags): Remove.
15524 Adjust all users to use symbols[i]->tag.
15525
15526 2001-12-29 Akim Demaille <akim@epita.fr>
15527
15528 * src/gram.h, src/gram.c (symbols): New, similar to state_table
15529 and rule_table.
15530 * src/reader.c (packsymbols): Fill this table.
15531 Drop sprec.
15532 * src/conflicts.c (resolve_sr_conflict): Adjust.
15533 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
15534 single table.
15535 Use symbols[i]->tag instead of tags[i].
15536
15537 2001-12-29 Akim Demaille <akim@epita.fr>
15538
15539 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
15540 In addition, put a comment in there, to replace...
15541 * tests/regression.at (%union and C comments): Remove.
15542
15543 2001-12-29 Akim Demaille <akim@epita.fr>
15544
15545 * tests/regression.at (Web2c Actions): Blindly move the actual
15546 output as expected output. The contents *seem* right to me, but I
15547 can't pretend reading perfectly parser tables... Nonetheless, all
15548 the other tests pass correctly, the table look OK, even though the
15549 presence of `$axiom' is to be noted: AFAICS it is useless (but
15550 harmless).
15551
15552 2001-12-29 Akim Demaille <akim@epita.fr>
15553
15554 * src/reader.c (readgram): Don't add the rule 0 if there were no
15555 rules read. In other words, add it _after_ having performed
15556 grammar sanity checks.
15557 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
15558
15559 2001-12-29 Akim Demaille <akim@epita.fr>
15560
15561 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
15562 visible, and some states have now a different number.
15563
15564 2001-12-29 Akim Demaille <akim@epita.fr>
15565
15566 * src/reader.c (readgram): Bind the initial rule's lineno to that
15567 of the first rule.
15568 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
15569 (Solved SR Conflicts): Adjust rule 0's line number.
15570
15571 2001-12-29 Akim Demaille <akim@epita.fr>
15572
15573 Fix the `GAWK Grammar' failure.
15574
15575 * src/LR0.c (final_state): Initialize to -1 so that we do compute
15576 the reductions of the first state which was mistakenly confused
15577 with the final state because precisely final_state was initialized
15578 to 0.
15579 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
15580 now noticed by Bison.
15581 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
15582 have a reduction on $default.
15583
15584 2001-12-29 Akim Demaille <akim@epita.fr>
15585
15586 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
15587 rule line numbers.
15588 * src/closure.c (print_closure): Likewise.
15589 * src/derives.c (print_derives): Likewise.
15590 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
15591 now.
15592
15593 2001-12-29 Akim Demaille <akim@epita.fr>
15594
15595 * src/lalr.c (lookaheads_print): New.
15596 (lalr): Call it when --trace-flag.
15597 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
15598 are dumped.
15599
15600 2001-12-29 Akim Demaille <akim@epita.fr>
15601
15602 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
15603 when walking through ritem, even via rule->rhs.
15604 * src/reduce.c (dump_grammar, useful_production, reduce_output)
15605 (useful_production, useless_nonterminals): Likewise.
15606 (reduce_grammar_tables): Likewise, plus update nritems.
15607 * src/nullable.c (set_nullable): Likewise.
15608 * src/lalr.c (build_relations): Likewise.
15609 * tests/sets.at (Nullable): Adjust.
15610 Fortunately, now, the $axiom is no longer nullable.
15611
15612 2001-12-29 Akim Demaille <akim@epita.fr>
15613
15614 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
15615 the 0-sentinel.
15616 * src/gram.c (ritem_longest_rhs): Likewise.
15617 * src/reduce.c (nonterminals_reduce): Likewise.
15618 * src/print_graph.c (print_graph): Likewise.
15619 * src/output.c (output_rule_data): Likewise.
15620 * src/nullable.c (set_nullable): Likewise.
15621
15622 2001-12-29 Akim Demaille <akim@epita.fr>
15623
15624 * src/output.c: Comment changes.
15625
15626 2001-12-27 Paul Eggert <eggert@twinsun.com>
15627
15628 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
15629 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
15630 Sparc, as they were causing more porting problems than the
15631 (minor) performance improvement was worth.
15632
15633 Also, catch up with 1.31's YYSTD.
15634
15635 2001-12-27 Akim Demaille <akim@epita.fr>
15636
15637 * src/output.c (output_gram): Rely on nritems, not the
15638 0-sentinel. See below.
15639 Use -1 as separator, not 0.
15640 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
15641 Rely on -1 as separator in yyrhs, instead of 0.
15642 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
15643 twice `Now at end of input', therefore there are two lines less to
15644 expect.
15645
15646 2001-12-27 Akim Demaille <akim@epita.fr>
15647
15648 * tests/regression.at (Unresolved SR Conflicts):
15649 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
15650 below.
15651
15652 2001-12-27 Akim Demaille <akim@epita.fr>
15653
15654 * src/LR0.c (new_state): Recognize the final state by the fact it
15655 is reached by eoftoken.
15656 (insert_start_shifting_state, insert_eof_shifting_state)
15657 (insert_accepting_state, augment_automaton): Remove, since now
15658 these states are automatically computed from the initial state.
15659 (generate_states): Adjust.
15660 * src/print.c: When reporting a rule number to the user, substract
15661 1, so that the axiom rule is rule 0, and the first user rule is 1.
15662 * src/reduce.c: Likewise.
15663 * src/print_graph.c (print_core): For the time being, just as for
15664 the report, depend upon --trace-flags to dump the full set of
15665 items.
15666 * src/reader.c (readgram): Once the grammar read, insert the rule
15667 0: `$axiom: START-SYMBOL $'.
15668 * tests/set.at: Adjust: rule 0 is now displayed, and since the
15669 number of the states has changed (the final state is no longer
15670 necessarily the last), catch up.
15671
15672 2001-12-27 Akim Demaille <akim@epita.fr>
15673
15674 Try to make the use of the eoftoken valid. Given that its value
15675 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
15676 is used instead of > 0 where appropriate, (ii), depend upon nritems
15677 instead of the 0-sentinel.
15678
15679 * src/gram.h, src/gram.c (nritems): New.
15680 Expected to be duplication of nitems, but for the time being...
15681 * src/reader.c (packgram): Assert nritems and nitems are equal.
15682 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
15683 * src/closure.c (print_closure, print_fderives): Likewise.
15684 * src/gram.c (ritem_print): Likewise.
15685 * src/print.c (print_core, print_grammar): Likewise.
15686 * src/print_graph.c: Likewise.
15687
15688 2001-12-27 Akim Demaille <akim@epita.fr>
15689
15690 * src/main.c (main): If there are complains after grammar
15691 reductions, then output the report anyway if requested, then die.
15692 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
15693 * src/reader.c (eoftoken): New.
15694 (parse_token_decl): If the token being defined has value `0', it
15695 is the eoftoken.
15696 (packsymbols): No longer hack `tags' to insert `$' by hand.
15697 Be sure to preserve the value of the eoftoken.
15698 (reader): Make sure eoftoken is defined.
15699 Initialize nsyms to 0: now eoftoken is created just like the others.
15700 * src/print.c (print_grammar): Don't special case the eof token.
15701 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
15702 lie anyway, albeit pleasant.
15703 * tests/calc.at: Exercise error messages with eoftoken.
15704 Change the grammar so that empty input is invalid.
15705 Adjust expectations.
15706 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
15707
15708 2001-12-27 Akim Demaille <akim@epita.fr>
15709
15710 * configure.in: Check the protos of strchr ans strspn.
15711 Replace strchr if needed.
15712 * src/system.h: Provide the protos of strchr, strspn and memchr if
15713 missing.
15714 * lib/strchr.c: New.
15715 * src/reader.c (symbols_save): Use strchr.
15716
15717 2001-12-27 Akim Demaille <akim@epita.fr>
15718
15719 * src/print.c, src/print_graph.c (escape): New.
15720 Use it to quote the TAGS outputs.
15721 * src/print_graph.c (print_state): Now errors are in red, and
15722 reductions in green.
15723 Prefer high to wide: output the state number on a line of its own.
15724
15725 2001-12-27 Akim Demaille <akim@epita.fr>
15726
15727 * src/state.h, src/state.c (reductions_new): New.
15728 * src/LR0.c (set_state_table): Let all the states have a
15729 `reductions', even if reduced to 0.
15730 (save_reductions): Adjust.
15731 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
15732 * src/print.c (print_reductions, print_actions): Adjust.
15733 * src/output.c (action_row): Adjust.
15734
15735 2001-12-27 Akim Demaille <akim@epita.fr>
15736
15737 * src/state.h, src/state.c (errs_new, errs_dup): New.
15738 * src/LR0.c (set_state_table): Let all the states have an errs,
15739 even if reduced to 0.
15740 * src/print.c (print_errs, print_reductions): Adjust.
15741 * src/output.c (output_actions, action_row): Adjust.
15742 * src/conflicts.c (resolve_sr_conflict): Adjust.
15743
15744 2001-12-27 Akim Demaille <akim@epita.fr>
15745
15746 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
15747
15748 2001-12-27 Akim Demaille <akim@epita.fr>
15749
15750 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
15751 * src/print.c: here.
15752 (lookaheadset, shiftset): New, used as additional storage by
15753 print_reductions.
15754 (print_results): Adjust.
15755 (print_shifts, print_gotos, print_errs): New, extracted from...
15756 (print_actions): here.
15757 * src/print_graph.c (print_actions): Remove dead code.
15758
15759 2001-12-27 Akim Demaille <akim@epita.fr>
15760
15761 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
15762 `$n' and `@n'.
15763
15764 2001-12-27 Akim Demaille <akim@epita.fr>
15765
15766 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
15767 (build_relations): Adjust.
15768
15769 2001-12-27 Akim Demaille <akim@epita.fr>
15770
15771 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
15772 duplication.
15773
15774 2001-12-27 Akim Demaille <akim@epita.fr>
15775
15776 * src/reader.c (packgram): Catch nitems overflows.
15777
15778 2001-12-27 Akim Demaille <akim@epita.fr>
15779
15780 * src/files.c, src/files.h (guard_obstack): Remove.
15781 * src/output.c (output): Adjust.
15782 * src/reader.c (parse_braces): New, factoring...
15783 (copy_action, copy_guard): these two which are renamed as...
15784 (parse_action, parse_guard): these.
15785 As a voluntary consequence, using braces around guards is now
15786 mandatory.
15787
15788 2001-12-27 Akim Demaille <akim@epita.fr>
15789
15790 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
15791 * src/reader.c (symbol_list): `guard' and `guard_line' are new
15792 members.
15793 (symbol_list_new): Adjust.
15794 (copy_action): action_line is the first line, not the last.
15795 (copy_guard): Just as for actions, store the `action' only, not
15796 the switch/case/break flesh.
15797 Don't parse the user action that might follow the guard, let...
15798 (readgram): do it, i.e., now, there can be an action after a
15799 guard.
15800 In other words the guard is just explicitly optional.
15801 (packgram): Adjust.
15802 * src/output.c (guards_output): New.
15803 (output_parser): Call it when needed.
15804 (output): Also free the guard and attrs obstacks.
15805 * src/files.c, src/files.h (obstack_save): Remove.
15806 (output_files): Remove.
15807 As a result, if one needs the former `.act' file, using an
15808 appropriate skeleton which requires actions and guards is now
15809 required.
15810 * src/main.c (main): Adjust.
15811 * tests/semantic.at: New.
15812 * tests/regression.at: Use `input.y' as input file name.
15813 Avoid 8+3 problems by requiring input.c when the test needs the
15814 parser.
15815
15816 2001-12-27 Akim Demaille <akim@epita.fr>
15817
15818 * src/reader.c (symbol_list_new): Be sure to initialize all the
15819 fields.
15820
15821 2001-12-27 Akim Demaille <akim@epita.fr>
15822
15823 All the hacks using a final pseudo state are now useless.
15824
15825 * src/LR0.c (set_state_table): state_table holds exactly nstates.
15826 * src/lalr.c (nLA): New.
15827 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
15828 instead of lookaheadsp from the pseudo state (nstate + 1).
15829
15830 2001-12-27 Akim Demaille <akim@epita.fr>
15831
15832 * src/output.c (action_row, token_actions): Use a state_t instead
15833 of a integer, and nlookaheads instead of the following state's
15834 lookaheadsp.
15835
15836 2001-12-27 Akim Demaille <akim@epita.fr>
15837
15838 * src/conflicts.c (log_resolution, flush_shift)
15839 (resolve_sr_conflict, set_conflicts, solve_conflicts)
15840 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
15841 (conflicts_print, print_reductions): Use a state_t instead of an
15842 integer when referring to a state.
15843 As much as possible, depend upon nlookaheads, instead of the
15844 `lookaheadsp' member of the following state (since lookaheads of
15845 successive states are successive, the difference between state n + 1
15846 and n served as the number of lookaheads for state n).
15847 * src/lalr.c (add_lookback_edge): Likewise.
15848 * src/print.c (print_core, print_actions, print_state)
15849 (print_results): Likewise.
15850 * src/print_graph.c (print_core, print_actions, print_state)
15851 (print_graph): Likewise.
15852 * src/conflicts.h: Adjust.
15853
15854 2001-12-27 Akim Demaille <akim@epita.fr>
15855
15856 * src/bison.hairy: Formatting/comment changes.
15857 ANSIfy.
15858 Remove `register' indications.
15859 Add plenty of `static'.
15860
15861 2001-12-27 Akim Demaille <akim@epita.fr>
15862
15863 * src/output.c (prepare): Drop the muscle `ntbase' which
15864 duplicates ntokens.
15865 * src/bison.simple: Formatting/comment changes.
15866 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
15867 is an undocumented synonym.
15868
15869 2001-12-22 Akim Demaille <akim@epita.fr>
15870
15871 * src/output.c (output_table_data): Change the prototype to use
15872 `int' for array ranges: some invocations do pass an int, not a
15873 short.
15874 Reported by Wayne Green.
15875
15876 2001-12-22 Akim Demaille <akim@epita.fr>
15877
15878 Some actions of web2c.y are improperly triggered.
15879 Reported by Mike Castle.
15880
15881 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
15882 * tests/regression.at (Web2c): Rename as...
15883 (Web2c Report): this.
15884 (Web2c Actions): New.
15885
15886 2001-12-22 Akim Demaille <akim@epita.fr>
15887
15888 Reductions in web2c.y are improperly reported.
15889 Reported by Mike Castle.
15890
15891 * src/conflicts.c (print_reductions): Fix.
15892 * tests/regression.at (Web2c): New.
15893
15894 2001-12-18 Akim Demaille <akim@epita.fr>
15895
15896 Some host fail on `assert (!"foo")', which expands to
15897 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
15898 Reported by Nelson Beebee.
15899
15900 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
15901 `#define it_succeeded 0' and `assert (it_succeeded)'.
15902
15903 2001-12-17 Marc Autret <autret_m@epita.fr>
15904
15905 * src/bison.simple: Don't hard code the skeleton line and filename.
15906 * src/output.c (output_parser): Rename 'line' as 'output_line'.
15907 New line counter 'skeleton_line' (skeleton-line muscle).
15908
15909 2001-12-17 Paul Eggert <eggert@twinsun.com>
15910
15911 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
15912 YYDEBUG must be defined to a nonzero value.
15913
15914 * src/bison.simple (yytname): Do not assume that the user defines
15915 YYDEBUG to a properly parenthesized expression.
15916
15917 2001-12-17 Akim Demaille <akim@epita.fr>
15918
15919 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
15920 nlookaheads is a new member.
15921 Adjust all users.
15922 * src/lalr.h (nlookaheads): Remove this orphan declaration.
15923 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
15924 state.
15925
15926 2001-12-17 Akim Demaille <akim@epita.fr>
15927
15928 * src/files.h, src/files.c (open_files, close_files): Remove.
15929 * src/main.c (main): Don't open/close files, nor invoke lex_free,
15930 let...
15931 * src/reader.c (reader): Do it.
15932
15933 2001-12-17 Akim Demaille <akim@epita.fr>
15934
15935 * src/conflicts.c (print_reductions): Formatting changes.
15936
15937 2001-12-17 Akim Demaille <akim@epita.fr>
15938
15939 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
15940 (flush_reduce): New.
15941 (resolve_sr_conflict): Adjust.
15942
15943 2001-12-17 Akim Demaille <akim@epita.fr>
15944
15945 * src/output.c (output_obstack): Be static and rename as...
15946 (format_obstack): this, to avoid any confusion with files.c's
15947 output_obstack.
15948 * src/reader.h (muscle_obstack): Move to...
15949 * src/output.h: here, since it's defined in output.c.
15950
15951 2001-12-17 Akim Demaille <akim@epita.fr>
15952
15953 * src/output.c (action_row, save_column, default_goto)
15954 (sort_actions, matching_state, pack_vector): Better variable
15955 locality.
15956
15957 2001-12-17 Akim Demaille <akim@epita.fr>
15958
15959 * src/output.c: Various formatting changes.
15960
15961 2001-12-17 Akim Demaille <akim@epita.fr>
15962
15963 * src/files.c (output_files): Free the output_obstack.
15964 * src/main.c (main): Call print and print_graph conditionally.
15965 * src/print.c (print): Work unconditionally.
15966 * src/print_graph.c (print_graph): Work unconditionally.
15967 * src/conflicts.c (log_resolution): Output only if verbose_flag.
15968
15969 2001-12-16 Marc Autret <autret_m@epita.fr>
15970
15971 * src/output.c (actions_output): Fix. When we use %no-lines,
15972 there is one less line per action.
15973
15974 2001-12-16 Marc Autret <autret_m@epita.fr>
15975
15976 * src/bison.simple: Remove a useless #line directive.
15977 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
15978 * src/output.c (get_lines_number): New.
15979 (output_parser): Adjust, now takes care about the lines of a
15980 output muscles.
15981 Fix line numbering.
15982 (actions_output): Computes the number of lines taken by actions.
15983 (output_master_parser): Insert new skeleton which is the name of
15984 the output parser file name.
15985
15986 2001-12-15 Marc Autret <autret_m@epita.fr>
15987
15988 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
15989
15990 2001-12-15 Marc Autret <autret_m@epita.fr>
15991
15992 * src/output.c (output_gram): Keep track of the hairy one.
15993
15994 2001-12-15 Akim Demaille <akim@epita.fr>
15995
15996 Make `make distcheck' work.
15997
15998 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
15999 system.h which uses libgettext.h.
16000
16001 2001-12-15 Akim Demaille <akim@epita.fr>
16002
16003 * src/nullable.c (set_nullable): Useless rules must be skipped,
16004 otherwise, since we range over their symbols, we might look at a
16005 nonterminal which no longer ``exists'', i.e., it is not counted in
16006 `nvars', hence we overflow our arrays.
16007
16008 2001-12-15 Akim Demaille <akim@epita.fr>
16009
16010 The header can also be produced directly, without any obstack!
16011 Yahoo!
16012
16013 * src/files.c, src/files.h (defines_obstack): Remove.
16014 (compute_header_macro): Global.
16015 (defines_obstack_save): Remove.
16016 * src/reader.c (parse_union_decl): No longer output to
16017 defines_obstack: its content can be found in the `stype' muscle
16018 anyway.
16019 (output_token_translations): Merge into...
16020 (symbols_output): this.
16021 Rename as...
16022 (symbols_save): this.
16023 (reader): Adjust.
16024 * src/output.c (header_output): New.
16025 (output): Call it.
16026
16027 2001-12-15 Akim Demaille <akim@epita.fr>
16028
16029 * src/reader.c (parse_union_decl): Instead of handling two obstack
16030 simultaneously, use one to define the `stype' muscle, and use the
16031 value of the latter to fill defines_obstack.
16032 (copy_comment): Remove.
16033 (copy_comment2): Work for a single obstack.
16034 Rename as...
16035 (copy_comment): this.
16036
16037 2001-12-15 Akim Demaille <akim@epita.fr>
16038
16039 * src/lex.c, src/lex.h (xgetc): No longer static.
16040 * src/reader.c (parse_union_decl): Revamp.
16041
16042 2001-12-15 Akim Demaille <akim@epita.fr>
16043
16044 Still making progress in separating Bison into (i) input, (ii)
16045 process, (iii) output: now we can directly output the parser file
16046 without using table_obstack at all.
16047
16048 * src/files.c, src/files.h (table_obstack): Bye bye.
16049 (parser_file_name): New.
16050 * src/files.c (compute_output_file_names): Compute it.
16051 * src/output.c (actions_output, output_parser)
16052 (output_master_parser): To a file instead of an obstack.
16053
16054 2001-12-15 Akim Demaille <akim@epita.fr>
16055
16056 Attach actions to rules, instead of pre-outputting them to
16057 actions_obstack.
16058
16059 * src/gram.h (rule_t): action and action_line are new members.
16060 * src/reader.c (symbol_list): Likewise.
16061 (copy_action): Save the actions within the rule.
16062 (packgram): Save them in rule_table.
16063 * src/output.c (actions_output): New.
16064 (output_parser): Use it on `%%actions'.
16065 (output_rule_data): Don't free rule_table.
16066 (output): Do it.
16067 (prepare): Don't save the `action' muscle.
16068 * src/bison.simple: s/%%action/%%actions/.
16069
16070 2001-12-15 Akim Demaille <akim@epita.fr>
16071
16072 * src/reader.c (copy_action): When --yacc, don't append a `;'
16073 to the user action: let it fail if lacking.
16074 Suggested by Arnold Robbins and Tom Tromey.
16075
16076 2001-12-14 Akim Demaille <akim@epita.fr>
16077
16078 * src/lex.c (literalchar): Simply return the char you decoded, non
16079 longer mess around with obstacks and int pointers.
16080 Adjust all callers.
16081
16082 2001-12-14 Akim Demaille <akim@epita.fr>
16083
16084 * src/lex.c (literalchar): Don't escape the special characters,
16085 just decode them, and keep them as char (before, eol was output as
16086 the 2 char string `\n' etc.).
16087 * src/output.c (output_rule_data): Use quotearg to output the
16088 token strings.
16089
16090 2001-12-13 Paul Eggert <eggert@twinsun.com>
16091
16092 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
16093 Do not infringe on the global user namespace when using C++.
16094 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
16095 All uses of `fprintf' and `stderr' changed.
16096
16097 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
16098
16099 2001-12-13 Akim Demaille <akim@epita.fr>
16100
16101 The computation of nullable is broken: it doesn't handle empty
16102 RHS's properly.
16103
16104 * tests/torture.at (GNU AWK Grammar): New.
16105 * tests/sets.at (Nullable): New.
16106 * src/nullable.c (set_nullable): Instead of blindly looping over
16107 `ritems', loop over the rules, and then over their rhs's.
16108
16109 Work around Autotest bugs.
16110
16111 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
16112 frame, because Autotest understand lines starting with a `+' as
16113 traces from the shell. Then, they are not processed properly.
16114 Admittedly an Autotest bug, but we don't have time to wait for
16115 Autotest to catch up.
16116 * tests/regression.at (Broken Closure): Adjust to the new table
16117 frames.
16118 Move to...
16119 * tests/sets.at: here.
16120
16121 2001-12-13 Akim Demaille <akim@epita.fr>
16122
16123 * src/closure.c (closure): Use nrules instead of playing tricks
16124 with BITS_PER_WORD.
16125
16126 2001-12-13 Akim Demaille <akim@epita.fr>
16127
16128 * src/print.c (print_actions): Output the handling of `$' as the
16129 traces do: shifting the token EOF. Before EOF was treated as a
16130 nonterminal.
16131 * tests/regression.at: Adjust some tests.
16132 * src/print_graph.c (print_core): Complete the set of items via
16133 closure. The next-to-final and final states are still unsatisfying,
16134 but that's to be addressed elsewhere.
16135 No longer output the rule numbers, but do output the state number.
16136 A single loop for the shifts + gotos is enough, but picked a
16137 distinct color for each.
16138 (print_graph): Initialize and finalize closure.
16139
16140 2001-12-13 Akim Demaille <akim@epita.fr>
16141
16142 * src/reader.c (readgram): Remove dead code, an strip useless
16143 braces.
16144 (get_type): Remove, unused.
16145
16146 2001-12-12 Akim Demaille <akim@epita.fr>
16147
16148 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
16149 on that of lib/error.c.
16150
16151 2001-12-12 Akim Demaille <akim@epita.fr>
16152
16153 Some hosts don't like `/' in includes.
16154
16155 * src/system.h: Include libgettext.h without qualifying the path.
16156 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
16157 $(top_srcdir).
16158
16159 2001-12-11 Marc Autret <autret_m@epita.fr>
16160
16161 * src/output.c (output_parser): Remove useless muscle.
16162
16163 2001-12-11 Marc Autret <autret_m@epita.fr>
16164
16165 * src/bison.simple: Remove #line just before %%epilogue. It
16166 is now handled in ...
16167 * src/reader.c (read_additionnal_code): Add the output of a
16168 #line for the epilogue.
16169
16170 2001-12-10 Marc Autret <autret_m@epita.fr>
16171
16172 * src/reader.c (copy_definition): Re-use CPP-outed code which
16173 replace precedent remove.
16174 * src/bison.simple: Remove #line before %%prologue because
16175 %%input-line is wrong at this time.
16176
16177 2001-12-10 Marc Autret <autret_m@epita.fr>
16178
16179 * src/reader.c (symbols_output): Clean up.
16180 * src/output.c (output_gram, output): Clean up.
16181
16182 2001-12-10 Akim Demaille <akim@epita.fr>
16183
16184 * src/lalr.c (initialize_lookaheads): New. Extracted from...
16185 * src/LR0.c (set_state_table): here.
16186 * src/lalr.c (lalr): Call it.
16187
16188 2001-12-10 Akim Demaille <akim@epita.fr>
16189
16190 * src/state.h (shifts): Remove the `number' member: shifts are
16191 attached to state, hence no longer need to be labelled with a
16192 state number.
16193
16194 2001-12-10 Akim Demaille <akim@epita.fr>
16195
16196 Now that states have a complete set of members, the linked list of
16197 shifts is useless: just fill directly the state's shifts member.
16198
16199 * src/state.h (shifts): Remove the `next' member.
16200 * src/LR0.c (first_state, last_state): Remove.
16201 Adjust the callers.
16202 (augment_automaton): Don't look for the shifts that must be added
16203 a shift on EOF: it is those of the state we looked for! But now,
16204 since shifts are attached, it is no longer needed to looking
16205 merely by its id: its number.
16206
16207 2001-12-10 Akim Demaille <akim@epita.fr>
16208
16209 * src/LR0.c (augment_automaton): Better variable locality.
16210 Remove an impossible branch: if there is a state corresponding to
16211 the start symbol being shifted, then there is shift for the start
16212 symbol from the initial state.
16213
16214 2001-12-10 Akim Demaille <akim@epita.fr>
16215
16216 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
16217 only when appropriate: when insert_start_shifting_state' is not
16218 invoked.
16219 * tests/regression.at (Rule Line Numbers): Adjust.
16220
16221 2001-12-10 Akim Demaille <akim@epita.fr>
16222
16223 * src/LR0.c (augment_automaton): Now that all states have shifts,
16224 merge the two cases addition shifts to the initial state.
16225
16226 2001-12-10 Akim Demaille <akim@epita.fr>
16227
16228 * src/lalr.c (set_state_table): Move to...
16229 * src/LR0.c: here.
16230 * src/lalr.c (lalr): Don't call it...
16231 * src/LR0.c (generate_states): do it.
16232 * src/LR0.h (first_state): Remove, only the table is used.
16233
16234 2001-12-10 Akim Demaille <akim@epita.fr>
16235
16236 * src/LR0.h (first_shift, first_reduction): Remove.
16237 * src/lalr.c: Don't use first_shift: find shifts through the
16238 states.
16239
16240 2001-12-10 Akim Demaille <akim@epita.fr>
16241
16242 * src/LR0.c: Attach shifts to states as soon as they are
16243 computed.
16244 * src/lalr.c (set_state_table): Instead of assigning shifts to
16245 state, just assert that the mapping was properly done.
16246
16247 2001-12-10 Akim Demaille <akim@epita.fr>
16248
16249 * src/LR0.c (insert_start_shift): Rename as...
16250 (insert_start_shifting_state): this.
16251 (insert_eof_shifting_state, insert_accepting_state): New.
16252 (augment_automaton): Adjust.
16253 Better locality of the variables.
16254 When looking if the start_symbol is shifted from the initial
16255 state, using `while (... symbol != start_symbol ...)' sounds
16256 better than `while (... symbol < start_symbol ...)': If fail
16257 to see how the order between symbols could be relevant!
16258
16259 2001-12-10 Akim Demaille <akim@epita.fr>
16260
16261 * src/getargs.h: Don't declare `spec_name_prefix' and
16262 `spec_file_prefix', declared by src/files.h.
16263 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
16264 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
16265 * src/output.c (prepare): Adjust.
16266 * src/reader.c (symbols_output): Likewise.
16267 * src/vmsgetargs.c: Vaguely adjust, but who cares?
16268
16269 2001-12-10 Akim Demaille <akim@epita.fr>
16270
16271 * src/muscle_tab.c (muscle_init): NULL is a better default than
16272 `"0"'.
16273
16274 2001-12-10 Akim Demaille <akim@epita.fr>
16275
16276 * src/reader.c (reader): Calling symbols_output once is enough.
16277
16278 2001-12-10 Akim Demaille <akim@epita.fr>
16279
16280 Now that states have a complete set of members, the linked list of
16281 reductions is useless: just fill directly the state's reductions
16282 member.
16283
16284 * src/state.h (struct reductions): Remove member `number' and
16285 `next'.
16286 * src/LR0.c (first_reduction, last_reduction): Remove.
16287 (save_reductions): Don't link the new reductions, store them in
16288 this_state.
16289 * src/lalr.c (set_state_table): No need to attach reductions to
16290 states, it's already done.
16291 * src/output.c (output_actions): No longer free the shifts, then
16292 the reductions, then the states: free all the states and their
16293 members.
16294
16295 2001-12-10 Akim Demaille <akim@epita.fr>
16296
16297 * src/options.c (OPTN, DRTV, BOTH): New.
16298 (option_table): Use them.
16299
16300 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
16301 the job of system.h.
16302 * src/options.c: Don't include stdio.h and xalloc.h for the same
16303 reasons.
16304
16305 2001-12-10 Akim Demaille <akim@epita.fr>
16306
16307 * src/output.c (output, prepare): Make sure the values of the
16308 muscles `action' and `prologue' are 0-terminated.
16309
16310 2001-12-10 Akim Demaille <akim@epita.fr>
16311
16312 Clean up GCC warnings.
16313
16314 * src/reader.c (copy_action): `buf' is not used.
16315 (parse_skel_decl): Be static.
16316 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
16317 * src/options.h (create_long_option_table): Have a real prototype.
16318 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
16319 (hash_delete_at): Return const void *.
16320 Adjust casts to preserve the const.
16321
16322 2001-12-10 Akim Demaille <akim@epita.fr>
16323
16324 * configure.in: Require 2.52g.
16325 M4 is not needed, but AUTOM4TE is.
16326 * m4/m4.m4: Remove.
16327 * tests/Makefile.am: Adjust.
16328
16329 2001-12-10 Akim Demaille <akim@epita.fr>
16330
16331 One structure for states is enough, even though theoretically
16332 there are LR(0) states and LALR(1) states.
16333
16334 * src/lalr.h (state_t): Remove.
16335 (state_table): Be state_t **, not state_t *.
16336 * src/state.h (core, CORE_ALLOC): Rename as...
16337 (state_t, STATE_ALLOC): this.
16338 Add the LALR(1) members: shifts, reductions, errs.
16339 * src/LR0.c (state_table): Rename as...
16340 (state_hash): this, to avoid name clashes with the global
16341 `state_table'.
16342 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
16343 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
16344
16345 2001-12-10 Akim Demaille <akim@epita.fr>
16346
16347 Bison dumps core on bash.y.
16348 Reported by Pascal Bart.
16349
16350 * src/warshall.c (bitmatrix_print): New.
16351 (TC): Use it.
16352 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
16353 j must be the outer loop.
16354 * tests/regression.at (Broken Closure): New.
16355
16356 2001-12-05 Akim Demaille <akim@epita.fr>
16357
16358 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
16359 its argument.
16360 Reported by Peter Hamorsky.
16361
16362 2001-12-05 Akim Demaille <akim@epita.fr>
16363
16364 * src/conflicts.c (err_table): Remove.
16365 (resolve_sr_conflict): Adjust.
16366 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
16367 Rename as...
16368 (state_t.reductions, state_t.shifts): this.
16369
16370 2001-12-05 Akim Demaille <akim@epita.fr>
16371
16372 * src/reduce.c (reduce_grammar_tables): No longer disable the
16373 removal of useless rules via CPP but via `if (0)', so that the
16374 compiler still check the code is valid.
16375 For instance, it should have noticed `rline' no longer exists: use
16376 the `line' member of rule_t.
16377 * src/gram.c (dummy, rline): Remove, unused.
16378
16379 2001-12-05 Akim Demaille <akim@epita.fr>
16380
16381 * src/output.c (pack_vector): Use assert, not berror.
16382 * src/main.c (berror): Remove, unused.
16383
16384 2001-12-05 Akim Demaille <akim@epita.fr>
16385
16386 New experimental feature: if --verbose --trace output all the
16387 items of a state, not only its kernel.
16388
16389 * src/print.c (print_core): If `trace_flag', then invoke closure
16390 before outputting the items of the state (print_core is no longer
16391 a correct name them).
16392 (print_results): Invoke new_closure/free_closure if needed.
16393
16394 2001-12-05 Akim Demaille <akim@epita.fr>
16395
16396 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
16397 * src/closure.c, src/closure.h (itemsetsize): Rename as...
16398 (nitemset): for consistency with the rest of the project.
16399
16400 2001-12-05 Akim Demaille <akim@epita.fr>
16401
16402 * src/closure.c (print_closure): Improve.
16403 (closure): Use it for printing input and output.
16404
16405 2001-12-05 Akim Demaille <akim@epita.fr>
16406
16407 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
16408 indexed by nonterminals.
16409
16410 2001-12-05 Akim Demaille <akim@epita.fr>
16411
16412 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
16413 what it was!).
16414 * src/warshall.h: Remove accidental duplication of the content.
16415
16416 2001-12-05 Akim Demaille <akim@epita.fr>
16417
16418 * src/closure.c (set_fderives): De-obfuscate.
16419
16420 2001-12-05 Akim Demaille <akim@epita.fr>
16421
16422 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
16423
16424 2001-12-05 Akim Demaille <akim@epita.fr>
16425
16426 * src/closure.c (set_firsts): De-obfuscate.
16427
16428 2001-12-05 Akim Demaille <akim@epita.fr>
16429
16430 * src/output.c (action_row): De-obfuscate
16431 using the good o' techniques: arrays not pointers, variable
16432 locality, BITISSET, RESETBIT etc.
16433
16434 2001-12-05 Akim Demaille <akim@epita.fr>
16435
16436 Pessimize the code to simplify it: from now on, all the states
16437 have a valid SHIFTS, which NSHIFTS is possibly 0.
16438
16439 * src/LR0.c (shifts_new): Be global and move to..
16440 * src/state.c, src/state.h: here.
16441 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
16442 * src/print_graph: Adjust.
16443
16444 2001-12-05 Akim Demaille <akim@epita.fr>
16445
16446 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
16447 * src/conflicts.c: Use it.
16448 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
16449 incorrectly ``simplified''.
16450
16451 2001-12-05 Akim Demaille <akim@epita.fr>
16452
16453 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
16454 using the good o' techniques: arrays not pointers, variable
16455 locality, BITISSET, RESETBIT etc.
16456
16457 2001-12-05 Akim Demaille <akim@epita.fr>
16458
16459 * src/state.h (SHIFT_SYMBOL): New.
16460 * src/conflicts.c: Use it to deobfuscate.
16461
16462 2001-12-05 Akim Demaille <akim@epita.fr>
16463
16464 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
16465 (print_reductions): De-obfuscate using the good o' techniques:
16466 arrays not pointers, variable locality, BITISSET.
16467
16468 2001-12-05 Akim Demaille <akim@epita.fr>
16469
16470 * src/conflicts.c (print_reductions): Arrays, not pointers.
16471 Use BITISSET.
16472
16473 2001-12-05 Akim Demaille <akim@epita.fr>
16474
16475 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16476
16477 2001-12-05 Akim Demaille <akim@epita.fr>
16478
16479 * src/conflicts.c (print_reductions): Improve variable locality.
16480
16481 2001-12-05 Akim Demaille <akim@epita.fr>
16482
16483 * src/conflicts.c (print_reductions): Pessimize, but clarify.
16484
16485 2001-12-05 Akim Demaille <akim@epita.fr>
16486
16487 * src/conflicts.c (print_reductions): Improve variable locality.
16488
16489 2001-12-05 Akim Demaille <akim@epita.fr>
16490
16491 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
16492 * src/lalr.c: Use them.
16493
16494 2001-12-05 Akim Demaille <akim@epita.fr>
16495
16496 * src/LR0.c (augment_automaton): Formatting changes.
16497 Better variable locality.
16498
16499 2001-12-05 Akim Demaille <akim@epita.fr>
16500
16501 * src/lalr.c (matrix_print): New.
16502 (transpose): Use it.
16503 Use arrays instead of pointers.
16504
16505 2001-12-05 Akim Demaille <akim@epita.fr>
16506
16507 * src/lalr.c (maxrhs): Move to...
16508 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
16509 * src/lalr.c (build_relations): Adjust.
16510
16511 2001-12-05 Akim Demaille <akim@epita.fr>
16512
16513 * src/lalr.c (transpose): Free the memory allocated to the
16514 argument, as it is replaced by the results by the unique caller.
16515 (build_relations): Merely invoke transpose: it handles the memory
16516 deallocation.
16517 Improve variable locality.
16518 Avoid variables used as mere abbreviations.
16519 (compute_lookaheads): Use arrays instead of pointers.
16520
16521 2001-12-05 Akim Demaille <akim@epita.fr>
16522
16523 * src/lalr.c (initialize_F): Improve variable locality.
16524 Avoid variables used as mere abbreviations.
16525
16526 2001-12-05 Akim Demaille <akim@epita.fr>
16527
16528 * src/derives.c (print_derives): Display the ruleno.
16529 * src/lalr.c (initialize_F, transpose): Better variable locality
16530 to improve readability.
16531 Avoid variables used as mere abbreviations.
16532
16533 2001-12-05 Akim Demaille <akim@epita.fr>
16534
16535 * src/lalr.c (traverse): Use arrays instead of pointers.
16536
16537 2001-12-05 Akim Demaille <akim@epita.fr>
16538
16539 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
16540 the handling of squeue.
16541 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16542
16543 2001-12-05 Akim Demaille <akim@epita.fr>
16544
16545 Because useless nonterminals are now kept alive (instead of being
16546 `destroyed'), we now sometimes examine them, and store information
16547 related to them. Hence we need to know their number, and adjust
16548 memory allocations.
16549
16550 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
16551 static.
16552 * src/LR0.c (allocate_itemsets): The memory allocated to
16553 `symbol_count' was used for two different purpose: once to count
16554 the number of occurrences of each symbol, and later reassigned to
16555 `shift_symbol', containing the symbol that can be shifted from a
16556 given state.
16557 Deobfuscate, i.e., allocate, use and free `symbol_count' here
16558 only, and...
16559 (new_itemsets): Allocate `shift_symbol' here.
16560 (allocate_itemsets): symbol_count includes useless nonterminals.
16561 Make room for them.
16562 (free_storage): Use `free', not `XFREE', for pointers that cannot
16563 be null.
16564
16565 2001-12-05 Akim Demaille <akim@epita.fr>
16566
16567 * src/nullable.c (set_nullable): Deobfuscate the handling of
16568 ritem.
16569 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
16570
16571 2001-12-05 Akim Demaille <akim@epita.fr>
16572
16573 * src/gram.c, src/gram.h (ritem_print): New.
16574 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
16575 (This useless function was defined only to work around VMS linkers
16576 that can't handle compilation units with variables only).
16577 * src/reduce.c (dump_grammar): Use it to trace the construction of
16578 ritem.
16579
16580 2001-12-04 Paul Eggert <eggert@twinsun.com>
16581
16582 * src/bison.simple (union yyalloc): Change member names
16583 to be the same as the stack names.
16584 (yyparse): yyptr is now union yyalloc *, not char *.
16585 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
16586 and may generate better code on some machines.
16587 (yystpcpy): Use prototype if __STDC__ is defined, not just
16588 if __cplusplus is defined.
16589
16590 2001-11-30 Akim Demaille <akim@epita.fr>
16591
16592 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
16593 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
16594 Gettext doesn't compile cleanly, and dies with -Werror.
16595 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
16596 Include WARNING_CFLAGS here.
16597 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
16598 before being defined.
16599
16600 2001-11-27 Paul Eggert <eggert@twinsun.com>
16601
16602 * lib/quotearg.h (quotearg_n, quotearg_n_style):
16603 First arg is int, not unsigned.
16604 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
16605 (SIZE_MAX, UINT_MAX): New macros.
16606 (quotearg_n_options): Abort if N is negative.
16607 Avoid overflow check on hosts where size_t is 64 bits and int
16608 is 32 bits, as overflow is impossible there.
16609 Fix off-by-one typo that caused unnecessary reallocation.
16610
16611 2001-11-29 Paul Eggert <eggert@twinsun.com>
16612
16613 Name space cleanup in generated parser.
16614
16615 * doc/bison.texinfo (Bison Parser): Discuss system headers
16616 and their effect on the user name space.
16617
16618 * src/bison.simple:
16619 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
16620 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
16621 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
16622
16623 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
16624 on user names when possible.
16625
16626 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
16627 Simplify test for whather <alloca.h> exists.
16628
16629 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
16630
16631 (<stdio.h>): Include if YYDEBUG.
16632
16633 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
16634 ! defined (yyoverflow) && ! defined (yymemcpy).
16635
16636 (yymemcpy, yyparse): Rename local variables as needed so that
16637 they all begin with 'yy'.
16638
16639 (yystrlen, yystpcpy): New functions.
16640
16641 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
16642 All uses changed.
16643
16644 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
16645 instead of relying on string.h functions. Use YYSTACK_ALLOC
16646 and YYSTACK_FREE instead of malloc and free.
16647
16648 2001-11-30 Akim Demaille <akim@epita.fr>
16649
16650 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
16651 before their first uses.
16652 (YYBISON, YYPURE): Move to the top of the output.
16653
16654 2001-11-30 Akim Demaille <akim@epita.fr>
16655
16656 * tests/reduce.at (Useless Nonterminals): Fix.
16657
16658 2001-11-30 Akim Demaille <akim@epita.fr>
16659
16660 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
16661 if body instead of `;' to pacify GCC's warnings.
16662
16663 2001-11-30 Akim Demaille <akim@epita.fr>
16664
16665 Instead of mapping the LHS of unused rules to -1, keep the LHS
16666 valid, but flag the rules as invalid.
16667
16668 * src/gram.h (rule_t): `useful' is a new member.
16669 * src/print.c (print_grammar): Adjust.
16670 * src/derives.c (set_derives): Likewise.
16671 * src/reader.c (packgram, reduce_output): Likewise.
16672 * src/reduce.c (reduce_grammar_tables): Likewise.
16673 * tests/reduce.at (Underivable Rules, Useless Rules): New.
16674
16675 2001-11-30 Akim Demaille <akim@epita.fr>
16676
16677 * src/reduce.c (reduce_output): Formatting changes.
16678 * src/print.c (print_results, print_grammar): Likewise.
16679 * tests/regression.at (Rule Line Numbers)
16680 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
16681
16682 2001-11-30 Akim Demaille <akim@epita.fr>
16683
16684 * src/reduce.c (nonterminals_reduce): Instead of throwing away
16685 useless nonterminals, move them at the end of the symbol arrays.
16686 (reduce_output): Adjust.
16687 * tests/reduce.at (Useless Nonterminals): Adjust.
16688
16689 2001-11-30 Akim Demaille <akim@epita.fr>
16690
16691 * src/reduce.c: Various comment/formatting changes.
16692 (nonterminals_reduce): New, extracted from...
16693 (reduce_grammar_tables): here.
16694 (reduce_grammar): Call nonterminals_reduce.
16695
16696 2001-11-29 Paul Eggert <eggert@twinsun.com>
16697
16698 * src/bison.simple (YYSTACK_REALLOC): Remove.
16699 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
16700 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
16701 New macros.
16702 (union yyalloc): New type.
16703 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
16704 an arbitrary restriction on hosts where size_t is wider than int.
16705
16706 (yyparse): Don't dump core if alloca or malloc fails; instead, report
16707 a parser stack overflow. Allocate just one block of memory for all
16708 three stacks, instead of allocating three blocks; this typically is
16709 faster and reduces fragmentation.
16710
16711 Do not limit the number of items in the stack to a value that fits
16712 in 'int', as this is an arbitrary limit on hosts with 64-bit
16713 size_t and 32-bit int.
16714
16715 2001-11-29 Marc Autret <autret_m@epita.fr>
16716
16717 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
16718 of defining YYERROR_VERBOSE.
16719 [AT_DATA]: $4 is now out of C declarations in the prologue.
16720
16721 2001-11-28 Marc Autret <autret_m@epita.fr>
16722
16723 * src/reader.c (parse_dquoted_param): New.
16724 (parse_skel_decl): Use it.
16725 * src/lex.h: Add its prototype.
16726 * src/lex.c (literalchar): Become not static.
16727
16728 2001-11-28 Marc Autret <autret_m@epita.fr>
16729
16730 * src/output.h: And put its extern declaration here.
16731 * src/output.c (error_verbose): Define here.
16732 (prepare): Echo name modification.
16733 * src/getargs.h: Clean its extern declaration.
16734 * src/getargs.c (error_verbose_flag): Remove.
16735 (getargs): Remove case 'e'.
16736 * src/options.c (option_table): 'error-verbose' is now seen as simple
16737 percent option.
16738 Include output.h.
16739
16740 * src/reader.c (read_declarations): Remove case tok_include.
16741 (parse_include_decl): Remove.
16742 * src/lex.h (token_t): Remove tok_include.
16743 * src/options.c (option_table): 'include' is now a simple command line
16744 option.
16745
16746 2001-11-28 Marc Autret <autret_m@epita.fr>
16747
16748 * src/bison.simple: Adjust muscle names.
16749 * src/muscle_tab.c (muscle_init): Also rename the muscles.
16750 * src/output.c (prepare): s/_/-/ for the muscles names.
16751 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
16752
16753 2001-11-28 Marc Autret <autret_m@epita.fr>
16754
16755 * src/bison.simple: Fix debug.
16756 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
16757
16758 2001-11-28 Akim Demaille <akim@epita.fr>
16759
16760 * src/LR0.c (shifts_new): New.
16761 (save_shifts, insert_start_shift, augment_automaton): Use it.
16762
16763 2001-11-28 Akim Demaille <akim@epita.fr>
16764
16765 * src/closure.c (closure): `b' and `ruleno' denote the same value:
16766 keep ruleno only.
16767
16768 2001-11-28 Akim Demaille <akim@epita.fr>
16769
16770 * src/closure.c (closure): Instead of looping over word in array
16771 then bits in words, loop over bits in array.
16772
16773 2001-11-28 Akim Demaille <akim@epita.fr>
16774
16775 * src/closure.c (closure): No longer optimize the special case
16776 where all the bits of `ruleset[r]' are set to 0, to make the code
16777 clearer.
16778
16779 2001-11-28 Akim Demaille <akim@epita.fr>
16780
16781 * src/closure.c (closure): `r' and `c' are new variables, used to
16782 de-obfuscate accesses to RULESET and CORE.
16783
16784 2001-11-28 Akim Demaille <akim@epita.fr>
16785
16786 * src/reduce.c (reduce_print): Use ngettext.
16787 (dump_grammar): Improve the trace accuracy.
16788
16789 2001-11-28 Akim Demaille <akim@epita.fr>
16790
16791 * src/reduce.c (dump_grammar): Don't translate trace messages.
16792
16793 2001-11-28 Akim Demaille <akim@epita.fr>
16794
16795 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
16796 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
16797 as all tags are free'ed afterwards.
16798 From Enrico Scholz.
16799
16800 2001-11-27 Paul Eggert <eggert@twinsun.com>
16801
16802 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
16803 use alloca when we didn't want to, and vice versa.
16804
16805 2001-11-27 Marc Autret <autret_m@epita.fr>
16806
16807 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
16808 initialization.
16809 * src/output.c (prepare): Remove its update.
16810
16811 2001-11-27 Marc Autret <autret_m@epita.fr>
16812
16813 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
16814 Use %error-verbose.
16815
16816 2001-11-27 Marc Autret <autret_m@epita.fr>
16817
16818 * src/bison.simple: Remove YYERROR_VERBOSE using.
16819 Use %%error_verbose.
16820 (yyparse): Likewise.
16821 * src/output.c (prepare): Give its final value.
16822 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
16823 * src/getargs.h: Add its extern declaration.
16824 * src/getargs.c (error_verbose_flag): New int.
16825 (getargs): Update to catch new case.
16826 * src/options.c (option_table): 'error-verbose' is a new option.
16827 (shortopts): Update.
16828
16829 2001-11-27 Akim Demaille <akim@epita.fr>
16830
16831 * src/system.h: Use intl/libgettext.h.
16832 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
16833
16834 2001-11-27 Akim Demaille <akim@epita.fr>
16835
16836 * tests/torture.at (Exploding the Stack Size with Malloc):
16837 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
16838
16839 2001-11-27 Akim Demaille <akim@epita.fr>
16840
16841 * src/files.c: Include error.h.
16842 Reported by Hans Aberg.
16843
16844 2001-11-26 Marc Autret <autret_m@epita.fr>
16845
16846 * src/reader.c (parse_include_decl): New, not yet implemented.
16847 (read_declarations): Add case tok_include.
16848 * src/getargs.h (include): Add its extern definition.
16849 * src/getargs.c (include): New const char *.
16850 (getargs): Add case '-I'.
16851 * src/options.c (option_table): Add include as command line and
16852 percent option.
16853 * src/lex.h (token_t): Add tok_include.
16854
16855 2001-11-26 Akim Demaille <akim@epita.fr>
16856
16857 * src/reader.c (readgram): Make sure rules for mid-rule actions
16858 have a lineno equal to that of their host rule.
16859 Reported by Hans Aberg.
16860 * tests/regression.at (Rule Line Numbers): New.
16861
16862 2001-11-26 Akim Demaille <akim@epita.fr>
16863
16864 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
16865 size_ts.
16866
16867 2001-11-26 Akim Demaille <akim@epita.fr>
16868
16869 * src/complain.c, src/complain.h (error): Remove, provided by
16870 lib/error.[ch].
16871
16872 2001-11-26 Akim Demaille <akim@epita.fr>
16873
16874 * src/reader.c (read_declarations): Don't abort on tok_illegal,
16875 issue an error message.
16876 * tests/regression.at (Invalid %directive): New.
16877 Reported by Hans Aberg.
16878
16879 2001-11-26 Akim Demaille <akim@epita.fr>
16880
16881 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
16882 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
16883
16884 2001-11-26 Akim Demaille <akim@epita.fr>
16885
16886 * src/conflicts.c (conflicts_print): Don't complain at all when
16887 there are no reduce/reduce conflicts, and as many shift/reduce
16888 conflicts as expected.
16889 * tests/regression.at (%expect right): Adjust.
16890
16891 2001-11-23 Akim Demaille <akim@epita.fr>
16892
16893 * lib/alloca.c: Update, from fileutils.
16894
16895 2001-11-23 Akim Demaille <akim@epita.fr>
16896
16897 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
16898
16899 2001-11-23 Akim Demaille <akim@epita.fr>
16900
16901 * src/system.h: Include alloca.h.
16902 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
16903
16904 2001-11-23 Akim Demaille <akim@epita.fr>
16905
16906 * src/print_graph.c (print_actions): Remove `rule', unused.
16907 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
16908 pacify GCC's signed < unsigned warnings.
16909 * src/closure.c (itemsetsize): Likewise.
16910 * src/reader.c (symbol_list_new): Static.
16911
16912 2001-11-23 Akim Demaille <akim@epita.fr>
16913
16914 Attaching lineno to buckets is stupid, since only one copy of each
16915 symbol is kept, only the line of the first occurrence is kept too.
16916
16917 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
16918 * src/reader.c (rline_allocated): Remove, unused.
16919 (symbol_list): Have a `line' member.
16920 (symbol_list_new): New.
16921 (readgram): Use it.
16922 * src/print.c (print_grammar): Output the rule line numbers.
16923 * tests/regression.at (Solved SR Conflicts)
16924 (Unresolved SR Conflicts): Adjust.
16925 Reported by Hans Aberg.
16926
16927 2001-11-22 Marc Autret <autret_m@epita.fr>
16928
16929 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
16930
16931 2001-11-22 Marc Autret <autret_m@epita.fr>
16932
16933 * src/muscle_tab.c (muscle_init): Remove initialization of
16934 skeleton muscle.
16935 * src/output.c (output_master_parser): Do it here.
16936
16937 2001-11-20 Akim Demaille <akim@epita.fr>
16938
16939 * po/sv.po: New.
16940 * configure.in (ALL_LINGUAS): Adjust.
16941 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
16942 longer contains strings to translate.
16943
16944 2001-11-19 Akim Demaille <akim@epita.fr>
16945
16946 * src/conflicts.c (conflicts_print): Add a missing \n.
16947
16948 2001-11-19 Akim Demaille <akim@epita.fr>
16949
16950 * src/nullable.c (nullable_print): New.
16951 (set_nullable): Call it when tracing.
16952 Better locality of variables.
16953
16954 2001-11-19 Akim Demaille <akim@epita.fr>
16955
16956 * src/print.c (print_actions): Better locality of variables.
16957
16958 2001-11-19 Akim Demaille <akim@epita.fr>
16959
16960 * src/derives.c (print_derives): Fix and enrich.
16961 * src/closure.c (print_fderives): Likewise.
16962
16963 2001-11-19 Akim Demaille <akim@epita.fr>
16964
16965 * src/closure.c (itemsetend): Remove, replaced with...
16966 (itemsetsize): new.
16967
16968 2001-11-19 Akim Demaille <akim@epita.fr>
16969
16970 * src/LR0.c (kernel_end): Remove, replaced with...
16971 (kernel_size): new.
16972
16973 2001-11-19 Akim Demaille <akim@epita.fr>
16974
16975 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
16976 to clarify.
16977
16978 2001-11-19 Akim Demaille <akim@epita.fr>
16979
16980 * src/closure.c (closure): Use arrays instead of pointers to clarify.
16981
16982 2001-11-19 Akim Demaille <akim@epita.fr>
16983
16984 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
16985 trace messages.
16986 * src/LR0.c: Likewise.
16987 (allocate_itemsets): Use arrays instead of pointers to clarify.
16988
16989 2001-11-19 Akim Demaille <akim@epita.fr>
16990
16991 * src/getargs.c (statistics_flag): Replace with...
16992 (trace_flag): New.
16993 (longopts): Accept --trace instead of --statistics.
16994 * src/getargs.h, src/options.c: Adjust.
16995 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
16996 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
16997
16998 2001-11-19 Akim Demaille <akim@epita.fr>
16999
17000 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
17001 pointers to clarify the code.
17002 (save_reductions, save_shifts): Factor common parts of alternatives.
17003
17004 2001-11-19 Akim Demaille <akim@epita.fr>
17005
17006 * src/LR0.c (new_state, get_state): Complete TRACE code.
17007 * src/closure.c: Include `reader.h' to get `tags', needed by the
17008 trace code.
17009 Rename the conditional DEBUG as TRACE.
17010 Output consistently TRACEs to stderr, not stdout.
17011 * src/derives.c: Likewise.
17012 * src/reduce.c: (inaccessable_symbols): Using if is better style
17013 than goto.
17014 Use `#if TRACE' instead of `#if 0' for tracing code.
17015
17016 2001-11-19 Akim Demaille <akim@epita.fr>
17017
17018 * src/system.h (LIST_FREE, shortcpy): New.
17019 * src/LR0.c: Use them.
17020 * src/output.c (free_itemsets, free_reductions, free_shifts):
17021 Remove, replaced by LIST_FREE.
17022
17023 2001-11-19 Akim Demaille <akim@epita.fr>
17024
17025 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
17026 (REDUCTIONS_ALLOC): New.
17027 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
17028 allocation.
17029
17030 2001-11-19 Akim Demaille <akim@epita.fr>
17031
17032 * src/LR0.c (new_state): Complete trace code.
17033 * src/nullable.c (set_nullable): Don't translate traces.
17034
17035 2001-11-19 Akim Demaille <akim@epita.fr>
17036
17037 * src/print_graph.c (print_core): Better locality of variables.
17038 * src/print.c (print_core): Likewise.
17039
17040 2001-11-19 Akim Demaille <akim@epita.fr>
17041
17042 * src/vcg.c: You do the output, so you are responsible of the
17043 handling of VCG syntax, in particular: use quotearg.
17044 * src/print_graph.c: Don't.
17045 (print_actions): Don't output the actions as part of the nodes,
17046 since that's the job of the edges.
17047 (print_state): Don't output by hand: fill the node description,
17048 and ask for its output.
17049
17050 2001-11-19 Akim Demaille <akim@epita.fr>
17051
17052 * src/bison.simple (yyparse): When verbosely reporting an error,
17053 no longer put additional quotes around token names.
17054 * tests/calc.at: Adjust.
17055
17056 2001-11-19 Akim Demaille <akim@epita.fr>
17057
17058 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
17059 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
17060 * src/output.c: Adjust.
17061
17062 2001-11-19 Akim Demaille <akim@epita.fr>
17063
17064 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
17065 (rule_t): this.
17066 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
17067
17068 2001-11-19 Akim Demaille <akim@epita.fr>
17069
17070 * src/gram.h (rule_t): New.
17071 (rule_table): New.
17072 (rrhs, rlhs): Remove, part of state_t.
17073 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
17074 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17075 * src/reader.c, src/reduce.c: Adjust.
17076
17077 2001-11-19 Akim Demaille <akim@epita.fr>
17078
17079 * src/reader.c (symbols_output): New, extracted from...
17080 (packsymbols): Here.
17081 (reader): Call it.
17082
17083 2001-11-19 Akim Demaille <akim@epita.fr>
17084
17085 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
17086 (maxrhs): this new function.
17087
17088 2001-11-19 Akim Demaille <akim@epita.fr>
17089
17090 * src/lalr.c (F): New macro to access the variable F.
17091 Adjust.
17092
17093 2001-11-19 Akim Demaille <akim@epita.fr>
17094
17095 * src/lalr.h (LA): New macro to access the variable LA.
17096 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17097 * src/lalr.c: Adjust.
17098
17099 2001-11-19 Akim Demaille <akim@epita.fr>
17100
17101 * src/lalr.c (initialize_LA): Only initialize LA. Let...
17102 (set_state_table): handle the `lookaheads' members.
17103
17104 2001-11-19 Akim Demaille <akim@epita.fr>
17105
17106 * src/lalr.h (lookaheads): Removed array, whose contents is now
17107 a member of...
17108 (state_t): this structure.
17109 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17110 Adjust.
17111
17112 2001-11-19 Akim Demaille <akim@epita.fr>
17113
17114 * src/lalr.h (consistent): Removed array, whose contents is now
17115 a member of...
17116 (state_t): this structure.
17117 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17118 Adjust.
17119
17120 2001-11-19 Akim Demaille <akim@epita.fr>
17121
17122 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
17123 contents are now members of...
17124 (state_t): this structure.
17125 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
17126 Adjust.
17127
17128 2001-11-19 Akim Demaille <akim@epita.fr>
17129
17130 * src/lalr.h (state_t): New.
17131 (state_table): Be a state_t * instead of a core **.
17132 (accessing_symbol): Remove, part of state_t.
17133 * src/lalr.c: Adjust.
17134 (set_accessing_symbol): Merge into...
17135 (set_state_table): this.
17136 * src/print_graph.c, src/conflicts.c: Adjust.
17137
17138 2001-11-14 Akim Demaille <akim@epita.fr>
17139
17140 * tests/calc.at, tests/output.at, tests/regression.at,
17141 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
17142 now the tests are run in private dirs, therefore AC_CLEANUP and
17143 family can be simplified to 0-ary.
17144 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
17145 use abs. path to find config.h.
17146 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
17147 stderr, there can be way too much random noise.
17148 Instead pass -Werror to GCC and rely on the exit status.
17149 Reported by Wolfram Wagner.
17150
17151 2001-11-14 Akim Demaille <akim@epita.fr>
17152
17153 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
17154 defined only if yyoverflow is defined, to avoid `warning: unused
17155 variable `yyvs1''.
17156 Reported by The Test Suite.
17157
17158 2001-11-14 Akim Demaille <akim@epita.fr>
17159
17160 * src/print.c: Include reduce.h.
17161 Reported by Hans Aberg.
17162
17163 2001-11-14 Akim Demaille <akim@epita.fr>
17164
17165 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
17166 Revert a previous patch: these are really const.
17167 * src/conflicts.c (conflict_report): Additional useless pair of
17168 braces to pacify GCC's warnings for `if () if () {} else {}'.
17169 * src/lex.c (parse_percent_token): Replace equal_offset with
17170 arg_offset.
17171 arg is const.
17172 Be sure to strdup `arg' when used, since there is no reason for
17173 token_buffer not to change.
17174
17175 2001-11-14 Akim Demaille <akim@epita.fr>
17176
17177 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
17178 definition.
17179 * src/main.c (main): Use them.
17180 Suggested by Hans Aberg.
17181
17182 2001-11-12 Akim Demaille <akim@epita.fr>
17183
17184 * src/system.h (ngettext): Now that we use ngettext, be sure to
17185 provide a default definition when NLS are not used.
17186
17187 2001-11-12 Akim Demaille <akim@epita.fr>
17188
17189 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
17190 Use @kbd to denote user input.
17191 (Language and Grammar): ANSIfy the example.
17192 Adjust its layout for info/notinfo.
17193 (Location Tracking Calc): Output error messages to stderr.
17194 Output locations in a more GNUtically correct way.
17195 Fix a couple of Englishos.
17196 Adjust @group/@end group pairs.
17197
17198 2001-11-12 Akim Demaille <akim@epita.fr>
17199
17200 %expect was not functioning at all.
17201
17202 * src/conflicts.c (expected_conflicts): Set to -1.
17203 (conflict_report): Use ngettext.
17204 (conflicts_print): Check %expect and make its violation an error.
17205 * doc/bison.texinfo (Expect Decl): Adjust.
17206 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
17207 * tests/regression.at (%expect not enough, %expect right)
17208 (%expect too much): New.
17209
17210 2001-11-12 Akim Demaille <akim@epita.fr>
17211
17212 * tests/regression.at (Conflicts): Rename as...
17213 (Unresolved SR Conflicts): this.
17214 (Solved SR Conflicts): New.
17215
17216 2001-11-12 Akim Demaille <akim@epita.fr>
17217
17218 * src/reduce.c (print_results): Rename as...
17219 (reduce_output): This.
17220 Output to OUT, passed as argument, instead of output_obstack.
17221 (dump_grammar): Likewise.
17222 (reduce_free): New.
17223 Also free V1.
17224 (reduce_grammar): No longer call reduce_output, since...
17225 * src/print.c (print_results): do it.
17226 * src/main.c (main): Call reduce_free;
17227
17228 2001-11-12 Akim Demaille <akim@epita.fr>
17229
17230 * src/conflicts.c (print_reductions): Accept OUT as argument.
17231 Output to it, not to output_obstack.
17232 * src/print.c (print_actions): Adjust.
17233
17234 2001-11-12 Akim Demaille <akim@epita.fr>
17235
17236 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
17237 the result instead of using...
17238 (src_total, rrc_total, src_count, rrc_count): Remove.
17239 (any_conflicts): Remove.
17240 (print_conflicts): Split into...
17241 (conflicts_print, conflicts_output): New.
17242 * src/conflicts.h: Adjust.
17243 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
17244 * src/print.c (print_grammar): Issue `\n' between two rules.
17245 * tests/regression.at (Conflicts): New.
17246 Reported by Tom Lane.
17247
17248 2001-11-12 Akim Demaille <akim@epita.fr>
17249
17250 * tests/regression.at (Invalid input): Remove, duplicate with
17251 ``Invalid input: 1''.
17252
17253 2001-11-12 Akim Demaille <akim@epita.fr>
17254
17255 * tests/torture.at (AT_DATA_STACK_TORTURE)
17256 (Exploding the Stack Size with Alloca)
17257 (Exploding the Stack Size with Malloc): New.
17258
17259 2001-11-12 Akim Demaille <akim@epita.fr>
17260
17261 * src/bison.simple (YYSTACK_REALLOC): New.
17262 (yyparse) [!yyoverflow]: Use it and free the old stack.
17263 Reported by Per Allansson.
17264
17265 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
17266
17267 * src/bison.simple: Define type yystype instead of YYSTYPE, and
17268 define CPP macro, which substitute YYSTYPE by yystype.
17269 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
17270 with yyltype/YYLTYPE. This allows inclusion of the generated
17271 header within the parser if the compiler, such as GGC, accepts
17272 multiple equivalent #defines.
17273 From Akim.
17274
17275 2001-11-05 Akim Demaille <akim@epita.fr>
17276
17277 * src/reader.c (symbols_output): New, extracted from...
17278 (packsymbols): here.
17279 (reader): Adjust.
17280
17281 2001-11-05 Akim Demaille <akim@epita.fr>
17282
17283 * src/lex.c (parse_percent_token): s/quotearg/quote/.
17284
17285 2001-11-05 Akim Demaille <akim@epita.fr>
17286
17287 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
17288 pattern.
17289
17290 2001-11-05 Akim Demaille <akim@epita.fr>
17291
17292 * src/options.h (struct option_table_struct): set_flags is void*.
17293 * src/options.c (longopts): Support `--output' and `%output'.
17294 (usage): Adjust.
17295 * src/lex.h (tok_setopt): Remove, replaced with...
17296 (tok_intopt, tok_stropt): these new guys.
17297 * src/lex.c (getopt.h): Not needed.
17298 (token_buffer, unlexed_token_buffer): Not const.
17299 (percent_table): Promote `-' over `_' in directive names.
17300 Active `%name-prefix', `file-prefix', and `output'.
17301 (parse_percent_token): Accept possible arguments to directives.
17302 Promote `-' over `_' in directive names.
17303
17304 2001-11-04 Akim Demaille <akim@epita.fr>
17305
17306 * doc/bison.texinfo (Decl Summary): Split the list into
17307 `directives for grammars' and `directives for bison'.
17308 Sort'em.
17309 Add description of `%name-prefix', `file-prefix', and `output'.
17310 Promote `-' over `_' in directive names.
17311 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
17312 Simplify the description of `--name-prefix'.
17313 Promote `-' over `_' in directive names.
17314 Promote `--output' over `--output-file'.
17315 Fix the description of `--defines'.
17316 * tests/output.at: Exercise %file-prefix and %output.
17317
17318 2001-11-02 Akim Demaille <akim@epita.fr>
17319
17320 * doc/refcard.tex: Update.
17321
17322 2001-11-02 Akim Demaille <akim@epita.fr>
17323
17324 * src/symtab.h (SUNDEF): New.
17325 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
17326 stand for `uninitialized', instead of 0.
17327 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
17328 * src/lex.c (lex): Adjust.
17329
17330 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
17331 Number it 0.
17332 Let yylex return it instead of a plain 0.
17333 Reported by Dick Streefland.
17334
17335 2001-11-02 Akim Demaille <akim@epita.fr>
17336
17337 * tests/regression.at (Mixing %token styles): New test.
17338
17339 2001-11-02 Akim Demaille <akim@epita.fr>
17340
17341 * src/reader.c (parse_thong_decl): Formatting changes.
17342 (token_translations_init): New, extracted from...
17343 (packsymbols): Here.
17344 Adjust.
17345
17346 2001-11-01 Akim Demaille <akim@epita.fr>
17347
17348 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
17349 Check that `9foo.y' produces correct cpp guards.
17350 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
17351 guards.
17352 Reported by Wwp.
17353
17354 2001-11-01 Akim Demaille <akim@epita.fr>
17355
17356 * tests/regression.at (Invalid input: 2): New.
17357 * src/lex.c (unlexed_token_buffer): New.
17358 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
17359 too.
17360 Reported by Wwp.
17361
17362 2001-11-01 Akim Demaille <akim@epita.fr>
17363
17364 * tests/calc.at: Catch up with 1.30.
17365 * configure.in: Bump to 1.49a.
17366 Adjust to newer Autotest.
17367
17368 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
17369
17370 * src/conflicts.c: Move global variables rrc_total and src_total ...
17371 (print_conflicts): here.
17372 * src/output.c (output): Free global variable user_toknums.
17373 * src/lex.c (token_obstack): Become static.
17374
17375 2001-10-18 Akim Demaille <akim@epita.fr>
17376
17377 * tests/atlocal.in (GCC): Add.
17378 * tests/calc.at: s/m4_match/m4_bmatch/.
17379 s/m4_patsubst/m4_bpatsubst/.
17380 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
17381 * configure.in: AC_SUBST(GCC).
17382
17383 2001-10-14 Marc Autret <autret_m@epita.fr>
17384
17385 * src/options.c (create_long_option_table): Fix.
17386
17387 2001-10-10 Akim Demaille <akim@epita.fr>
17388
17389 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
17390
17391 2001-10-04 Akim Demaille <akim@epita.fr>
17392
17393 * src/reader.c (parse_union_decl): Push the caracters in
17394 union_obstack, not attrs_obstack.
17395
17396 2001-10-04 Akim Demaille <akim@epita.fr>
17397
17398 Merge in the branch 1.29.
17399
17400 * src/reader.c (packsymbols): Use a temporary obstack for
17401 `%%tokendef', since output_stack is already used elsewhere.
17402
17403 2001-10-02 Akim Demaille <akim@epita.fr>
17404
17405 Bump 1.29d.
17406
17407 2001-10-02 Akim Demaille <akim@epita.fr>
17408
17409 Version 1.29c.
17410
17411 2001-10-02 Akim Demaille <akim@epita.fr>
17412
17413 * tests/regression.at (Invalid CPP headers): New.
17414 From Alexander Belopolsky.
17415 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
17416
17417 2001-10-02 Akim Demaille <akim@epita.fr>
17418
17419 * tests/regression.at (Invalid input): New.
17420 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
17421 Reported by Shura.
17422
17423 2001-10-02 Akim Demaille <akim@epita.fr>
17424
17425 * tests/calc.at: Now that --debug works, the tests must be adjusted.
17426
17427 2001-10-02 Akim Demaille <akim@epita.fr>
17428
17429 * src/output.c (output_parser): Assert `skeleton'.
17430 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
17431 systems.
17432 From Shura.
17433
17434 2001-10-01 Marc Autret <autret_m@epita.fr>
17435
17436 * src/lex.h: Echo modifications.
17437 * src/lex.c (unlex): Parameter is now token_t.
17438 From Hans Aberg.
17439
17440 2001-10-01 Marc Autret <autret_m@epita.fr>
17441
17442 * src/main.c: Include lex.h.
17443 From Hans Aberg.
17444
17445 2001-09-29 Akim Demaille <akim@epita.fr>
17446
17447 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
17448
17449 2001-09-28 Akim Demaille <akim@epita.fr>
17450
17451 * tests/testsuite.at: Update to newer Autotest.
17452 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
17453
17454 2001-09-27 Akim Demaille <akim@epita.fr>
17455
17456 Position independent wrapper.
17457
17458 * tests/bison: Remove.
17459 * tests/bison.in: New.
17460 * configure.in: Adjust.
17461
17462 2001-09-27 Paul Eggert <eggert@twinsun.com>
17463
17464 Port quotearg fixes from tar 1.13.24.
17465
17466 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
17467 tm to be declared.
17468 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
17469 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
17470
17471 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
17472 * m4/mbrtowc.m4: New file.
17473 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
17474 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
17475
17476 2001-09-27 Akim Demaille <akim@epita.fr>
17477
17478 Bump to 1.29c.
17479
17480 2001-09-27 Akim Demaille <akim@epita.fr>
17481
17482 Version 1.29b.
17483
17484 2001-09-25 Akim Demaille <akim@epita.fr>
17485
17486 * src/system.h: Include `xalloc.h'.
17487 Remove it from the C files.
17488 * src/files.c (output_files): Free the obstacks.
17489 * src/lex.c (init_lex): Rename as...
17490 (lex_init): this.
17491 (lex_free): New.
17492 * src/main.c (main): Use it.
17493
17494 2001-09-24 Marc Autret <autret_m@epita.fr>
17495
17496 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
17497 to output informations in fout (FILE*).
17498 (open_graph, close_graph): Likewise.
17499 (output_graph, output_edge, output_node): Likewise.
17500 * src/vcg.h: Update function prototypes.
17501 * src/print_graph.c (print_graph): Open output graph file.
17502 (print_actions): Adjust.
17503 * src/files.h: Remove extern declaration.
17504 * src/files.c: Remove graph_obstack declaration.
17505 (open_files): Remove graph_obstack initialization.
17506 (output_files): Remove graph_obstack saving.
17507
17508 2001-09-24 Marc Autret <autret_m@epita.fr>
17509
17510 * src/files.c (compute_output_file_names): Fix.
17511
17512 2001-09-24 Marc Autret <autret_m@epita.fr>,
17513 Akim Demaille <akim@epita.fr>
17514
17515 * src/reader.c (reader): Remove call to free_symtab ().
17516 * src/main.c (main): Call it here.
17517 Include symtab.h.
17518 * src/conflicts.c (initialize_conflicts): Rename as...
17519 (solve_conflicts): this.
17520 * src/print.c (print_core, print_actions, print_state)
17521 (print_grammar): Dump to a file instead a `output_obstack'.
17522 (print_results): Dump `output_obstack', and then proceed with the
17523 FILE *.
17524 * src/files.c (compute_output_file_names, close_files): New.
17525 (output_files): Adjust.
17526 * src/main.c (main): Adjust.
17527
17528 2001-09-23 Marc Autret <autret_m@epita.fr>
17529
17530 * src/files.c (compute_header_macro): Computes header macro name
17531 from spec_defines_file when given.
17532
17533 2001-09-23 Marc Autret <autret_m@epita.fr>
17534
17535 * src/files.c (output_files): Add default extensions.
17536
17537 2001-09-22 Akim Demaille <akim@epita.fr>
17538
17539 * src/conflicts.c (finalize_conflicts): Rename as...
17540 (free_conflicts): this.
17541
17542 2001-09-22 Akim Demaille <akim@epita.fr>
17543
17544 * src/gram.c (gram_free): Rename back as...
17545 (dummy): this.
17546 (output_token_translations): Free `token_translations'.
17547 * src/symtab.c (free_symtab): Free the tag field.
17548
17549 2001-09-22 Akim Demaille <akim@epita.fr>
17550
17551 Remove `translations' as it is always set to true.
17552
17553 * src/gram.h: Adjust.
17554 * src/reader.c (packsymbols, parse_token_decl): Adjust
17555 * src/print.c (print_grammar): Adjust.
17556 * src/output.c (output_token_translations): Adjust.
17557 * src/lex.c (lex): Adjust.
17558 * src/gram.c: Be sure the set pointers to NULL.
17559 (dummy): Rename as...
17560 (gram_free): this.
17561
17562 2001-09-22 Akim Demaille <akim@epita.fr>
17563
17564 * configure.in: Invoke AM_LIB_DMALLOC.
17565 * src/system.h: Use dmalloc.
17566 * src/LR0.c: Be sure to have pointers initialized to NULL.
17567 (allocate_itemsets): Allocate kernel_items only if needed.
17568
17569 2001-09-22 Akim Demaille <akim@epita.fr>
17570
17571 * configure.in: Bump to 1.29b.
17572 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
17573 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
17574 need xmalloc.c in calc.y.
17575 From Pascal Bart.
17576
17577 2001-09-21 Akim Demaille <akim@epita.fr>
17578
17579 Version 1.29a.
17580 * Makefile.maint, config/config.guess, config/config.sub,
17581 * config/missing: Update from masters.
17582 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
17583 upon package.m4.
17584 * configure.in (ALL_LINGUAS): Add `tr'.
17585
17586 2001-09-21 Akim Demaille <akim@epita.fr>
17587
17588 * tests/Makefile.am (package.m4): Move to...
17589 ($(srcdir)/$(TESTSUITE)): here.
17590
17591 2001-09-20 Akim Demaille <akim@epita.fr>
17592
17593 * src/complain.c: No longer try to be standalone: use system.h.
17594 Don't assume __STDC__ is defined to 1. Just test if it is defined.
17595 * src/complain.h: Likewise.
17596 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
17597 Remove the unused variable `n'.
17598 From Albert Chin-A-Young.
17599
17600 2001-09-18 Marc Autret <autret_m@epita.fr>
17601
17602 * doc/bison.1: Update.
17603 * doc/bison.texinfo (Bison Options): Update --defines and --graph
17604 descriptions.
17605 (Option Cross Key): Update.
17606 Add --graph.
17607
17608 2001-09-18 Marc Autret <autret_m@epita.fr>
17609
17610 * tests/regression.at: New test (comment in %union).
17611
17612 2001-09-18 Marc Autret <autret_m@epita.fr>
17613
17614 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
17615 do that.
17616 Reported by Keith Browne.
17617
17618 2001-09-18 Marc Autret <autret_m@epita.fr>
17619
17620 * tests/output.at: Add tests for --defines and --graph.
17621
17622 2001-09-18 Marc Autret <autret_m@epita.fr>
17623
17624 * tests/output.at: Removes tests of %{header,src}_extension features.
17625
17626 2001-09-18 Akim Demaille <akim@epita.fr>
17627
17628 * tests/Makefile.am (package.m4): New.
17629 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
17630 (_AT_CHECK_CALC_ERROR): Likewise.
17631 Factor the `, ' part of verbose error messages.
17632
17633 2001-09-18 Marc Autret <autret_m@epita.fr>
17634
17635 * src/getargs.c (longopts): Declare --defines and --graph as options
17636 with optional arguments.
17637 * src/files.h: Add extern declarations.
17638 * src/files.c (spec_graph_file, spec_defines_file): New.
17639 (output_files): Update.
17640 Remove CPP-outed code.
17641
17642 2001-09-18 Marc Autret <autret_m@epita.fr>
17643
17644 Turn off %{source,header}_extension feature.
17645
17646 * src/files.c (compute_exts_from_gf): Update.
17647 (compute_exts_from_src): Update.
17648 (output_files): CPP-out useless code.
17649 * src/files.h: Remove {header,source}_extension extern declarations.
17650 * src/reader.c (parse_dquoted_param): CPP-out.
17651 (parse_header_extension_decl): Remove.
17652 (parse_source_extension_decl): Remove.
17653 (read_declarations): Remove cases tok_{hdrext,srcext}.
17654 * src/lex.c (percent_table): Remove {header,source}_extension entries.
17655 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
17656
17657 2001-09-10 Akim Demaille <akim@epita.fr>
17658
17659 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
17660 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
17661 (AT_CHECK_OUTPUT): this.
17662 Merely check ls' exit status, its output is useless.
17663
17664 2001-09-10 Akim Demaille <akim@epita.fr>
17665
17666 * tests/calc.at: Use m4_match.
17667 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
17668
17669 2001-09-10 Marc Autret <autret_m@epita.fr>,
17670 Akim Demaille <akim@epita.fr>
17671
17672 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
17673 enum color_e.
17674 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
17675 to `normal'.
17676 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
17677 * src/lex.h: Adjust prototype.
17678 (token_t): Add `tok_undef'.
17679 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
17680 (parse_percent_token): Now returns token_t.
17681 Add default statement in switch.
17682 (lex): Separate `c' as an input variable, from the token_t result
17683 part.
17684 (unlexed): Is a token_t.
17685
17686 2001-09-10 Akim Demaille <akim@epita.fr>
17687
17688 * configure.in: Bump to 1.29a.
17689
17690 2001-09-07 Akim Demaille <akim@epita.fr>
17691
17692 Version 1.29.
17693
17694 2001-08-30 Akim Demaille <akim@epita.fr>
17695
17696 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
17697 * m4/atconfig.m4: Remove.
17698 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
17699 * tests/bison: New.
17700 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
17701 m4_if, m4_patsubst, and m4_regexp.
17702 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
17703 `input' file instead of echo.
17704
17705 2001-08-29 Akim Demaille <akim@epita.fr>
17706
17707 Bump to 1.28e.
17708
17709 2001-08-29 Akim Demaille <akim@epita.fr>
17710
17711 Version 1.28d.
17712
17713 2001-08-29 Paul Eggert <eggert@twinsun.com>
17714
17715 * src/bison.simple (yyparse): Don't take the address of an
17716 item before the start of an array, as that doesn't conform to
17717 the C Standard.
17718
17719 2001-08-29 Robert Anisko <anisko_r@epita.fr>
17720
17721 * doc/bison.texinfo (Location Tracking Calc): New node.
17722
17723 2001-08-29 Paul Eggert <eggert@twinsun.com>
17724
17725 * src/output.c (output): Do not define const, as this now
17726 causes more problems than it cures.
17727
17728 2001-08-29 Akim Demaille <akim@epita.fr>
17729
17730 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
17731 the nodes.
17732 Be sure to tag the `detailmenu'.
17733
17734 2001-08-29 Akim Demaille <akim@epita.fr>
17735
17736 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
17737 download in a tmp dir.
17738
17739 2001-08-28 Marc Autret <autret_m@epita.fr>
17740
17741 * config/depcomp: New file.
17742
17743 2001-08-28 Marc Autret <autret_m@epita.fr>
17744
17745 * doc/bison.1 (mandoc): Adjust.
17746 From Juan Manuel Guerrero.
17747
17748 2001-08-28 Marc Autret <autret_m@epita.fr>
17749
17750 * src/print_graph.c (print_state): Fix.
17751
17752 2001-08-27 Marc Autret <autret_m@epita.fr>
17753
17754 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
17755 char * members.
17756 Echo modifications to the functions prototypes.
17757 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
17758
17759 2001-08-27 Marc Autret <autret_m@epita.fr>
17760
17761 * src/vcg.c: Include `xalloc.h'.
17762 (add_colorentry): New.
17763 (add_classname): New.
17764 (add_infoname): New.
17765 * src/vcg.h: Add new prototypes.
17766
17767 2001-08-27 Akim Demaille <akim@epita.fr>
17768
17769 * Makefile.maint: Sync. again with CVS Autoconf.
17770
17771 2001-08-27 Akim Demaille <akim@epita.fr>
17772
17773 * Makefile.maint: Formatting changes.
17774 (po-update, cvs-update, update): New targets.
17775 (AMTAR): Remove.
17776
17777 2001-08-27 Akim Demaille <akim@epita.fr>
17778
17779 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
17780 * Makefile.maint: Sync. with CVS Autoconf.
17781
17782 2001-08-27 Marc Autret <autret_m@epita.fr>
17783
17784 * src/vcg.h (struct infoname_s): New.
17785 (struct colorentry_s): New.
17786 (graph_s): New fields {vertical,horizontal}_order in structure.
17787 Add `infoname' field.
17788 Add `colorentry' field;
17789 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
17790 (G_HORIZONTAL_ORDER): New.
17791 (G_INFONAME): New.
17792 (G_COLORENTRY): New.
17793 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
17794 Add output of `infoname'.
17795 Add output of `colorentry'.
17796
17797 2001-08-27 Marc Autret <autret_m@epita.fr>
17798
17799 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
17800 This one shadowed a global parameter.
17801
17802 2001-08-24 Marc Autret <autret_m@epita.fr>
17803
17804 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
17805 instead of `unsigned'.
17806 (print_state): Do not call obstack_object_size () in obstack_grow ()
17807 to avoid macro variables shadowing.
17808
17809 2001-08-23 Marc Autret <autret_m@epita.fr>
17810
17811 * src/lex.c (percent_table): Typo: s/naem/name/.
17812 Add graph option.
17813 Normalize new options declarations.
17814
17815 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
17816
17817 * tests/suite.at: Exercise %header_extension and %source_extension.
17818
17819 2001-08-16 Marc Autret <autret_m@epita.fr>
17820
17821 * src/reader.c (parse_dquoted_param): New.
17822 (parse_header_extension_decl): Use it.
17823 (parse_source_extension_decl): Likewise.
17824
17825 2001-08-16 Marc Autret <autret_m@epita.fr>
17826
17827 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
17828 (get_xxxx_str): Use assert () instead of complain ().
17829 Remove return invokations in default cases.
17830 (get_decision_str): Modify default behaviour. Remove second argument.
17831 Echo modifications on calls.
17832 (output_graph): Fix.
17833
17834 2001-08-16 Marc Autret <autret_m@epita.fr>
17835
17836 * src/getargs.c (usage): Update with ``-g, --graph''.
17837
17838 2001-08-16 Marc Autret <autret_m@epita.fr>
17839
17840 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
17841 (Option Cross Key): Likewise.
17842 * doc/bison.1: Update.
17843
17844 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
17845
17846 * src/output.c (output_master_parser): Don't finish action_obstack.
17847 (output_parser): Don't care about the muscle action, here.
17848 (prepare): Copy the action_obstack in the action muscle.
17849 (output): Free action_obstack.
17850
17851 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17852
17853 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
17854 will contain `%union' declaration.
17855 (parse_union_decl): Delete #line directive output.
17856 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
17857 informations about %union.
17858 (parse_union_decl): Copy the union_obstack in the muscle stype.
17859 * src/bison.simple: Add new #line directive.
17860 Add typdef %%stype YYSTYPE.
17861
17862 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
17863
17864 * src/bison.simple: Add new `#line' directive.
17865
17866 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
17867
17868 * src/bison.simple: New `#line' directive.
17869 * src/output.c (output_parser): Support new dynamic muscle input_line.
17870
17871 2001-09-22 Marc Autret <autret_m@epita.fr>
17872
17873 * src/output.c (output_master_parser): New.
17874 (output_parser): Be more re-entrant.
17875
17876 2001-09-21 Marc Autret <autret_m@epita.fr>
17877
17878 * src/reader.c (copy_definition, parse_union_decl): Update and use
17879 `linef' muscle.
17880 (copy_action): Likewise.
17881 Use obstack_1grow ().
17882 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
17883
17884 2001-09-21 Marc Autret <autret_m@epita.fr>
17885
17886 * src/options.c (option_table): Adjust.
17887 * src/lex.c (parse_percent_token): Fix.
17888
17889 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17890
17891 * src/options.c (symtab.h): Include it, need by lex.h.
17892
17893 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
17894
17895 * src/lex.c (parse_percent_token): Change type of variable `tx', which
17896 is now an option_table_struct*.
17897 (option_strcmp): New function option_strcmp.
17898 (parse_percent_token): Call option_strcmp.
17899 * src/getargs.c (xalloc.h, options.h): Include it.
17900 (getargs): Call create_long_option_table.
17901 (getargs): Free longopts at the end of the function.
17902 (shortopts): Move in options.c.
17903 * src/options.c (create_long_option_table): New function. Convert
17904 information from option_table to option structure.
17905 * src/reader.c (options.h): Include it.
17906
17907 * src/Makefile.am: Adjust.
17908 * src/options.c (option_table): Create from longopts and percent_table.
17909 * src/getargs.c (longopts): Delete.
17910 * src/lex.c (struct percent_table_struct): Delete.
17911 (percent_table): Delete.
17912 (options.h): Include it.
17913 * src/options.c: Create.
17914 * src/options.h: Create.
17915 Declare enum opt_access_e.
17916 Define struct option_table_struct.
17917
17918 2001-09-20 Marc Autret <autret_m@epita.fr>
17919
17920 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
17921 sections of Bison.
17922
17923 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
17924
17925 * src/bison.simple: s/%%filename/%%skeleton.
17926 * src/muscle_tab.c (getargs.h): Include it.
17927 (muscle_init): Insert new muscle skeleton.
17928
17929 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
17930
17931 * src/output.c (output_parser): Delete unused variable actions_dumped.
17932
17933 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
17934
17935 * src/output.c (output): Delete call to reader_output_yylsp.
17936 * src/reader.c (reader): Likewise.
17937 * src/reader.h: Delete declaration of reader_output_yylsp.
17938
17939 2001-09-02 Marc Autret <autret_m@epita.fr>
17940
17941 * src/reader.c: Include muscle_tab.h.
17942 (parse_union_decl): Update.
17943 (parse_macro_decl): Rename parse_muscle_decl.
17944 Update to use renamed functions and variable.
17945 (read_declarations, copy_action, read_additionnal_code, : Updated
17946 with correct variables and functions names.
17947 (packsymbols, reader): Likewise.
17948
17949 * src/reader.h (muscle_obstack): Extern declaration update.
17950
17951 * src/output.c: Include muscle_tab.h
17952 In all functions using macro_insert, change by using muscle_insert ().
17953 (macro_obstack): Rename muscle_obstack.
17954 Echo modifications in the whole file.
17955 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
17956 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
17957 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
17958
17959 * src/muscle_tab.h: Update double inclusion macros.
17960 (macro_entry_s): Rename muscle_entry_s.
17961 Update prototypes.
17962
17963 * src/muscle_tab.c: Include muscle_tab.h.
17964 Rename macro_tabble to muscle_table.
17965 (mhash1, mhash2, mcmp): Use muscle_entry.
17966 (macro_init): Rename muscle_init. Update.
17967 (macro_insert): Rename muscle_insert. Update.
17968 (macro_find): Rename muscle_find. Update.
17969
17970 * src/main.c: Include muscle_tab.h.
17971 (main): Call muscle_init ().
17972 * src/Makefile.am (bison_SOURCES): Echo modifications.
17973
17974 2001-09-02 Marc Autret <autret_m@epita.fr>
17975
17976 Now the files macro_tab.[ch] are named muscle_tab.[ch].
17977
17978 * src/muscle_tab.c, src/muscle_tab.h: Add files.
17979
17980 2001-09-02 Marc Autret <autret_m@epita.fr>
17981
17982 * src/macrotab.c, src/macrotab.h: Remove.
17983
17984 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
17985
17986 * src/reader.c (copy_guard): Use muscle to specify the `#line'
17987 filename.
17988
17989 2001-09-01 Marc Autret <autret_m@epita.fr>
17990
17991 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
17992 to an explicit value to activate the feature. We do it here.
17993
17994 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
17995
17996 * src/output.c (prepare): Delete the `filename' muscule insertion.
17997 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
17998 (parse_union_decl): Likewise.
17999 * src/macrotab.c (macro_init): Initialize filename by infile.
18000
18001 2001-08-31 Marc Autret <autret_m@epita.fr>
18002
18003 * src/bison.simple (YYLSP_NEEDED): New definition.
18004 * src/output.c (prepare): Add macro insertion of `locations_flag'
18005
18006 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18007
18008 * src/output.c (prepare): Delete insertion of previous muscles,
18009 and insert the `prefix' muscles.
18010 * src/macrotab.c (macro_init): Likewise.
18011 (macro_init): Initialization prefix directive by `yy'.
18012 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
18013 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
18014 yylval, yydebug, yyerror, yynerrs and yyparse.
18015 New directive `#define' to substitute yydebug, ... with option
18016 name_prefix.
18017
18018 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18019
18020 * src/main.c (main): Standardize.
18021 * src/output.c (output_table_data, output_parser): Likewise.
18022 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
18023
18024 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
18025
18026 * src/reader.c (read_additionnal_code): Rename %%user_code to
18027 %%epilogue.
18028 * src/output.c (output): Rename %%declarations to %%prologue.
18029 * src/bison.simple: Echo modifications.
18030
18031 2001-08-31 Marc Autret <autret_m@epita.fr>
18032
18033 * src/reader.c (readgram): CleanUp.
18034 (output_token_defines): Likewise.
18035 (packsymbols): Likewise.
18036 (reader): Likewise.
18037 * src/output.c (output): CPP-out useless code.
18038
18039 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
18040
18041 * src/reader.c (reader): Delete obsolete call to function
18042 output_trailers and output_headers.
18043 * src/output.h: Remove obsolete functions prototypes of output_headers
18044 and output_trailers.
18045
18046 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
18047
18048 * src/main.c: Include macrotab.h.
18049 * src/macrotab.h (macro_entry_s): Constify fields.
18050 Adjust functions prototypes.
18051 * src/macrotab.c (macro_insert): Constify key and value.
18052 (macro_find): Constify key.
18053 (macro_insert): Include 'xalloc.h'
18054 (macro_insert): Use XMALLOC.
18055 (macro_find): Constify return value.
18056 * src/output.c (output_table_data): Rename table to table_data.
18057 (output_parser): Constify macro_key, macro_value.
18058
18059 2001-08-30 Marc Autret <autret_m@epita.fr>
18060
18061 * src/reader.c (parse_skel_decl): New.
18062 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
18063 * src/lex.h (token_t): New token `tok_skel'.
18064 * src/lex.c (percent_table): Add skeleton option entry.
18065 Standardize.
18066
18067 2001-08-29 Marc Autret <autret_m@epita.fr>
18068
18069 * src/bison.simple: Add %%user_code directive at the end.
18070 * src/reader.c (read_additionnal_code): New.
18071 (reader): Use it.
18072 * src/output.c (output_program): Remove.
18073 (output): Update.
18074
18075 2001-08-28 Marc Autret <autret_m@epita.fr>
18076
18077 * src/output.c (output_actions): Clean up.
18078 (output_gram): CPP-out useless code.
18079 * src/reader.c (reader): Clean up, CPP-out useless code.
18080
18081 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
18082
18083 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
18084 directive.
18085 * src/bison.simple: Add `%%definitions'.
18086
18087 2001-08-28 Marc Autret <autret_m@epita.fr>
18088
18089 * config/depcomp: New file.
18090
18091 2001-08-27 Paul Eggert <eggert@twinsun.com>
18092
18093 * src/bison.simple (yyparse): Don't take the address of an
18094 item before the start of an array, as that doesn't conform to
18095 the C Standard.
18096
18097 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
18098
18099 * src/output.c (output): Remove the initialization of the macro
18100 obstack. It was done too late here.
18101
18102 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
18103 completely wrong.
18104 (reader): Initialize the macro obstack here, since we need it to grow
18105 '%define' directives.
18106
18107 * src/reader.h: Declare the macro obstack as extern.
18108
18109 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
18110
18111 * src/output.c (output_parser): Fix. Store single '%' characters in
18112 the output obstack instead of throwing them away.
18113
18114 2001-08-27 Akim Demaille <akim@epita.fr>
18115
18116 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
18117
18118 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18119
18120 * lib/Makefile.am: Adjust.
18121
18122 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18123
18124 * src/bison.simple: Update and add '%%' directives.
18125
18126 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18127
18128 * src/reader.c (reader): Remove calls to 'output_headers' and
18129 'output_trailers'. Remove some C output.
18130 (readgram): Disable a piece of code that was writing a default
18131 definition for 'YYSTYPE'.
18132 (reader_output_yylsp): Remove.
18133 (packsymbols): Output token defintions to a macro.
18134 (copy_definition): Disable C output.
18135
18136 * src/reader.c (parse_macro_decl): New function used to parse macro
18137 declarations.
18138 (copy_string2): Put the body of copy_string into this new function.
18139 Add a parameter to let the caller choose whether he wants to copy the
18140 string delimiters or not.
18141 (copy_string): Be a simple call to copy_string2 with the last argument
18142 bound to true.
18143 (read_declarations): Add case for macro definition.
18144 (copy_identifier): New.
18145 (parse_macro_decl): Read macro identifiers using copy_identifier
18146 rather than lex.
18147
18148 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18149
18150 * src/output.c (prepare): Add prefixed names.
18151 (output_parser): Output semantic actions.
18152 (output_parser): Fix bug on '%%line' directives.
18153
18154 * src/output.c (output_headers): Remove. The C code printed by this
18155 function should now be in the skeletons.
18156 (output_trailers): Remove.
18157 (output): Disable call to 'reader_output_yylsp'.
18158 (output_rule_data): Do not output tables to the table obstack.
18159
18160 * src/output.c: Remove some C dedicated output.
18161 Improve the use of macro and output obstacks.
18162 (output_defines): Remove.
18163
18164 * src/output.c (output_token_translations): Associate 'translate'
18165 table with a macro. No output to the table obstack.
18166 (output_gram): Same for 'rhs' and 'prhs'.
18167 (output_stos): Same for 'stos'.
18168 (output_rule_data): Same for 'r1' and 'r2'.
18169 (token_actions): Same for 'defact'.
18170 (goto_actions): Same for 'defgoto'.
18171 (output_base): Same for 'pact' and 'pgoto'.
18172 (output_table): Same for 'table'.
18173 (output_check): Same for 'check'.
18174
18175 * src/output.c (output_table_data): New function.
18176 (output_short_table): Remove.
18177 (output_short_or_char_table): Remove.
18178
18179 * src/output.c (output_parser): Replace most of the skeleton copy code
18180 with something new. Skeletons are now processed character by character
18181 rather than line by line, and Bison looks for '%%' macros. This is the
18182 first step in making Bison's output process (a lot) more flexible.
18183 (output_parser): Use the macro table.
18184
18185 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18186
18187 * src/main.c (main): Initialize the macro table.
18188
18189 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18190
18191 * src/lex.c (percent_table): Add tok_define.
18192 * src/lex.h: Add tok_define.
18193
18194 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18195
18196 * src/macrotab.c: New file.
18197 * src/macrotab.h: New file.
18198 * src/Makefile.am: Update.
18199
18200 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
18201
18202 * lib/hash.c: New file.
18203 * lib/hash.h: New file.
18204 * lib/Makefile.am: Update.
18205
18206 2001-08-15 Akim Demaille <akim@epita.fr>
18207
18208 Version 1.28c.
18209
18210 2001-08-15 Marc Autret <autret_m@epita.fr>
18211
18212 * src/reader.c (readgram): Indent output macro YYSTYPE.
18213 (packsymbols): Likewise.
18214 (output_token_defines): Likewise.
18215 * src/files.c: Standardize.
18216 (compute_header_macro): New.
18217 (defines_obstack_save): New. Use compute_header_macro.
18218 (output_files): Update. Use defines_obstack_save.
18219
18220 2001-08-15 Akim Demaille <akim@epita.fr>
18221
18222 * doc/bison.texinfo (Table of Symbols): Document
18223 YYSTACK_USE_ALLOCA.
18224
18225 2001-08-15 Akim Demaille <akim@epita.fr>
18226
18227 * missing: Update from CVS Automake.
18228 * config/config.guess, config/config.sub, config/texinfo.tex:
18229 Update from gnu.org.
18230
18231 2001-08-15 Akim Demaille <akim@epita.fr>
18232
18233 * Makefile.maint: Sync with CVS Autoconf.
18234
18235 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
18236
18237 * doc/bison.texinfo: Include GNU Free Documentation License from
18238 `fdl.texi'.
18239 * doc/fdl.texi: Add to package.
18240
18241 2001-08-14 Marc Autret <autret_m@epita.fr>
18242
18243 Turn on %{source,header}_extension features.
18244
18245 * src/lex.c (percent_table): Un-CPP out header_extension and
18246 source_extension.
18247 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
18248 (compute_exts_from_src): Remove conditions. It restores priorities
18249 between options.
18250
18251 2001-08-14 Marc Autret <autret_m@epita.fr>
18252
18253 * src/files.c (compute_base_names): Add extensions computing when
18254 `--file-prefix' used.
18255 Standardize function calls.
18256
18257 2001-08-13 Marc Autret <autret_m@epita.fr>
18258
18259 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
18260 defining it (defined but null disables alloca).
18261
18262 2001-08-13 Marc Autret <autret_m@epita.fr>
18263
18264 * src/bison.simple (_yy_memcpy): CPP reformat.
18265
18266 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
18267
18268 * tests/atconfig.in (CPPFLAGS): Fix.
18269
18270 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
18271
18272 * doc/bison.texinfo: Include GNU General Public License from
18273 `gpl.texi'.
18274 * doc/gpl.texi: Add to package.
18275
18276 2001-08-10 Marc Autret <autret_m@epita.fr>
18277
18278 * src/print_graph.h: Fix.
18279 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
18280
18281 2001-08-10 Akim Demaille <akim@epita.fr>
18282
18283 * src/system.h: Provide default declarations for stpcpy, strndup,
18284 and strnlen.
18285
18286 2001-08-10 Robert Anisko <anisko_r@epita.fr>
18287
18288 * doc/bison.texinfo (Locations): Update @$ stuff.
18289
18290 2001-08-09 Robert Anisko <anisko_r@epita.fr>
18291
18292 * src/bison.simple (YYLLOC_DEFAULT): Update.
18293 (yyparse): Adjust.
18294
18295 2001-08-08 Marc Autret <autret_m@epita.fr>
18296
18297 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
18298 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
18299 Reported by Fabrice Bauzac.
18300
18301 2001-08-08 Marc Autret <autret_m@epita.fr>
18302
18303 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
18304 * src/vcg.c (output_node): Fix.
18305 * src/vcg.h: Cleanup.
18306 * src/print_graph.c: Add comments.
18307 (node_output_size): New global variable. Simplify the formatting of
18308 the VCG graph output.
18309 (print_actions): Unused code is now used. It notifies the final state
18310 and no action states in the VCG graph. It also give the reduce actions.
18311 The `shift and goto' edges are red and the `go to state' edges are
18312 blue.
18313 Get the current node name and node_obstack by argument.
18314 (node_obstack): New variable.
18315 (print_state): Manage node_obstack.
18316 (print_core): Use node_obstack given by argument.
18317 A node is not only computed here but in print_actions also.
18318 (print_graph): CPP out useless code instead of commenting it.
18319
18320 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
18321
18322 * tests/atconfig.in (CPPFLAGS): Fix.
18323
18324 2001-08-07 Akim Demaille <akim@epita.fr>
18325
18326 * src/print_graph.c (quote): New.
18327 (print_core): Use it.
18328
18329 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
18330
18331 * src/vcg.c (complain.h): Include it.
18332 Unepitaize `return' invocations.
18333 [NDEBUG] (main): Remove.
18334 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
18335 * src/files.c (open_files): Initialize graph_obstack.
18336 * src/print_graph.c (print_actions): CPP out useless code.
18337 (print_core): Don't output the last `\n' in labels.
18338 Use `quote'.
18339 * src/files.c (output_files): Output the VCG file.
18340 * src/main.c (main): Invoke print_graph ();
18341
18342 2001-08-06 Marc Autret <autret_m@epita.fr>
18343
18344 Automaton VCG graph output.
18345 Using option ``-g'' or long option ``--graph'', you can generate
18346 a gram_filename.vcg file containing a VCG description of the LALR (1)
18347 automaton of your grammar.
18348
18349 * src/main.c: Call to print_graph() function.
18350 * src/getargs.h: Update.
18351 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
18352 (graph_flag): New flag.
18353 (longopts): Update.
18354 (getargs): Add case `g'.
18355 * src/files.c (graph_obstack): New obstack struct.
18356 (open_files): Initialize new obstack.
18357 (output_files): Saves graph_obstack if required.
18358 * src/files.h (graph_obstack): New extern declaration.
18359 * src/Makefile.am: Add new source files.
18360
18361 2001-08-06 Marc Autret <autret_m@epita.fr>
18362
18363 * src/print_graph.c, src/print_graph.h (graph): New.
18364 * src/vcg.h: New file.
18365 * src/vcg.c: New file, VCG graph handling.
18366
18367 2001-08-06 Marc Autret <autret_m@epita.fr>
18368
18369 Add of %source_extension and %header_extension which specify
18370 the source or/and the header output file extension.
18371
18372 * src/files.c (compute_base_names): Remove initialisation of
18373 src_extension and header_extension.
18374 (compute_exts_from_gf): Update.
18375 (compute_exts_from_src): Update.
18376 (output_files): Update.
18377 * src/reader.c (parse_header_extension_decl): New.
18378 (parse_source_extension_decl): New.
18379 (read_declarations): New case statements for the new tokens.
18380 * src/lex.c (percent_table): Add entries for %source_extension
18381 and %header_extension.
18382 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
18383
18384 2001-08-06 Marc Autret <autret_m@epita.fr>
18385
18386 * configure.in: Bump to 1.28c.
18387 * doc/bison.texinfo: Texinfo thingies.
18388
18389 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
18390
18391 * tests/atconfig.in (CPPFLAGS): Add.
18392 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
18393
18394 2001-08-03 Akim Demaille <akim@epita.fr>
18395
18396 Version 1.28b.
18397
18398 2001-08-03 Akim Demaille <akim@epita.fr>
18399
18400 * tests/Makefile.am (check-local): Ship testsuite.
18401 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
18402 Include `string.h'.
18403
18404 2001-08-03 Akim Demaille <akim@epita.fr>
18405
18406 * configure.in: Try using -Wformat when compiling.
18407
18408 2001-08-03 Akim Demaille <akim@epita.fr>
18409
18410 * configure.in: Bump to 1.28b.
18411
18412 2001-08-03 Akim Demaille <akim@epita.fr>
18413
18414 * src/complain.c: Adjust strerror_r portability issues.
18415
18416 2001-08-03 Akim Demaille <akim@epita.fr>
18417
18418 Version 1.28a.
18419
18420 2001-08-03 Akim Demaille <akim@epita.fr>
18421
18422 * src/getargs.c, src/getarg.h (skeleton)): Constify.
18423 * src/lex.c (literalchar): Avoid name clashes on `buf'.
18424 * src/getargs.c: Include complain.h.
18425 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
18426 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
18427
18428 2001-08-03 Akim Demaille <akim@epita.fr>
18429
18430 * src/reader.c (readgram): Display hidden chars in error messages.
18431
18432 2001-08-03 Akim Demaille <akim@epita.fr>
18433
18434 Update to gettext 0.10.39.
18435
18436 2001-08-03 Akim Demaille <akim@epita.fr>
18437
18438 * lib/strspn.c: New.
18439
18440 2001-08-01 Marc Autret <autret_m@epita.fr>
18441
18442 * doc/bison.texinfo: Update.
18443 * doc/bison.1 (mandoc): Update.
18444 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
18445 * src/files.c: Support output files extensions computing.
18446 (src_extension): New static variable.
18447 (header_extension): New static variable.
18448 (tr): New function.
18449 (get_extension_index): New function, gets the index of an extension
18450 filename in a string.
18451 (compute_exts_from_gf): New function, computes extensions from the
18452 grammar file extension.
18453 (compute_exts_from_src): New functions, computes extensions from the
18454 C source file extension, file given by ``-o'' option.
18455 (compute_base_names): Update.
18456 (output_files): Update.
18457
18458 2001-08-01 Robert Anisko <anisko_r@epita.fr>
18459
18460 * doc/bison.texi: Document @$.
18461 (Locations): New section.
18462
18463 2001-07-18 Akim Demaille <akim@epita.fr>
18464
18465 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
18466 * config/prev-version.txt, config/move-if-change: New.
18467 * Makefile.am: Adjust.
18468
18469 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
18470
18471 * src/bison.simple (yyparse): Suppress warning `comparaison
18472 between signed and unsigned'.
18473
18474 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
18475
18476 * src/getargs.h (raw_flag): Remove.
18477 * src/getargs.c: Die on `-r'/`--raw'.
18478 * src/lex.c (parse_percent_token): Die on `%raw'.
18479 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
18480 * tests/calc.at: Suppress test with option `--raw'.
18481
18482 2001-07-14 Akim Demaille <akim@epita.fr>
18483
18484 * config/: New.
18485 * configure.in: Require Autoconf 2.50.
18486 Update to gettext 0.10.38.
18487
18488 2001-03-16 Akim Demaille <akim@epita.fr>
18489
18490 * doc/bison.texinfo: ANSIfy the examples.
18491
18492 2001-03-16 Akim Demaille <akim@epita.fr>
18493
18494 * getargs.c (skeleton): New variable.
18495 (longopts): --skeleton is a new option.
18496 (shortopts, getargs): -S is a new option.
18497 * getargs.h: Declare skeleton.
18498 * output.c (output_parser): Use it.
18499
18500 2001-03-16 Akim Demaille <akim@epita.fr>
18501
18502 * m4/strerror_r.m4: New.
18503 * m4/error.m4: Run AC_FUNC_STRERROR_R.
18504 * lib/error.h, lib/error.c: Update.
18505
18506 2001-03-16 Akim Demaille <akim@epita.fr>
18507
18508 * src/getargs.c (longopts): Clean up.
18509
18510 2001-02-21 Akim Demaille <akim@epita.fr>
18511
18512 * src/reader.c (gensym): `gensym_count' is your own.
18513 Use a static buf to create the symbol name, as token_buffer is no
18514 longer a buffer.
18515
18516 2001-02-08 Akim Demaille <akim@epita.fr>
18517
18518 * src/conflicts.c (conflict_report): Be sure not to append to res
18519 between two calls, which could happen if both first sprintf were
18520 skipped, but not the first cp += strlen.
18521
18522 2001-02-08 Akim Demaille <akim@epita.fr>
18523
18524 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
18525 New, from fileutils 4.0.37.
18526 * configure.in: Require Autoconf 2.49c. I took some time before
18527 making this decision. This is the only way out for portability
18528 issues in Bison, it would mean way too much duplicate effort to
18529 import in Bison features implemented in 2.49c since 2.13.
18530 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
18531
18532 2001-02-02 Akim Demaille <akim@epita.fr>
18533
18534 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
18535 * lib/xalloc.h, lib/xmalloc.c: Update.
18536
18537 2001-01-19 Akim Demaille <akim@epita.fr>
18538
18539 Get rid of the ad hoc handling of token_buffer in the scanner: use
18540 the obstacks.
18541
18542 * src/lex.c (token_obstack): New.
18543 (init_lex): Initialize it. No longer call...
18544 (grow_token_buffer): this. Remove it.
18545 Adjust all the places which used it to use the obstack.
18546
18547 2001-01-19 Akim Demaille <akim@epita.fr>
18548
18549 * src/lex.h: Rename all the tokens:
18550 s/\bENDFILE\b/tok_eof/g;
18551 s/\bIDENTIFIER\b/tok_identifier/g;
18552 etc.
18553 Let them be enums, not #define, to ease debugging.
18554 Adjust all the code.
18555
18556 2001-01-18 Akim Demaille <akim@epita.fr>
18557
18558 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
18559 * src/lex.c (maxtoken, grow_token_buffer): Static.
18560
18561 2001-01-18 Akim Demaille <akim@epita.fr>
18562
18563 Since we now use obstacks, more % directives can be enabled.
18564
18565 * src/lex.c (percent_table): Also accept `%yacc',
18566 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
18567 `%debug'.
18568 Handle the actions for `%semantic_parser' and `%pure_parser' here,
18569 instead of returning a token.
18570 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
18571 * src/reader.c (read_declarations): Adjust.
18572 * src/files.c (open_files): Don't call `compute_base_names', don't
18573 compute `attrsfile' since they depend upon data which might be
18574 *in* the input file now.
18575 (output_files): Do it here.
18576 * src/output.c (output_headers): Document the fact that this patch
18577 introduces a guaranteed SEGV for semantic parsers.
18578 * doc/bison.texinfo: Document them.
18579 * tests/suite.at: Exercise these %options.
18580
18581 2000-12-20 Akim Demaille <akim@epita.fr>
18582
18583 Also handle the output file (--verbose) with obstacks.
18584
18585 * files.c (foutput): Remove.
18586 (output_obstack): New.
18587 Adjust all dependencies.
18588 * src/conflicts.c: Return a string.
18589 * src/system.h (obstack_grow_string): Rename as...
18590 (obstack_sgrow): this. Be ready to work with non literals.
18591 (obstack_fgrow4): New.
18592
18593 2000-12-20 Akim Demaille <akim@epita.fr>
18594
18595 * src/files.c (open_files): Fix the computation of short_base_name
18596 in the case of `-o foo.tab.c'.
18597
18598 2000-12-20 Akim Demaille <akim@epita.fr>
18599
18600 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
18601 (copy_dollar): Now that everything uses obstacks, get rid of the
18602 FILE * parameters.
18603
18604 2000-12-20 Akim Demaille <akim@epita.fr>
18605
18606 * src/files.c (open_files): Actually the `.output' file is based
18607 on the short_base_name, not base_name.
18608 * tests/suite.at (Checking output file names): Adjust.
18609
18610 2000-12-20 Akim Demaille <akim@epita.fr>
18611
18612 * src/bison.s1: Remove, we now use directly...
18613 * src/bison.simple: this.
18614 * src/Makefile.am: Use pkgdata instead of data.
18615
18616 2000-12-20 Akim Demaille <akim@epita.fr>
18617
18618 * src/files.c (guard_obstack): New.
18619 (open_files): Initialize it.
18620 (output_files): Dump it...
18621 * src/files.h: Export it.
18622 * src/reader.c (copy_guard): Use it.
18623
18624 2000-12-19 Akim Demaille <akim@epita.fr>
18625
18626 * src/files.c (outfile, defsfile, actfile): Removed as global
18627 vars.
18628 (open_files): Don't compute them.
18629 (output_files): Adjust.
18630 (base_name, short_base_name): Be global.
18631 Adjust dependencies.
18632
18633 2000-12-19 Akim Demaille <akim@epita.fr>
18634
18635 * src/files.c (strsuffix): New.
18636 (stringappend): Be just like strcat but allocate.
18637 (base_names): Eve out from open_files.
18638 Try to simplify the rather hairy computation of base_name and
18639 short_base_name.
18640 (open_files): Use it.
18641 * tests/suite.at (Checking output file names): New test.
18642
18643 2000-12-19 Akim Demaille <akim@epita.fr>
18644
18645 * src/system.h (obstack_grow_literal_string): Rename as...
18646 (obstack_grow_string): this.
18647 * src/output.c (output_parser): Recognize `%% actions' instead of
18648 `$'.
18649 * src/bison.s1: s/$/%% actions/.
18650 * src/bison.hairy: Likewise.
18651
18652 2000-12-19 Akim Demaille <akim@epita.fr>
18653
18654 * src/output.c (output_parser): Compute the `#line' lines when
18655 there are.
18656 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
18657 Suggested by Hans Aberg.
18658
18659 2000-12-19 Akim Demaille <akim@epita.fr>
18660
18661 Let the handling of the skeleton files be local to the procedures
18662 that use it.
18663
18664 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
18665 longer static.
18666 (fparser, open_extra_files): Remove.
18667 (open_files, output_files): Don't take care of fparser.
18668 * src/files.h: Adjust.
18669 * src/output.c (output_parser): Open and close the file to the
18670 skeleton.
18671 * src/reader.c (read_declarations): When %semantic_parser, open
18672 fguard.
18673
18674 2000-12-19 Akim Demaille <akim@epita.fr>
18675
18676 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
18677 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
18678
18679 2000-12-19 Akim Demaille <akim@epita.fr>
18680
18681 * src/files.c (open_files): Yipee! We no longer need all the code
18682 looking for `/tmp' since we have no tmp file.
18683
18684 2000-12-19 Akim Demaille <akim@epita.fr>
18685
18686 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
18687 New macros.
18688 * src/files.c (open_files): Less dependency on MSDOS etc.
18689
18690 2000-12-14 Akim Demaille <akim@epita.fr>
18691
18692 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
18693 Provide a default definition.
18694 Use it when executing the default @ action.
18695 * src/reader.c (reader_output_yylsp): No longer include
18696 `timestamp' and `text' in the default YYLTYPE.
18697
18698 2000-12-12 Akim Demaille <akim@epita.fr>
18699
18700 * src/reader.c (copy_definition, parse_union_decl, copy_action)
18701 (copy_guard): Quote the file names.
18702 Reported by Laurent Mascherpa.
18703
18704 2000-12-12 Akim Demaille <akim@epita.fr>
18705
18706 * src/output.c (output_headers, output_program, output): Be sure
18707 to escape special characters when outputting filenames.
18708 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
18709 (output_headers): Don't depend on them, Use ACTSTR.
18710
18711 2000-11-17 Akim Demaille <akim@epita.fr>
18712
18713 * lib/obstack.h: Formatting changes.
18714 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
18715 prevents type checking.
18716 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
18717 cast the value to (void *): assigning a `foo *' to a `void *'
18718 variable is valid.
18719 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
18720 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
18721 append characters.
18722
18723 2000-11-17 Akim Demaille <akim@epita.fr>
18724
18725 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
18726 as...
18727 (suite.m4, regression.m4, calc.m4): these.
18728 * tests/atgeneral.m4: Update from CVS Autoconf.
18729
18730 2000-11-17 Akim Demaille <akim@epita.fr>
18731
18732 * tests/regression.m4 (%union and --defines): New test,
18733 demonstrating a current bug in the obstack implementation.
18734
18735 2000-11-17 Akim Demaille <akim@epita.fr>
18736
18737 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
18738 macros.
18739 Use them to declare the variables which are global or local to
18740 `yyparse'.
18741
18742 2000-11-17 Akim Demaille <akim@epita.fr>
18743
18744 * acconfig.h: Remove, no longer used.
18745
18746 2000-11-07 Akim Demaille <akim@epita.fr>
18747
18748 * src: s/Copyright (C)/Copyright/g.
18749
18750 2000-11-07 Akim Demaille <akim@epita.fr>
18751
18752 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
18753 defining.
18754 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
18755
18756 2000-11-07 Akim Demaille <akim@epita.fr>
18757
18758 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
18759 Merge in a single CPP if/else.
18760
18761 2000-11-07 Akim Demaille <akim@epita.fr>
18762
18763 * src/output.c (output): Remove useless variables.
18764 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
18765 argument `data' for consistency with the prototypes.
18766 Qualify it `const'.
18767 (obstack_copy, obstack_copy0): Rename the second argument as
18768 `address' for consistency. Qualify it `const'.
18769 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
18770 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
18771 `const' their input argument (`data' or `address').
18772 Adjust the corresponding macros to include `const' in casts.
18773
18774 2000-11-03 Akim Demaille <akim@epita.fr>
18775
18776 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
18777 s/PFILE1/BISON_HAIRY/.
18778 Adjust dependencies.
18779
18780 2000-11-03 Akim Demaille <akim@epita.fr>
18781
18782 For some reason, this was not applied.
18783
18784 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18785 `unlink': it's no longer used.
18786
18787 2000-11-03 Akim Demaille <akim@epita.fr>
18788
18789 * src/files.c (skeleton_find): New function, eved out of...
18790 (open_files, open_extra_files): here.
18791
18792 2000-11-03 Akim Demaille <akim@epita.fr>
18793
18794 Don't use `atexit'.
18795
18796 * src/files.c (obstack_save): New function.
18797 (done): Rename as...
18798 (output_files): this.
18799 Use `obstack_save'.
18800 * src/main.c (main): Don't use `atexit' to register `done', since
18801 it no longer has to remove tmp files, just call `output_files'
18802 when there are no errors.
18803
18804 2000-11-02 Akim Demaille <akim@epita.fr>
18805
18806 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
18807 `unlink': it's no longer used.
18808 * src/files.h: Formatting changes.
18809
18810 2000-11-02 Akim Demaille <akim@epita.fr>
18811
18812 Remove the last uses of mktemp and unlink/delete.
18813
18814 * src/files.c (fdefines, ftable): Removed.
18815 (defines_ostack, table_obstack): New.
18816 Adjust dependencies of the former into uses of the latter.
18817 * src/output.c (output_short_or_char_table, output_short_table):
18818 Convert to using obstacks.
18819 * src/reader.c (copy_comment2): Accept one FILE * and two
18820 obstacks.
18821 (output_token_defines, reader_output_yylsp): Use obstacks.
18822 * src/system.h (obstack_fgrow3): New.
18823 * po/POTFILES.in: Adjust.
18824
18825 2000-11-01 Akim Demaille <akim@epita.fr>
18826
18827 Change each use of `fattrs' into a use of `attrs_obstack'.
18828
18829 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
18830 * src/files.c (fattrs): Remove.
18831 (attrs_obstack): New.
18832 Adjust all dependencies.
18833 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
18834
18835 2000-11-01 Akim Demaille <akim@epita.fr>
18836
18837 Introduce obstacks.
18838 Change each use of `faction' into a use of `action_obstack'.
18839
18840 * lib/obstack.h, lib/obstack.c: New files.
18841 * src/files.c (faction): Remove.
18842 (action_obstack): New.
18843 Adjust all dependencies.
18844
18845 2000-10-20 Akim Demaille <akim@epita.fr>
18846
18847 * lib/quote.h (PARAMS): New macro. Use it.
18848
18849 2000-10-16 Akim Demaille <akim@epita.fr>
18850
18851 * src/output.c (output_short_or_char_table): New function.
18852 (output_short_table, output_token_translations): Use it.
18853 (goto_actions): Use output_short_table.
18854
18855 2000-10-16 Akim Demaille <akim@epita.fr>
18856
18857 * src/symtab.c (bucket_new): New function.
18858 (getsym): Use it.
18859
18860 * src/output.c (output_short_table): New argument to display the
18861 comment associated with the table.
18862 Adjust dependencies.
18863 (output_gram): Use it.
18864 (output_rule_data): Nicer output layout for YYTNAME.
18865
18866 2000-10-16 Akim Demaille <akim@epita.fr>
18867
18868 * src/lex.c (read_typename): New function.
18869 (lex): Use it.
18870 * src/reader.c (copy_dollar): Likewise.
18871
18872 2000-10-16 Akim Demaille <akim@epita.fr>
18873
18874 * src/reader.c (copy_comment2): Expect the input stream to be on
18875 the `/' which is suspected to open a comment, instead of being
18876 called after `//' or `/*' was read.
18877 (copy_comment, copy_definition, parse_union_decl, copy_action)
18878 (copy_guard): Adjust.
18879
18880 2000-10-16 Akim Demaille <akim@epita.fr>
18881
18882 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
18883 `read_signed_integer'.
18884
18885 2000-10-16 Akim Demaille <akim@epita.fr>
18886
18887 * src/reader.c (copy_dollar): New function.
18888 (copy_guard, copy_action): Use it.
18889
18890 2000-10-16 Akim Demaille <akim@epita.fr>
18891
18892 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
18893 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
18894 New files, from Fileutils 4.0.27.
18895 * src/main.c (printable_version): Remove.
18896 * src/lex.c, src/reader.c: Use `quote'.
18897
18898 2000-10-04 Akim Demaille <akim@epita.fr>
18899
18900 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
18901
18902 2000-10-04 Akim Demaille <akim@epita.fr>
18903
18904 * doc/bison.texinfo: Various typos spotted by Neil Booth.
18905
18906 2000-10-04 Akim Demaille <akim@epita.fr>
18907
18908 When a literal string is used to define two different tokens,
18909 `bison -v' segfaults.
18910 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
18911
18912 * tests/regression.m4: New file.
18913 Include the core of the sample provided by Piotr Gackiewicz.
18914 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
18915 properly.
18916
18917 2000-10-04 Akim Demaille <akim@epita.fr>
18918
18919 * src/reader.c (parse_expect_decl): Keep `count' within the size
18920 of `buffer'.
18921 From Neil Booth.
18922
18923 2000-10-02 Paul Eggert <eggert@twinsun.com>
18924
18925 * bison.s1 (yyparse): Assign the default value
18926 unconditionally, to avoid a GCC warning and make the parser a
18927 tad smaller.
18928
18929 2000-10-02 Akim Demaille <akim@epita.fr>
18930
18931 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
18932 options.
18933
18934 2000-10-02 Akim Demaille <akim@epita.fr>
18935
18936 * src/derives.c, src/print.c, src/reduce.c: To ease the
18937 translation, move some `\n' out of the translated strings.
18938
18939 2000-10-02 Akim Demaille <akim@epita.fr>
18940
18941 The location tracking mechanism is precious for parse error
18942 messages. Nevertheless, it is enabled only when `@n' is used in
18943 the grammar, which is a different issue (you can use it in error
18944 message, but not in the grammar per se). Therefore, there should
18945 be another means to enable it.
18946
18947 * src/getargs.c (getargs): Support `--locations'.
18948 (usage): Report it.
18949 * src/getargs.h (locationsflag): Export it.
18950 * src/lex.c (percent_table): Support `%locations'.
18951 * src/reader.c (yylsp_needed): Remove this variable, now replaced
18952 with `locationsflag'.
18953 * doc/bison.texinfo: Document `--locations' and `%locations'.
18954 Sort the options.
18955 * tests/calc.m4: Test it.
18956
18957 For regularity of the names, replace each
18958 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
18959 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
18960 In addition replace each `flag' with `_flag'.
18961
18962 2000-10-02 Akim Demaille <akim@epita.fr>
18963
18964 Also test parse error messages, including with YYERROR_VERBOSE.
18965
18966 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
18967 associative).
18968 Use it to check the computations.
18969 Use it to check `nonassoc' is honored.
18970 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
18971 `--yyerror-verbose'.
18972 (_AT_CHECK_CALC): Adjust to this option.
18973 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
18974
18975 2000-10-02 Akim Demaille <akim@epita.fr>
18976
18977 Test also `--verbose', `--defines' and `--name-prefix'. Testing
18978 the latter demonstrates a flaw in the handling of non debugging
18979 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
18980 was used in order to simplify:
18981
18982 #if YYDEBUG
18983 if (yydebug)
18984 {
18985 ...
18986 }
18987 #endif
18988
18989 into
18990
18991 if (yydebug)
18992 {
18993 ...
18994 }
18995
18996 unfortunately this leads to a CPP conflict when
18997 `--name-prefix=foo' is used since it produces `#define yydebug
18998 foodebug'.
18999
19000 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
19001 (YYDPRINTF): New macro.
19002 Spread its use.
19003 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
19004 the bison options.
19005 Also test `--verbose', `--defines' and `--name-prefix'.
19006
19007 2000-10-02 Akim Demaille <akim@epita.fr>
19008
19009 Improve the readability of the produced parsers.
19010
19011 * src/bison.s1: Formatting changes.
19012 Improve the comment related to the `$' mark.
19013 (yydefault): Don't fall through to `yyresume': `goto' there.
19014 * src/output.c (output_parser): When the `$' is met, skip the end
19015 of its line.
19016 New variable, `number_of_dollar_signs', to check there's exactly
19017 one `$' in the parser skeleton.
19018
19019 2000-10-02 Akim Demaille <akim@epita.fr>
19020
19021 * lib/xstrdup.c: New file, from the fileutils.
19022 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
19023 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
19024 instead of strlen + xmalloc + strcpy.
19025 * src/symtab.c (copys): Remove, use xstrdup instead.
19026
19027 2000-10-02 Akim Demaille <akim@epita.fr>
19028
19029 * src/gram.h (associativity): New enum type which replaces the
19030 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
19031 `right_assoc', `left_assoc' and `non_assoc'.
19032 Adjust all dependencies.
19033 * src/reader.c: Formatting changes.
19034 (LTYPESTR): Don't define it, use it as a literal in
19035 `reader_output_yylsp'.
19036 * src/symtab.h (symbol_class): New enum type which replaces the
19037 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
19038 `sunknown', `stoken and `snterm'.
19039
19040 2000-10-02 Akim Demaille <akim@epita.fr>
19041
19042 * src/getargs.c (fixed_outfiles): Rename as...
19043 (yaccflag): for consistency and accuracy.
19044 Adjust dependencies.
19045
19046 2000-10-02 Akim Demaille <akim@epita.fr>
19047
19048 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
19049 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
19050 difficult and introduced a lot of core dump. It turns out that
19051 Bison used an implementation of `xmalloc' based on `calloc', and
19052 at various places it does depend upon the initialization to 0. I
19053 have not tried to isolate the pertinent places, and all the former
19054 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
19055 someone should address this issue.
19056
19057 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
19058 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
19059 files.
19060 Adjust dependencies.
19061 * src/warshall.h: New file.
19062 Propagate.
19063
19064 2000-10-02 Akim Demaille <akim@epita.fr>
19065
19066 Various anti-`extern in *.c' changes.
19067
19068 * src/system.h: Include `assert.h'.
19069
19070 2000-10-02 Akim Demaille <akim@epita.fr>
19071
19072 * src/state.h (nstates, final_state, first_state, first_shift)
19073 (first_reduction): Move their exportation from here...
19074 * src/LR0.h: to here.
19075 Adjust dependencies.
19076 * src/getargs.c (statisticsflag): New variable.
19077 Add support for `--statistics'.
19078 Adjust dependencies.
19079
19080 Remove a lot of now useless `extern' statements in most files.
19081
19082 2000-10-02 Akim Demaille <akim@epita.fr>
19083
19084 * src/LR0.h: New file.
19085 Propagate its use.
19086
19087 2000-10-02 Akim Demaille <akim@epita.fr>
19088
19089 * src/print.h: New file.
19090 Propagate its use.
19091 * src/print.c: Formatting and ordering changes.
19092 (verbose, terse): Replace with...
19093 (print_results): this new function.
19094 Adjust dependencies.
19095
19096 2000-10-02 Akim Demaille <akim@epita.fr>
19097
19098 * src/conflicts.c (conflict_report): New function.
19099 (conflict_log, verbose_conflict_log): Replace with...
19100 (print_conflicts): this function.
19101 Adjust dependencies.
19102 * src/conflicts.h: New file.
19103 Propagate its inclusion.
19104
19105 2000-10-02 Akim Demaille <akim@epita.fr>
19106
19107 * src/nullable.h: New file.
19108 Propagate its inclusion.
19109 * src/nullable.c: Formatting changes.
19110
19111 2000-10-02 Akim Demaille <akim@epita.fr>
19112
19113 * src/reduce.h: New file.
19114 Propagate its inclusion.
19115 * src/reduce.c: Topological sort and other formatting changes.
19116 (bool, TRUE, FALSE): Move their definition to...
19117 * src/system.h: here.
19118
19119 2000-10-02 Akim Demaille <akim@epita.fr>
19120
19121 * src/files.c: Formatting changes.
19122 (tryopen, tryclose, openfiles): Rename as...
19123 (xfopen, xfclose, open_files): this.
19124 (stringappend): static.
19125 * src/files.h: Complete the list of exported symbols.
19126 Propagate its use.
19127
19128 2000-10-02 Akim Demaille <akim@epita.fr>
19129
19130 * src/reader.h: New file.
19131 Propagate its use instead of tedious list of `extern' and
19132 prototypes.
19133 * src/reader.c: Formatting changes, topological sort,
19134 s/register//.
19135
19136 2000-10-02 Akim Demaille <akim@epita.fr>
19137
19138 * src/lex.h: Prototype `lex.c' exported functions.
19139 * src/reader.c: Adjust.
19140 * src/lex.c: Formatting changes.
19141 (safegetc): Rename as...
19142 (xgetc): this.
19143
19144 2000-10-02 Akim Demaille <akim@epita.fr>
19145
19146 * src/lalr.h: New file.
19147 Propagate its inclusion instead of prototypes and `extern'.
19148 * src/lalr.c: Formatting changes, topological sorting etc.
19149
19150 2000-10-02 Akim Demaille <akim@epita.fr>
19151
19152 * src/output.c (token_actions): Introduce a temporary array,
19153 YYDEFACT, that makes it possible for this function to use
19154 output_short_table.
19155
19156 2000-10-02 Akim Demaille <akim@epita.fr>
19157
19158 `user_toknums' is output as a `short[]' in `output.c', while it is
19159 defined as a `int[]' in `reader.c'. For consistency with the
19160 other output tables, `user_toknums' is now defined as a table of
19161 shorts.
19162
19163 * src/reader.c (user_toknums): Be a short table instead of an int
19164 table.
19165 Adjust dependencies.
19166
19167 Factor the short table outputs.
19168
19169 * src/output.c (output_short_table): New function.
19170 * src/output.c (output_gram, output_stos, output_rule_data)
19171 (output_base, output_table, output_check): Use it.
19172
19173 2000-10-02 Akim Demaille <akim@epita.fr>
19174
19175 * src/output.c (output): Topological sort of the functions, in
19176 order to get rid of the `static' prototypes.
19177 No longer use `register'.
19178 * src/output.h: New file.
19179 Propagate its inclusion in files explicitly prototyping functions
19180 from output.c.
19181
19182 2000-09-21 Akim Demaille <akim@epita.fr>
19183
19184 * src/atgeneral.m4: Update from Autoconf.
19185
19186 2000-09-21 Akim Demaille <akim@epita.fr>
19187
19188 * src/closure.h: New file.
19189 * src/closure.c: Formatting changes, topological sort over the
19190 functions, use of closure.h.
19191 (initialize_closure, finalize_closure): Rename as...
19192 (new_closure, free_closure): these. Adjust dependencies.
19193 * src/LR0.c: Formatting changes, topological sort, use of
19194 cloture.h.
19195 (initialize_states): Rename as...
19196 (new_states): this.
19197 * src/Makefile.am (noinst_HEADERS): Adjust.
19198
19199 2000-09-20 Akim Demaille <akim@epita.fr>
19200
19201 * src/acconfig.h: Don't protect config.h against multiple
19202 inclusion.
19203 Don't define PARAMS.
19204 * src/system.h: Define PARAMS.
19205 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
19206 purpose of config.h. system.h must not try to fix wrong
19207 definitions in config.h.
19208
19209 2000-09-20 Akim Demaille <akim@epita.fr>
19210
19211 * src/derives.h: New file.
19212 * src/main.c, src/derives.h: Use it.
19213 Formatting changes.
19214 * src/Makefile.am (noinst_HEADERS): Adjust.
19215
19216 2000-09-20 Akim Demaille <akim@epita.fr>
19217
19218 * tests/atgeneral.m4: Update from Autoconf.
19219 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
19220 (AT_CHECK_CALC): New macros.
19221 Use these macros to test bison with options `', `--raw',
19222 `--debug', `--yacc', `--yacc --debug'.
19223
19224 2000-09-19 Akim Demaille <akim@epita.fr>
19225
19226 * src/output.c: Formatting changes.
19227 * src/machine.h: Remove, leaving its contents in...
19228 * src/system.h: here.
19229 Include stdio.h.
19230 Adjust all dependencies on stdio.h and machine.h.
19231 * src/getargs.h: New file.
19232 Let all `extern' declarations about getargs.c be replaced with
19233 inclusion of `getargs.h'.
19234 * src/Makefile.am (noinst_HEADERS): Adjust.
19235
19236 * tests/calc.m4 (yyin): Be initialized in main, not on the global
19237 scope.
19238 (yyerror): Returns void, not int.
19239 * doc/bison.texinfo: Formatting changes.
19240
19241 2000-09-19 Akim Demaille <akim@epita.fr>
19242
19243 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
19244 portable.
19245
19246 2000-09-18 Akim Demaille <akim@epita.fr>
19247
19248 * configure.in: Append WARNING_CFLAGS to CFLAGS.
19249 * src/Makefile.am (INCLUDES): Don't.
19250 Be ready to fetch headers in lib/.
19251
19252 2000-09-18 Akim Demaille <akim@epita.fr>
19253
19254 * doc/bison.texinfo: Update the copyright.
19255 ANSIfy and GNUify the examples.
19256 Remove the old menu.
19257
19258 2000-09-18 Akim Demaille <akim@epita.fr>
19259
19260 First set of tests: use the `calc' example from the documentation.
19261
19262 * src/bison.s1 (yyparse): Condition the code using `yytname' which
19263 is defined only when YYDEBUG is.
19264 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
19265 * src/files.c (tryopen, tryclose): Formatting changes.
19266 Move to the top and be static.
19267 * src/reader.c (read_signed_integer): Likewise.
19268 * tests/calc.m4: New file.
19269 * Makefile.am, suite.m4: Adjust.
19270 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
19271
19272 2000-09-18 Akim Demaille <akim@epita.fr>
19273
19274 Add support for an Autotest test suite for Bison.
19275
19276 * m4/m4.m4, m4/atconfig.m4: New files.
19277 * m4/Makefile.am (EXTRA_DIST): Adjust.
19278 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
19279 files.
19280 * src/getargs.c: Display a more standard --version message.
19281 * src/reader.c (reader): Formatting changes.
19282 No longer depend upon VERSION_STRING.
19283 * configure.in: No longer use `dnl'.
19284 Set up the test suite and the new directory `tests/.
19285 (VERSION_STRING): Remove.
19286
19287 2000-04-14 Akim Demaille <akim@epita.fr>
19288
19289 * src/reader.c (copy_comment2): New function, same as former
19290 `copy_comment', but outputs into two FILE *.
19291 (copy_comment): Use it.
19292 (parse_union_decl): Use it.
19293 (get_type, parse_start_decl): Use the same `invalid' message.
19294 (parse_start_decl, parse_union_decl): Use the same `multiple'
19295 message.
19296 (parse_union_decl, copy_guard, copy_action): Use the same
19297 `unmatched' message.
19298 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
19299
19300 2000-03-31 Akim Demaille <akim@epita.fr>
19301
19302 * src/files.c (tryopen, tryclose): Move to the top.
19303 Be static.
19304
19305 2000-03-31 Akim Demaille <akim@epita.fr>
19306
19307 * src/main.c (main): Don't call `done', exit does it.
19308
19309 2000-03-31 Akim Demaille <akim@epita.fr>
19310
19311 * allocate.c: s/return (foo)/return foo/.
19312 * lalr.c: Likewise.
19313 * LR0.c: Likewise.
19314 * output.c: Likewise.
19315 * reader.c: Likewise.
19316 * symtab.c: Likewise.
19317 * vmsgetargs.c: Likewise.
19318
19319 2000-03-31 Akim Demaille <akim@epita.fr>
19320
19321 Clean up the error reporting functions.
19322
19323 * src/report.c: New file.
19324 * src/report.h: Likewise.
19325 * src/Makefile.am: Adjust.
19326 * m4/error.m4: New file.
19327 * m4/Makefile.am: Adjust.
19328 * configure.in (jm_PREREQ_ERROR): Call it.
19329 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
19330 Remove.
19331 (fatal, fatals): Remove. All callers use complain.c::fatal.
19332 (warn, warni, warns, warnss, warnss): Remove. All callers use
19333 complain.c::complain.
19334 (toomany): Remove, use fatal instead.
19335 * src/files.c (done): No argument, use complain_message_count.
19336 * src/main.c (main): Register `done' to `atexit'.
19337
19338 * src/getargs.c (usage): More `fputs', less `fprintf'.
19339
19340 2000-03-28 Akim Demaille <akim@epita.fr>
19341
19342 * lib/: New directory.
19343 * Makefile.am (SUBDIRS): Adjust.
19344 * configure.in: Adjust.
19345 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
19346 useless.
19347 * src/alloca.c: Moved to lib/.
19348 * src/getopt.c: Likewise.
19349 * src/getopt1.c: Likewise.
19350 * src/getopt.h: Likewise.
19351 * src/ansi2knr.c: Likewise.
19352 * src/ansi2knr.1: Likewise.
19353 * src/Makefile.am: Adjust.
19354 * lib/Makefile.am: New file.
19355
19356 2000-03-28 Akim Demaille <akim@epita.fr>
19357
19358 * src/getargs.c (usage): Refresh the help message.
19359
19360 2000-03-17 Akim Demaille <akim@epita.fr>
19361
19362 * src/getopt1.c: Updated from textutils 2.0e
19363 * src/getopt.c: Likewise.
19364 * src/getopt.h: Likewise.
19365
19366 2000-03-17 Akim Demaille <akim@epita.fr>
19367
19368 * src/Makefile.am (bison.simple): Fix the awk program: quote only
19369 the file name, not the whole `#line LINE FILE'.
19370
19371 2000-03-17 Akim Demaille <akim@epita.fr>
19372
19373 On syntax errors, report the token on which we choked.
19374
19375 * src/bison.s1 (yyparse): In the label yyerrlab, when
19376 YYERROR_VERBOSE, add yychar in msg.
19377
19378 2000-03-17 Akim Demaille <akim@epita.fr>
19379
19380 * src/reader.c (copy_at): New function.
19381 (copy_guard): Use it.
19382 (copy_action): Use it.
19383
19384 2000-03-17 Akim Demaille <akim@epita.fr>
19385
19386 Be kind to translators, save some useless translations.
19387
19388 * src/main.c (banner): New function.
19389 (fatal_banner): Use it.
19390 (warn_banner): Use it.
19391
19392 2000-03-17 Akim Demaille <akim@epita.fr>
19393
19394 * src/reader.c (copy_definition): Use copy_string and
19395 copy_comment. Removed now unused `match', `ended',
19396 `cplus_comment'.
19397 (copy_comment, copy_string): Moved, to be visible from
19398 copy_definition.
19399
19400 2000-03-17 Akim Demaille <akim@epita.fr>
19401
19402 * src/reader.c (copy_string): Declare `static inline'. No
19403 problems with inline, since it is checked by configure.
19404 (copy_comment): Likewise.
19405
19406 2000-03-17 Akim Demaille <akim@epita.fr>
19407
19408 * src/reader.c (packsymbols): Formatting changes.
19409
19410 2000-03-17 Akim Demaille <akim@epita.fr>
19411
19412 * src/reader.c (copy_comment): New function, factored out from:
19413 (copy_action): Use it. Removed now unused `match', `ended',
19414 `cplus_comment'.
19415 (copy_guard): Likewise.
19416
19417 2000-03-17 Akim Demaille <akim@epita.fr>
19418
19419 * src/reader.c (copy_string): New function, factored out from:
19420 (copy_action): Use it.
19421 (copy_guard): Likewise.
19422
19423 2000-03-17 Akim Demaille <akim@epita.fr>
19424
19425 Change the handling of @s so that they behave exactly like $s.
19426 There is now a pseudo variable @$ (readble and writable), location
19427 of the lhs of the rule (by default ranging from the location of
19428 the first symbol of the rhs, to the location of the last symbol,
19429 or, if the rhs is empty, YYLLOC).
19430
19431 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
19432 yyval.
19433 (yyparse): When providing a default semantic action, provide a
19434 default location action.
19435 (after the $): No longer change `*YYLSP', just stack YYLOC the
19436 same way you stack YYVAL.
19437 * src/reader.c (read_declarations): Use warns.
19438 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
19439 (copy_action, case '@'): Likewise.
19440 Use a standard error message, to save useless work from
19441 translators.
19442
19443 2000-03-17 Akim Demaille <akim@epita.fr>
19444
19445 * src/bison.s1: Formatting and cosmetics changes.
19446 * src/reader.c: Likewise.
19447 Update the Copyright notice.
19448
19449 2000-03-17 Akim Demaille <akim@epita.fr>
19450
19451 * src/bison.s1 (#line): All set to `#line' only, since the
19452 Makefile now handles them.
19453
19454 2000-03-16 Akim Demaille <akim@epita.fr>
19455
19456 * src/output.c (output_rule_data): Output the documentation of
19457 some of the tables.
19458 (Copyright notice): Update.
19459 Formatting changes.
19460
19461 2000-03-16 Akim Demaille <akim@epita.fr>
19462
19463 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
19464 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
19465 One `#if YYDEBUG' remains, since it uses variables which are
19466 defined only if `YYDEBUG != 0'.
19467
19468 2000-03-16 Akim Demaille <akim@epita.fr>
19469
19470 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
19471 and related variables so that the similarities are highlighted.
19472
19473 2000-03-16 Akim Demaille <akim@epita.fr>
19474
19475 * src/bison.s1: Properly indent CPP directives.
19476
19477 2000-03-16 Akim Demaille <akim@epita.fr>
19478
19479 * src/bison.s1: Properly indent the `alloca' CPP section.
19480
19481 2000-03-16 Akim Demaille <akim@epita.fr>
19482
19483 Do not hard code values of directories in `configure.in'.
19484 Update the `configure' tool chain.
19485
19486 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
19487 src/makefile.am.
19488 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
19489 (AC_OUTPUT): Add m4/Makefile.
19490 Bump to bison 1.28a, 1.29 has never been released.
19491 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
19492 handled via src/Makefile.am.
19493 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
19494 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
19495 autoheader.
19496 * Makefile.am (SUBDIRS): Add m4.
19497 (ACLOCAL_AM_FLAGS): New variable.
19498 (AUTOMAKE_OPTIONS): Add check-news.
19499 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
19500 the proper line number and file name.
19501 (DEFS): Propagate the location of bison library files and of the
19502 locale files.
19503 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
19504 builddir.
19505 * acinclude.m4: Remove, replaced by the directory m4.
19506 * m4/Makefile.am (EXTRA_DIST): New variable.
19507 * m4/gettext.m4: New file, from the fileutils.
19508 * m4/lcmessage.m4: Likewise
19509 * m4/progtest.m4: Likewise.
19510 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
19511
19512 2000-03-10 Akim Demaille <akim@epita.fr>
19513
19514 * src/closure.c:
19515 Formatting changes of various comments.
19516 Respect the GNU coding standards at various places.
19517 Don't use `_()' when no translation is needed.
19518
19519 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19520
19521 * src/files.c:
19522 OS/2 honors TMPDIR environment variable.
19523
19524 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19525
19526 * doc/bison.texinfo: Tweaked spelling and grammar.
19527 Updated ISBN.
19528 Removed reference to price of printed copy.
19529 Mention BISON_SIMPLE and BISON_HAIRY.
19530
19531 1999-12-13 Jesse Thilo <jthilo@gnu.org>
19532
19533 * configure.in, NEWS:
19534 Bison 1.29 released.
19535
19536 1999-10-27 Jesse Thilo <jthilo@gnu.org>
19537
19538 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
19539 Added reference card.
19540
19541 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19542
19543 * po/ru.po: Added Russian translation.
19544
19545 1999-07-26 Jesse Thilo <jthilo@gnu.org>
19546
19547 * configure.in: Added Russian translation.
19548
19549 1999-07-06 Jesse Thilo <jthilo@gnu.org>
19550
19551 * configure.in, NEWS, README:
19552 Released version 1.28.
19553
19554 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19555
19556 * src/system.h:
19557 Squashed redefinition warning on some systems.
19558
19559 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
19560 Have configure build version string instead of relying on ANSI string
19561 concatentation.
19562
19563 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19564
19565 * po/POTFILES.in: Got rid of version.c.
19566
19567 1999-06-14 Jesse Thilo <jthilo@gnu.org>
19568
19569 * acconfig.h, configure.in:
19570 Have configure build version string instead of relying on ANSI string
19571 concatentation.
19572
19573 1999-06-08 Jesse Thilo <jthilo@gnu.org>
19574
19575 * doc/bison.1:
19576 Dropped mention of `+' for long-named options.
19577
19578 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19579
19580 * src/files.c: Added <unistd.h> for unlink().
19581
19582 * src/Makefile.am, src/system.h:
19583 I18n fixes.
19584
19585 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19586
19587 * README: Added a FAQ list.
19588
19589 * configure.in, acconfig.h:
19590 I18n fixes.
19591
19592 1999-05-30 Jesse Thilo <jthilo@gnu.org>
19593
19594 * doc/FAQ, doc/Makefile.am:
19595 Added a FAQ list.
19596
19597 1999-05-19 Jesse Thilo <jthilo@gnu.org>
19598
19599 * src/alloc.h, src/symtab.h, src/version.c:
19600 Protected inclusion of "config.h" with HAVE_CONFIG_H.
19601
19602 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19603
19604 * src/.cvsignore, src/Makefile.am:
19605 Reorganized: sources in `src', documentation in `doc'.
19606
19607 * src/lex.c (literalchar):
19608 fixed the code for escaping double quotes (thanks
19609 Jonathan Czisny.)
19610
19611 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19612
19613 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
19614 Adjusted paths to reflect directory reorganization.
19615
19616 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19617
19618 * doc/.cvsignore, doc/Makefile.am:
19619 Reorganized: sources in `src', documentation in `doc'.
19620
19621 1999-04-18 Jesse Thilo <jthilo@gnu.org>
19622
19623 * configure.in:
19624 Updated AC_INIT file to reflect directory reorganization.
19625
19626 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
19627 Reorganized: sources in `src', documentation in `doc'.
19628
19629 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19630
19631 * src/allocate.c:
19632 Don't declare calloc() and realloc() if not necessary.
19633
19634 1999-04-13 Jesse Thilo <jthilo@gnu.org>
19635
19636 * configure.in, acconfig.h, acinclude.m4:
19637 Don't declare calloc() and realloc() if not necessary.
19638
19639 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19640
19641 * po/.cvsignore: Added i18n support.
19642
19643 1999-03-23 Jesse Thilo <jthilo@gnu.org>
19644
19645 * acconfig.h, configure.in, Makefile.am:
19646 Added i18n support.
19647
19648 1999-03-22 Jesse Thilo <jthilo@gnu.org>
19649
19650 * src/bison.s1: Fixed #line numbers.
19651
19652 1999-03-15 Jesse Thilo <jthilo@gnu.org>
19653
19654 * po/es.po, po/fr.po, po/nl.po, po/de.po:
19655 Added PO files from Translation Project.
19656
19657 1999-03-03 Jesse Thilo <jthilo@gnu.org>
19658
19659 * Makefile.am:
19660 Added support for non-ANSI compilers (ansi2knr).
19661
19662 1999-02-16 Jesse Thilo <jthilo@gnu.org>
19663
19664 * configure.in: Bumped version number to 1.27.
19665
19666 * Makefile.am:
19667 Added `bison.simple' to list of files removed by `make distclean'.
19668
19669 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19670
19671 * src/files.c, src/files.h:
19672 Defined locations of parser files in config.h instead of Makefile.
19673
19674 1999-02-12 Jesse Thilo <jthilo@gnu.org>
19675
19676 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
19677 Defined locations of parser files in config.h instead of Makefile.
19678
19679 1999-02-09 Jesse Thilo <jthilo@gnu.org>
19680
19681 * Makefile.am:
19682 Removed inappropriate use of $< macro.
19683
19684 1999-02-05 Jesse Thilo <jthilo@gnu.org>
19685
19686 * po/Makefile.in.in, po/POTFILES.in:
19687 Add `po' directory skeleton.
19688
19689 1999-01-27 Jesse Thilo <jthilo@gnu.org>
19690
19691 * README: Document help-bison list.
19692
19693 * configure.in: Add check for mkstemp().
19694
19695 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19696
19697 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
19698 Hush a few compiler warnings.
19699
19700 * src/files.c:
19701 Add tryclose(), which verifies that fclose was successful.
19702 Hush a couple of compiler warnings.
19703
19704 1999-01-20 Jesse Thilo <jthilo@gnu.org>
19705
19706 * Makefile.am, OChangeLog:
19707 ChangeLog is now automatically generated. Include the old version as
19708 OChangeLog.
19709
19710 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19711
19712 * 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:
19713 Update FSF address.
19714
19715 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19716
19717 * doc/bison.texinfo: Fix formatting glitch.
19718
19719 * doc/bison.texinfo: Update FSF address.
19720
19721 1999-01-14 Jesse Thilo <jthilo@gnu.org>
19722
19723 * acconfig.h: Update FSF address.
19724
19725 1999-01-08 Jesse Thilo <jthilo@gnu.org>
19726
19727 * src/system.h:
19728 Don't define PACKAGE here, since config.h defines it.
19729
19730 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19731
19732 * src/reader.c: Update copyright date.
19733
19734 * src/main.c:
19735 Ditch sprintf to statically-sized buffers in fatal/warn functions in
19736 favor of output directly to stderr (avoids buffer overruns).
19737
19738 * src/reader.c: Some checks for premature EOF.
19739
19740 * 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:
19741 Use prototypes if the compiler understands them.
19742
19743 * src/files.c: Honor TMPDIR on Unix hosts.
19744 Use prototypes if the compiler understands them.
19745
19746 * src/reader.c:
19747 Fix a couple of buffer overrun bugs.
19748 Use prototypes if the compiler understands them.
19749
19750 * src/system.h: Include unistd.h and ctype.h.
19751 Use #ifdef instead of #if for NLS symbols.
19752
19753 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19754
19755 * doc/bison.texinfo:
19756 Delete comment "consider using @set for edition number, etc..." since
19757 we now are doing so.
19758
19759 1998-12-30 Jesse Thilo <jthilo@gnu.org>
19760
19761 * configure.in:
19762 Use prototypes if the compiler understands them.
19763
19764 * NEWS: Document 1.26 highlights.
19765
19766 * Makefile.am: Require Automake 1.3 or later.
19767
19768 * acconfig.h:
19769 Use prototypes if the compiler understands them.
19770
19771 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19772
19773 * src/version.c:
19774 Use VERSION symbol from automake for version number.
19775
19776 1998-12-29 Jesse Thilo <jthilo@gnu.org>
19777
19778 * acconfig.h, configure.in, version.cin:
19779 Use VERSION symbol from automake for version number.
19780
19781 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19782
19783 * Makefile.am:
19784 Distribute original version of simple parser (bison.s1), not built
19785 version (bison.simple).
19786
19787 1998-11-28 Jesse Thilo <jthilo@gnu.org>
19788
19789 * doc/bison.texinfo: Add info dir entry.
19790
19791 * doc/bison.texinfo:
19792 Let automake put version number into documentation.
19793
19794 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19795
19796 * src/bison.cld, src/build.com, src/vmshlp.mar:
19797 Add non-RCS files from /gd/gnu/bison.
19798
19799 1998-11-26 Jesse Thilo <jthilo@gnu.org>
19800
19801 * doc/bison.1:
19802 Document the BISON_HAIRY and BISON_SIMPLE variables.
19803
19804 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19805
19806 * src/version.c: Build version.c automatically.
19807
19808 * src/reader.c:
19809 Fix token numbering (used to start at 258, not 257).
19810
19811 * src/system.h: Include config.h.
19812
19813 * src/getargs.c: Update bug report address.
19814
19815 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
19816 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
19817
19818 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19819
19820 * Makefile.am:
19821 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19822
19823 * configure.in, version.cin:
19824 Build version.c automatically.
19825
19826 * AUTHORS: Add AUTHORS file.
19827
19828 * README: Update bug report address.
19829
19830 * bison.simple:
19831 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
19832
19833 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
19834 Add automake stuff.
19835
19836 1998-11-25 Jesse Thilo <jthilo@gnu.org>
19837
19838 * doc/bison.texinfo: Clean up some formatting.
19839
19840 1998-05-05 Richard Stallman <rms@gnu.org>
19841
19842 * doc/bison.texinfo:
19843 Explain better why to make a pure parser.
19844
19845 1998-01-05 Richard Stallman <rms@gnu.org>
19846
19847 * src/files.c (openfiles):
19848 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
19849 find a temporary directory, if possible. Do not unlink files while
19850 they are open.
19851
19852 1997-08-25 Richard Stallman <rms@gnu.org>
19853
19854 * src/reader.c (stack_offset;):
19855 Change some warni to warns.
19856
19857 * src/lex.c (literalchar): Use warns, not warni.
19858
19859 1997-06-28 Richard Stallman <rms@gnu.org>
19860
19861 * src/bison.s1: Add a Bison version comment.
19862
19863 * src/main.c (fatal, warn, berror):
19864 Use program_name.
19865
19866 1997-06-28 Richard Stallman <rms@gnu.org>
19867
19868 * Makefile.in (bison_version): New variable.
19869 (dist): Use that variable.
19870 (bison.s1): Substitute the Bison version into bison.simple.
19871
19872 * bison.simple: Add a Bison version comment.
19873
19874 1997-06-18 Richard Stallman <rms@gnu.org>
19875
19876 * src/main.c (fatal, warn, berror):
19877 Make error messages standard.
19878 (toomany): Improve error message text.
19879
19880 * 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:
19881 new.h renamed to alloc.h.
19882
19883 1997-06-18 Richard Stallman <rms@gnu.org>
19884
19885 * Makefile.in: new.h renamed to alloc.h.
19886
19887 1997-05-24 Richard Stallman <rms@gnu.org>
19888
19889 * src/lex.c (literalchar):
19890 Fix the code for escaping \, " and '.
19891
19892 (lex): Avoid trouble when there are many chars
19893 to discard in a char literal with just several chars in it.
19894
19895 1997-05-17 Richard Stallman <rms@gnu.org>
19896
19897 * src/bison.s1:
19898 Use malloc, if using alloca is troublesome.
19899 (YYSTACK_USE_ALLOCA): New flag macro.
19900 Define it for some systems and compilers.
19901 (YYSTACK_ALLOC): New macro.
19902 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19903 If it was malloc'd, free it.
19904
19905 1997-05-17 Richard Stallman <rms@gnu.org>
19906
19907 * bison.simple:
19908 Use malloc, if using alloca is troublesome.
19909 (YYSTACK_USE_ALLOCA): New flag macro.
19910 Define it for some systems and compilers.
19911 (YYSTACK_ALLOC): New macro.
19912 (yyparse): Use YYSTACK_ALLOC to allocate stack.
19913 If it was malloc'd, free it.
19914
19915 1997-04-23 Richard Stallman <rms@gnu.org>
19916
19917 * src/bison.s1:
19918 (alloca) [__hpux]: Always define as __builtin_alloca.
19919
19920 1997-04-23 Richard Stallman <rms@gnu.org>
19921
19922 * bison.simple:
19923 (alloca) [__hpux]: Always define as __builtin_alloca.
19924
19925 1997-04-22 Richard Stallman <rms@gnu.org>
19926
19927 * src/bison.s1:
19928 [__hpux]: Include alloca.h (right for HPUX 10)
19929 instead of declaring alloca (right for HPUX 9).
19930
19931 * src/bison.s1 (__yy_memcpy):
19932 Declare arg `count' as unsigned int.
19933 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19934
19935 1997-04-22 Richard Stallman <rms@gnu.org>
19936
19937 * bison.simple:
19938 [__hpux]: Include alloca.h (right for HPUX 10)
19939 instead of declaring alloca (right for HPUX 9).
19940
19941 * bison.simple (__yy_memcpy):
19942 Declare arg `count' as unsigned int.
19943 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
19944
19945 1997-01-03 Richard Stallman <rms@gnu.org>
19946
19947 * src/allocate.c: [__STDC__ or _MSC_VER]:
19948 Declare calloc and realloc to return void *.
19949
19950 1997-01-02 Richard Stallman <rms@gnu.org>
19951
19952 * src/system.h:
19953 [_MSC_VER]: Include stdlib.h and process.h.
19954 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
19955
19956 * src/main.c (main): Return FAILURE as a value.
19957 (printable_version): Declare arg as int, not char.
19958
19959 1997-01-02 Richard Stallman <rms@gnu.org>
19960
19961 * Makefile.in (dist):
19962 Explicitly check for symlinks, and copy them.
19963
19964 1996-12-19 Richard Stallman <rms@gnu.org>
19965
19966 * src/files.c:
19967 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
19968
19969 1996-12-18 Paul Eggert <eggert@gnu.org>
19970
19971 * src/bison.s1 (yyparse):
19972 If __GNUC__ and YYPARSE_PARAM are both defined,
19973 declare yyparse to have a void * argument.
19974
19975 1996-12-18 Paul Eggert <eggert@gnu.org>
19976
19977 * bison.simple (yyparse):
19978 If __GNUC__ and YYPARSE_PARAM are both defined,
19979 declare yyparse to have a void * argument.
19980
19981 1996-12-17 Richard Stallman <rms@gnu.org>
19982
19983 * src/reduce.c (nbits): Add some casts.
19984
19985 1996-08-12 Richard Stallman <rms@gnu.org>
19986
19987 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
19988
19989 1996-08-12 Richard Stallman <rms@gnu.org>
19990
19991 * bison.simple: Test _MSDOS as well as _MSDOS_.
19992
19993 1996-07-31 Richard Stallman <rms@gnu.org>
19994
19995 * src/bison.s1:
19996 [__sun && __i386]: Include alloca.h.
19997
19998 1996-07-31 Richard Stallman <rms@gnu.org>
19999
20000 * bison.simple:
20001 [__sun && __i386]: Include alloca.h.
20002
20003 1996-07-30 Richard Stallman <rms@gnu.org>
20004
20005 * src/bison.s1: Comment change.
20006
20007 * src/bison.s1: Test _MSDOS_, not MSDOS.
20008
20009 1996-07-30 Richard Stallman <rms@gnu.org>
20010
20011 * bison.simple: Comment change.
20012
20013 * bison.simple: Test _MSDOS_, not MSDOS.
20014
20015 1996-06-01 Richard Stallman <rms@gnu.org>
20016
20017 * 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:
20018 Insert `_' macro around many string constants.
20019
20020 * src/main.c:
20021 Insert `_' macro around many string constants.
20022
20023 (main): Call setlocale, bindtextdomain and textdomain.
20024
20025 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
20026 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
20027 [ENABLE_NLS]: Include libintl.h.
20028 [ENABLE_NLS] (gettext): Define.
20029 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
20030 (N_, PACKAGE, LOCALEDIR): New macros.
20031
20032 1996-06-01 Richard Stallman <rms@gnu.org>
20033
20034 * POTFILES.in: New file.
20035
20036 * Makefile.in (allocate.o):
20037 Define target explicitly.
20038
20039 * Makefile.in (CFLAGS): Set to @CFLAGS@.
20040 (LDFLAGS): Set to @LDFLAGS@.
20041 (configure): Run autoconf only if preceding `cd' succeeds.
20042 (bison.s1): Redirect output to temporary file then move the
20043 temporary to the target, rather than redirecting directly to bison.s1.
20044 (clean): Remove config.status and config.log.
20045 (distclean): Don't remove config.status here.
20046
20047 1996-05-12 Richard Stallman <rms@gnu.org>
20048
20049 * src/bison.s1:
20050 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20051
20052 1996-05-12 Richard Stallman <rms@gnu.org>
20053
20054 * bison.simple:
20055 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
20056
20057 1996-05-11 Richard Stallman <rms@gnu.org>
20058
20059 * src/bison.s1 (__yy_memcpy):
20060 Really reorder the args, as was supposedly done on Feb 14 1995.
20061 (yyparse): Calls changed accordingly.
20062
20063 1996-05-11 Richard Stallman <rms@gnu.org>
20064
20065 * Makefile.in (dist): Don't use $(srcdir).
20066
20067 * bison.simple (__yy_memcpy):
20068 Really reorder the args, as was supposedly done on Feb 14 1995.
20069 (yyparse): Calls changed accordingly.
20070
20071 1996-01-27 Richard Stallman <rms@gnu.org>
20072
20073 * src/output.c (output_rule_data):
20074 Test YYERROR_VERBOSE in the conditional
20075 around the definition of ttyname.
20076
20077 1995-12-29 Richard Stallman <rms@gnu.org>
20078
20079 * src/bison.s1:
20080 Fix line numbers in #line commands.
20081
20082 1995-12-29 Richard Stallman <rms@gnu.org>
20083
20084 * bison.simple:
20085 Fix line numbers in #line commands.
20086
20087 1995-12-27 Richard Stallman <rms@gnu.org>
20088
20089 * src/bison.s1 (YYPARSE_PARAM_DECL):
20090 In C++, make it always null.
20091 (YYPARSE_PARAM_ARG): New macro.
20092 (yyparse): Use YYPARSE_PARAM_ARG.
20093
20094 1995-12-27 Richard Stallman <rms@gnu.org>
20095
20096 * bison.simple (YYPARSE_PARAM_DECL):
20097 In C++, make it always null.
20098 (YYPARSE_PARAM_ARG): New macro.
20099 (yyparse): Use YYPARSE_PARAM_ARG.
20100
20101 1995-11-29 Richard Stallman <rms@gnu.org>
20102
20103 * doc/bison.texinfo:
20104 Describe literal string tokens, %raw, %no_lines, %token_table.
20105
20106 1995-11-29 Daniel Hagerty <hag@gnu.org>
20107
20108 * doc/bison.texinfo: Fixed update date
20109
20110 1995-10-16 Richard Stallman <rms@gnu.org>
20111
20112 * src/version.c: Version 1.25.
20113
20114 1995-10-16 Richard Stallman <rms@gnu.org>
20115
20116 * NEWS: *** empty log message ***
20117
20118 1995-10-16 Richard Stallman <rms@gnu.org>
20119
20120 * doc/bison.1, doc/bison.rnh:
20121 Add new options.
20122
20123 1995-10-15 Richard Stallman <rms@gnu.org>
20124
20125 * src/vmsgetargs.c, src/getargs.c:
20126 Added -n, -k, and -raw switches.
20127 (noparserflag, toknumflag, rawtoknumflag): New variables.
20128
20129 * src/symtab.h (SALIAS):
20130 New #define for adding aliases to %token.
20131 (struct bucket): Added `alias' field.
20132
20133 * src/reduce.c (reduce_grammar):
20134 Revise error message.
20135 (print_notices): Remove final `.' from error message.
20136
20137 * src/reader.c (reader_output_yylsp):
20138 New function.
20139 (readgram): Use `#if 0' around code that accepted %command
20140 inside grammar rules: The documentation doesn't allow it,
20141 and it will fail since the %command processors scan for the next %.
20142 (parse_token_decl): Extended the %token
20143 declaration to allow a multi-character symbol as an alias.
20144 (parse_thong_decl): New function.
20145 (read_declarations): Added %thong declarations.
20146 (read_declarations): Handle NOOP to deal with allowing
20147 % declarations as another means to specify the flags.
20148 (readgram): Allow %prec prior to semantics embedded in a rule.
20149 (skip_to_char, read_declarations, copy_definition)
20150 (parse_token_decl, parse_start_decl, parse_type_decl)
20151 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
20152 (get_type_name, copy_guard, copy_action, readgram)
20153 (get_type, packsymbols): Revised most error messages.
20154 Changed `fatal' to `warnxxx' to avoid aborting for error.
20155 Revised and use multiple warnxxx functions to avoid using VARARGS1.
20156 (read_declarations): Improve the error message for
20157 an invalid character. Do not abort.
20158 (read_declarations, copy_guard, copy_action): Use
20159 printable_version to avoid unprintable characters in printed output.
20160 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
20161 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
20162 Allow the type of a non-terminal can be given
20163 more than once, as long as all specifications give the same type.
20164
20165 * src/output.c:
20166 (output_headers, output_trailers, output, output_gram)
20167 (output_rule_data): Implement noparserflag variable.
20168 Implement toknumflag variable.
20169 (output): Call reader_output_yylsp to output LTYPESTR.
20170
20171 * src/main.c (main):
20172 If reader sees an error, don't process the grammar.
20173 (fatals): Updated to not use VARARGS1.
20174 (printable_version, int_to_string, warn, warni, warns, warnss)
20175 (warnsss): New error reporting functions. Avoid abort for error.
20176
20177 * src/lex.h:
20178 Added THONG and NOOP for alias processing.
20179 Added SETOPT for the new code that allows setting options with %flags.
20180
20181 * src/lex.c:
20182 Include getopt.h. Add some extern decls.
20183 (safegetc): New function to deal with EOF gracefully.
20184 (literalchar); new function to deal with reading \ escapes.
20185 (lex): Use literalchar.
20186 (lex): Implemented "..." tokens.
20187 (literalchar, lex, parse_percent_token): Made tokenbuffer
20188 always contain the token. This includes growing the token
20189 buffer while reading an integer.
20190 (parse_percent_token): Replaced if-else statement with percent_table.
20191 (parse_percent_token): Added % declarations as another
20192 way to specify the flags -n, -l, and -r. Also added hooks for
20193 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
20194 major changes to files.c.
20195 (lex) Retain in the incoming stream a character following
20196 an incorrect '/'.
20197 (skip_white_space, lex): Revised most error messages
20198 and changed fatal to warn to avoid aborting.
20199 (percent_table): Added %thong declarations.
20200
20201 * src/gram.h: Comment changes.
20202
20203 * src/files.c (openfiles, open_extra_files, done):
20204 Add faction flag
20205 and actfile file. Handle noparserflag. Both for -n switch.
20206
20207 * src/conflicts.c (resolve_sr_conflict):
20208 Remove use of alloca.
20209
20210 1995-06-01 Jim Meyering <meyering@gnu.org>
20211
20212 * doc/bison.texinfo: *** empty log message ***
20213
20214 1995-05-06 Richard Stallman <rms@gnu.org>
20215
20216 * src/bison.s1: Comment change.
20217
20218 1995-05-06 Richard Stallman <rms@gnu.org>
20219
20220 * bison.simple: Comment change.
20221
20222 1995-05-03 Richard Stallman <rms@gnu.org>
20223
20224 * src/version.c: Version now 1.24.
20225
20226 * src/bison.s1: Change distribution terms.
20227
20228 * src/version.c: Version now 1.23.
20229
20230 1995-05-03 Richard Stallman <rms@gnu.org>
20231
20232 * doc/bison.texinfo:
20233 Rewrite "Conditions for Using Bison".
20234 Update version to 1.24.
20235
20236 1995-05-03 Richard Stallman <rms@gnu.org>
20237
20238 * bison.simple: Change distribution terms.
20239
20240 1995-02-23 Richard Stallman <rms@gnu.org>
20241
20242 * src/files.c: Test __VMS_POSIX as well as VMS.
20243
20244 1995-02-14 Jim Meyering <meyering@gnu.org>
20245
20246 * src/bison.s1 (__yy_memcpy):
20247 Renamed from __yy_bcopy to avoid
20248 confusion. Reverse FROM and TO arguments to be consistent with
20249 those of memcpy.
20250
20251 1995-02-14 Jim Meyering <meyering@gnu.org>
20252
20253 * bison.simple (__yy_memcpy):
20254 Renamed from __yy_bcopy to avoid
20255 confusion. Reverse FROM and TO arguments to be consistent with
20256 those of memcpy.
20257
20258 1994-11-10 David J. MacKenzie <djm@gnu.org>
20259
20260 * NEWS: reformat
20261
20262 * NEWS: New file.
20263
20264 * Makefile.in (DISTFILES): Include NEWS.
20265
20266 * Makefile.in (DISTFILES):
20267 Include install-sh, not install.sh.
20268
20269 * configure.in: Update to Autoconf v2 macro names.
20270
20271 1994-10-05 David J. MacKenzie <djm@gnu.org>
20272
20273 * Makefile.in: fix typo
20274
20275 * Makefile.in (prefix, exec_prefix):
20276 Let configure set them.
20277
20278 1994-09-28 David J. MacKenzie <djm@gnu.org>
20279
20280 * Makefile.in: Set datadir to $(prefix)/share.
20281
20282 1994-09-15 Richard Stallman <rms@gnu.org>
20283
20284 * src/bison.s1:
20285 Update copyright notice and GPL version.
20286
20287 1994-09-15 Richard Stallman <rms@gnu.org>
20288
20289 * bison.simple:
20290 Update copyright notice and GPL version.
20291
20292 1994-07-12 Richard Stallman <rms@gnu.org>
20293
20294 * src/reduce.c, src/reader.c:
20295 entered into RCS
20296
20297 1994-05-05 David J. MacKenzie <djm@gnu.org>
20298
20299 * Makefile.in: entered into RCS
20300
20301 1994-03-26 Richard Stallman <rms@gnu.org>
20302
20303 * src/bison.s1: entered into RCS
20304
20305 1994-03-26 Richard Stallman <rms@gnu.org>
20306
20307 * bison.simple: entered into RCS
20308
20309 1994-03-25 Richard Stallman <rms@gnu.org>
20310
20311 * src/main.c: entered into RCS
20312
20313 1994-03-24 Richard Stallman <rms@gnu.org>
20314
20315 * src/conflicts.c: entered into RCS
20316
20317 1994-01-02 Richard Stallman <rms@gnu.org>
20318
20319 * Makefile.in: *** empty log message ***
20320
20321 1993-11-21 Richard Stallman <rms@gnu.org>
20322
20323 * src/bison.s1: *** empty log message ***
20324
20325 1993-11-21 Richard Stallman <rms@gnu.org>
20326
20327 * doc/bison.texinfo: entered into RCS
20328
20329 * doc/bison.texinfo: *** empty log message ***
20330
20331 1993-11-21 Richard Stallman <rms@gnu.org>
20332
20333 * bison.simple: *** empty log message ***
20334
20335 1993-10-25 David J. MacKenzie <djm@gnu.org>
20336
20337 * doc/bison.texinfo: *** empty log message ***
20338
20339 1993-10-19 Richard Stallman <rms@gnu.org>
20340
20341 * src/bison.s1: *** empty log message ***
20342
20343 1993-10-19 Richard Stallman <rms@gnu.org>
20344
20345 * bison.simple: *** empty log message ***
20346
20347 1993-10-14 Richard Stallman <rms@gnu.org>
20348
20349 * src/bison.s1: *** empty log message ***
20350
20351 1993-10-14 Richard Stallman <rms@gnu.org>
20352
20353 * bison.simple: *** empty log message ***
20354
20355 1993-09-14 David J. MacKenzie <djm@gnu.org>
20356
20357 * doc/bison.texinfo: *** empty log message ***
20358
20359 1993-09-13 Noah Friedman <friedman@gnu.org>
20360
20361 * Makefile.in: *** empty log message ***
20362
20363 1993-09-10 Richard Stallman <rms@gnu.org>
20364
20365 * src/conflicts.c: *** empty log message ***
20366
20367 * src/system.h: entered into RCS
20368
20369 1993-09-10 Richard Stallman <rms@gnu.org>
20370
20371 * doc/bison.1: entered into RCS
20372
20373 1993-09-06 Noah Friedman <friedman@gnu.org>
20374
20375 * src/version.c: entered into RCS
20376
20377 1993-09-06 Noah Friedman <friedman@gnu.org>
20378
20379 * Makefile.in: *** empty log message ***
20380
20381 1993-07-30 David J. MacKenzie <djm@gnu.org>
20382
20383 * Makefile.in: *** empty log message ***
20384
20385 1993-07-24 Richard Stallman <rms@gnu.org>
20386
20387 * src/bison.s1: *** empty log message ***
20388
20389 1993-07-24 Richard Stallman <rms@gnu.org>
20390
20391 * bison.simple: *** empty log message ***
20392
20393 1993-07-08 David J. MacKenzie <djm@gnu.org>
20394
20395 * Makefile.in: *** empty log message ***
20396
20397 1993-07-04 Richard Stallman <rms@gnu.org>
20398
20399 * src/bison.s1: *** empty log message ***
20400
20401 1993-07-04 Richard Stallman <rms@gnu.org>
20402
20403 * bison.simple: *** empty log message ***
20404
20405 1993-06-26 David J. MacKenzie <djm@gnu.org>
20406
20407 * src/getargs.c: entered into RCS
20408
20409 1993-06-26 David J. MacKenzie <djm@gnu.org>
20410
20411 * doc/bison.texinfo: *** empty log message ***
20412
20413 * doc/bison.1: New file.
20414
20415 1993-06-25 Richard Stallman <rms@gnu.org>
20416
20417 * src/getargs.c: New file.
20418
20419 1993-06-16 Richard Stallman <rms@gnu.org>
20420
20421 * src/bison.s1: *** empty log message ***
20422
20423 1993-06-16 Richard Stallman <rms@gnu.org>
20424
20425 * bison.simple: *** empty log message ***
20426
20427 1993-06-03 Richard Stallman <rms@gnu.org>
20428
20429 * src/bison.s1: New file.
20430
20431 1993-06-03 Richard Stallman <rms@gnu.org>
20432
20433 * doc/bison.texinfo: *** empty log message ***
20434
20435 1993-06-03 Richard Stallman <rms@gnu.org>
20436
20437 * bison.simple: New file.
20438
20439 1993-05-19 Richard Stallman <rms@gnu.org>
20440
20441 * doc/bison.texinfo: New file.
20442
20443 1993-05-07 Noah Friedman <friedman@gnu.org>
20444
20445 * Makefile.in: *** empty log message ***
20446
20447 1993-04-28 Noah Friedman <friedman@gnu.org>
20448
20449 * src/reader.c: *** empty log message ***
20450
20451 1993-04-23 Noah Friedman <friedman@gnu.org>
20452
20453 * src/alloc.h: entered into RCS
20454
20455 1993-04-20 David J. MacKenzie <djm@gnu.org>
20456
20457 * src/version.c: *** empty log message ***
20458
20459 * src/files.c, src/allocate.c:
20460 entered into RCS
20461
20462 * src/reader.c: *** empty log message ***
20463
20464 * src/lex.c: entered into RCS
20465
20466 * src/conflicts.c: New file.
20467
20468 * src/symtab.c: entered into RCS
20469
20470 * src/alloc.h: New file.
20471
20472 * src/LR0.c: entered into RCS
20473
20474 1993-04-18 Noah Friedman <friedman@gnu.org>
20475
20476 * src/reader.c: New file.
20477
20478 * src/version.c: *** empty log message ***
20479
20480 1993-04-18 Noah Friedman <friedman@gnu.org>
20481
20482 * Makefile.in: *** empty log message ***
20483
20484 1993-04-17 Noah Friedman <friedman@gnu.org>
20485
20486 * Makefile.in: *** empty log message ***
20487
20488 1993-04-15 Richard Stallman <rms@gnu.org>
20489
20490 * src/main.c, src/files.c:
20491 New file.
20492
20493 1993-04-15 Noah Friedman <friedman@gnu.org>
20494
20495 * configure.in: entered into RCS
20496
20497 * configure.in: *** empty log message ***
20498
20499 * configure.in: New file.
20500
20501 1993-04-14 Richard Stallman <rms@gnu.org>
20502
20503 * Makefile.in: New file.
20504
20505 1993-04-13 Richard Stallman <rms@gnu.org>
20506
20507 * src/version.c: New file.
20508
20509 1993-03-25 Richard Stallman <rms@gnu.org>
20510
20511 * src/output.c: entered into RCS
20512
20513 1992-09-25 Richard Stallman <rms@gnu.org>
20514
20515 * configure.bat: entered into RCS
20516
20517 1992-06-22 Richard Stallman <rms@gnu.org>
20518
20519 * src/vmsgetargs.c: entered into RCS
20520
20521 1992-06-22 Richard Stallman <rms@gnu.org>
20522
20523 * doc/bison.rnh: entered into RCS
20524
20525 1992-04-20 David J. MacKenzie <djm@gnu.org>
20526
20527 * README: entered into RCS
20528
20529 1992-01-22 Richard Stallman <rms@gnu.org>
20530
20531 * src/machine.h: entered into RCS
20532
20533 1991-12-21 Richard Stallman <rms@gnu.org>
20534
20535 * src/lalr.c, src/closure.c:
20536 entered into RCS
20537
20538 1991-12-20 Richard Stallman <rms@gnu.org>
20539
20540 * src/state.h: entered into RCS
20541
20542 1991-12-18 Richard Stallman <rms@gnu.org>
20543
20544 * src/print.c, src/nullable.c, src/derives.c:
20545 entered into RCS
20546
20547 1991-11-03 David J. MacKenzie <djm@gnu.org>
20548
20549 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
20550 entered into RCS
20551
20552 1988-09-09 Richard Stallman <rms@gnu.org>
20553
20554 * src/bison.hairy: entered into RCS
20555
20556 1987-12-16 Richard Stallman <rms@gnu.org>
20557
20558 * REFERENCES: entered into RCS
20559
20560
20561 -----
20562
20563 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
20564 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
20565 Free Software Foundation, Inc.
20566
20567 Copying and distribution of this file, with or without
20568 modification, are permitted provided the copyright notice and this
20569 notice are preserved.
20570
20571 $Id$